@google-cloud/pubsub 3.2.1 → 3.3.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 2022 Google LLC
1
+ // Copyright 2023 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.
@@ -616,6 +616,8 @@
616
616
  * @interface ISchemaSettings
617
617
  * @property {string|null} [schema] SchemaSettings schema
618
618
  * @property {google.pubsub.v1.Encoding|null} [encoding] SchemaSettings encoding
619
+ * @property {string|null} [firstRevisionId] SchemaSettings firstRevisionId
620
+ * @property {string|null} [lastRevisionId] SchemaSettings lastRevisionId
619
621
  */
620
622
 
621
623
  /**
@@ -649,6 +651,22 @@
649
651
  */
650
652
  SchemaSettings.prototype.encoding = 0;
651
653
 
654
+ /**
655
+ * SchemaSettings firstRevisionId.
656
+ * @member {string} firstRevisionId
657
+ * @memberof google.pubsub.v1.SchemaSettings
658
+ * @instance
659
+ */
660
+ SchemaSettings.prototype.firstRevisionId = "";
661
+
662
+ /**
663
+ * SchemaSettings lastRevisionId.
664
+ * @member {string} lastRevisionId
665
+ * @memberof google.pubsub.v1.SchemaSettings
666
+ * @instance
667
+ */
668
+ SchemaSettings.prototype.lastRevisionId = "";
669
+
652
670
  /**
653
671
  * Creates a new SchemaSettings instance using the specified properties.
654
672
  * @function create
@@ -677,6 +695,10 @@
677
695
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema);
678
696
  if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding"))
679
697
  writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding);
698
+ if (message.firstRevisionId != null && Object.hasOwnProperty.call(message, "firstRevisionId"))
699
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.firstRevisionId);
700
+ if (message.lastRevisionId != null && Object.hasOwnProperty.call(message, "lastRevisionId"))
701
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.lastRevisionId);
680
702
  return writer;
681
703
  };
682
704
 
@@ -719,6 +741,14 @@
719
741
  message.encoding = reader.int32();
720
742
  break;
721
743
  }
744
+ case 3: {
745
+ message.firstRevisionId = reader.string();
746
+ break;
747
+ }
748
+ case 4: {
749
+ message.lastRevisionId = reader.string();
750
+ break;
751
+ }
722
752
  default:
723
753
  reader.skipType(tag & 7);
724
754
  break;
@@ -766,6 +796,12 @@
766
796
  case 2:
767
797
  break;
768
798
  }
799
+ if (message.firstRevisionId != null && message.hasOwnProperty("firstRevisionId"))
800
+ if (!$util.isString(message.firstRevisionId))
801
+ return "firstRevisionId: string expected";
802
+ if (message.lastRevisionId != null && message.hasOwnProperty("lastRevisionId"))
803
+ if (!$util.isString(message.lastRevisionId))
804
+ return "lastRevisionId: string expected";
769
805
  return null;
770
806
  };
771
807
 
@@ -803,6 +839,10 @@
803
839
  message.encoding = 2;
804
840
  break;
805
841
  }
842
+ if (object.firstRevisionId != null)
843
+ message.firstRevisionId = String(object.firstRevisionId);
844
+ if (object.lastRevisionId != null)
845
+ message.lastRevisionId = String(object.lastRevisionId);
806
846
  return message;
807
847
  };
808
848
 
@@ -822,11 +862,17 @@
822
862
  if (options.defaults) {
823
863
  object.schema = "";
824
864
  object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0;
865
+ object.firstRevisionId = "";
866
+ object.lastRevisionId = "";
825
867
  }
826
868
  if (message.schema != null && message.hasOwnProperty("schema"))
827
869
  object.schema = message.schema;
828
870
  if (message.encoding != null && message.hasOwnProperty("encoding"))
829
871
  object.encoding = options.enums === String ? $root.google.pubsub.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.pubsub.v1.Encoding[message.encoding] : message.encoding;
872
+ if (message.firstRevisionId != null && message.hasOwnProperty("firstRevisionId"))
873
+ object.firstRevisionId = message.firstRevisionId;
874
+ if (message.lastRevisionId != null && message.hasOwnProperty("lastRevisionId"))
875
+ object.lastRevisionId = message.lastRevisionId;
830
876
  return object;
831
877
  };
832
878
 
@@ -13859,6 +13905,138 @@
13859
13905
  * @variation 2
13860
13906
  */
13861
13907
 
13908
+ /**
13909
+ * Callback as used by {@link google.pubsub.v1.SchemaService|listSchemaRevisions}.
13910
+ * @memberof google.pubsub.v1.SchemaService
13911
+ * @typedef ListSchemaRevisionsCallback
13912
+ * @type {function}
13913
+ * @param {Error|null} error Error, if any
13914
+ * @param {google.pubsub.v1.ListSchemaRevisionsResponse} [response] ListSchemaRevisionsResponse
13915
+ */
13916
+
13917
+ /**
13918
+ * Calls ListSchemaRevisions.
13919
+ * @function listSchemaRevisions
13920
+ * @memberof google.pubsub.v1.SchemaService
13921
+ * @instance
13922
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest} request ListSchemaRevisionsRequest message or plain object
13923
+ * @param {google.pubsub.v1.SchemaService.ListSchemaRevisionsCallback} callback Node-style callback called with the error, if any, and ListSchemaRevisionsResponse
13924
+ * @returns {undefined}
13925
+ * @variation 1
13926
+ */
13927
+ Object.defineProperty(SchemaService.prototype.listSchemaRevisions = function listSchemaRevisions(request, callback) {
13928
+ return this.rpcCall(listSchemaRevisions, $root.google.pubsub.v1.ListSchemaRevisionsRequest, $root.google.pubsub.v1.ListSchemaRevisionsResponse, request, callback);
13929
+ }, "name", { value: "ListSchemaRevisions" });
13930
+
13931
+ /**
13932
+ * Calls ListSchemaRevisions.
13933
+ * @function listSchemaRevisions
13934
+ * @memberof google.pubsub.v1.SchemaService
13935
+ * @instance
13936
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest} request ListSchemaRevisionsRequest message or plain object
13937
+ * @returns {Promise<google.pubsub.v1.ListSchemaRevisionsResponse>} Promise
13938
+ * @variation 2
13939
+ */
13940
+
13941
+ /**
13942
+ * Callback as used by {@link google.pubsub.v1.SchemaService|commitSchema}.
13943
+ * @memberof google.pubsub.v1.SchemaService
13944
+ * @typedef CommitSchemaCallback
13945
+ * @type {function}
13946
+ * @param {Error|null} error Error, if any
13947
+ * @param {google.pubsub.v1.Schema} [response] Schema
13948
+ */
13949
+
13950
+ /**
13951
+ * Calls CommitSchema.
13952
+ * @function commitSchema
13953
+ * @memberof google.pubsub.v1.SchemaService
13954
+ * @instance
13955
+ * @param {google.pubsub.v1.ICommitSchemaRequest} request CommitSchemaRequest message or plain object
13956
+ * @param {google.pubsub.v1.SchemaService.CommitSchemaCallback} callback Node-style callback called with the error, if any, and Schema
13957
+ * @returns {undefined}
13958
+ * @variation 1
13959
+ */
13960
+ Object.defineProperty(SchemaService.prototype.commitSchema = function commitSchema(request, callback) {
13961
+ return this.rpcCall(commitSchema, $root.google.pubsub.v1.CommitSchemaRequest, $root.google.pubsub.v1.Schema, request, callback);
13962
+ }, "name", { value: "CommitSchema" });
13963
+
13964
+ /**
13965
+ * Calls CommitSchema.
13966
+ * @function commitSchema
13967
+ * @memberof google.pubsub.v1.SchemaService
13968
+ * @instance
13969
+ * @param {google.pubsub.v1.ICommitSchemaRequest} request CommitSchemaRequest message or plain object
13970
+ * @returns {Promise<google.pubsub.v1.Schema>} Promise
13971
+ * @variation 2
13972
+ */
13973
+
13974
+ /**
13975
+ * Callback as used by {@link google.pubsub.v1.SchemaService|rollbackSchema}.
13976
+ * @memberof google.pubsub.v1.SchemaService
13977
+ * @typedef RollbackSchemaCallback
13978
+ * @type {function}
13979
+ * @param {Error|null} error Error, if any
13980
+ * @param {google.pubsub.v1.Schema} [response] Schema
13981
+ */
13982
+
13983
+ /**
13984
+ * Calls RollbackSchema.
13985
+ * @function rollbackSchema
13986
+ * @memberof google.pubsub.v1.SchemaService
13987
+ * @instance
13988
+ * @param {google.pubsub.v1.IRollbackSchemaRequest} request RollbackSchemaRequest message or plain object
13989
+ * @param {google.pubsub.v1.SchemaService.RollbackSchemaCallback} callback Node-style callback called with the error, if any, and Schema
13990
+ * @returns {undefined}
13991
+ * @variation 1
13992
+ */
13993
+ Object.defineProperty(SchemaService.prototype.rollbackSchema = function rollbackSchema(request, callback) {
13994
+ return this.rpcCall(rollbackSchema, $root.google.pubsub.v1.RollbackSchemaRequest, $root.google.pubsub.v1.Schema, request, callback);
13995
+ }, "name", { value: "RollbackSchema" });
13996
+
13997
+ /**
13998
+ * Calls RollbackSchema.
13999
+ * @function rollbackSchema
14000
+ * @memberof google.pubsub.v1.SchemaService
14001
+ * @instance
14002
+ * @param {google.pubsub.v1.IRollbackSchemaRequest} request RollbackSchemaRequest message or plain object
14003
+ * @returns {Promise<google.pubsub.v1.Schema>} Promise
14004
+ * @variation 2
14005
+ */
14006
+
14007
+ /**
14008
+ * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchemaRevision}.
14009
+ * @memberof google.pubsub.v1.SchemaService
14010
+ * @typedef DeleteSchemaRevisionCallback
14011
+ * @type {function}
14012
+ * @param {Error|null} error Error, if any
14013
+ * @param {google.pubsub.v1.Schema} [response] Schema
14014
+ */
14015
+
14016
+ /**
14017
+ * Calls DeleteSchemaRevision.
14018
+ * @function deleteSchemaRevision
14019
+ * @memberof google.pubsub.v1.SchemaService
14020
+ * @instance
14021
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} request DeleteSchemaRevisionRequest message or plain object
14022
+ * @param {google.pubsub.v1.SchemaService.DeleteSchemaRevisionCallback} callback Node-style callback called with the error, if any, and Schema
14023
+ * @returns {undefined}
14024
+ * @variation 1
14025
+ */
14026
+ Object.defineProperty(SchemaService.prototype.deleteSchemaRevision = function deleteSchemaRevision(request, callback) {
14027
+ return this.rpcCall(deleteSchemaRevision, $root.google.pubsub.v1.DeleteSchemaRevisionRequest, $root.google.pubsub.v1.Schema, request, callback);
14028
+ }, "name", { value: "DeleteSchemaRevision" });
14029
+
14030
+ /**
14031
+ * Calls DeleteSchemaRevision.
14032
+ * @function deleteSchemaRevision
14033
+ * @memberof google.pubsub.v1.SchemaService
14034
+ * @instance
14035
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} request DeleteSchemaRevisionRequest message or plain object
14036
+ * @returns {Promise<google.pubsub.v1.Schema>} Promise
14037
+ * @variation 2
14038
+ */
14039
+
13862
14040
  /**
13863
14041
  * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchema}.
13864
14042
  * @memberof google.pubsub.v1.SchemaService
@@ -13970,6 +14148,8 @@
13970
14148
  * @property {string|null} [name] Schema name
13971
14149
  * @property {google.pubsub.v1.Schema.Type|null} [type] Schema type
13972
14150
  * @property {string|null} [definition] Schema definition
14151
+ * @property {string|null} [revisionId] Schema revisionId
14152
+ * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] Schema revisionCreateTime
13973
14153
  */
13974
14154
 
13975
14155
  /**
@@ -14011,6 +14191,22 @@
14011
14191
  */
14012
14192
  Schema.prototype.definition = "";
14013
14193
 
14194
+ /**
14195
+ * Schema revisionId.
14196
+ * @member {string} revisionId
14197
+ * @memberof google.pubsub.v1.Schema
14198
+ * @instance
14199
+ */
14200
+ Schema.prototype.revisionId = "";
14201
+
14202
+ /**
14203
+ * Schema revisionCreateTime.
14204
+ * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime
14205
+ * @memberof google.pubsub.v1.Schema
14206
+ * @instance
14207
+ */
14208
+ Schema.prototype.revisionCreateTime = null;
14209
+
14014
14210
  /**
14015
14211
  * Creates a new Schema instance using the specified properties.
14016
14212
  * @function create
@@ -14041,6 +14237,10 @@
14041
14237
  writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
14042
14238
  if (message.definition != null && Object.hasOwnProperty.call(message, "definition"))
14043
14239
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.definition);
14240
+ if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId"))
14241
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.revisionId);
14242
+ if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime"))
14243
+ $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
14044
14244
  return writer;
14045
14245
  };
14046
14246
 
@@ -14087,6 +14287,14 @@
14087
14287
  message.definition = reader.string();
14088
14288
  break;
14089
14289
  }
14290
+ case 4: {
14291
+ message.revisionId = reader.string();
14292
+ break;
14293
+ }
14294
+ case 6: {
14295
+ message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
14296
+ break;
14297
+ }
14090
14298
  default:
14091
14299
  reader.skipType(tag & 7);
14092
14300
  break;
@@ -14137,6 +14345,14 @@
14137
14345
  if (message.definition != null && message.hasOwnProperty("definition"))
14138
14346
  if (!$util.isString(message.definition))
14139
14347
  return "definition: string expected";
14348
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
14349
+ if (!$util.isString(message.revisionId))
14350
+ return "revisionId: string expected";
14351
+ if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) {
14352
+ var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime);
14353
+ if (error)
14354
+ return "revisionCreateTime." + error;
14355
+ }
14140
14356
  return null;
14141
14357
  };
14142
14358
 
@@ -14176,6 +14392,13 @@
14176
14392
  }
14177
14393
  if (object.definition != null)
14178
14394
  message.definition = String(object.definition);
14395
+ if (object.revisionId != null)
14396
+ message.revisionId = String(object.revisionId);
14397
+ if (object.revisionCreateTime != null) {
14398
+ if (typeof object.revisionCreateTime !== "object")
14399
+ throw TypeError(".google.pubsub.v1.Schema.revisionCreateTime: object expected");
14400
+ message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime);
14401
+ }
14179
14402
  return message;
14180
14403
  };
14181
14404
 
@@ -14196,6 +14419,8 @@
14196
14419
  object.name = "";
14197
14420
  object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
14198
14421
  object.definition = "";
14422
+ object.revisionId = "";
14423
+ object.revisionCreateTime = null;
14199
14424
  }
14200
14425
  if (message.name != null && message.hasOwnProperty("name"))
14201
14426
  object.name = message.name;
@@ -14203,6 +14428,10 @@
14203
14428
  object.type = options.enums === String ? $root.google.pubsub.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.pubsub.v1.Schema.Type[message.type] : message.type;
14204
14429
  if (message.definition != null && message.hasOwnProperty("definition"))
14205
14430
  object.definition = message.definition;
14431
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
14432
+ object.revisionId = message.revisionId;
14433
+ if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime"))
14434
+ object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options);
14206
14435
  return object;
14207
14436
  };
14208
14437
 
@@ -14251,6 +14480,22 @@
14251
14480
  return Schema;
14252
14481
  })();
14253
14482
 
14483
+ /**
14484
+ * SchemaView enum.
14485
+ * @name google.pubsub.v1.SchemaView
14486
+ * @enum {number}
14487
+ * @property {number} SCHEMA_VIEW_UNSPECIFIED=0 SCHEMA_VIEW_UNSPECIFIED value
14488
+ * @property {number} BASIC=1 BASIC value
14489
+ * @property {number} FULL=2 FULL value
14490
+ */
14491
+ v1.SchemaView = (function() {
14492
+ var valuesById = {}, values = Object.create(valuesById);
14493
+ values[valuesById[0] = "SCHEMA_VIEW_UNSPECIFIED"] = 0;
14494
+ values[valuesById[1] = "BASIC"] = 1;
14495
+ values[valuesById[2] = "FULL"] = 2;
14496
+ return values;
14497
+ })();
14498
+
14254
14499
  v1.CreateSchemaRequest = (function() {
14255
14500
 
14256
14501
  /**
@@ -14506,22 +14751,6 @@
14506
14751
  return CreateSchemaRequest;
14507
14752
  })();
14508
14753
 
14509
- /**
14510
- * SchemaView enum.
14511
- * @name google.pubsub.v1.SchemaView
14512
- * @enum {number}
14513
- * @property {number} SCHEMA_VIEW_UNSPECIFIED=0 SCHEMA_VIEW_UNSPECIFIED value
14514
- * @property {number} BASIC=1 BASIC value
14515
- * @property {number} FULL=2 FULL value
14516
- */
14517
- v1.SchemaView = (function() {
14518
- var valuesById = {}, values = Object.create(valuesById);
14519
- values[valuesById[0] = "SCHEMA_VIEW_UNSPECIFIED"] = 0;
14520
- values[valuesById[1] = "BASIC"] = 1;
14521
- values[valuesById[2] = "FULL"] = 2;
14522
- return values;
14523
- })();
14524
-
14525
14754
  v1.GetSchemaRequest = (function() {
14526
14755
 
14527
14756
  /**
@@ -15318,6 +15547,1237 @@
15318
15547
  return ListSchemasResponse;
15319
15548
  })();
15320
15549
 
15550
+ v1.ListSchemaRevisionsRequest = (function() {
15551
+
15552
+ /**
15553
+ * Properties of a ListSchemaRevisionsRequest.
15554
+ * @memberof google.pubsub.v1
15555
+ * @interface IListSchemaRevisionsRequest
15556
+ * @property {string|null} [name] ListSchemaRevisionsRequest name
15557
+ * @property {google.pubsub.v1.SchemaView|null} [view] ListSchemaRevisionsRequest view
15558
+ * @property {number|null} [pageSize] ListSchemaRevisionsRequest pageSize
15559
+ * @property {string|null} [pageToken] ListSchemaRevisionsRequest pageToken
15560
+ */
15561
+
15562
+ /**
15563
+ * Constructs a new ListSchemaRevisionsRequest.
15564
+ * @memberof google.pubsub.v1
15565
+ * @classdesc Represents a ListSchemaRevisionsRequest.
15566
+ * @implements IListSchemaRevisionsRequest
15567
+ * @constructor
15568
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest=} [properties] Properties to set
15569
+ */
15570
+ function ListSchemaRevisionsRequest(properties) {
15571
+ if (properties)
15572
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15573
+ if (properties[keys[i]] != null)
15574
+ this[keys[i]] = properties[keys[i]];
15575
+ }
15576
+
15577
+ /**
15578
+ * ListSchemaRevisionsRequest name.
15579
+ * @member {string} name
15580
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15581
+ * @instance
15582
+ */
15583
+ ListSchemaRevisionsRequest.prototype.name = "";
15584
+
15585
+ /**
15586
+ * ListSchemaRevisionsRequest view.
15587
+ * @member {google.pubsub.v1.SchemaView} view
15588
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15589
+ * @instance
15590
+ */
15591
+ ListSchemaRevisionsRequest.prototype.view = 0;
15592
+
15593
+ /**
15594
+ * ListSchemaRevisionsRequest pageSize.
15595
+ * @member {number} pageSize
15596
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15597
+ * @instance
15598
+ */
15599
+ ListSchemaRevisionsRequest.prototype.pageSize = 0;
15600
+
15601
+ /**
15602
+ * ListSchemaRevisionsRequest pageToken.
15603
+ * @member {string} pageToken
15604
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15605
+ * @instance
15606
+ */
15607
+ ListSchemaRevisionsRequest.prototype.pageToken = "";
15608
+
15609
+ /**
15610
+ * Creates a new ListSchemaRevisionsRequest instance using the specified properties.
15611
+ * @function create
15612
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15613
+ * @static
15614
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest=} [properties] Properties to set
15615
+ * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest instance
15616
+ */
15617
+ ListSchemaRevisionsRequest.create = function create(properties) {
15618
+ return new ListSchemaRevisionsRequest(properties);
15619
+ };
15620
+
15621
+ /**
15622
+ * Encodes the specified ListSchemaRevisionsRequest message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages.
15623
+ * @function encode
15624
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15625
+ * @static
15626
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest} message ListSchemaRevisionsRequest message or plain object to encode
15627
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15628
+ * @returns {$protobuf.Writer} Writer
15629
+ */
15630
+ ListSchemaRevisionsRequest.encode = function encode(message, writer) {
15631
+ if (!writer)
15632
+ writer = $Writer.create();
15633
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
15634
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
15635
+ if (message.view != null && Object.hasOwnProperty.call(message, "view"))
15636
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view);
15637
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
15638
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize);
15639
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
15640
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken);
15641
+ return writer;
15642
+ };
15643
+
15644
+ /**
15645
+ * Encodes the specified ListSchemaRevisionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages.
15646
+ * @function encodeDelimited
15647
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15648
+ * @static
15649
+ * @param {google.pubsub.v1.IListSchemaRevisionsRequest} message ListSchemaRevisionsRequest message or plain object to encode
15650
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15651
+ * @returns {$protobuf.Writer} Writer
15652
+ */
15653
+ ListSchemaRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
15654
+ return this.encode(message, writer).ldelim();
15655
+ };
15656
+
15657
+ /**
15658
+ * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer.
15659
+ * @function decode
15660
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15661
+ * @static
15662
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15663
+ * @param {number} [length] Message length if known beforehand
15664
+ * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest
15665
+ * @throws {Error} If the payload is not a reader or valid buffer
15666
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15667
+ */
15668
+ ListSchemaRevisionsRequest.decode = function decode(reader, length) {
15669
+ if (!(reader instanceof $Reader))
15670
+ reader = $Reader.create(reader);
15671
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemaRevisionsRequest();
15672
+ while (reader.pos < end) {
15673
+ var tag = reader.uint32();
15674
+ switch (tag >>> 3) {
15675
+ case 1: {
15676
+ message.name = reader.string();
15677
+ break;
15678
+ }
15679
+ case 2: {
15680
+ message.view = reader.int32();
15681
+ break;
15682
+ }
15683
+ case 3: {
15684
+ message.pageSize = reader.int32();
15685
+ break;
15686
+ }
15687
+ case 4: {
15688
+ message.pageToken = reader.string();
15689
+ break;
15690
+ }
15691
+ default:
15692
+ reader.skipType(tag & 7);
15693
+ break;
15694
+ }
15695
+ }
15696
+ return message;
15697
+ };
15698
+
15699
+ /**
15700
+ * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer, length delimited.
15701
+ * @function decodeDelimited
15702
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15703
+ * @static
15704
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15705
+ * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest
15706
+ * @throws {Error} If the payload is not a reader or valid buffer
15707
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15708
+ */
15709
+ ListSchemaRevisionsRequest.decodeDelimited = function decodeDelimited(reader) {
15710
+ if (!(reader instanceof $Reader))
15711
+ reader = new $Reader(reader);
15712
+ return this.decode(reader, reader.uint32());
15713
+ };
15714
+
15715
+ /**
15716
+ * Verifies a ListSchemaRevisionsRequest message.
15717
+ * @function verify
15718
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15719
+ * @static
15720
+ * @param {Object.<string,*>} message Plain object to verify
15721
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15722
+ */
15723
+ ListSchemaRevisionsRequest.verify = function verify(message) {
15724
+ if (typeof message !== "object" || message === null)
15725
+ return "object expected";
15726
+ if (message.name != null && message.hasOwnProperty("name"))
15727
+ if (!$util.isString(message.name))
15728
+ return "name: string expected";
15729
+ if (message.view != null && message.hasOwnProperty("view"))
15730
+ switch (message.view) {
15731
+ default:
15732
+ return "view: enum value expected";
15733
+ case 0:
15734
+ case 1:
15735
+ case 2:
15736
+ break;
15737
+ }
15738
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
15739
+ if (!$util.isInteger(message.pageSize))
15740
+ return "pageSize: integer expected";
15741
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
15742
+ if (!$util.isString(message.pageToken))
15743
+ return "pageToken: string expected";
15744
+ return null;
15745
+ };
15746
+
15747
+ /**
15748
+ * Creates a ListSchemaRevisionsRequest message from a plain object. Also converts values to their respective internal types.
15749
+ * @function fromObject
15750
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15751
+ * @static
15752
+ * @param {Object.<string,*>} object Plain object
15753
+ * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest
15754
+ */
15755
+ ListSchemaRevisionsRequest.fromObject = function fromObject(object) {
15756
+ if (object instanceof $root.google.pubsub.v1.ListSchemaRevisionsRequest)
15757
+ return object;
15758
+ var message = new $root.google.pubsub.v1.ListSchemaRevisionsRequest();
15759
+ if (object.name != null)
15760
+ message.name = String(object.name);
15761
+ switch (object.view) {
15762
+ default:
15763
+ if (typeof object.view === "number") {
15764
+ message.view = object.view;
15765
+ break;
15766
+ }
15767
+ break;
15768
+ case "SCHEMA_VIEW_UNSPECIFIED":
15769
+ case 0:
15770
+ message.view = 0;
15771
+ break;
15772
+ case "BASIC":
15773
+ case 1:
15774
+ message.view = 1;
15775
+ break;
15776
+ case "FULL":
15777
+ case 2:
15778
+ message.view = 2;
15779
+ break;
15780
+ }
15781
+ if (object.pageSize != null)
15782
+ message.pageSize = object.pageSize | 0;
15783
+ if (object.pageToken != null)
15784
+ message.pageToken = String(object.pageToken);
15785
+ return message;
15786
+ };
15787
+
15788
+ /**
15789
+ * Creates a plain object from a ListSchemaRevisionsRequest message. Also converts values to other types if specified.
15790
+ * @function toObject
15791
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15792
+ * @static
15793
+ * @param {google.pubsub.v1.ListSchemaRevisionsRequest} message ListSchemaRevisionsRequest
15794
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
15795
+ * @returns {Object.<string,*>} Plain object
15796
+ */
15797
+ ListSchemaRevisionsRequest.toObject = function toObject(message, options) {
15798
+ if (!options)
15799
+ options = {};
15800
+ var object = {};
15801
+ if (options.defaults) {
15802
+ object.name = "";
15803
+ object.view = options.enums === String ? "SCHEMA_VIEW_UNSPECIFIED" : 0;
15804
+ object.pageSize = 0;
15805
+ object.pageToken = "";
15806
+ }
15807
+ if (message.name != null && message.hasOwnProperty("name"))
15808
+ object.name = message.name;
15809
+ if (message.view != null && message.hasOwnProperty("view"))
15810
+ object.view = options.enums === String ? $root.google.pubsub.v1.SchemaView[message.view] === undefined ? message.view : $root.google.pubsub.v1.SchemaView[message.view] : message.view;
15811
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
15812
+ object.pageSize = message.pageSize;
15813
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
15814
+ object.pageToken = message.pageToken;
15815
+ return object;
15816
+ };
15817
+
15818
+ /**
15819
+ * Converts this ListSchemaRevisionsRequest to JSON.
15820
+ * @function toJSON
15821
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15822
+ * @instance
15823
+ * @returns {Object.<string,*>} JSON object
15824
+ */
15825
+ ListSchemaRevisionsRequest.prototype.toJSON = function toJSON() {
15826
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
15827
+ };
15828
+
15829
+ /**
15830
+ * Gets the default type url for ListSchemaRevisionsRequest
15831
+ * @function getTypeUrl
15832
+ * @memberof google.pubsub.v1.ListSchemaRevisionsRequest
15833
+ * @static
15834
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
15835
+ * @returns {string} The default type url
15836
+ */
15837
+ ListSchemaRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
15838
+ if (typeUrlPrefix === undefined) {
15839
+ typeUrlPrefix = "type.googleapis.com";
15840
+ }
15841
+ return typeUrlPrefix + "/google.pubsub.v1.ListSchemaRevisionsRequest";
15842
+ };
15843
+
15844
+ return ListSchemaRevisionsRequest;
15845
+ })();
15846
+
15847
+ v1.ListSchemaRevisionsResponse = (function() {
15848
+
15849
+ /**
15850
+ * Properties of a ListSchemaRevisionsResponse.
15851
+ * @memberof google.pubsub.v1
15852
+ * @interface IListSchemaRevisionsResponse
15853
+ * @property {Array.<google.pubsub.v1.ISchema>|null} [schemas] ListSchemaRevisionsResponse schemas
15854
+ * @property {string|null} [nextPageToken] ListSchemaRevisionsResponse nextPageToken
15855
+ */
15856
+
15857
+ /**
15858
+ * Constructs a new ListSchemaRevisionsResponse.
15859
+ * @memberof google.pubsub.v1
15860
+ * @classdesc Represents a ListSchemaRevisionsResponse.
15861
+ * @implements IListSchemaRevisionsResponse
15862
+ * @constructor
15863
+ * @param {google.pubsub.v1.IListSchemaRevisionsResponse=} [properties] Properties to set
15864
+ */
15865
+ function ListSchemaRevisionsResponse(properties) {
15866
+ this.schemas = [];
15867
+ if (properties)
15868
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15869
+ if (properties[keys[i]] != null)
15870
+ this[keys[i]] = properties[keys[i]];
15871
+ }
15872
+
15873
+ /**
15874
+ * ListSchemaRevisionsResponse schemas.
15875
+ * @member {Array.<google.pubsub.v1.ISchema>} schemas
15876
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15877
+ * @instance
15878
+ */
15879
+ ListSchemaRevisionsResponse.prototype.schemas = $util.emptyArray;
15880
+
15881
+ /**
15882
+ * ListSchemaRevisionsResponse nextPageToken.
15883
+ * @member {string} nextPageToken
15884
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15885
+ * @instance
15886
+ */
15887
+ ListSchemaRevisionsResponse.prototype.nextPageToken = "";
15888
+
15889
+ /**
15890
+ * Creates a new ListSchemaRevisionsResponse instance using the specified properties.
15891
+ * @function create
15892
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15893
+ * @static
15894
+ * @param {google.pubsub.v1.IListSchemaRevisionsResponse=} [properties] Properties to set
15895
+ * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse instance
15896
+ */
15897
+ ListSchemaRevisionsResponse.create = function create(properties) {
15898
+ return new ListSchemaRevisionsResponse(properties);
15899
+ };
15900
+
15901
+ /**
15902
+ * Encodes the specified ListSchemaRevisionsResponse message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages.
15903
+ * @function encode
15904
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15905
+ * @static
15906
+ * @param {google.pubsub.v1.IListSchemaRevisionsResponse} message ListSchemaRevisionsResponse message or plain object to encode
15907
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15908
+ * @returns {$protobuf.Writer} Writer
15909
+ */
15910
+ ListSchemaRevisionsResponse.encode = function encode(message, writer) {
15911
+ if (!writer)
15912
+ writer = $Writer.create();
15913
+ if (message.schemas != null && message.schemas.length)
15914
+ for (var i = 0; i < message.schemas.length; ++i)
15915
+ $root.google.pubsub.v1.Schema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
15916
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
15917
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
15918
+ return writer;
15919
+ };
15920
+
15921
+ /**
15922
+ * Encodes the specified ListSchemaRevisionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages.
15923
+ * @function encodeDelimited
15924
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15925
+ * @static
15926
+ * @param {google.pubsub.v1.IListSchemaRevisionsResponse} message ListSchemaRevisionsResponse message or plain object to encode
15927
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15928
+ * @returns {$protobuf.Writer} Writer
15929
+ */
15930
+ ListSchemaRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
15931
+ return this.encode(message, writer).ldelim();
15932
+ };
15933
+
15934
+ /**
15935
+ * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer.
15936
+ * @function decode
15937
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15938
+ * @static
15939
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15940
+ * @param {number} [length] Message length if known beforehand
15941
+ * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse
15942
+ * @throws {Error} If the payload is not a reader or valid buffer
15943
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15944
+ */
15945
+ ListSchemaRevisionsResponse.decode = function decode(reader, length) {
15946
+ if (!(reader instanceof $Reader))
15947
+ reader = $Reader.create(reader);
15948
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemaRevisionsResponse();
15949
+ while (reader.pos < end) {
15950
+ var tag = reader.uint32();
15951
+ switch (tag >>> 3) {
15952
+ case 1: {
15953
+ if (!(message.schemas && message.schemas.length))
15954
+ message.schemas = [];
15955
+ message.schemas.push($root.google.pubsub.v1.Schema.decode(reader, reader.uint32()));
15956
+ break;
15957
+ }
15958
+ case 2: {
15959
+ message.nextPageToken = reader.string();
15960
+ break;
15961
+ }
15962
+ default:
15963
+ reader.skipType(tag & 7);
15964
+ break;
15965
+ }
15966
+ }
15967
+ return message;
15968
+ };
15969
+
15970
+ /**
15971
+ * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer, length delimited.
15972
+ * @function decodeDelimited
15973
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15974
+ * @static
15975
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15976
+ * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse
15977
+ * @throws {Error} If the payload is not a reader or valid buffer
15978
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15979
+ */
15980
+ ListSchemaRevisionsResponse.decodeDelimited = function decodeDelimited(reader) {
15981
+ if (!(reader instanceof $Reader))
15982
+ reader = new $Reader(reader);
15983
+ return this.decode(reader, reader.uint32());
15984
+ };
15985
+
15986
+ /**
15987
+ * Verifies a ListSchemaRevisionsResponse message.
15988
+ * @function verify
15989
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
15990
+ * @static
15991
+ * @param {Object.<string,*>} message Plain object to verify
15992
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15993
+ */
15994
+ ListSchemaRevisionsResponse.verify = function verify(message) {
15995
+ if (typeof message !== "object" || message === null)
15996
+ return "object expected";
15997
+ if (message.schemas != null && message.hasOwnProperty("schemas")) {
15998
+ if (!Array.isArray(message.schemas))
15999
+ return "schemas: array expected";
16000
+ for (var i = 0; i < message.schemas.length; ++i) {
16001
+ var error = $root.google.pubsub.v1.Schema.verify(message.schemas[i]);
16002
+ if (error)
16003
+ return "schemas." + error;
16004
+ }
16005
+ }
16006
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
16007
+ if (!$util.isString(message.nextPageToken))
16008
+ return "nextPageToken: string expected";
16009
+ return null;
16010
+ };
16011
+
16012
+ /**
16013
+ * Creates a ListSchemaRevisionsResponse message from a plain object. Also converts values to their respective internal types.
16014
+ * @function fromObject
16015
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
16016
+ * @static
16017
+ * @param {Object.<string,*>} object Plain object
16018
+ * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse
16019
+ */
16020
+ ListSchemaRevisionsResponse.fromObject = function fromObject(object) {
16021
+ if (object instanceof $root.google.pubsub.v1.ListSchemaRevisionsResponse)
16022
+ return object;
16023
+ var message = new $root.google.pubsub.v1.ListSchemaRevisionsResponse();
16024
+ if (object.schemas) {
16025
+ if (!Array.isArray(object.schemas))
16026
+ throw TypeError(".google.pubsub.v1.ListSchemaRevisionsResponse.schemas: array expected");
16027
+ message.schemas = [];
16028
+ for (var i = 0; i < object.schemas.length; ++i) {
16029
+ if (typeof object.schemas[i] !== "object")
16030
+ throw TypeError(".google.pubsub.v1.ListSchemaRevisionsResponse.schemas: object expected");
16031
+ message.schemas[i] = $root.google.pubsub.v1.Schema.fromObject(object.schemas[i]);
16032
+ }
16033
+ }
16034
+ if (object.nextPageToken != null)
16035
+ message.nextPageToken = String(object.nextPageToken);
16036
+ return message;
16037
+ };
16038
+
16039
+ /**
16040
+ * Creates a plain object from a ListSchemaRevisionsResponse message. Also converts values to other types if specified.
16041
+ * @function toObject
16042
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
16043
+ * @static
16044
+ * @param {google.pubsub.v1.ListSchemaRevisionsResponse} message ListSchemaRevisionsResponse
16045
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16046
+ * @returns {Object.<string,*>} Plain object
16047
+ */
16048
+ ListSchemaRevisionsResponse.toObject = function toObject(message, options) {
16049
+ if (!options)
16050
+ options = {};
16051
+ var object = {};
16052
+ if (options.arrays || options.defaults)
16053
+ object.schemas = [];
16054
+ if (options.defaults)
16055
+ object.nextPageToken = "";
16056
+ if (message.schemas && message.schemas.length) {
16057
+ object.schemas = [];
16058
+ for (var j = 0; j < message.schemas.length; ++j)
16059
+ object.schemas[j] = $root.google.pubsub.v1.Schema.toObject(message.schemas[j], options);
16060
+ }
16061
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
16062
+ object.nextPageToken = message.nextPageToken;
16063
+ return object;
16064
+ };
16065
+
16066
+ /**
16067
+ * Converts this ListSchemaRevisionsResponse to JSON.
16068
+ * @function toJSON
16069
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
16070
+ * @instance
16071
+ * @returns {Object.<string,*>} JSON object
16072
+ */
16073
+ ListSchemaRevisionsResponse.prototype.toJSON = function toJSON() {
16074
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
16075
+ };
16076
+
16077
+ /**
16078
+ * Gets the default type url for ListSchemaRevisionsResponse
16079
+ * @function getTypeUrl
16080
+ * @memberof google.pubsub.v1.ListSchemaRevisionsResponse
16081
+ * @static
16082
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16083
+ * @returns {string} The default type url
16084
+ */
16085
+ ListSchemaRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16086
+ if (typeUrlPrefix === undefined) {
16087
+ typeUrlPrefix = "type.googleapis.com";
16088
+ }
16089
+ return typeUrlPrefix + "/google.pubsub.v1.ListSchemaRevisionsResponse";
16090
+ };
16091
+
16092
+ return ListSchemaRevisionsResponse;
16093
+ })();
16094
+
16095
+ v1.CommitSchemaRequest = (function() {
16096
+
16097
+ /**
16098
+ * Properties of a CommitSchemaRequest.
16099
+ * @memberof google.pubsub.v1
16100
+ * @interface ICommitSchemaRequest
16101
+ * @property {string|null} [name] CommitSchemaRequest name
16102
+ * @property {google.pubsub.v1.ISchema|null} [schema] CommitSchemaRequest schema
16103
+ */
16104
+
16105
+ /**
16106
+ * Constructs a new CommitSchemaRequest.
16107
+ * @memberof google.pubsub.v1
16108
+ * @classdesc Represents a CommitSchemaRequest.
16109
+ * @implements ICommitSchemaRequest
16110
+ * @constructor
16111
+ * @param {google.pubsub.v1.ICommitSchemaRequest=} [properties] Properties to set
16112
+ */
16113
+ function CommitSchemaRequest(properties) {
16114
+ if (properties)
16115
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
16116
+ if (properties[keys[i]] != null)
16117
+ this[keys[i]] = properties[keys[i]];
16118
+ }
16119
+
16120
+ /**
16121
+ * CommitSchemaRequest name.
16122
+ * @member {string} name
16123
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16124
+ * @instance
16125
+ */
16126
+ CommitSchemaRequest.prototype.name = "";
16127
+
16128
+ /**
16129
+ * CommitSchemaRequest schema.
16130
+ * @member {google.pubsub.v1.ISchema|null|undefined} schema
16131
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16132
+ * @instance
16133
+ */
16134
+ CommitSchemaRequest.prototype.schema = null;
16135
+
16136
+ /**
16137
+ * Creates a new CommitSchemaRequest instance using the specified properties.
16138
+ * @function create
16139
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16140
+ * @static
16141
+ * @param {google.pubsub.v1.ICommitSchemaRequest=} [properties] Properties to set
16142
+ * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest instance
16143
+ */
16144
+ CommitSchemaRequest.create = function create(properties) {
16145
+ return new CommitSchemaRequest(properties);
16146
+ };
16147
+
16148
+ /**
16149
+ * Encodes the specified CommitSchemaRequest message. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages.
16150
+ * @function encode
16151
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16152
+ * @static
16153
+ * @param {google.pubsub.v1.ICommitSchemaRequest} message CommitSchemaRequest message or plain object to encode
16154
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16155
+ * @returns {$protobuf.Writer} Writer
16156
+ */
16157
+ CommitSchemaRequest.encode = function encode(message, writer) {
16158
+ if (!writer)
16159
+ writer = $Writer.create();
16160
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
16161
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
16162
+ if (message.schema != null && Object.hasOwnProperty.call(message, "schema"))
16163
+ $root.google.pubsub.v1.Schema.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
16164
+ return writer;
16165
+ };
16166
+
16167
+ /**
16168
+ * Encodes the specified CommitSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages.
16169
+ * @function encodeDelimited
16170
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16171
+ * @static
16172
+ * @param {google.pubsub.v1.ICommitSchemaRequest} message CommitSchemaRequest message or plain object to encode
16173
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16174
+ * @returns {$protobuf.Writer} Writer
16175
+ */
16176
+ CommitSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) {
16177
+ return this.encode(message, writer).ldelim();
16178
+ };
16179
+
16180
+ /**
16181
+ * Decodes a CommitSchemaRequest message from the specified reader or buffer.
16182
+ * @function decode
16183
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16184
+ * @static
16185
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16186
+ * @param {number} [length] Message length if known beforehand
16187
+ * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest
16188
+ * @throws {Error} If the payload is not a reader or valid buffer
16189
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16190
+ */
16191
+ CommitSchemaRequest.decode = function decode(reader, length) {
16192
+ if (!(reader instanceof $Reader))
16193
+ reader = $Reader.create(reader);
16194
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CommitSchemaRequest();
16195
+ while (reader.pos < end) {
16196
+ var tag = reader.uint32();
16197
+ switch (tag >>> 3) {
16198
+ case 1: {
16199
+ message.name = reader.string();
16200
+ break;
16201
+ }
16202
+ case 2: {
16203
+ message.schema = $root.google.pubsub.v1.Schema.decode(reader, reader.uint32());
16204
+ break;
16205
+ }
16206
+ default:
16207
+ reader.skipType(tag & 7);
16208
+ break;
16209
+ }
16210
+ }
16211
+ return message;
16212
+ };
16213
+
16214
+ /**
16215
+ * Decodes a CommitSchemaRequest message from the specified reader or buffer, length delimited.
16216
+ * @function decodeDelimited
16217
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16218
+ * @static
16219
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16220
+ * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest
16221
+ * @throws {Error} If the payload is not a reader or valid buffer
16222
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16223
+ */
16224
+ CommitSchemaRequest.decodeDelimited = function decodeDelimited(reader) {
16225
+ if (!(reader instanceof $Reader))
16226
+ reader = new $Reader(reader);
16227
+ return this.decode(reader, reader.uint32());
16228
+ };
16229
+
16230
+ /**
16231
+ * Verifies a CommitSchemaRequest message.
16232
+ * @function verify
16233
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16234
+ * @static
16235
+ * @param {Object.<string,*>} message Plain object to verify
16236
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
16237
+ */
16238
+ CommitSchemaRequest.verify = function verify(message) {
16239
+ if (typeof message !== "object" || message === null)
16240
+ return "object expected";
16241
+ if (message.name != null && message.hasOwnProperty("name"))
16242
+ if (!$util.isString(message.name))
16243
+ return "name: string expected";
16244
+ if (message.schema != null && message.hasOwnProperty("schema")) {
16245
+ var error = $root.google.pubsub.v1.Schema.verify(message.schema);
16246
+ if (error)
16247
+ return "schema." + error;
16248
+ }
16249
+ return null;
16250
+ };
16251
+
16252
+ /**
16253
+ * Creates a CommitSchemaRequest message from a plain object. Also converts values to their respective internal types.
16254
+ * @function fromObject
16255
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16256
+ * @static
16257
+ * @param {Object.<string,*>} object Plain object
16258
+ * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest
16259
+ */
16260
+ CommitSchemaRequest.fromObject = function fromObject(object) {
16261
+ if (object instanceof $root.google.pubsub.v1.CommitSchemaRequest)
16262
+ return object;
16263
+ var message = new $root.google.pubsub.v1.CommitSchemaRequest();
16264
+ if (object.name != null)
16265
+ message.name = String(object.name);
16266
+ if (object.schema != null) {
16267
+ if (typeof object.schema !== "object")
16268
+ throw TypeError(".google.pubsub.v1.CommitSchemaRequest.schema: object expected");
16269
+ message.schema = $root.google.pubsub.v1.Schema.fromObject(object.schema);
16270
+ }
16271
+ return message;
16272
+ };
16273
+
16274
+ /**
16275
+ * Creates a plain object from a CommitSchemaRequest message. Also converts values to other types if specified.
16276
+ * @function toObject
16277
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16278
+ * @static
16279
+ * @param {google.pubsub.v1.CommitSchemaRequest} message CommitSchemaRequest
16280
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16281
+ * @returns {Object.<string,*>} Plain object
16282
+ */
16283
+ CommitSchemaRequest.toObject = function toObject(message, options) {
16284
+ if (!options)
16285
+ options = {};
16286
+ var object = {};
16287
+ if (options.defaults) {
16288
+ object.name = "";
16289
+ object.schema = null;
16290
+ }
16291
+ if (message.name != null && message.hasOwnProperty("name"))
16292
+ object.name = message.name;
16293
+ if (message.schema != null && message.hasOwnProperty("schema"))
16294
+ object.schema = $root.google.pubsub.v1.Schema.toObject(message.schema, options);
16295
+ return object;
16296
+ };
16297
+
16298
+ /**
16299
+ * Converts this CommitSchemaRequest to JSON.
16300
+ * @function toJSON
16301
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16302
+ * @instance
16303
+ * @returns {Object.<string,*>} JSON object
16304
+ */
16305
+ CommitSchemaRequest.prototype.toJSON = function toJSON() {
16306
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
16307
+ };
16308
+
16309
+ /**
16310
+ * Gets the default type url for CommitSchemaRequest
16311
+ * @function getTypeUrl
16312
+ * @memberof google.pubsub.v1.CommitSchemaRequest
16313
+ * @static
16314
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16315
+ * @returns {string} The default type url
16316
+ */
16317
+ CommitSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16318
+ if (typeUrlPrefix === undefined) {
16319
+ typeUrlPrefix = "type.googleapis.com";
16320
+ }
16321
+ return typeUrlPrefix + "/google.pubsub.v1.CommitSchemaRequest";
16322
+ };
16323
+
16324
+ return CommitSchemaRequest;
16325
+ })();
16326
+
16327
+ v1.RollbackSchemaRequest = (function() {
16328
+
16329
+ /**
16330
+ * Properties of a RollbackSchemaRequest.
16331
+ * @memberof google.pubsub.v1
16332
+ * @interface IRollbackSchemaRequest
16333
+ * @property {string|null} [name] RollbackSchemaRequest name
16334
+ * @property {string|null} [revisionId] RollbackSchemaRequest revisionId
16335
+ */
16336
+
16337
+ /**
16338
+ * Constructs a new RollbackSchemaRequest.
16339
+ * @memberof google.pubsub.v1
16340
+ * @classdesc Represents a RollbackSchemaRequest.
16341
+ * @implements IRollbackSchemaRequest
16342
+ * @constructor
16343
+ * @param {google.pubsub.v1.IRollbackSchemaRequest=} [properties] Properties to set
16344
+ */
16345
+ function RollbackSchemaRequest(properties) {
16346
+ if (properties)
16347
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
16348
+ if (properties[keys[i]] != null)
16349
+ this[keys[i]] = properties[keys[i]];
16350
+ }
16351
+
16352
+ /**
16353
+ * RollbackSchemaRequest name.
16354
+ * @member {string} name
16355
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16356
+ * @instance
16357
+ */
16358
+ RollbackSchemaRequest.prototype.name = "";
16359
+
16360
+ /**
16361
+ * RollbackSchemaRequest revisionId.
16362
+ * @member {string} revisionId
16363
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16364
+ * @instance
16365
+ */
16366
+ RollbackSchemaRequest.prototype.revisionId = "";
16367
+
16368
+ /**
16369
+ * Creates a new RollbackSchemaRequest instance using the specified properties.
16370
+ * @function create
16371
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16372
+ * @static
16373
+ * @param {google.pubsub.v1.IRollbackSchemaRequest=} [properties] Properties to set
16374
+ * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest instance
16375
+ */
16376
+ RollbackSchemaRequest.create = function create(properties) {
16377
+ return new RollbackSchemaRequest(properties);
16378
+ };
16379
+
16380
+ /**
16381
+ * Encodes the specified RollbackSchemaRequest message. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages.
16382
+ * @function encode
16383
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16384
+ * @static
16385
+ * @param {google.pubsub.v1.IRollbackSchemaRequest} message RollbackSchemaRequest message or plain object to encode
16386
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16387
+ * @returns {$protobuf.Writer} Writer
16388
+ */
16389
+ RollbackSchemaRequest.encode = function encode(message, writer) {
16390
+ if (!writer)
16391
+ writer = $Writer.create();
16392
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
16393
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
16394
+ if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId"))
16395
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId);
16396
+ return writer;
16397
+ };
16398
+
16399
+ /**
16400
+ * Encodes the specified RollbackSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages.
16401
+ * @function encodeDelimited
16402
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16403
+ * @static
16404
+ * @param {google.pubsub.v1.IRollbackSchemaRequest} message RollbackSchemaRequest message or plain object to encode
16405
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16406
+ * @returns {$protobuf.Writer} Writer
16407
+ */
16408
+ RollbackSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) {
16409
+ return this.encode(message, writer).ldelim();
16410
+ };
16411
+
16412
+ /**
16413
+ * Decodes a RollbackSchemaRequest message from the specified reader or buffer.
16414
+ * @function decode
16415
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16416
+ * @static
16417
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16418
+ * @param {number} [length] Message length if known beforehand
16419
+ * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest
16420
+ * @throws {Error} If the payload is not a reader or valid buffer
16421
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16422
+ */
16423
+ RollbackSchemaRequest.decode = function decode(reader, length) {
16424
+ if (!(reader instanceof $Reader))
16425
+ reader = $Reader.create(reader);
16426
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.RollbackSchemaRequest();
16427
+ while (reader.pos < end) {
16428
+ var tag = reader.uint32();
16429
+ switch (tag >>> 3) {
16430
+ case 1: {
16431
+ message.name = reader.string();
16432
+ break;
16433
+ }
16434
+ case 2: {
16435
+ message.revisionId = reader.string();
16436
+ break;
16437
+ }
16438
+ default:
16439
+ reader.skipType(tag & 7);
16440
+ break;
16441
+ }
16442
+ }
16443
+ return message;
16444
+ };
16445
+
16446
+ /**
16447
+ * Decodes a RollbackSchemaRequest message from the specified reader or buffer, length delimited.
16448
+ * @function decodeDelimited
16449
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16450
+ * @static
16451
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16452
+ * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest
16453
+ * @throws {Error} If the payload is not a reader or valid buffer
16454
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16455
+ */
16456
+ RollbackSchemaRequest.decodeDelimited = function decodeDelimited(reader) {
16457
+ if (!(reader instanceof $Reader))
16458
+ reader = new $Reader(reader);
16459
+ return this.decode(reader, reader.uint32());
16460
+ };
16461
+
16462
+ /**
16463
+ * Verifies a RollbackSchemaRequest message.
16464
+ * @function verify
16465
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16466
+ * @static
16467
+ * @param {Object.<string,*>} message Plain object to verify
16468
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
16469
+ */
16470
+ RollbackSchemaRequest.verify = function verify(message) {
16471
+ if (typeof message !== "object" || message === null)
16472
+ return "object expected";
16473
+ if (message.name != null && message.hasOwnProperty("name"))
16474
+ if (!$util.isString(message.name))
16475
+ return "name: string expected";
16476
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
16477
+ if (!$util.isString(message.revisionId))
16478
+ return "revisionId: string expected";
16479
+ return null;
16480
+ };
16481
+
16482
+ /**
16483
+ * Creates a RollbackSchemaRequest message from a plain object. Also converts values to their respective internal types.
16484
+ * @function fromObject
16485
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16486
+ * @static
16487
+ * @param {Object.<string,*>} object Plain object
16488
+ * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest
16489
+ */
16490
+ RollbackSchemaRequest.fromObject = function fromObject(object) {
16491
+ if (object instanceof $root.google.pubsub.v1.RollbackSchemaRequest)
16492
+ return object;
16493
+ var message = new $root.google.pubsub.v1.RollbackSchemaRequest();
16494
+ if (object.name != null)
16495
+ message.name = String(object.name);
16496
+ if (object.revisionId != null)
16497
+ message.revisionId = String(object.revisionId);
16498
+ return message;
16499
+ };
16500
+
16501
+ /**
16502
+ * Creates a plain object from a RollbackSchemaRequest message. Also converts values to other types if specified.
16503
+ * @function toObject
16504
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16505
+ * @static
16506
+ * @param {google.pubsub.v1.RollbackSchemaRequest} message RollbackSchemaRequest
16507
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16508
+ * @returns {Object.<string,*>} Plain object
16509
+ */
16510
+ RollbackSchemaRequest.toObject = function toObject(message, options) {
16511
+ if (!options)
16512
+ options = {};
16513
+ var object = {};
16514
+ if (options.defaults) {
16515
+ object.name = "";
16516
+ object.revisionId = "";
16517
+ }
16518
+ if (message.name != null && message.hasOwnProperty("name"))
16519
+ object.name = message.name;
16520
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
16521
+ object.revisionId = message.revisionId;
16522
+ return object;
16523
+ };
16524
+
16525
+ /**
16526
+ * Converts this RollbackSchemaRequest to JSON.
16527
+ * @function toJSON
16528
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16529
+ * @instance
16530
+ * @returns {Object.<string,*>} JSON object
16531
+ */
16532
+ RollbackSchemaRequest.prototype.toJSON = function toJSON() {
16533
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
16534
+ };
16535
+
16536
+ /**
16537
+ * Gets the default type url for RollbackSchemaRequest
16538
+ * @function getTypeUrl
16539
+ * @memberof google.pubsub.v1.RollbackSchemaRequest
16540
+ * @static
16541
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16542
+ * @returns {string} The default type url
16543
+ */
16544
+ RollbackSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16545
+ if (typeUrlPrefix === undefined) {
16546
+ typeUrlPrefix = "type.googleapis.com";
16547
+ }
16548
+ return typeUrlPrefix + "/google.pubsub.v1.RollbackSchemaRequest";
16549
+ };
16550
+
16551
+ return RollbackSchemaRequest;
16552
+ })();
16553
+
16554
+ v1.DeleteSchemaRevisionRequest = (function() {
16555
+
16556
+ /**
16557
+ * Properties of a DeleteSchemaRevisionRequest.
16558
+ * @memberof google.pubsub.v1
16559
+ * @interface IDeleteSchemaRevisionRequest
16560
+ * @property {string|null} [name] DeleteSchemaRevisionRequest name
16561
+ * @property {string|null} [revisionId] DeleteSchemaRevisionRequest revisionId
16562
+ */
16563
+
16564
+ /**
16565
+ * Constructs a new DeleteSchemaRevisionRequest.
16566
+ * @memberof google.pubsub.v1
16567
+ * @classdesc Represents a DeleteSchemaRevisionRequest.
16568
+ * @implements IDeleteSchemaRevisionRequest
16569
+ * @constructor
16570
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest=} [properties] Properties to set
16571
+ */
16572
+ function DeleteSchemaRevisionRequest(properties) {
16573
+ if (properties)
16574
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
16575
+ if (properties[keys[i]] != null)
16576
+ this[keys[i]] = properties[keys[i]];
16577
+ }
16578
+
16579
+ /**
16580
+ * DeleteSchemaRevisionRequest name.
16581
+ * @member {string} name
16582
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16583
+ * @instance
16584
+ */
16585
+ DeleteSchemaRevisionRequest.prototype.name = "";
16586
+
16587
+ /**
16588
+ * DeleteSchemaRevisionRequest revisionId.
16589
+ * @member {string} revisionId
16590
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16591
+ * @instance
16592
+ */
16593
+ DeleteSchemaRevisionRequest.prototype.revisionId = "";
16594
+
16595
+ /**
16596
+ * Creates a new DeleteSchemaRevisionRequest instance using the specified properties.
16597
+ * @function create
16598
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16599
+ * @static
16600
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest=} [properties] Properties to set
16601
+ * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest instance
16602
+ */
16603
+ DeleteSchemaRevisionRequest.create = function create(properties) {
16604
+ return new DeleteSchemaRevisionRequest(properties);
16605
+ };
16606
+
16607
+ /**
16608
+ * Encodes the specified DeleteSchemaRevisionRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages.
16609
+ * @function encode
16610
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16611
+ * @static
16612
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest message or plain object to encode
16613
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16614
+ * @returns {$protobuf.Writer} Writer
16615
+ */
16616
+ DeleteSchemaRevisionRequest.encode = function encode(message, writer) {
16617
+ if (!writer)
16618
+ writer = $Writer.create();
16619
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
16620
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
16621
+ if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId"))
16622
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId);
16623
+ return writer;
16624
+ };
16625
+
16626
+ /**
16627
+ * Encodes the specified DeleteSchemaRevisionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages.
16628
+ * @function encodeDelimited
16629
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16630
+ * @static
16631
+ * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest message or plain object to encode
16632
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16633
+ * @returns {$protobuf.Writer} Writer
16634
+ */
16635
+ DeleteSchemaRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) {
16636
+ return this.encode(message, writer).ldelim();
16637
+ };
16638
+
16639
+ /**
16640
+ * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer.
16641
+ * @function decode
16642
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16643
+ * @static
16644
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16645
+ * @param {number} [length] Message length if known beforehand
16646
+ * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest
16647
+ * @throws {Error} If the payload is not a reader or valid buffer
16648
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16649
+ */
16650
+ DeleteSchemaRevisionRequest.decode = function decode(reader, length) {
16651
+ if (!(reader instanceof $Reader))
16652
+ reader = $Reader.create(reader);
16653
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteSchemaRevisionRequest();
16654
+ while (reader.pos < end) {
16655
+ var tag = reader.uint32();
16656
+ switch (tag >>> 3) {
16657
+ case 1: {
16658
+ message.name = reader.string();
16659
+ break;
16660
+ }
16661
+ case 2: {
16662
+ message.revisionId = reader.string();
16663
+ break;
16664
+ }
16665
+ default:
16666
+ reader.skipType(tag & 7);
16667
+ break;
16668
+ }
16669
+ }
16670
+ return message;
16671
+ };
16672
+
16673
+ /**
16674
+ * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer, length delimited.
16675
+ * @function decodeDelimited
16676
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16677
+ * @static
16678
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16679
+ * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest
16680
+ * @throws {Error} If the payload is not a reader or valid buffer
16681
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16682
+ */
16683
+ DeleteSchemaRevisionRequest.decodeDelimited = function decodeDelimited(reader) {
16684
+ if (!(reader instanceof $Reader))
16685
+ reader = new $Reader(reader);
16686
+ return this.decode(reader, reader.uint32());
16687
+ };
16688
+
16689
+ /**
16690
+ * Verifies a DeleteSchemaRevisionRequest message.
16691
+ * @function verify
16692
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16693
+ * @static
16694
+ * @param {Object.<string,*>} message Plain object to verify
16695
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
16696
+ */
16697
+ DeleteSchemaRevisionRequest.verify = function verify(message) {
16698
+ if (typeof message !== "object" || message === null)
16699
+ return "object expected";
16700
+ if (message.name != null && message.hasOwnProperty("name"))
16701
+ if (!$util.isString(message.name))
16702
+ return "name: string expected";
16703
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
16704
+ if (!$util.isString(message.revisionId))
16705
+ return "revisionId: string expected";
16706
+ return null;
16707
+ };
16708
+
16709
+ /**
16710
+ * Creates a DeleteSchemaRevisionRequest message from a plain object. Also converts values to their respective internal types.
16711
+ * @function fromObject
16712
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16713
+ * @static
16714
+ * @param {Object.<string,*>} object Plain object
16715
+ * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest
16716
+ */
16717
+ DeleteSchemaRevisionRequest.fromObject = function fromObject(object) {
16718
+ if (object instanceof $root.google.pubsub.v1.DeleteSchemaRevisionRequest)
16719
+ return object;
16720
+ var message = new $root.google.pubsub.v1.DeleteSchemaRevisionRequest();
16721
+ if (object.name != null)
16722
+ message.name = String(object.name);
16723
+ if (object.revisionId != null)
16724
+ message.revisionId = String(object.revisionId);
16725
+ return message;
16726
+ };
16727
+
16728
+ /**
16729
+ * Creates a plain object from a DeleteSchemaRevisionRequest message. Also converts values to other types if specified.
16730
+ * @function toObject
16731
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16732
+ * @static
16733
+ * @param {google.pubsub.v1.DeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest
16734
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16735
+ * @returns {Object.<string,*>} Plain object
16736
+ */
16737
+ DeleteSchemaRevisionRequest.toObject = function toObject(message, options) {
16738
+ if (!options)
16739
+ options = {};
16740
+ var object = {};
16741
+ if (options.defaults) {
16742
+ object.name = "";
16743
+ object.revisionId = "";
16744
+ }
16745
+ if (message.name != null && message.hasOwnProperty("name"))
16746
+ object.name = message.name;
16747
+ if (message.revisionId != null && message.hasOwnProperty("revisionId"))
16748
+ object.revisionId = message.revisionId;
16749
+ return object;
16750
+ };
16751
+
16752
+ /**
16753
+ * Converts this DeleteSchemaRevisionRequest to JSON.
16754
+ * @function toJSON
16755
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16756
+ * @instance
16757
+ * @returns {Object.<string,*>} JSON object
16758
+ */
16759
+ DeleteSchemaRevisionRequest.prototype.toJSON = function toJSON() {
16760
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
16761
+ };
16762
+
16763
+ /**
16764
+ * Gets the default type url for DeleteSchemaRevisionRequest
16765
+ * @function getTypeUrl
16766
+ * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest
16767
+ * @static
16768
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16769
+ * @returns {string} The default type url
16770
+ */
16771
+ DeleteSchemaRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16772
+ if (typeUrlPrefix === undefined) {
16773
+ typeUrlPrefix = "type.googleapis.com";
16774
+ }
16775
+ return typeUrlPrefix + "/google.pubsub.v1.DeleteSchemaRevisionRequest";
16776
+ };
16777
+
16778
+ return DeleteSchemaRevisionRequest;
16779
+ })();
16780
+
15321
16781
  v1.DeleteSchemaRequest = (function() {
15322
16782
 
15323
16783
  /**