@google-cloud/pubsub 4.11.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +2 -2
  2. package/build/protos/google/pubsub/v1/pubsub.proto +144 -29
  3. package/build/protos/google/pubsub/v1/schema.proto +2 -3
  4. package/build/protos/protos.d.ts +477 -11
  5. package/build/protos/protos.js +1681 -151
  6. package/build/protos/protos.json +203 -28
  7. package/build/src/debug.js +2 -0
  8. package/build/src/debug.js.map +1 -1
  9. package/build/src/default-options.d.ts +2 -2
  10. package/build/src/default-options.js +3 -3
  11. package/build/src/default-options.js.map +1 -1
  12. package/build/src/exponential-retry.js +4 -1
  13. package/build/src/exponential-retry.js.map +1 -1
  14. package/build/src/histogram.js +3 -0
  15. package/build/src/histogram.js.map +1 -1
  16. package/build/src/iam.js +3 -0
  17. package/build/src/iam.js.map +1 -1
  18. package/build/src/index.d.ts +0 -2
  19. package/build/src/index.js +1 -5
  20. package/build/src/index.js.map +1 -1
  21. package/build/src/lease-manager.d.ts +0 -3
  22. package/build/src/lease-manager.js +14 -19
  23. package/build/src/lease-manager.js.map +1 -1
  24. package/build/src/message-queues.js +31 -23
  25. package/build/src/message-queues.js.map +1 -1
  26. package/build/src/message-stream.js +13 -4
  27. package/build/src/message-stream.js.map +1 -1
  28. package/build/src/publisher/flow-control.js +4 -1
  29. package/build/src/publisher/flow-control.js.map +1 -1
  30. package/build/src/publisher/flow-publisher.js +5 -2
  31. package/build/src/publisher/flow-publisher.js.map +1 -1
  32. package/build/src/publisher/index.d.ts +0 -2
  33. package/build/src/publisher/index.js +9 -6
  34. package/build/src/publisher/index.js.map +1 -1
  35. package/build/src/publisher/message-batch.d.ts +0 -11
  36. package/build/src/publisher/message-batch.js +13 -1
  37. package/build/src/publisher/message-batch.js.map +1 -1
  38. package/build/src/publisher/message-queues.js +10 -3
  39. package/build/src/publisher/message-queues.js.map +1 -1
  40. package/build/src/publisher/publish-error.js +5 -0
  41. package/build/src/publisher/publish-error.js.map +1 -1
  42. package/build/src/publisher/pubsub-message.d.ts +0 -68
  43. package/build/src/pubsub.js +14 -5
  44. package/build/src/pubsub.js.map +1 -1
  45. package/build/src/schema.js +3 -0
  46. package/build/src/schema.js.map +1 -1
  47. package/build/src/snapshot.js +3 -0
  48. package/build/src/snapshot.js.map +1 -1
  49. package/build/src/subscriber.d.ts +11 -15
  50. package/build/src/subscriber.js +84 -26
  51. package/build/src/subscriber.js.map +1 -1
  52. package/build/src/subscription.js +11 -2
  53. package/build/src/subscription.js.map +1 -1
  54. package/build/src/telemetry-tracing.d.ts +2 -220
  55. package/build/src/telemetry-tracing.js +52 -121
  56. package/build/src/telemetry-tracing.js.map +1 -1
  57. package/build/src/temporal.js +8 -8
  58. package/build/src/temporal.js.map +1 -1
  59. package/build/src/topic.js +8 -1
  60. package/build/src/topic.js.map +1 -1
  61. package/build/src/util.js +3 -2
  62. package/build/src/util.js.map +1 -1
  63. package/build/src/v1/publisher_client.d.ts +8 -4
  64. package/build/src/v1/publisher_client.js +228 -78
  65. package/build/src/v1/publisher_client.js.map +1 -1
  66. package/build/src/v1/publisher_proto_list.json +4 -0
  67. package/build/src/v1/schema_service_client.d.ts +4 -3
  68. package/build/src/v1/schema_service_client.js +233 -73
  69. package/build/src/v1/schema_service_client.js.map +1 -1
  70. package/build/src/v1/schema_service_proto_list.json +4 -0
  71. package/build/src/v1/subscriber_client.d.ts +11 -7
  72. package/build/src/v1/subscriber_client.js +324 -96
  73. package/build/src/v1/subscriber_client.js.map +1 -1
  74. package/build/src/v1/subscriber_proto_list.json +4 -0
  75. package/package.json +45 -47
  76. package/CHANGELOG.md +0 -1606
@@ -1708,6 +1708,9 @@ export namespace google {
1708
1708
 
1709
1709
  /** IngestionFailureEvent confluentCloudFailure */
1710
1710
  confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null);
1711
+
1712
+ /** IngestionFailureEvent awsKinesisFailure */
1713
+ awsKinesisFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null);
1711
1714
  }
1712
1715
 
1713
1716
  /** Represents an IngestionFailureEvent. */
@@ -1737,8 +1740,11 @@ export namespace google {
1737
1740
  /** IngestionFailureEvent confluentCloudFailure. */
1738
1741
  public confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null);
1739
1742
 
1743
+ /** IngestionFailureEvent awsKinesisFailure. */
1744
+ public awsKinesisFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null);
1745
+
1740
1746
  /** IngestionFailureEvent failure. */
1741
- public failure?: ("cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure");
1747
+ public failure?: ("cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|"awsKinesisFailure");
1742
1748
 
1743
1749
  /**
1744
1750
  * Creates a new IngestionFailureEvent instance using the specified properties.
@@ -2002,6 +2008,97 @@ export namespace google {
2002
2008
  public static getTypeUrl(typeUrlPrefix?: string): string;
2003
2009
  }
2004
2010
 
2011
+ /** Properties of a SchemaViolationReason. */
2012
+ interface ISchemaViolationReason {
2013
+ }
2014
+
2015
+ /** Represents a SchemaViolationReason. */
2016
+ class SchemaViolationReason implements ISchemaViolationReason {
2017
+
2018
+ /**
2019
+ * Constructs a new SchemaViolationReason.
2020
+ * @param [properties] Properties to set
2021
+ */
2022
+ constructor(properties?: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason);
2023
+
2024
+ /**
2025
+ * Creates a new SchemaViolationReason instance using the specified properties.
2026
+ * @param [properties] Properties to set
2027
+ * @returns SchemaViolationReason instance
2028
+ */
2029
+ public static create(properties?: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason;
2030
+
2031
+ /**
2032
+ * Encodes the specified SchemaViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages.
2033
+ * @param message SchemaViolationReason message or plain object to encode
2034
+ * @param [writer] Writer to encode to
2035
+ * @returns Writer
2036
+ */
2037
+ public static encode(message: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason, writer?: $protobuf.Writer): $protobuf.Writer;
2038
+
2039
+ /**
2040
+ * Encodes the specified SchemaViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages.
2041
+ * @param message SchemaViolationReason message or plain object to encode
2042
+ * @param [writer] Writer to encode to
2043
+ * @returns Writer
2044
+ */
2045
+ public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason, writer?: $protobuf.Writer): $protobuf.Writer;
2046
+
2047
+ /**
2048
+ * Decodes a SchemaViolationReason message from the specified reader or buffer.
2049
+ * @param reader Reader or buffer to decode from
2050
+ * @param [length] Message length if known beforehand
2051
+ * @returns SchemaViolationReason
2052
+ * @throws {Error} If the payload is not a reader or valid buffer
2053
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2054
+ */
2055
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason;
2056
+
2057
+ /**
2058
+ * Decodes a SchemaViolationReason message from the specified reader or buffer, length delimited.
2059
+ * @param reader Reader or buffer to decode from
2060
+ * @returns SchemaViolationReason
2061
+ * @throws {Error} If the payload is not a reader or valid buffer
2062
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2063
+ */
2064
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason;
2065
+
2066
+ /**
2067
+ * Verifies a SchemaViolationReason message.
2068
+ * @param message Plain object to verify
2069
+ * @returns `null` if valid, otherwise the reason why it is not
2070
+ */
2071
+ public static verify(message: { [k: string]: any }): (string|null);
2072
+
2073
+ /**
2074
+ * Creates a SchemaViolationReason message from a plain object. Also converts values to their respective internal types.
2075
+ * @param object Plain object
2076
+ * @returns SchemaViolationReason
2077
+ */
2078
+ public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason;
2079
+
2080
+ /**
2081
+ * Creates a plain object from a SchemaViolationReason message. Also converts values to other types if specified.
2082
+ * @param message SchemaViolationReason
2083
+ * @param [options] Conversion options
2084
+ * @returns Plain object
2085
+ */
2086
+ public static toObject(message: google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, options?: $protobuf.IConversionOptions): { [k: string]: any };
2087
+
2088
+ /**
2089
+ * Converts this SchemaViolationReason to JSON.
2090
+ * @returns JSON object
2091
+ */
2092
+ public toJSON(): { [k: string]: any };
2093
+
2094
+ /**
2095
+ * Gets the default type url for SchemaViolationReason
2096
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2097
+ * @returns The default type url
2098
+ */
2099
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2100
+ }
2101
+
2005
2102
  /** Properties of a CloudStorageFailure. */
2006
2103
  interface ICloudStorageFailure {
2007
2104
 
@@ -2019,6 +2116,9 @@ export namespace google {
2019
2116
 
2020
2117
  /** CloudStorageFailure apiViolationReason */
2021
2118
  apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2119
+
2120
+ /** CloudStorageFailure schemaViolationReason */
2121
+ schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2022
2122
  }
2023
2123
 
2024
2124
  /** Represents a CloudStorageFailure. */
@@ -2045,8 +2145,11 @@ export namespace google {
2045
2145
  /** CloudStorageFailure apiViolationReason. */
2046
2146
  public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2047
2147
 
2148
+ /** CloudStorageFailure schemaViolationReason. */
2149
+ public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2150
+
2048
2151
  /** CloudStorageFailure reason. */
2049
- public reason?: ("avroFailureReason"|"apiViolationReason");
2152
+ public reason?: ("avroFailureReason"|"apiViolationReason"|"schemaViolationReason");
2050
2153
 
2051
2154
  /**
2052
2155
  * Creates a new CloudStorageFailure instance using the specified properties.
@@ -2143,6 +2246,9 @@ export namespace google {
2143
2246
 
2144
2247
  /** AwsMskFailureReason apiViolationReason */
2145
2248
  apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2249
+
2250
+ /** AwsMskFailureReason schemaViolationReason */
2251
+ schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2146
2252
  }
2147
2253
 
2148
2254
  /** Represents an AwsMskFailureReason. */
@@ -2169,8 +2275,11 @@ export namespace google {
2169
2275
  /** AwsMskFailureReason apiViolationReason. */
2170
2276
  public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2171
2277
 
2278
+ /** AwsMskFailureReason schemaViolationReason. */
2279
+ public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2280
+
2172
2281
  /** AwsMskFailureReason reason. */
2173
- public reason?: "apiViolationReason";
2282
+ public reason?: ("apiViolationReason"|"schemaViolationReason");
2174
2283
 
2175
2284
  /**
2176
2285
  * Creates a new AwsMskFailureReason instance using the specified properties.
@@ -2267,6 +2376,9 @@ export namespace google {
2267
2376
 
2268
2377
  /** AzureEventHubsFailureReason apiViolationReason */
2269
2378
  apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2379
+
2380
+ /** AzureEventHubsFailureReason schemaViolationReason */
2381
+ schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2270
2382
  }
2271
2383
 
2272
2384
  /** Represents an AzureEventHubsFailureReason. */
@@ -2293,8 +2405,11 @@ export namespace google {
2293
2405
  /** AzureEventHubsFailureReason apiViolationReason. */
2294
2406
  public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2295
2407
 
2408
+ /** AzureEventHubsFailureReason schemaViolationReason. */
2409
+ public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2410
+
2296
2411
  /** AzureEventHubsFailureReason reason. */
2297
- public reason?: "apiViolationReason";
2412
+ public reason?: ("apiViolationReason"|"schemaViolationReason");
2298
2413
 
2299
2414
  /**
2300
2415
  * Creates a new AzureEventHubsFailureReason instance using the specified properties.
@@ -2391,6 +2506,9 @@ export namespace google {
2391
2506
 
2392
2507
  /** ConfluentCloudFailureReason apiViolationReason */
2393
2508
  apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2509
+
2510
+ /** ConfluentCloudFailureReason schemaViolationReason */
2511
+ schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2394
2512
  }
2395
2513
 
2396
2514
  /** Represents a ConfluentCloudFailureReason. */
@@ -2417,8 +2535,11 @@ export namespace google {
2417
2535
  /** ConfluentCloudFailureReason apiViolationReason. */
2418
2536
  public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null);
2419
2537
 
2538
+ /** ConfluentCloudFailureReason schemaViolationReason. */
2539
+ public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2540
+
2420
2541
  /** ConfluentCloudFailureReason reason. */
2421
- public reason?: "apiViolationReason";
2542
+ public reason?: ("apiViolationReason"|"schemaViolationReason");
2422
2543
 
2423
2544
  /**
2424
2545
  * Creates a new ConfluentCloudFailureReason instance using the specified properties.
@@ -2497,6 +2618,339 @@ export namespace google {
2497
2618
  */
2498
2619
  public static getTypeUrl(typeUrlPrefix?: string): string;
2499
2620
  }
2621
+
2622
+ /** Properties of an AwsKinesisFailureReason. */
2623
+ interface IAwsKinesisFailureReason {
2624
+
2625
+ /** AwsKinesisFailureReason streamArn */
2626
+ streamArn?: (string|null);
2627
+
2628
+ /** AwsKinesisFailureReason partitionKey */
2629
+ partitionKey?: (string|null);
2630
+
2631
+ /** AwsKinesisFailureReason sequenceNumber */
2632
+ sequenceNumber?: (string|null);
2633
+
2634
+ /** AwsKinesisFailureReason schemaViolationReason */
2635
+ schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2636
+ }
2637
+
2638
+ /** Represents an AwsKinesisFailureReason. */
2639
+ class AwsKinesisFailureReason implements IAwsKinesisFailureReason {
2640
+
2641
+ /**
2642
+ * Constructs a new AwsKinesisFailureReason.
2643
+ * @param [properties] Properties to set
2644
+ */
2645
+ constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason);
2646
+
2647
+ /** AwsKinesisFailureReason streamArn. */
2648
+ public streamArn: string;
2649
+
2650
+ /** AwsKinesisFailureReason partitionKey. */
2651
+ public partitionKey: string;
2652
+
2653
+ /** AwsKinesisFailureReason sequenceNumber. */
2654
+ public sequenceNumber: string;
2655
+
2656
+ /** AwsKinesisFailureReason schemaViolationReason. */
2657
+ public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null);
2658
+
2659
+ /** AwsKinesisFailureReason reason. */
2660
+ public reason?: "schemaViolationReason";
2661
+
2662
+ /**
2663
+ * Creates a new AwsKinesisFailureReason instance using the specified properties.
2664
+ * @param [properties] Properties to set
2665
+ * @returns AwsKinesisFailureReason instance
2666
+ */
2667
+ public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason;
2668
+
2669
+ /**
2670
+ * Encodes the specified AwsKinesisFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages.
2671
+ * @param message AwsKinesisFailureReason message or plain object to encode
2672
+ * @param [writer] Writer to encode to
2673
+ * @returns Writer
2674
+ */
2675
+ public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason, writer?: $protobuf.Writer): $protobuf.Writer;
2676
+
2677
+ /**
2678
+ * Encodes the specified AwsKinesisFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages.
2679
+ * @param message AwsKinesisFailureReason message or plain object to encode
2680
+ * @param [writer] Writer to encode to
2681
+ * @returns Writer
2682
+ */
2683
+ public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason, writer?: $protobuf.Writer): $protobuf.Writer;
2684
+
2685
+ /**
2686
+ * Decodes an AwsKinesisFailureReason message from the specified reader or buffer.
2687
+ * @param reader Reader or buffer to decode from
2688
+ * @param [length] Message length if known beforehand
2689
+ * @returns AwsKinesisFailureReason
2690
+ * @throws {Error} If the payload is not a reader or valid buffer
2691
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2692
+ */
2693
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason;
2694
+
2695
+ /**
2696
+ * Decodes an AwsKinesisFailureReason message from the specified reader or buffer, length delimited.
2697
+ * @param reader Reader or buffer to decode from
2698
+ * @returns AwsKinesisFailureReason
2699
+ * @throws {Error} If the payload is not a reader or valid buffer
2700
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2701
+ */
2702
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason;
2703
+
2704
+ /**
2705
+ * Verifies an AwsKinesisFailureReason message.
2706
+ * @param message Plain object to verify
2707
+ * @returns `null` if valid, otherwise the reason why it is not
2708
+ */
2709
+ public static verify(message: { [k: string]: any }): (string|null);
2710
+
2711
+ /**
2712
+ * Creates an AwsKinesisFailureReason message from a plain object. Also converts values to their respective internal types.
2713
+ * @param object Plain object
2714
+ * @returns AwsKinesisFailureReason
2715
+ */
2716
+ public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason;
2717
+
2718
+ /**
2719
+ * Creates a plain object from an AwsKinesisFailureReason message. Also converts values to other types if specified.
2720
+ * @param message AwsKinesisFailureReason
2721
+ * @param [options] Conversion options
2722
+ * @returns Plain object
2723
+ */
2724
+ public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any };
2725
+
2726
+ /**
2727
+ * Converts this AwsKinesisFailureReason to JSON.
2728
+ * @returns JSON object
2729
+ */
2730
+ public toJSON(): { [k: string]: any };
2731
+
2732
+ /**
2733
+ * Gets the default type url for AwsKinesisFailureReason
2734
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2735
+ * @returns The default type url
2736
+ */
2737
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2738
+ }
2739
+ }
2740
+
2741
+ /** Properties of a JavaScriptUDF. */
2742
+ interface IJavaScriptUDF {
2743
+
2744
+ /** JavaScriptUDF functionName */
2745
+ functionName?: (string|null);
2746
+
2747
+ /** JavaScriptUDF code */
2748
+ code?: (string|null);
2749
+ }
2750
+
2751
+ /** Represents a JavaScriptUDF. */
2752
+ class JavaScriptUDF implements IJavaScriptUDF {
2753
+
2754
+ /**
2755
+ * Constructs a new JavaScriptUDF.
2756
+ * @param [properties] Properties to set
2757
+ */
2758
+ constructor(properties?: google.pubsub.v1.IJavaScriptUDF);
2759
+
2760
+ /** JavaScriptUDF functionName. */
2761
+ public functionName: string;
2762
+
2763
+ /** JavaScriptUDF code. */
2764
+ public code: string;
2765
+
2766
+ /**
2767
+ * Creates a new JavaScriptUDF instance using the specified properties.
2768
+ * @param [properties] Properties to set
2769
+ * @returns JavaScriptUDF instance
2770
+ */
2771
+ public static create(properties?: google.pubsub.v1.IJavaScriptUDF): google.pubsub.v1.JavaScriptUDF;
2772
+
2773
+ /**
2774
+ * Encodes the specified JavaScriptUDF message. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages.
2775
+ * @param message JavaScriptUDF message or plain object to encode
2776
+ * @param [writer] Writer to encode to
2777
+ * @returns Writer
2778
+ */
2779
+ public static encode(message: google.pubsub.v1.IJavaScriptUDF, writer?: $protobuf.Writer): $protobuf.Writer;
2780
+
2781
+ /**
2782
+ * Encodes the specified JavaScriptUDF message, length delimited. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages.
2783
+ * @param message JavaScriptUDF message or plain object to encode
2784
+ * @param [writer] Writer to encode to
2785
+ * @returns Writer
2786
+ */
2787
+ public static encodeDelimited(message: google.pubsub.v1.IJavaScriptUDF, writer?: $protobuf.Writer): $protobuf.Writer;
2788
+
2789
+ /**
2790
+ * Decodes a JavaScriptUDF message from the specified reader or buffer.
2791
+ * @param reader Reader or buffer to decode from
2792
+ * @param [length] Message length if known beforehand
2793
+ * @returns JavaScriptUDF
2794
+ * @throws {Error} If the payload is not a reader or valid buffer
2795
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2796
+ */
2797
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.JavaScriptUDF;
2798
+
2799
+ /**
2800
+ * Decodes a JavaScriptUDF message from the specified reader or buffer, length delimited.
2801
+ * @param reader Reader or buffer to decode from
2802
+ * @returns JavaScriptUDF
2803
+ * @throws {Error} If the payload is not a reader or valid buffer
2804
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2805
+ */
2806
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.JavaScriptUDF;
2807
+
2808
+ /**
2809
+ * Verifies a JavaScriptUDF message.
2810
+ * @param message Plain object to verify
2811
+ * @returns `null` if valid, otherwise the reason why it is not
2812
+ */
2813
+ public static verify(message: { [k: string]: any }): (string|null);
2814
+
2815
+ /**
2816
+ * Creates a JavaScriptUDF message from a plain object. Also converts values to their respective internal types.
2817
+ * @param object Plain object
2818
+ * @returns JavaScriptUDF
2819
+ */
2820
+ public static fromObject(object: { [k: string]: any }): google.pubsub.v1.JavaScriptUDF;
2821
+
2822
+ /**
2823
+ * Creates a plain object from a JavaScriptUDF message. Also converts values to other types if specified.
2824
+ * @param message JavaScriptUDF
2825
+ * @param [options] Conversion options
2826
+ * @returns Plain object
2827
+ */
2828
+ public static toObject(message: google.pubsub.v1.JavaScriptUDF, options?: $protobuf.IConversionOptions): { [k: string]: any };
2829
+
2830
+ /**
2831
+ * Converts this JavaScriptUDF to JSON.
2832
+ * @returns JSON object
2833
+ */
2834
+ public toJSON(): { [k: string]: any };
2835
+
2836
+ /**
2837
+ * Gets the default type url for JavaScriptUDF
2838
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2839
+ * @returns The default type url
2840
+ */
2841
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2842
+ }
2843
+
2844
+ /** Properties of a MessageTransform. */
2845
+ interface IMessageTransform {
2846
+
2847
+ /** MessageTransform javascriptUdf */
2848
+ javascriptUdf?: (google.pubsub.v1.IJavaScriptUDF|null);
2849
+
2850
+ /** MessageTransform enabled */
2851
+ enabled?: (boolean|null);
2852
+
2853
+ /** MessageTransform disabled */
2854
+ disabled?: (boolean|null);
2855
+ }
2856
+
2857
+ /** Represents a MessageTransform. */
2858
+ class MessageTransform implements IMessageTransform {
2859
+
2860
+ /**
2861
+ * Constructs a new MessageTransform.
2862
+ * @param [properties] Properties to set
2863
+ */
2864
+ constructor(properties?: google.pubsub.v1.IMessageTransform);
2865
+
2866
+ /** MessageTransform javascriptUdf. */
2867
+ public javascriptUdf?: (google.pubsub.v1.IJavaScriptUDF|null);
2868
+
2869
+ /** MessageTransform enabled. */
2870
+ public enabled: boolean;
2871
+
2872
+ /** MessageTransform disabled. */
2873
+ public disabled: boolean;
2874
+
2875
+ /** MessageTransform transform. */
2876
+ public transform?: "javascriptUdf";
2877
+
2878
+ /**
2879
+ * Creates a new MessageTransform instance using the specified properties.
2880
+ * @param [properties] Properties to set
2881
+ * @returns MessageTransform instance
2882
+ */
2883
+ public static create(properties?: google.pubsub.v1.IMessageTransform): google.pubsub.v1.MessageTransform;
2884
+
2885
+ /**
2886
+ * Encodes the specified MessageTransform message. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages.
2887
+ * @param message MessageTransform message or plain object to encode
2888
+ * @param [writer] Writer to encode to
2889
+ * @returns Writer
2890
+ */
2891
+ public static encode(message: google.pubsub.v1.IMessageTransform, writer?: $protobuf.Writer): $protobuf.Writer;
2892
+
2893
+ /**
2894
+ * Encodes the specified MessageTransform message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages.
2895
+ * @param message MessageTransform message or plain object to encode
2896
+ * @param [writer] Writer to encode to
2897
+ * @returns Writer
2898
+ */
2899
+ public static encodeDelimited(message: google.pubsub.v1.IMessageTransform, writer?: $protobuf.Writer): $protobuf.Writer;
2900
+
2901
+ /**
2902
+ * Decodes a MessageTransform message from the specified reader or buffer.
2903
+ * @param reader Reader or buffer to decode from
2904
+ * @param [length] Message length if known beforehand
2905
+ * @returns MessageTransform
2906
+ * @throws {Error} If the payload is not a reader or valid buffer
2907
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2908
+ */
2909
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.MessageTransform;
2910
+
2911
+ /**
2912
+ * Decodes a MessageTransform message from the specified reader or buffer, length delimited.
2913
+ * @param reader Reader or buffer to decode from
2914
+ * @returns MessageTransform
2915
+ * @throws {Error} If the payload is not a reader or valid buffer
2916
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2917
+ */
2918
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.MessageTransform;
2919
+
2920
+ /**
2921
+ * Verifies a MessageTransform message.
2922
+ * @param message Plain object to verify
2923
+ * @returns `null` if valid, otherwise the reason why it is not
2924
+ */
2925
+ public static verify(message: { [k: string]: any }): (string|null);
2926
+
2927
+ /**
2928
+ * Creates a MessageTransform message from a plain object. Also converts values to their respective internal types.
2929
+ * @param object Plain object
2930
+ * @returns MessageTransform
2931
+ */
2932
+ public static fromObject(object: { [k: string]: any }): google.pubsub.v1.MessageTransform;
2933
+
2934
+ /**
2935
+ * Creates a plain object from a MessageTransform message. Also converts values to other types if specified.
2936
+ * @param message MessageTransform
2937
+ * @param [options] Conversion options
2938
+ * @returns Plain object
2939
+ */
2940
+ public static toObject(message: google.pubsub.v1.MessageTransform, options?: $protobuf.IConversionOptions): { [k: string]: any };
2941
+
2942
+ /**
2943
+ * Converts this MessageTransform to JSON.
2944
+ * @returns JSON object
2945
+ */
2946
+ public toJSON(): { [k: string]: any };
2947
+
2948
+ /**
2949
+ * Gets the default type url for MessageTransform
2950
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2951
+ * @returns The default type url
2952
+ */
2953
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2500
2954
  }
2501
2955
 
2502
2956
  /** Properties of a Topic. */
@@ -2528,6 +2982,9 @@ export namespace google {
2528
2982
 
2529
2983
  /** Topic ingestionDataSourceSettings */
2530
2984
  ingestionDataSourceSettings?: (google.pubsub.v1.IIngestionDataSourceSettings|null);
2985
+
2986
+ /** Topic messageTransforms */
2987
+ messageTransforms?: (google.pubsub.v1.IMessageTransform[]|null);
2531
2988
  }
2532
2989
 
2533
2990
  /** Represents a Topic. */
@@ -2566,6 +3023,9 @@ export namespace google {
2566
3023
  /** Topic ingestionDataSourceSettings. */
2567
3024
  public ingestionDataSourceSettings?: (google.pubsub.v1.IIngestionDataSourceSettings|null);
2568
3025
 
3026
+ /** Topic messageTransforms. */
3027
+ public messageTransforms: google.pubsub.v1.IMessageTransform[];
3028
+
2569
3029
  /**
2570
3030
  * Creates a new Topic instance using the specified properties.
2571
3031
  * @param [properties] Properties to set
@@ -2658,7 +3118,7 @@ export namespace google {
2658
3118
  interface IPubsubMessage {
2659
3119
 
2660
3120
  /** PubsubMessage data */
2661
- data?: (Uint8Array|string|null);
3121
+ data?: (Uint8Array|Buffer|string|null);
2662
3122
 
2663
3123
  /** PubsubMessage attributes */
2664
3124
  attributes?: ({ [k: string]: string }|null);
@@ -2683,7 +3143,7 @@ export namespace google {
2683
3143
  constructor(properties?: google.pubsub.v1.IPubsubMessage);
2684
3144
 
2685
3145
  /** PubsubMessage data. */
2686
- public data: (Uint8Array|string);
3146
+ public data: (Uint8Array|Buffer|string);
2687
3147
 
2688
3148
  /** PubsubMessage attributes. */
2689
3149
  public attributes: { [k: string]: string };
@@ -4515,6 +4975,9 @@ export namespace google {
4515
4975
 
4516
4976
  /** Subscription analyticsHubSubscriptionInfo */
4517
4977
  analyticsHubSubscriptionInfo?: (google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null);
4978
+
4979
+ /** Subscription messageTransforms */
4980
+ messageTransforms?: (google.pubsub.v1.IMessageTransform[]|null);
4518
4981
  }
4519
4982
 
4520
4983
  /** Represents a Subscription. */
@@ -4583,6 +5046,9 @@ export namespace google {
4583
5046
  /** Subscription analyticsHubSubscriptionInfo. */
4584
5047
  public analyticsHubSubscriptionInfo?: (google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null);
4585
5048
 
5049
+ /** Subscription messageTransforms. */
5050
+ public messageTransforms: google.pubsub.v1.IMessageTransform[];
5051
+
4586
5052
  /**
4587
5053
  * Creates a new Subscription instance using the specified properties.
4588
5054
  * @param [properties] Properties to set
@@ -10303,7 +10769,7 @@ export namespace google {
10303
10769
  schema?: (google.pubsub.v1.ISchema|null);
10304
10770
 
10305
10771
  /** ValidateMessageRequest message */
10306
- message?: (Uint8Array|string|null);
10772
+ message?: (Uint8Array|Buffer|string|null);
10307
10773
 
10308
10774
  /** ValidateMessageRequest encoding */
10309
10775
  encoding?: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding|null);
@@ -10328,7 +10794,7 @@ export namespace google {
10328
10794
  public schema?: (google.pubsub.v1.ISchema|null);
10329
10795
 
10330
10796
  /** ValidateMessageRequest message. */
10331
- public message: (Uint8Array|string);
10797
+ public message: (Uint8Array|Buffer|string);
10332
10798
 
10333
10799
  /** ValidateMessageRequest encoding. */
10334
10800
  public encoding: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding);
@@ -15684,7 +16150,7 @@ export namespace google {
15684
16150
  doubleValue?: (number|null);
15685
16151
 
15686
16152
  /** UninterpretedOption stringValue */
15687
- stringValue?: (Uint8Array|string|null);
16153
+ stringValue?: (Uint8Array|Buffer|string|null);
15688
16154
 
15689
16155
  /** UninterpretedOption aggregateValue */
15690
16156
  aggregateValue?: (string|null);
@@ -15715,7 +16181,7 @@ export namespace google {
15715
16181
  public doubleValue: number;
15716
16182
 
15717
16183
  /** UninterpretedOption stringValue. */
15718
- public stringValue: (Uint8Array|string);
16184
+ public stringValue: (Uint8Array|Buffer|string);
15719
16185
 
15720
16186
  /** UninterpretedOption aggregateValue. */
15721
16187
  public aggregateValue: string;