@googlemaps/fleetengine 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +4 -2
- package/build/protos/google/geo/type/viewport.proto +1 -1
- package/build/protos/google/maps/fleetengine/v1/fleetengine.proto +2 -1
- package/build/protos/google/maps/fleetengine/v1/header.proto +1 -1
- package/build/protos/google/maps/fleetengine/v1/traffic.proto +1 -1
- package/build/protos/google/maps/fleetengine/v1/trip_api.proto +35 -1
- package/build/protos/google/maps/fleetengine/v1/trips.proto +1 -1
- package/build/protos/google/maps/fleetengine/v1/vehicle_api.proto +37 -1
- package/build/protos/google/maps/fleetengine/v1/vehicles.proto +9 -1
- package/build/protos/protos.d.ts +536 -282
- package/build/protos/protos.js +1857 -1283
- package/build/protos/protos.json +179 -80
- package/build/src/v1/gapic_metadata.json +175 -0
- package/build/src/v1/trip_service_client.d.ts +34 -2
- package/build/src/v1/trip_service_client.js +142 -37
- package/build/src/v1/trip_service_client.js.map +1 -1
- package/build/src/v1/trip_service_client_config.json +4 -0
- package/build/src/v1/trip_service_proto_list.json +10 -0
- package/build/src/v1/vehicle_service_client.d.ts +35 -2
- package/build/src/v1/vehicle_service_client.js +155 -40
- package/build/src/v1/vehicle_service_client.js.map +1 -1
- package/build/src/v1/vehicle_service_client_config.json +4 -0
- package/build/src/v1/vehicle_service_proto_list.json +10 -0
- package/package.json +16 -16
package/build/protos/protos.js
CHANGED
|
@@ -3856,6 +3856,39 @@
|
|
|
3856
3856
|
* @variation 2
|
|
3857
3857
|
*/
|
|
3858
3858
|
|
|
3859
|
+
/**
|
|
3860
|
+
* Callback as used by {@link maps.fleetengine.v1.TripService|deleteTrip}.
|
|
3861
|
+
* @memberof maps.fleetengine.v1.TripService
|
|
3862
|
+
* @typedef DeleteTripCallback
|
|
3863
|
+
* @type {function}
|
|
3864
|
+
* @param {Error|null} error Error, if any
|
|
3865
|
+
* @param {google.protobuf.Empty} [response] Empty
|
|
3866
|
+
*/
|
|
3867
|
+
|
|
3868
|
+
/**
|
|
3869
|
+
* Calls DeleteTrip.
|
|
3870
|
+
* @function deleteTrip
|
|
3871
|
+
* @memberof maps.fleetengine.v1.TripService
|
|
3872
|
+
* @instance
|
|
3873
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest} request DeleteTripRequest message or plain object
|
|
3874
|
+
* @param {maps.fleetengine.v1.TripService.DeleteTripCallback} callback Node-style callback called with the error, if any, and Empty
|
|
3875
|
+
* @returns {undefined}
|
|
3876
|
+
* @variation 1
|
|
3877
|
+
*/
|
|
3878
|
+
Object.defineProperty(TripService.prototype.deleteTrip = function deleteTrip(request, callback) {
|
|
3879
|
+
return this.rpcCall(deleteTrip, $root.maps.fleetengine.v1.DeleteTripRequest, $root.google.protobuf.Empty, request, callback);
|
|
3880
|
+
}, "name", { value: "DeleteTrip" });
|
|
3881
|
+
|
|
3882
|
+
/**
|
|
3883
|
+
* Calls DeleteTrip.
|
|
3884
|
+
* @function deleteTrip
|
|
3885
|
+
* @memberof maps.fleetengine.v1.TripService
|
|
3886
|
+
* @instance
|
|
3887
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest} request DeleteTripRequest message or plain object
|
|
3888
|
+
* @returns {Promise<google.protobuf.Empty>} Promise
|
|
3889
|
+
* @variation 2
|
|
3890
|
+
*/
|
|
3891
|
+
|
|
3859
3892
|
/**
|
|
3860
3893
|
* Callback as used by {@link maps.fleetengine.v1.TripService|reportBillableTrip}.
|
|
3861
3894
|
* @memberof maps.fleetengine.v1.TripService
|
|
@@ -4679,6 +4712,238 @@
|
|
|
4679
4712
|
return GetTripRequest;
|
|
4680
4713
|
})();
|
|
4681
4714
|
|
|
4715
|
+
v1.DeleteTripRequest = (function() {
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* Properties of a DeleteTripRequest.
|
|
4719
|
+
* @memberof maps.fleetengine.v1
|
|
4720
|
+
* @interface IDeleteTripRequest
|
|
4721
|
+
* @property {maps.fleetengine.v1.IRequestHeader|null} [header] DeleteTripRequest header
|
|
4722
|
+
* @property {string|null} [name] DeleteTripRequest name
|
|
4723
|
+
*/
|
|
4724
|
+
|
|
4725
|
+
/**
|
|
4726
|
+
* Constructs a new DeleteTripRequest.
|
|
4727
|
+
* @memberof maps.fleetengine.v1
|
|
4728
|
+
* @classdesc Represents a DeleteTripRequest.
|
|
4729
|
+
* @implements IDeleteTripRequest
|
|
4730
|
+
* @constructor
|
|
4731
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest=} [properties] Properties to set
|
|
4732
|
+
*/
|
|
4733
|
+
function DeleteTripRequest(properties) {
|
|
4734
|
+
if (properties)
|
|
4735
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
4736
|
+
if (properties[keys[i]] != null)
|
|
4737
|
+
this[keys[i]] = properties[keys[i]];
|
|
4738
|
+
}
|
|
4739
|
+
|
|
4740
|
+
/**
|
|
4741
|
+
* DeleteTripRequest header.
|
|
4742
|
+
* @member {maps.fleetengine.v1.IRequestHeader|null|undefined} header
|
|
4743
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4744
|
+
* @instance
|
|
4745
|
+
*/
|
|
4746
|
+
DeleteTripRequest.prototype.header = null;
|
|
4747
|
+
|
|
4748
|
+
/**
|
|
4749
|
+
* DeleteTripRequest name.
|
|
4750
|
+
* @member {string} name
|
|
4751
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4752
|
+
* @instance
|
|
4753
|
+
*/
|
|
4754
|
+
DeleteTripRequest.prototype.name = "";
|
|
4755
|
+
|
|
4756
|
+
/**
|
|
4757
|
+
* Creates a new DeleteTripRequest instance using the specified properties.
|
|
4758
|
+
* @function create
|
|
4759
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4760
|
+
* @static
|
|
4761
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest=} [properties] Properties to set
|
|
4762
|
+
* @returns {maps.fleetengine.v1.DeleteTripRequest} DeleteTripRequest instance
|
|
4763
|
+
*/
|
|
4764
|
+
DeleteTripRequest.create = function create(properties) {
|
|
4765
|
+
return new DeleteTripRequest(properties);
|
|
4766
|
+
};
|
|
4767
|
+
|
|
4768
|
+
/**
|
|
4769
|
+
* Encodes the specified DeleteTripRequest message. Does not implicitly {@link maps.fleetengine.v1.DeleteTripRequest.verify|verify} messages.
|
|
4770
|
+
* @function encode
|
|
4771
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4772
|
+
* @static
|
|
4773
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest} message DeleteTripRequest message or plain object to encode
|
|
4774
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4775
|
+
* @returns {$protobuf.Writer} Writer
|
|
4776
|
+
*/
|
|
4777
|
+
DeleteTripRequest.encode = function encode(message, writer) {
|
|
4778
|
+
if (!writer)
|
|
4779
|
+
writer = $Writer.create();
|
|
4780
|
+
if (message.header != null && Object.hasOwnProperty.call(message, "header"))
|
|
4781
|
+
$root.maps.fleetengine.v1.RequestHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
4782
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
4783
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
|
|
4784
|
+
return writer;
|
|
4785
|
+
};
|
|
4786
|
+
|
|
4787
|
+
/**
|
|
4788
|
+
* Encodes the specified DeleteTripRequest message, length delimited. Does not implicitly {@link maps.fleetengine.v1.DeleteTripRequest.verify|verify} messages.
|
|
4789
|
+
* @function encodeDelimited
|
|
4790
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4791
|
+
* @static
|
|
4792
|
+
* @param {maps.fleetengine.v1.IDeleteTripRequest} message DeleteTripRequest message or plain object to encode
|
|
4793
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4794
|
+
* @returns {$protobuf.Writer} Writer
|
|
4795
|
+
*/
|
|
4796
|
+
DeleteTripRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
4797
|
+
return this.encode(message, writer).ldelim();
|
|
4798
|
+
};
|
|
4799
|
+
|
|
4800
|
+
/**
|
|
4801
|
+
* Decodes a DeleteTripRequest message from the specified reader or buffer.
|
|
4802
|
+
* @function decode
|
|
4803
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4804
|
+
* @static
|
|
4805
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4806
|
+
* @param {number} [length] Message length if known beforehand
|
|
4807
|
+
* @returns {maps.fleetengine.v1.DeleteTripRequest} DeleteTripRequest
|
|
4808
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4809
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4810
|
+
*/
|
|
4811
|
+
DeleteTripRequest.decode = function decode(reader, length) {
|
|
4812
|
+
if (!(reader instanceof $Reader))
|
|
4813
|
+
reader = $Reader.create(reader);
|
|
4814
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.maps.fleetengine.v1.DeleteTripRequest();
|
|
4815
|
+
while (reader.pos < end) {
|
|
4816
|
+
var tag = reader.uint32();
|
|
4817
|
+
switch (tag >>> 3) {
|
|
4818
|
+
case 1: {
|
|
4819
|
+
message.header = $root.maps.fleetengine.v1.RequestHeader.decode(reader, reader.uint32());
|
|
4820
|
+
break;
|
|
4821
|
+
}
|
|
4822
|
+
case 2: {
|
|
4823
|
+
message.name = reader.string();
|
|
4824
|
+
break;
|
|
4825
|
+
}
|
|
4826
|
+
default:
|
|
4827
|
+
reader.skipType(tag & 7);
|
|
4828
|
+
break;
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4831
|
+
return message;
|
|
4832
|
+
};
|
|
4833
|
+
|
|
4834
|
+
/**
|
|
4835
|
+
* Decodes a DeleteTripRequest message from the specified reader or buffer, length delimited.
|
|
4836
|
+
* @function decodeDelimited
|
|
4837
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4838
|
+
* @static
|
|
4839
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4840
|
+
* @returns {maps.fleetengine.v1.DeleteTripRequest} DeleteTripRequest
|
|
4841
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4842
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4843
|
+
*/
|
|
4844
|
+
DeleteTripRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
4845
|
+
if (!(reader instanceof $Reader))
|
|
4846
|
+
reader = new $Reader(reader);
|
|
4847
|
+
return this.decode(reader, reader.uint32());
|
|
4848
|
+
};
|
|
4849
|
+
|
|
4850
|
+
/**
|
|
4851
|
+
* Verifies a DeleteTripRequest message.
|
|
4852
|
+
* @function verify
|
|
4853
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4854
|
+
* @static
|
|
4855
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
4856
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
4857
|
+
*/
|
|
4858
|
+
DeleteTripRequest.verify = function verify(message) {
|
|
4859
|
+
if (typeof message !== "object" || message === null)
|
|
4860
|
+
return "object expected";
|
|
4861
|
+
if (message.header != null && message.hasOwnProperty("header")) {
|
|
4862
|
+
var error = $root.maps.fleetengine.v1.RequestHeader.verify(message.header);
|
|
4863
|
+
if (error)
|
|
4864
|
+
return "header." + error;
|
|
4865
|
+
}
|
|
4866
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
4867
|
+
if (!$util.isString(message.name))
|
|
4868
|
+
return "name: string expected";
|
|
4869
|
+
return null;
|
|
4870
|
+
};
|
|
4871
|
+
|
|
4872
|
+
/**
|
|
4873
|
+
* Creates a DeleteTripRequest message from a plain object. Also converts values to their respective internal types.
|
|
4874
|
+
* @function fromObject
|
|
4875
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4876
|
+
* @static
|
|
4877
|
+
* @param {Object.<string,*>} object Plain object
|
|
4878
|
+
* @returns {maps.fleetengine.v1.DeleteTripRequest} DeleteTripRequest
|
|
4879
|
+
*/
|
|
4880
|
+
DeleteTripRequest.fromObject = function fromObject(object) {
|
|
4881
|
+
if (object instanceof $root.maps.fleetengine.v1.DeleteTripRequest)
|
|
4882
|
+
return object;
|
|
4883
|
+
var message = new $root.maps.fleetengine.v1.DeleteTripRequest();
|
|
4884
|
+
if (object.header != null) {
|
|
4885
|
+
if (typeof object.header !== "object")
|
|
4886
|
+
throw TypeError(".maps.fleetengine.v1.DeleteTripRequest.header: object expected");
|
|
4887
|
+
message.header = $root.maps.fleetengine.v1.RequestHeader.fromObject(object.header);
|
|
4888
|
+
}
|
|
4889
|
+
if (object.name != null)
|
|
4890
|
+
message.name = String(object.name);
|
|
4891
|
+
return message;
|
|
4892
|
+
};
|
|
4893
|
+
|
|
4894
|
+
/**
|
|
4895
|
+
* Creates a plain object from a DeleteTripRequest message. Also converts values to other types if specified.
|
|
4896
|
+
* @function toObject
|
|
4897
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4898
|
+
* @static
|
|
4899
|
+
* @param {maps.fleetengine.v1.DeleteTripRequest} message DeleteTripRequest
|
|
4900
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
4901
|
+
* @returns {Object.<string,*>} Plain object
|
|
4902
|
+
*/
|
|
4903
|
+
DeleteTripRequest.toObject = function toObject(message, options) {
|
|
4904
|
+
if (!options)
|
|
4905
|
+
options = {};
|
|
4906
|
+
var object = {};
|
|
4907
|
+
if (options.defaults) {
|
|
4908
|
+
object.header = null;
|
|
4909
|
+
object.name = "";
|
|
4910
|
+
}
|
|
4911
|
+
if (message.header != null && message.hasOwnProperty("header"))
|
|
4912
|
+
object.header = $root.maps.fleetengine.v1.RequestHeader.toObject(message.header, options);
|
|
4913
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
4914
|
+
object.name = message.name;
|
|
4915
|
+
return object;
|
|
4916
|
+
};
|
|
4917
|
+
|
|
4918
|
+
/**
|
|
4919
|
+
* Converts this DeleteTripRequest to JSON.
|
|
4920
|
+
* @function toJSON
|
|
4921
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4922
|
+
* @instance
|
|
4923
|
+
* @returns {Object.<string,*>} JSON object
|
|
4924
|
+
*/
|
|
4925
|
+
DeleteTripRequest.prototype.toJSON = function toJSON() {
|
|
4926
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
4927
|
+
};
|
|
4928
|
+
|
|
4929
|
+
/**
|
|
4930
|
+
* Gets the default type url for DeleteTripRequest
|
|
4931
|
+
* @function getTypeUrl
|
|
4932
|
+
* @memberof maps.fleetengine.v1.DeleteTripRequest
|
|
4933
|
+
* @static
|
|
4934
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4935
|
+
* @returns {string} The default type url
|
|
4936
|
+
*/
|
|
4937
|
+
DeleteTripRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4938
|
+
if (typeUrlPrefix === undefined) {
|
|
4939
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
4940
|
+
}
|
|
4941
|
+
return typeUrlPrefix + "/maps.fleetengine.v1.DeleteTripRequest";
|
|
4942
|
+
};
|
|
4943
|
+
|
|
4944
|
+
return DeleteTripRequest;
|
|
4945
|
+
})();
|
|
4946
|
+
|
|
4682
4947
|
v1.ReportBillableTripRequest = (function() {
|
|
4683
4948
|
|
|
4684
4949
|
/**
|
|
@@ -7641,6 +7906,39 @@
|
|
|
7641
7906
|
* @variation 2
|
|
7642
7907
|
*/
|
|
7643
7908
|
|
|
7909
|
+
/**
|
|
7910
|
+
* Callback as used by {@link maps.fleetengine.v1.VehicleService|deleteVehicle}.
|
|
7911
|
+
* @memberof maps.fleetengine.v1.VehicleService
|
|
7912
|
+
* @typedef DeleteVehicleCallback
|
|
7913
|
+
* @type {function}
|
|
7914
|
+
* @param {Error|null} error Error, if any
|
|
7915
|
+
* @param {google.protobuf.Empty} [response] Empty
|
|
7916
|
+
*/
|
|
7917
|
+
|
|
7918
|
+
/**
|
|
7919
|
+
* Calls DeleteVehicle.
|
|
7920
|
+
* @function deleteVehicle
|
|
7921
|
+
* @memberof maps.fleetengine.v1.VehicleService
|
|
7922
|
+
* @instance
|
|
7923
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest} request DeleteVehicleRequest message or plain object
|
|
7924
|
+
* @param {maps.fleetengine.v1.VehicleService.DeleteVehicleCallback} callback Node-style callback called with the error, if any, and Empty
|
|
7925
|
+
* @returns {undefined}
|
|
7926
|
+
* @variation 1
|
|
7927
|
+
*/
|
|
7928
|
+
Object.defineProperty(VehicleService.prototype.deleteVehicle = function deleteVehicle(request, callback) {
|
|
7929
|
+
return this.rpcCall(deleteVehicle, $root.maps.fleetengine.v1.DeleteVehicleRequest, $root.google.protobuf.Empty, request, callback);
|
|
7930
|
+
}, "name", { value: "DeleteVehicle" });
|
|
7931
|
+
|
|
7932
|
+
/**
|
|
7933
|
+
* Calls DeleteVehicle.
|
|
7934
|
+
* @function deleteVehicle
|
|
7935
|
+
* @memberof maps.fleetengine.v1.VehicleService
|
|
7936
|
+
* @instance
|
|
7937
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest} request DeleteVehicleRequest message or plain object
|
|
7938
|
+
* @returns {Promise<google.protobuf.Empty>} Promise
|
|
7939
|
+
* @variation 2
|
|
7940
|
+
*/
|
|
7941
|
+
|
|
7644
7942
|
/**
|
|
7645
7943
|
* Callback as used by {@link maps.fleetengine.v1.VehicleService|updateVehicle}.
|
|
7646
7944
|
* @memberof maps.fleetengine.v1.VehicleService
|
|
@@ -8347,27 +8645,25 @@
|
|
|
8347
8645
|
return GetVehicleRequest;
|
|
8348
8646
|
})();
|
|
8349
8647
|
|
|
8350
|
-
v1.
|
|
8648
|
+
v1.DeleteVehicleRequest = (function() {
|
|
8351
8649
|
|
|
8352
8650
|
/**
|
|
8353
|
-
* Properties of
|
|
8651
|
+
* Properties of a DeleteVehicleRequest.
|
|
8354
8652
|
* @memberof maps.fleetengine.v1
|
|
8355
|
-
* @interface
|
|
8356
|
-
* @property {maps.fleetengine.v1.IRequestHeader|null} [header]
|
|
8357
|
-
* @property {string|null} [name]
|
|
8358
|
-
* @property {maps.fleetengine.v1.IVehicle|null} [vehicle] UpdateVehicleRequest vehicle
|
|
8359
|
-
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVehicleRequest updateMask
|
|
8653
|
+
* @interface IDeleteVehicleRequest
|
|
8654
|
+
* @property {maps.fleetengine.v1.IRequestHeader|null} [header] DeleteVehicleRequest header
|
|
8655
|
+
* @property {string|null} [name] DeleteVehicleRequest name
|
|
8360
8656
|
*/
|
|
8361
8657
|
|
|
8362
8658
|
/**
|
|
8363
|
-
* Constructs a new
|
|
8659
|
+
* Constructs a new DeleteVehicleRequest.
|
|
8364
8660
|
* @memberof maps.fleetengine.v1
|
|
8365
|
-
* @classdesc Represents
|
|
8366
|
-
* @implements
|
|
8661
|
+
* @classdesc Represents a DeleteVehicleRequest.
|
|
8662
|
+
* @implements IDeleteVehicleRequest
|
|
8367
8663
|
* @constructor
|
|
8368
|
-
* @param {maps.fleetengine.v1.
|
|
8664
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest=} [properties] Properties to set
|
|
8369
8665
|
*/
|
|
8370
|
-
function
|
|
8666
|
+
function DeleteVehicleRequest(properties) {
|
|
8371
8667
|
if (properties)
|
|
8372
8668
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
8373
8669
|
if (properties[keys[i]] != null)
|
|
@@ -8375,55 +8671,289 @@
|
|
|
8375
8671
|
}
|
|
8376
8672
|
|
|
8377
8673
|
/**
|
|
8378
|
-
*
|
|
8674
|
+
* DeleteVehicleRequest header.
|
|
8379
8675
|
* @member {maps.fleetengine.v1.IRequestHeader|null|undefined} header
|
|
8380
|
-
* @memberof maps.fleetengine.v1.
|
|
8676
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8381
8677
|
* @instance
|
|
8382
8678
|
*/
|
|
8383
|
-
|
|
8679
|
+
DeleteVehicleRequest.prototype.header = null;
|
|
8384
8680
|
|
|
8385
8681
|
/**
|
|
8386
|
-
*
|
|
8682
|
+
* DeleteVehicleRequest name.
|
|
8387
8683
|
* @member {string} name
|
|
8388
|
-
* @memberof maps.fleetengine.v1.
|
|
8389
|
-
* @instance
|
|
8390
|
-
*/
|
|
8391
|
-
UpdateVehicleRequest.prototype.name = "";
|
|
8392
|
-
|
|
8393
|
-
/**
|
|
8394
|
-
* UpdateVehicleRequest vehicle.
|
|
8395
|
-
* @member {maps.fleetengine.v1.IVehicle|null|undefined} vehicle
|
|
8396
|
-
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8397
|
-
* @instance
|
|
8398
|
-
*/
|
|
8399
|
-
UpdateVehicleRequest.prototype.vehicle = null;
|
|
8400
|
-
|
|
8401
|
-
/**
|
|
8402
|
-
* UpdateVehicleRequest updateMask.
|
|
8403
|
-
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
8404
|
-
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8684
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8405
8685
|
* @instance
|
|
8406
8686
|
*/
|
|
8407
|
-
|
|
8687
|
+
DeleteVehicleRequest.prototype.name = "";
|
|
8408
8688
|
|
|
8409
8689
|
/**
|
|
8410
|
-
* Creates a new
|
|
8690
|
+
* Creates a new DeleteVehicleRequest instance using the specified properties.
|
|
8411
8691
|
* @function create
|
|
8412
|
-
* @memberof maps.fleetengine.v1.
|
|
8692
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8413
8693
|
* @static
|
|
8414
|
-
* @param {maps.fleetengine.v1.
|
|
8415
|
-
* @returns {maps.fleetengine.v1.
|
|
8694
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest=} [properties] Properties to set
|
|
8695
|
+
* @returns {maps.fleetengine.v1.DeleteVehicleRequest} DeleteVehicleRequest instance
|
|
8416
8696
|
*/
|
|
8417
|
-
|
|
8418
|
-
return new
|
|
8697
|
+
DeleteVehicleRequest.create = function create(properties) {
|
|
8698
|
+
return new DeleteVehicleRequest(properties);
|
|
8419
8699
|
};
|
|
8420
8700
|
|
|
8421
8701
|
/**
|
|
8422
|
-
* Encodes the specified
|
|
8702
|
+
* Encodes the specified DeleteVehicleRequest message. Does not implicitly {@link maps.fleetengine.v1.DeleteVehicleRequest.verify|verify} messages.
|
|
8423
8703
|
* @function encode
|
|
8424
|
-
* @memberof maps.fleetengine.v1.
|
|
8704
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8425
8705
|
* @static
|
|
8426
|
-
* @param {maps.fleetengine.v1.
|
|
8706
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest} message DeleteVehicleRequest message or plain object to encode
|
|
8707
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8708
|
+
* @returns {$protobuf.Writer} Writer
|
|
8709
|
+
*/
|
|
8710
|
+
DeleteVehicleRequest.encode = function encode(message, writer) {
|
|
8711
|
+
if (!writer)
|
|
8712
|
+
writer = $Writer.create();
|
|
8713
|
+
if (message.header != null && Object.hasOwnProperty.call(message, "header"))
|
|
8714
|
+
$root.maps.fleetengine.v1.RequestHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
8715
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
8716
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
|
|
8717
|
+
return writer;
|
|
8718
|
+
};
|
|
8719
|
+
|
|
8720
|
+
/**
|
|
8721
|
+
* Encodes the specified DeleteVehicleRequest message, length delimited. Does not implicitly {@link maps.fleetengine.v1.DeleteVehicleRequest.verify|verify} messages.
|
|
8722
|
+
* @function encodeDelimited
|
|
8723
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8724
|
+
* @static
|
|
8725
|
+
* @param {maps.fleetengine.v1.IDeleteVehicleRequest} message DeleteVehicleRequest message or plain object to encode
|
|
8726
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8727
|
+
* @returns {$protobuf.Writer} Writer
|
|
8728
|
+
*/
|
|
8729
|
+
DeleteVehicleRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
8730
|
+
return this.encode(message, writer).ldelim();
|
|
8731
|
+
};
|
|
8732
|
+
|
|
8733
|
+
/**
|
|
8734
|
+
* Decodes a DeleteVehicleRequest message from the specified reader or buffer.
|
|
8735
|
+
* @function decode
|
|
8736
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8737
|
+
* @static
|
|
8738
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8739
|
+
* @param {number} [length] Message length if known beforehand
|
|
8740
|
+
* @returns {maps.fleetengine.v1.DeleteVehicleRequest} DeleteVehicleRequest
|
|
8741
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8742
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8743
|
+
*/
|
|
8744
|
+
DeleteVehicleRequest.decode = function decode(reader, length) {
|
|
8745
|
+
if (!(reader instanceof $Reader))
|
|
8746
|
+
reader = $Reader.create(reader);
|
|
8747
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.maps.fleetengine.v1.DeleteVehicleRequest();
|
|
8748
|
+
while (reader.pos < end) {
|
|
8749
|
+
var tag = reader.uint32();
|
|
8750
|
+
switch (tag >>> 3) {
|
|
8751
|
+
case 1: {
|
|
8752
|
+
message.header = $root.maps.fleetengine.v1.RequestHeader.decode(reader, reader.uint32());
|
|
8753
|
+
break;
|
|
8754
|
+
}
|
|
8755
|
+
case 2: {
|
|
8756
|
+
message.name = reader.string();
|
|
8757
|
+
break;
|
|
8758
|
+
}
|
|
8759
|
+
default:
|
|
8760
|
+
reader.skipType(tag & 7);
|
|
8761
|
+
break;
|
|
8762
|
+
}
|
|
8763
|
+
}
|
|
8764
|
+
return message;
|
|
8765
|
+
};
|
|
8766
|
+
|
|
8767
|
+
/**
|
|
8768
|
+
* Decodes a DeleteVehicleRequest message from the specified reader or buffer, length delimited.
|
|
8769
|
+
* @function decodeDelimited
|
|
8770
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8771
|
+
* @static
|
|
8772
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8773
|
+
* @returns {maps.fleetengine.v1.DeleteVehicleRequest} DeleteVehicleRequest
|
|
8774
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8775
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8776
|
+
*/
|
|
8777
|
+
DeleteVehicleRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
8778
|
+
if (!(reader instanceof $Reader))
|
|
8779
|
+
reader = new $Reader(reader);
|
|
8780
|
+
return this.decode(reader, reader.uint32());
|
|
8781
|
+
};
|
|
8782
|
+
|
|
8783
|
+
/**
|
|
8784
|
+
* Verifies a DeleteVehicleRequest message.
|
|
8785
|
+
* @function verify
|
|
8786
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8787
|
+
* @static
|
|
8788
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
8789
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
8790
|
+
*/
|
|
8791
|
+
DeleteVehicleRequest.verify = function verify(message) {
|
|
8792
|
+
if (typeof message !== "object" || message === null)
|
|
8793
|
+
return "object expected";
|
|
8794
|
+
if (message.header != null && message.hasOwnProperty("header")) {
|
|
8795
|
+
var error = $root.maps.fleetengine.v1.RequestHeader.verify(message.header);
|
|
8796
|
+
if (error)
|
|
8797
|
+
return "header." + error;
|
|
8798
|
+
}
|
|
8799
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
8800
|
+
if (!$util.isString(message.name))
|
|
8801
|
+
return "name: string expected";
|
|
8802
|
+
return null;
|
|
8803
|
+
};
|
|
8804
|
+
|
|
8805
|
+
/**
|
|
8806
|
+
* Creates a DeleteVehicleRequest message from a plain object. Also converts values to their respective internal types.
|
|
8807
|
+
* @function fromObject
|
|
8808
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8809
|
+
* @static
|
|
8810
|
+
* @param {Object.<string,*>} object Plain object
|
|
8811
|
+
* @returns {maps.fleetengine.v1.DeleteVehicleRequest} DeleteVehicleRequest
|
|
8812
|
+
*/
|
|
8813
|
+
DeleteVehicleRequest.fromObject = function fromObject(object) {
|
|
8814
|
+
if (object instanceof $root.maps.fleetengine.v1.DeleteVehicleRequest)
|
|
8815
|
+
return object;
|
|
8816
|
+
var message = new $root.maps.fleetengine.v1.DeleteVehicleRequest();
|
|
8817
|
+
if (object.header != null) {
|
|
8818
|
+
if (typeof object.header !== "object")
|
|
8819
|
+
throw TypeError(".maps.fleetengine.v1.DeleteVehicleRequest.header: object expected");
|
|
8820
|
+
message.header = $root.maps.fleetengine.v1.RequestHeader.fromObject(object.header);
|
|
8821
|
+
}
|
|
8822
|
+
if (object.name != null)
|
|
8823
|
+
message.name = String(object.name);
|
|
8824
|
+
return message;
|
|
8825
|
+
};
|
|
8826
|
+
|
|
8827
|
+
/**
|
|
8828
|
+
* Creates a plain object from a DeleteVehicleRequest message. Also converts values to other types if specified.
|
|
8829
|
+
* @function toObject
|
|
8830
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8831
|
+
* @static
|
|
8832
|
+
* @param {maps.fleetengine.v1.DeleteVehicleRequest} message DeleteVehicleRequest
|
|
8833
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
8834
|
+
* @returns {Object.<string,*>} Plain object
|
|
8835
|
+
*/
|
|
8836
|
+
DeleteVehicleRequest.toObject = function toObject(message, options) {
|
|
8837
|
+
if (!options)
|
|
8838
|
+
options = {};
|
|
8839
|
+
var object = {};
|
|
8840
|
+
if (options.defaults) {
|
|
8841
|
+
object.header = null;
|
|
8842
|
+
object.name = "";
|
|
8843
|
+
}
|
|
8844
|
+
if (message.header != null && message.hasOwnProperty("header"))
|
|
8845
|
+
object.header = $root.maps.fleetengine.v1.RequestHeader.toObject(message.header, options);
|
|
8846
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
8847
|
+
object.name = message.name;
|
|
8848
|
+
return object;
|
|
8849
|
+
};
|
|
8850
|
+
|
|
8851
|
+
/**
|
|
8852
|
+
* Converts this DeleteVehicleRequest to JSON.
|
|
8853
|
+
* @function toJSON
|
|
8854
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8855
|
+
* @instance
|
|
8856
|
+
* @returns {Object.<string,*>} JSON object
|
|
8857
|
+
*/
|
|
8858
|
+
DeleteVehicleRequest.prototype.toJSON = function toJSON() {
|
|
8859
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
8860
|
+
};
|
|
8861
|
+
|
|
8862
|
+
/**
|
|
8863
|
+
* Gets the default type url for DeleteVehicleRequest
|
|
8864
|
+
* @function getTypeUrl
|
|
8865
|
+
* @memberof maps.fleetengine.v1.DeleteVehicleRequest
|
|
8866
|
+
* @static
|
|
8867
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
8868
|
+
* @returns {string} The default type url
|
|
8869
|
+
*/
|
|
8870
|
+
DeleteVehicleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
8871
|
+
if (typeUrlPrefix === undefined) {
|
|
8872
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
8873
|
+
}
|
|
8874
|
+
return typeUrlPrefix + "/maps.fleetengine.v1.DeleteVehicleRequest";
|
|
8875
|
+
};
|
|
8876
|
+
|
|
8877
|
+
return DeleteVehicleRequest;
|
|
8878
|
+
})();
|
|
8879
|
+
|
|
8880
|
+
v1.UpdateVehicleRequest = (function() {
|
|
8881
|
+
|
|
8882
|
+
/**
|
|
8883
|
+
* Properties of an UpdateVehicleRequest.
|
|
8884
|
+
* @memberof maps.fleetengine.v1
|
|
8885
|
+
* @interface IUpdateVehicleRequest
|
|
8886
|
+
* @property {maps.fleetengine.v1.IRequestHeader|null} [header] UpdateVehicleRequest header
|
|
8887
|
+
* @property {string|null} [name] UpdateVehicleRequest name
|
|
8888
|
+
* @property {maps.fleetengine.v1.IVehicle|null} [vehicle] UpdateVehicleRequest vehicle
|
|
8889
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVehicleRequest updateMask
|
|
8890
|
+
*/
|
|
8891
|
+
|
|
8892
|
+
/**
|
|
8893
|
+
* Constructs a new UpdateVehicleRequest.
|
|
8894
|
+
* @memberof maps.fleetengine.v1
|
|
8895
|
+
* @classdesc Represents an UpdateVehicleRequest.
|
|
8896
|
+
* @implements IUpdateVehicleRequest
|
|
8897
|
+
* @constructor
|
|
8898
|
+
* @param {maps.fleetengine.v1.IUpdateVehicleRequest=} [properties] Properties to set
|
|
8899
|
+
*/
|
|
8900
|
+
function UpdateVehicleRequest(properties) {
|
|
8901
|
+
if (properties)
|
|
8902
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
8903
|
+
if (properties[keys[i]] != null)
|
|
8904
|
+
this[keys[i]] = properties[keys[i]];
|
|
8905
|
+
}
|
|
8906
|
+
|
|
8907
|
+
/**
|
|
8908
|
+
* UpdateVehicleRequest header.
|
|
8909
|
+
* @member {maps.fleetengine.v1.IRequestHeader|null|undefined} header
|
|
8910
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8911
|
+
* @instance
|
|
8912
|
+
*/
|
|
8913
|
+
UpdateVehicleRequest.prototype.header = null;
|
|
8914
|
+
|
|
8915
|
+
/**
|
|
8916
|
+
* UpdateVehicleRequest name.
|
|
8917
|
+
* @member {string} name
|
|
8918
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8919
|
+
* @instance
|
|
8920
|
+
*/
|
|
8921
|
+
UpdateVehicleRequest.prototype.name = "";
|
|
8922
|
+
|
|
8923
|
+
/**
|
|
8924
|
+
* UpdateVehicleRequest vehicle.
|
|
8925
|
+
* @member {maps.fleetengine.v1.IVehicle|null|undefined} vehicle
|
|
8926
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8927
|
+
* @instance
|
|
8928
|
+
*/
|
|
8929
|
+
UpdateVehicleRequest.prototype.vehicle = null;
|
|
8930
|
+
|
|
8931
|
+
/**
|
|
8932
|
+
* UpdateVehicleRequest updateMask.
|
|
8933
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
8934
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8935
|
+
* @instance
|
|
8936
|
+
*/
|
|
8937
|
+
UpdateVehicleRequest.prototype.updateMask = null;
|
|
8938
|
+
|
|
8939
|
+
/**
|
|
8940
|
+
* Creates a new UpdateVehicleRequest instance using the specified properties.
|
|
8941
|
+
* @function create
|
|
8942
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8943
|
+
* @static
|
|
8944
|
+
* @param {maps.fleetengine.v1.IUpdateVehicleRequest=} [properties] Properties to set
|
|
8945
|
+
* @returns {maps.fleetengine.v1.UpdateVehicleRequest} UpdateVehicleRequest instance
|
|
8946
|
+
*/
|
|
8947
|
+
UpdateVehicleRequest.create = function create(properties) {
|
|
8948
|
+
return new UpdateVehicleRequest(properties);
|
|
8949
|
+
};
|
|
8950
|
+
|
|
8951
|
+
/**
|
|
8952
|
+
* Encodes the specified UpdateVehicleRequest message. Does not implicitly {@link maps.fleetengine.v1.UpdateVehicleRequest.verify|verify} messages.
|
|
8953
|
+
* @function encode
|
|
8954
|
+
* @memberof maps.fleetengine.v1.UpdateVehicleRequest
|
|
8955
|
+
* @static
|
|
8956
|
+
* @param {maps.fleetengine.v1.IUpdateVehicleRequest} message UpdateVehicleRequest message or plain object to encode
|
|
8427
8957
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8428
8958
|
* @returns {$protobuf.Writer} Writer
|
|
8429
8959
|
*/
|
|
@@ -12346,6 +12876,7 @@
|
|
|
12346
12876
|
* @property {Array.<maps.fleetengine.v1.TripType>|null} [supportedTripTypes] Vehicle supportedTripTypes
|
|
12347
12877
|
* @property {Array.<string>|null} [currentTrips] Vehicle currentTrips
|
|
12348
12878
|
* @property {maps.fleetengine.v1.IVehicleLocation|null} [lastLocation] Vehicle lastLocation
|
|
12879
|
+
* @property {Array.<maps.fleetengine.v1.IVehicleLocation>|null} [pastLocations] Vehicle pastLocations
|
|
12349
12880
|
* @property {number|null} [maximumCapacity] Vehicle maximumCapacity
|
|
12350
12881
|
* @property {Array.<maps.fleetengine.v1.IVehicleAttribute>|null} [attributes] Vehicle attributes
|
|
12351
12882
|
* @property {maps.fleetengine.v1.Vehicle.IVehicleType|null} [vehicleType] Vehicle vehicleType
|
|
@@ -12376,6 +12907,7 @@
|
|
|
12376
12907
|
function Vehicle(properties) {
|
|
12377
12908
|
this.supportedTripTypes = [];
|
|
12378
12909
|
this.currentTrips = [];
|
|
12910
|
+
this.pastLocations = [];
|
|
12379
12911
|
this.attributes = [];
|
|
12380
12912
|
this.route = [];
|
|
12381
12913
|
this.waypoints = [];
|
|
@@ -12425,6 +12957,14 @@
|
|
|
12425
12957
|
*/
|
|
12426
12958
|
Vehicle.prototype.lastLocation = null;
|
|
12427
12959
|
|
|
12960
|
+
/**
|
|
12961
|
+
* Vehicle pastLocations.
|
|
12962
|
+
* @member {Array.<maps.fleetengine.v1.IVehicleLocation>} pastLocations
|
|
12963
|
+
* @memberof maps.fleetengine.v1.Vehicle
|
|
12964
|
+
* @instance
|
|
12965
|
+
*/
|
|
12966
|
+
Vehicle.prototype.pastLocations = $util.emptyArray;
|
|
12967
|
+
|
|
12428
12968
|
/**
|
|
12429
12969
|
* Vehicle maximumCapacity.
|
|
12430
12970
|
* @member {number} maximumCapacity
|
|
@@ -12637,6 +13177,9 @@
|
|
|
12637
13177
|
$root.maps.fleetengine.v1.DeviceSettings.encode(message.deviceSettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
|
|
12638
13178
|
if (message.currentRouteSegmentTraffic != null && Object.hasOwnProperty.call(message, "currentRouteSegmentTraffic"))
|
|
12639
13179
|
$root.maps.fleetengine.v1.TrafficPolylineData.encode(message.currentRouteSegmentTraffic, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
|
|
13180
|
+
if (message.pastLocations != null && message.pastLocations.length)
|
|
13181
|
+
for (var i = 0; i < message.pastLocations.length; ++i)
|
|
13182
|
+
$root.maps.fleetengine.v1.VehicleLocation.encode(message.pastLocations[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
|
|
12640
13183
|
return writer;
|
|
12641
13184
|
};
|
|
12642
13185
|
|
|
@@ -12700,6 +13243,12 @@
|
|
|
12700
13243
|
message.lastLocation = $root.maps.fleetengine.v1.VehicleLocation.decode(reader, reader.uint32());
|
|
12701
13244
|
break;
|
|
12702
13245
|
}
|
|
13246
|
+
case 30: {
|
|
13247
|
+
if (!(message.pastLocations && message.pastLocations.length))
|
|
13248
|
+
message.pastLocations = [];
|
|
13249
|
+
message.pastLocations.push($root.maps.fleetengine.v1.VehicleLocation.decode(reader, reader.uint32()));
|
|
13250
|
+
break;
|
|
13251
|
+
}
|
|
12703
13252
|
case 6: {
|
|
12704
13253
|
message.maximumCapacity = reader.int32();
|
|
12705
13254
|
break;
|
|
@@ -12846,6 +13395,15 @@
|
|
|
12846
13395
|
if (error)
|
|
12847
13396
|
return "lastLocation." + error;
|
|
12848
13397
|
}
|
|
13398
|
+
if (message.pastLocations != null && message.hasOwnProperty("pastLocations")) {
|
|
13399
|
+
if (!Array.isArray(message.pastLocations))
|
|
13400
|
+
return "pastLocations: array expected";
|
|
13401
|
+
for (var i = 0; i < message.pastLocations.length; ++i) {
|
|
13402
|
+
var error = $root.maps.fleetengine.v1.VehicleLocation.verify(message.pastLocations[i]);
|
|
13403
|
+
if (error)
|
|
13404
|
+
return "pastLocations." + error;
|
|
13405
|
+
}
|
|
13406
|
+
}
|
|
12849
13407
|
if (message.maximumCapacity != null && message.hasOwnProperty("maximumCapacity"))
|
|
12850
13408
|
if (!$util.isInteger(message.maximumCapacity))
|
|
12851
13409
|
return "maximumCapacity: integer expected";
|
|
@@ -13017,6 +13575,16 @@
|
|
|
13017
13575
|
throw TypeError(".maps.fleetengine.v1.Vehicle.lastLocation: object expected");
|
|
13018
13576
|
message.lastLocation = $root.maps.fleetengine.v1.VehicleLocation.fromObject(object.lastLocation);
|
|
13019
13577
|
}
|
|
13578
|
+
if (object.pastLocations) {
|
|
13579
|
+
if (!Array.isArray(object.pastLocations))
|
|
13580
|
+
throw TypeError(".maps.fleetengine.v1.Vehicle.pastLocations: array expected");
|
|
13581
|
+
message.pastLocations = [];
|
|
13582
|
+
for (var i = 0; i < object.pastLocations.length; ++i) {
|
|
13583
|
+
if (typeof object.pastLocations[i] !== "object")
|
|
13584
|
+
throw TypeError(".maps.fleetengine.v1.Vehicle.pastLocations: object expected");
|
|
13585
|
+
message.pastLocations[i] = $root.maps.fleetengine.v1.VehicleLocation.fromObject(object.pastLocations[i]);
|
|
13586
|
+
}
|
|
13587
|
+
}
|
|
13020
13588
|
if (object.maximumCapacity != null)
|
|
13021
13589
|
message.maximumCapacity = object.maximumCapacity | 0;
|
|
13022
13590
|
if (object.attributes) {
|
|
@@ -13153,6 +13721,7 @@
|
|
|
13153
13721
|
object.attributes = [];
|
|
13154
13722
|
object.route = [];
|
|
13155
13723
|
object.waypoints = [];
|
|
13724
|
+
object.pastLocations = [];
|
|
13156
13725
|
}
|
|
13157
13726
|
if (options.defaults) {
|
|
13158
13727
|
object.name = "";
|
|
@@ -13232,6 +13801,11 @@
|
|
|
13232
13801
|
object.deviceSettings = $root.maps.fleetengine.v1.DeviceSettings.toObject(message.deviceSettings, options);
|
|
13233
13802
|
if (message.currentRouteSegmentTraffic != null && message.hasOwnProperty("currentRouteSegmentTraffic"))
|
|
13234
13803
|
object.currentRouteSegmentTraffic = $root.maps.fleetengine.v1.TrafficPolylineData.toObject(message.currentRouteSegmentTraffic, options);
|
|
13804
|
+
if (message.pastLocations && message.pastLocations.length) {
|
|
13805
|
+
object.pastLocations = [];
|
|
13806
|
+
for (var j = 0; j < message.pastLocations.length; ++j)
|
|
13807
|
+
object.pastLocations[j] = $root.maps.fleetengine.v1.VehicleLocation.toObject(message.pastLocations[j], options);
|
|
13808
|
+
}
|
|
13235
13809
|
return object;
|
|
13236
13810
|
};
|
|
13237
13811
|
|
|
@@ -15759,26 +16333,32 @@
|
|
|
15759
16333
|
return values;
|
|
15760
16334
|
})();
|
|
15761
16335
|
|
|
15762
|
-
api.
|
|
16336
|
+
api.ResourceDescriptor = (function() {
|
|
15763
16337
|
|
|
15764
16338
|
/**
|
|
15765
|
-
* Properties of a
|
|
16339
|
+
* Properties of a ResourceDescriptor.
|
|
15766
16340
|
* @memberof google.api
|
|
15767
|
-
* @interface
|
|
15768
|
-
* @property {
|
|
15769
|
-
* @property {
|
|
16341
|
+
* @interface IResourceDescriptor
|
|
16342
|
+
* @property {string|null} [type] ResourceDescriptor type
|
|
16343
|
+
* @property {Array.<string>|null} [pattern] ResourceDescriptor pattern
|
|
16344
|
+
* @property {string|null} [nameField] ResourceDescriptor nameField
|
|
16345
|
+
* @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
|
|
16346
|
+
* @property {string|null} [plural] ResourceDescriptor plural
|
|
16347
|
+
* @property {string|null} [singular] ResourceDescriptor singular
|
|
16348
|
+
* @property {Array.<google.api.ResourceDescriptor.Style>|null} [style] ResourceDescriptor style
|
|
15770
16349
|
*/
|
|
15771
16350
|
|
|
15772
16351
|
/**
|
|
15773
|
-
* Constructs a new
|
|
16352
|
+
* Constructs a new ResourceDescriptor.
|
|
15774
16353
|
* @memberof google.api
|
|
15775
|
-
* @classdesc Represents a
|
|
15776
|
-
* @implements
|
|
16354
|
+
* @classdesc Represents a ResourceDescriptor.
|
|
16355
|
+
* @implements IResourceDescriptor
|
|
15777
16356
|
* @constructor
|
|
15778
|
-
* @param {google.api.
|
|
16357
|
+
* @param {google.api.IResourceDescriptor=} [properties] Properties to set
|
|
15779
16358
|
*/
|
|
15780
|
-
function
|
|
15781
|
-
this.
|
|
16359
|
+
function ResourceDescriptor(properties) {
|
|
16360
|
+
this.pattern = [];
|
|
16361
|
+
this.style = [];
|
|
15782
16362
|
if (properties)
|
|
15783
16363
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
15784
16364
|
if (properties[keys[i]] != null)
|
|
@@ -15786,92 +16366,173 @@
|
|
|
15786
16366
|
}
|
|
15787
16367
|
|
|
15788
16368
|
/**
|
|
15789
|
-
*
|
|
15790
|
-
* @member {
|
|
15791
|
-
* @memberof google.api.
|
|
16369
|
+
* ResourceDescriptor type.
|
|
16370
|
+
* @member {string} type
|
|
16371
|
+
* @memberof google.api.ResourceDescriptor
|
|
15792
16372
|
* @instance
|
|
15793
16373
|
*/
|
|
15794
|
-
|
|
16374
|
+
ResourceDescriptor.prototype.type = "";
|
|
15795
16375
|
|
|
15796
16376
|
/**
|
|
15797
|
-
*
|
|
15798
|
-
* @member {
|
|
15799
|
-
* @memberof google.api.
|
|
16377
|
+
* ResourceDescriptor pattern.
|
|
16378
|
+
* @member {Array.<string>} pattern
|
|
16379
|
+
* @memberof google.api.ResourceDescriptor
|
|
15800
16380
|
* @instance
|
|
15801
16381
|
*/
|
|
15802
|
-
|
|
16382
|
+
ResourceDescriptor.prototype.pattern = $util.emptyArray;
|
|
15803
16383
|
|
|
15804
16384
|
/**
|
|
15805
|
-
*
|
|
16385
|
+
* ResourceDescriptor nameField.
|
|
16386
|
+
* @member {string} nameField
|
|
16387
|
+
* @memberof google.api.ResourceDescriptor
|
|
16388
|
+
* @instance
|
|
16389
|
+
*/
|
|
16390
|
+
ResourceDescriptor.prototype.nameField = "";
|
|
16391
|
+
|
|
16392
|
+
/**
|
|
16393
|
+
* ResourceDescriptor history.
|
|
16394
|
+
* @member {google.api.ResourceDescriptor.History} history
|
|
16395
|
+
* @memberof google.api.ResourceDescriptor
|
|
16396
|
+
* @instance
|
|
16397
|
+
*/
|
|
16398
|
+
ResourceDescriptor.prototype.history = 0;
|
|
16399
|
+
|
|
16400
|
+
/**
|
|
16401
|
+
* ResourceDescriptor plural.
|
|
16402
|
+
* @member {string} plural
|
|
16403
|
+
* @memberof google.api.ResourceDescriptor
|
|
16404
|
+
* @instance
|
|
16405
|
+
*/
|
|
16406
|
+
ResourceDescriptor.prototype.plural = "";
|
|
16407
|
+
|
|
16408
|
+
/**
|
|
16409
|
+
* ResourceDescriptor singular.
|
|
16410
|
+
* @member {string} singular
|
|
16411
|
+
* @memberof google.api.ResourceDescriptor
|
|
16412
|
+
* @instance
|
|
16413
|
+
*/
|
|
16414
|
+
ResourceDescriptor.prototype.singular = "";
|
|
16415
|
+
|
|
16416
|
+
/**
|
|
16417
|
+
* ResourceDescriptor style.
|
|
16418
|
+
* @member {Array.<google.api.ResourceDescriptor.Style>} style
|
|
16419
|
+
* @memberof google.api.ResourceDescriptor
|
|
16420
|
+
* @instance
|
|
16421
|
+
*/
|
|
16422
|
+
ResourceDescriptor.prototype.style = $util.emptyArray;
|
|
16423
|
+
|
|
16424
|
+
/**
|
|
16425
|
+
* Creates a new ResourceDescriptor instance using the specified properties.
|
|
15806
16426
|
* @function create
|
|
15807
|
-
* @memberof google.api.
|
|
16427
|
+
* @memberof google.api.ResourceDescriptor
|
|
15808
16428
|
* @static
|
|
15809
|
-
* @param {google.api.
|
|
15810
|
-
* @returns {google.api.
|
|
16429
|
+
* @param {google.api.IResourceDescriptor=} [properties] Properties to set
|
|
16430
|
+
* @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
|
|
15811
16431
|
*/
|
|
15812
|
-
|
|
15813
|
-
return new
|
|
16432
|
+
ResourceDescriptor.create = function create(properties) {
|
|
16433
|
+
return new ResourceDescriptor(properties);
|
|
15814
16434
|
};
|
|
15815
16435
|
|
|
15816
16436
|
/**
|
|
15817
|
-
* Encodes the specified
|
|
16437
|
+
* Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
|
|
15818
16438
|
* @function encode
|
|
15819
|
-
* @memberof google.api.
|
|
16439
|
+
* @memberof google.api.ResourceDescriptor
|
|
15820
16440
|
* @static
|
|
15821
|
-
* @param {google.api.
|
|
16441
|
+
* @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
|
|
15822
16442
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15823
16443
|
* @returns {$protobuf.Writer} Writer
|
|
15824
16444
|
*/
|
|
15825
|
-
|
|
16445
|
+
ResourceDescriptor.encode = function encode(message, writer) {
|
|
15826
16446
|
if (!writer)
|
|
15827
16447
|
writer = $Writer.create();
|
|
15828
|
-
if (message.
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
16448
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
16449
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
|
|
16450
|
+
if (message.pattern != null && message.pattern.length)
|
|
16451
|
+
for (var i = 0; i < message.pattern.length; ++i)
|
|
16452
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
|
|
16453
|
+
if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
|
|
16454
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
|
|
16455
|
+
if (message.history != null && Object.hasOwnProperty.call(message, "history"))
|
|
16456
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
|
|
16457
|
+
if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
|
|
16458
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
|
|
16459
|
+
if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
|
|
16460
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
|
|
16461
|
+
if (message.style != null && message.style.length) {
|
|
16462
|
+
writer.uint32(/* id 10, wireType 2 =*/82).fork();
|
|
16463
|
+
for (var i = 0; i < message.style.length; ++i)
|
|
16464
|
+
writer.int32(message.style[i]);
|
|
16465
|
+
writer.ldelim();
|
|
16466
|
+
}
|
|
15833
16467
|
return writer;
|
|
15834
16468
|
};
|
|
15835
16469
|
|
|
15836
16470
|
/**
|
|
15837
|
-
* Encodes the specified
|
|
16471
|
+
* Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
|
|
15838
16472
|
* @function encodeDelimited
|
|
15839
|
-
* @memberof google.api.
|
|
16473
|
+
* @memberof google.api.ResourceDescriptor
|
|
15840
16474
|
* @static
|
|
15841
|
-
* @param {google.api.
|
|
16475
|
+
* @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
|
|
15842
16476
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15843
16477
|
* @returns {$protobuf.Writer} Writer
|
|
15844
16478
|
*/
|
|
15845
|
-
|
|
16479
|
+
ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
|
|
15846
16480
|
return this.encode(message, writer).ldelim();
|
|
15847
16481
|
};
|
|
15848
16482
|
|
|
15849
16483
|
/**
|
|
15850
|
-
* Decodes a
|
|
16484
|
+
* Decodes a ResourceDescriptor message from the specified reader or buffer.
|
|
15851
16485
|
* @function decode
|
|
15852
|
-
* @memberof google.api.
|
|
16486
|
+
* @memberof google.api.ResourceDescriptor
|
|
15853
16487
|
* @static
|
|
15854
16488
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15855
16489
|
* @param {number} [length] Message length if known beforehand
|
|
15856
|
-
* @returns {google.api.
|
|
16490
|
+
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
15857
16491
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15858
16492
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15859
16493
|
*/
|
|
15860
|
-
|
|
16494
|
+
ResourceDescriptor.decode = function decode(reader, length) {
|
|
15861
16495
|
if (!(reader instanceof $Reader))
|
|
15862
16496
|
reader = $Reader.create(reader);
|
|
15863
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.
|
|
16497
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
|
|
15864
16498
|
while (reader.pos < end) {
|
|
15865
16499
|
var tag = reader.uint32();
|
|
15866
16500
|
switch (tag >>> 3) {
|
|
15867
16501
|
case 1: {
|
|
15868
|
-
|
|
15869
|
-
message.rules = [];
|
|
15870
|
-
message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
16502
|
+
message.type = reader.string();
|
|
15871
16503
|
break;
|
|
15872
16504
|
}
|
|
15873
16505
|
case 2: {
|
|
15874
|
-
message.
|
|
16506
|
+
if (!(message.pattern && message.pattern.length))
|
|
16507
|
+
message.pattern = [];
|
|
16508
|
+
message.pattern.push(reader.string());
|
|
16509
|
+
break;
|
|
16510
|
+
}
|
|
16511
|
+
case 3: {
|
|
16512
|
+
message.nameField = reader.string();
|
|
16513
|
+
break;
|
|
16514
|
+
}
|
|
16515
|
+
case 4: {
|
|
16516
|
+
message.history = reader.int32();
|
|
16517
|
+
break;
|
|
16518
|
+
}
|
|
16519
|
+
case 5: {
|
|
16520
|
+
message.plural = reader.string();
|
|
16521
|
+
break;
|
|
16522
|
+
}
|
|
16523
|
+
case 6: {
|
|
16524
|
+
message.singular = reader.string();
|
|
16525
|
+
break;
|
|
16526
|
+
}
|
|
16527
|
+
case 10: {
|
|
16528
|
+
if (!(message.style && message.style.length))
|
|
16529
|
+
message.style = [];
|
|
16530
|
+
if ((tag & 7) === 2) {
|
|
16531
|
+
var end2 = reader.uint32() + reader.pos;
|
|
16532
|
+
while (reader.pos < end2)
|
|
16533
|
+
message.style.push(reader.int32());
|
|
16534
|
+
} else
|
|
16535
|
+
message.style.push(reader.int32());
|
|
15875
16536
|
break;
|
|
15876
16537
|
}
|
|
15877
16538
|
default:
|
|
@@ -15883,158 +16544,271 @@
|
|
|
15883
16544
|
};
|
|
15884
16545
|
|
|
15885
16546
|
/**
|
|
15886
|
-
* Decodes a
|
|
16547
|
+
* Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
|
|
15887
16548
|
* @function decodeDelimited
|
|
15888
|
-
* @memberof google.api.
|
|
16549
|
+
* @memberof google.api.ResourceDescriptor
|
|
15889
16550
|
* @static
|
|
15890
16551
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15891
|
-
* @returns {google.api.
|
|
16552
|
+
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
15892
16553
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15893
16554
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15894
16555
|
*/
|
|
15895
|
-
|
|
16556
|
+
ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
|
|
15896
16557
|
if (!(reader instanceof $Reader))
|
|
15897
16558
|
reader = new $Reader(reader);
|
|
15898
16559
|
return this.decode(reader, reader.uint32());
|
|
15899
16560
|
};
|
|
15900
16561
|
|
|
15901
16562
|
/**
|
|
15902
|
-
* Verifies a
|
|
16563
|
+
* Verifies a ResourceDescriptor message.
|
|
15903
16564
|
* @function verify
|
|
15904
|
-
* @memberof google.api.
|
|
16565
|
+
* @memberof google.api.ResourceDescriptor
|
|
15905
16566
|
* @static
|
|
15906
16567
|
* @param {Object.<string,*>} message Plain object to verify
|
|
15907
16568
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
15908
16569
|
*/
|
|
15909
|
-
|
|
16570
|
+
ResourceDescriptor.verify = function verify(message) {
|
|
15910
16571
|
if (typeof message !== "object" || message === null)
|
|
15911
16572
|
return "object expected";
|
|
15912
|
-
if (message.
|
|
15913
|
-
if (
|
|
15914
|
-
return "
|
|
15915
|
-
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
16573
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
16574
|
+
if (!$util.isString(message.type))
|
|
16575
|
+
return "type: string expected";
|
|
16576
|
+
if (message.pattern != null && message.hasOwnProperty("pattern")) {
|
|
16577
|
+
if (!Array.isArray(message.pattern))
|
|
16578
|
+
return "pattern: array expected";
|
|
16579
|
+
for (var i = 0; i < message.pattern.length; ++i)
|
|
16580
|
+
if (!$util.isString(message.pattern[i]))
|
|
16581
|
+
return "pattern: string[] expected";
|
|
16582
|
+
}
|
|
16583
|
+
if (message.nameField != null && message.hasOwnProperty("nameField"))
|
|
16584
|
+
if (!$util.isString(message.nameField))
|
|
16585
|
+
return "nameField: string expected";
|
|
16586
|
+
if (message.history != null && message.hasOwnProperty("history"))
|
|
16587
|
+
switch (message.history) {
|
|
16588
|
+
default:
|
|
16589
|
+
return "history: enum value expected";
|
|
16590
|
+
case 0:
|
|
16591
|
+
case 1:
|
|
16592
|
+
case 2:
|
|
16593
|
+
break;
|
|
15919
16594
|
}
|
|
16595
|
+
if (message.plural != null && message.hasOwnProperty("plural"))
|
|
16596
|
+
if (!$util.isString(message.plural))
|
|
16597
|
+
return "plural: string expected";
|
|
16598
|
+
if (message.singular != null && message.hasOwnProperty("singular"))
|
|
16599
|
+
if (!$util.isString(message.singular))
|
|
16600
|
+
return "singular: string expected";
|
|
16601
|
+
if (message.style != null && message.hasOwnProperty("style")) {
|
|
16602
|
+
if (!Array.isArray(message.style))
|
|
16603
|
+
return "style: array expected";
|
|
16604
|
+
for (var i = 0; i < message.style.length; ++i)
|
|
16605
|
+
switch (message.style[i]) {
|
|
16606
|
+
default:
|
|
16607
|
+
return "style: enum value[] expected";
|
|
16608
|
+
case 0:
|
|
16609
|
+
case 1:
|
|
16610
|
+
break;
|
|
16611
|
+
}
|
|
15920
16612
|
}
|
|
15921
|
-
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
15922
|
-
if (typeof message.fullyDecodeReservedExpansion !== "boolean")
|
|
15923
|
-
return "fullyDecodeReservedExpansion: boolean expected";
|
|
15924
16613
|
return null;
|
|
15925
16614
|
};
|
|
15926
16615
|
|
|
15927
16616
|
/**
|
|
15928
|
-
* Creates a
|
|
16617
|
+
* Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
|
|
15929
16618
|
* @function fromObject
|
|
15930
|
-
* @memberof google.api.
|
|
16619
|
+
* @memberof google.api.ResourceDescriptor
|
|
15931
16620
|
* @static
|
|
15932
16621
|
* @param {Object.<string,*>} object Plain object
|
|
15933
|
-
* @returns {google.api.
|
|
16622
|
+
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
15934
16623
|
*/
|
|
15935
|
-
|
|
15936
|
-
if (object instanceof $root.google.api.
|
|
16624
|
+
ResourceDescriptor.fromObject = function fromObject(object) {
|
|
16625
|
+
if (object instanceof $root.google.api.ResourceDescriptor)
|
|
15937
16626
|
return object;
|
|
15938
|
-
var message = new $root.google.api.
|
|
15939
|
-
if (object.
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
message.
|
|
15947
|
-
}
|
|
16627
|
+
var message = new $root.google.api.ResourceDescriptor();
|
|
16628
|
+
if (object.type != null)
|
|
16629
|
+
message.type = String(object.type);
|
|
16630
|
+
if (object.pattern) {
|
|
16631
|
+
if (!Array.isArray(object.pattern))
|
|
16632
|
+
throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
|
|
16633
|
+
message.pattern = [];
|
|
16634
|
+
for (var i = 0; i < object.pattern.length; ++i)
|
|
16635
|
+
message.pattern[i] = String(object.pattern[i]);
|
|
15948
16636
|
}
|
|
15949
|
-
if (object.
|
|
15950
|
-
message.
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
16637
|
+
if (object.nameField != null)
|
|
16638
|
+
message.nameField = String(object.nameField);
|
|
16639
|
+
switch (object.history) {
|
|
16640
|
+
default:
|
|
16641
|
+
if (typeof object.history === "number") {
|
|
16642
|
+
message.history = object.history;
|
|
16643
|
+
break;
|
|
16644
|
+
}
|
|
16645
|
+
break;
|
|
16646
|
+
case "HISTORY_UNSPECIFIED":
|
|
16647
|
+
case 0:
|
|
16648
|
+
message.history = 0;
|
|
16649
|
+
break;
|
|
16650
|
+
case "ORIGINALLY_SINGLE_PATTERN":
|
|
16651
|
+
case 1:
|
|
16652
|
+
message.history = 1;
|
|
16653
|
+
break;
|
|
16654
|
+
case "FUTURE_MULTI_PATTERN":
|
|
16655
|
+
case 2:
|
|
16656
|
+
message.history = 2;
|
|
16657
|
+
break;
|
|
16658
|
+
}
|
|
16659
|
+
if (object.plural != null)
|
|
16660
|
+
message.plural = String(object.plural);
|
|
16661
|
+
if (object.singular != null)
|
|
16662
|
+
message.singular = String(object.singular);
|
|
16663
|
+
if (object.style) {
|
|
16664
|
+
if (!Array.isArray(object.style))
|
|
16665
|
+
throw TypeError(".google.api.ResourceDescriptor.style: array expected");
|
|
16666
|
+
message.style = [];
|
|
16667
|
+
for (var i = 0; i < object.style.length; ++i)
|
|
16668
|
+
switch (object.style[i]) {
|
|
16669
|
+
default:
|
|
16670
|
+
if (typeof object.style[i] === "number") {
|
|
16671
|
+
message.style[i] = object.style[i];
|
|
16672
|
+
break;
|
|
16673
|
+
}
|
|
16674
|
+
case "STYLE_UNSPECIFIED":
|
|
16675
|
+
case 0:
|
|
16676
|
+
message.style[i] = 0;
|
|
16677
|
+
break;
|
|
16678
|
+
case "DECLARATIVE_FRIENDLY":
|
|
16679
|
+
case 1:
|
|
16680
|
+
message.style[i] = 1;
|
|
16681
|
+
break;
|
|
16682
|
+
}
|
|
16683
|
+
}
|
|
16684
|
+
return message;
|
|
16685
|
+
};
|
|
16686
|
+
|
|
16687
|
+
/**
|
|
16688
|
+
* Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
|
|
16689
|
+
* @function toObject
|
|
16690
|
+
* @memberof google.api.ResourceDescriptor
|
|
16691
|
+
* @static
|
|
16692
|
+
* @param {google.api.ResourceDescriptor} message ResourceDescriptor
|
|
16693
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
15961
16694
|
* @returns {Object.<string,*>} Plain object
|
|
15962
16695
|
*/
|
|
15963
|
-
|
|
16696
|
+
ResourceDescriptor.toObject = function toObject(message, options) {
|
|
15964
16697
|
if (!options)
|
|
15965
16698
|
options = {};
|
|
15966
16699
|
var object = {};
|
|
15967
|
-
if (options.arrays || options.defaults)
|
|
15968
|
-
object.
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
if (
|
|
15972
|
-
object.
|
|
15973
|
-
|
|
15974
|
-
|
|
16700
|
+
if (options.arrays || options.defaults) {
|
|
16701
|
+
object.pattern = [];
|
|
16702
|
+
object.style = [];
|
|
16703
|
+
}
|
|
16704
|
+
if (options.defaults) {
|
|
16705
|
+
object.type = "";
|
|
16706
|
+
object.nameField = "";
|
|
16707
|
+
object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
|
|
16708
|
+
object.plural = "";
|
|
16709
|
+
object.singular = "";
|
|
16710
|
+
}
|
|
16711
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
16712
|
+
object.type = message.type;
|
|
16713
|
+
if (message.pattern && message.pattern.length) {
|
|
16714
|
+
object.pattern = [];
|
|
16715
|
+
for (var j = 0; j < message.pattern.length; ++j)
|
|
16716
|
+
object.pattern[j] = message.pattern[j];
|
|
16717
|
+
}
|
|
16718
|
+
if (message.nameField != null && message.hasOwnProperty("nameField"))
|
|
16719
|
+
object.nameField = message.nameField;
|
|
16720
|
+
if (message.history != null && message.hasOwnProperty("history"))
|
|
16721
|
+
object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history;
|
|
16722
|
+
if (message.plural != null && message.hasOwnProperty("plural"))
|
|
16723
|
+
object.plural = message.plural;
|
|
16724
|
+
if (message.singular != null && message.hasOwnProperty("singular"))
|
|
16725
|
+
object.singular = message.singular;
|
|
16726
|
+
if (message.style && message.style.length) {
|
|
16727
|
+
object.style = [];
|
|
16728
|
+
for (var j = 0; j < message.style.length; ++j)
|
|
16729
|
+
object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
|
|
15975
16730
|
}
|
|
15976
|
-
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
15977
|
-
object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
|
15978
16731
|
return object;
|
|
15979
16732
|
};
|
|
15980
16733
|
|
|
15981
16734
|
/**
|
|
15982
|
-
* Converts this
|
|
16735
|
+
* Converts this ResourceDescriptor to JSON.
|
|
15983
16736
|
* @function toJSON
|
|
15984
|
-
* @memberof google.api.
|
|
16737
|
+
* @memberof google.api.ResourceDescriptor
|
|
15985
16738
|
* @instance
|
|
15986
16739
|
* @returns {Object.<string,*>} JSON object
|
|
15987
16740
|
*/
|
|
15988
|
-
|
|
16741
|
+
ResourceDescriptor.prototype.toJSON = function toJSON() {
|
|
15989
16742
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
15990
16743
|
};
|
|
15991
16744
|
|
|
15992
16745
|
/**
|
|
15993
|
-
* Gets the default type url for
|
|
16746
|
+
* Gets the default type url for ResourceDescriptor
|
|
15994
16747
|
* @function getTypeUrl
|
|
15995
|
-
* @memberof google.api.
|
|
16748
|
+
* @memberof google.api.ResourceDescriptor
|
|
15996
16749
|
* @static
|
|
15997
16750
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
15998
16751
|
* @returns {string} The default type url
|
|
15999
16752
|
*/
|
|
16000
|
-
|
|
16753
|
+
ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
16001
16754
|
if (typeUrlPrefix === undefined) {
|
|
16002
16755
|
typeUrlPrefix = "type.googleapis.com";
|
|
16003
16756
|
}
|
|
16004
|
-
return typeUrlPrefix + "/google.api.
|
|
16757
|
+
return typeUrlPrefix + "/google.api.ResourceDescriptor";
|
|
16005
16758
|
};
|
|
16006
16759
|
|
|
16007
|
-
|
|
16760
|
+
/**
|
|
16761
|
+
* History enum.
|
|
16762
|
+
* @name google.api.ResourceDescriptor.History
|
|
16763
|
+
* @enum {number}
|
|
16764
|
+
* @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
|
|
16765
|
+
* @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
|
|
16766
|
+
* @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
|
|
16767
|
+
*/
|
|
16768
|
+
ResourceDescriptor.History = (function() {
|
|
16769
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
16770
|
+
values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
|
|
16771
|
+
values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
|
|
16772
|
+
values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
|
|
16773
|
+
return values;
|
|
16774
|
+
})();
|
|
16775
|
+
|
|
16776
|
+
/**
|
|
16777
|
+
* Style enum.
|
|
16778
|
+
* @name google.api.ResourceDescriptor.Style
|
|
16779
|
+
* @enum {number}
|
|
16780
|
+
* @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
|
|
16781
|
+
* @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
|
|
16782
|
+
*/
|
|
16783
|
+
ResourceDescriptor.Style = (function() {
|
|
16784
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
16785
|
+
values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
|
|
16786
|
+
values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
|
|
16787
|
+
return values;
|
|
16788
|
+
})();
|
|
16789
|
+
|
|
16790
|
+
return ResourceDescriptor;
|
|
16008
16791
|
})();
|
|
16009
16792
|
|
|
16010
|
-
api.
|
|
16793
|
+
api.ResourceReference = (function() {
|
|
16011
16794
|
|
|
16012
16795
|
/**
|
|
16013
|
-
* Properties of a
|
|
16796
|
+
* Properties of a ResourceReference.
|
|
16014
16797
|
* @memberof google.api
|
|
16015
|
-
* @interface
|
|
16016
|
-
* @property {string|null} [
|
|
16017
|
-
* @property {string|null} [
|
|
16018
|
-
* @property {string|null} [put] HttpRule put
|
|
16019
|
-
* @property {string|null} [post] HttpRule post
|
|
16020
|
-
* @property {string|null} ["delete"] HttpRule delete
|
|
16021
|
-
* @property {string|null} [patch] HttpRule patch
|
|
16022
|
-
* @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
|
|
16023
|
-
* @property {string|null} [body] HttpRule body
|
|
16024
|
-
* @property {string|null} [responseBody] HttpRule responseBody
|
|
16025
|
-
* @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
|
|
16798
|
+
* @interface IResourceReference
|
|
16799
|
+
* @property {string|null} [type] ResourceReference type
|
|
16800
|
+
* @property {string|null} [childType] ResourceReference childType
|
|
16026
16801
|
*/
|
|
16027
16802
|
|
|
16028
16803
|
/**
|
|
16029
|
-
* Constructs a new
|
|
16804
|
+
* Constructs a new ResourceReference.
|
|
16030
16805
|
* @memberof google.api
|
|
16031
|
-
* @classdesc Represents a
|
|
16032
|
-
* @implements
|
|
16806
|
+
* @classdesc Represents a ResourceReference.
|
|
16807
|
+
* @implements IResourceReference
|
|
16033
16808
|
* @constructor
|
|
16034
|
-
* @param {google.api.
|
|
16809
|
+
* @param {google.api.IResourceReference=} [properties] Properties to set
|
|
16035
16810
|
*/
|
|
16036
|
-
function
|
|
16037
|
-
this.additionalBindings = [];
|
|
16811
|
+
function ResourceReference(properties) {
|
|
16038
16812
|
if (properties)
|
|
16039
16813
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
16040
16814
|
if (properties[keys[i]] != null)
|
|
@@ -16042,218 +16816,320 @@
|
|
|
16042
16816
|
}
|
|
16043
16817
|
|
|
16044
16818
|
/**
|
|
16045
|
-
*
|
|
16046
|
-
* @member {string}
|
|
16047
|
-
* @memberof google.api.
|
|
16819
|
+
* ResourceReference type.
|
|
16820
|
+
* @member {string} type
|
|
16821
|
+
* @memberof google.api.ResourceReference
|
|
16048
16822
|
* @instance
|
|
16049
16823
|
*/
|
|
16050
|
-
|
|
16824
|
+
ResourceReference.prototype.type = "";
|
|
16051
16825
|
|
|
16052
16826
|
/**
|
|
16053
|
-
*
|
|
16054
|
-
* @member {string
|
|
16055
|
-
* @memberof google.api.
|
|
16827
|
+
* ResourceReference childType.
|
|
16828
|
+
* @member {string} childType
|
|
16829
|
+
* @memberof google.api.ResourceReference
|
|
16056
16830
|
* @instance
|
|
16057
16831
|
*/
|
|
16058
|
-
|
|
16832
|
+
ResourceReference.prototype.childType = "";
|
|
16059
16833
|
|
|
16060
16834
|
/**
|
|
16061
|
-
*
|
|
16062
|
-
* @
|
|
16063
|
-
* @memberof google.api.
|
|
16064
|
-
* @
|
|
16835
|
+
* Creates a new ResourceReference instance using the specified properties.
|
|
16836
|
+
* @function create
|
|
16837
|
+
* @memberof google.api.ResourceReference
|
|
16838
|
+
* @static
|
|
16839
|
+
* @param {google.api.IResourceReference=} [properties] Properties to set
|
|
16840
|
+
* @returns {google.api.ResourceReference} ResourceReference instance
|
|
16065
16841
|
*/
|
|
16066
|
-
|
|
16842
|
+
ResourceReference.create = function create(properties) {
|
|
16843
|
+
return new ResourceReference(properties);
|
|
16844
|
+
};
|
|
16067
16845
|
|
|
16068
16846
|
/**
|
|
16069
|
-
*
|
|
16070
|
-
* @
|
|
16071
|
-
* @memberof google.api.
|
|
16072
|
-
* @
|
|
16847
|
+
* Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
|
|
16848
|
+
* @function encode
|
|
16849
|
+
* @memberof google.api.ResourceReference
|
|
16850
|
+
* @static
|
|
16851
|
+
* @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
|
|
16852
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16853
|
+
* @returns {$protobuf.Writer} Writer
|
|
16073
16854
|
*/
|
|
16074
|
-
|
|
16855
|
+
ResourceReference.encode = function encode(message, writer) {
|
|
16856
|
+
if (!writer)
|
|
16857
|
+
writer = $Writer.create();
|
|
16858
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
16859
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
|
|
16860
|
+
if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
|
|
16861
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
|
|
16862
|
+
return writer;
|
|
16863
|
+
};
|
|
16075
16864
|
|
|
16076
16865
|
/**
|
|
16077
|
-
*
|
|
16078
|
-
* @
|
|
16079
|
-
* @memberof google.api.
|
|
16080
|
-
* @
|
|
16866
|
+
* Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
|
|
16867
|
+
* @function encodeDelimited
|
|
16868
|
+
* @memberof google.api.ResourceReference
|
|
16869
|
+
* @static
|
|
16870
|
+
* @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
|
|
16871
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16872
|
+
* @returns {$protobuf.Writer} Writer
|
|
16081
16873
|
*/
|
|
16082
|
-
|
|
16874
|
+
ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
|
|
16875
|
+
return this.encode(message, writer).ldelim();
|
|
16876
|
+
};
|
|
16083
16877
|
|
|
16084
16878
|
/**
|
|
16085
|
-
*
|
|
16086
|
-
* @
|
|
16087
|
-
* @memberof google.api.
|
|
16088
|
-
* @
|
|
16879
|
+
* Decodes a ResourceReference message from the specified reader or buffer.
|
|
16880
|
+
* @function decode
|
|
16881
|
+
* @memberof google.api.ResourceReference
|
|
16882
|
+
* @static
|
|
16883
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16884
|
+
* @param {number} [length] Message length if known beforehand
|
|
16885
|
+
* @returns {google.api.ResourceReference} ResourceReference
|
|
16886
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16887
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16089
16888
|
*/
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16889
|
+
ResourceReference.decode = function decode(reader, length) {
|
|
16890
|
+
if (!(reader instanceof $Reader))
|
|
16891
|
+
reader = $Reader.create(reader);
|
|
16892
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
|
|
16893
|
+
while (reader.pos < end) {
|
|
16894
|
+
var tag = reader.uint32();
|
|
16895
|
+
switch (tag >>> 3) {
|
|
16896
|
+
case 1: {
|
|
16897
|
+
message.type = reader.string();
|
|
16898
|
+
break;
|
|
16899
|
+
}
|
|
16900
|
+
case 2: {
|
|
16901
|
+
message.childType = reader.string();
|
|
16902
|
+
break;
|
|
16903
|
+
}
|
|
16904
|
+
default:
|
|
16905
|
+
reader.skipType(tag & 7);
|
|
16906
|
+
break;
|
|
16907
|
+
}
|
|
16908
|
+
}
|
|
16909
|
+
return message;
|
|
16910
|
+
};
|
|
16911
|
+
|
|
16912
|
+
/**
|
|
16913
|
+
* Decodes a ResourceReference message from the specified reader or buffer, length delimited.
|
|
16914
|
+
* @function decodeDelimited
|
|
16915
|
+
* @memberof google.api.ResourceReference
|
|
16916
|
+
* @static
|
|
16917
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16918
|
+
* @returns {google.api.ResourceReference} ResourceReference
|
|
16919
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16920
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16097
16921
|
*/
|
|
16098
|
-
|
|
16922
|
+
ResourceReference.decodeDelimited = function decodeDelimited(reader) {
|
|
16923
|
+
if (!(reader instanceof $Reader))
|
|
16924
|
+
reader = new $Reader(reader);
|
|
16925
|
+
return this.decode(reader, reader.uint32());
|
|
16926
|
+
};
|
|
16099
16927
|
|
|
16100
16928
|
/**
|
|
16101
|
-
*
|
|
16102
|
-
* @
|
|
16103
|
-
* @memberof google.api.
|
|
16104
|
-
* @
|
|
16929
|
+
* Verifies a ResourceReference message.
|
|
16930
|
+
* @function verify
|
|
16931
|
+
* @memberof google.api.ResourceReference
|
|
16932
|
+
* @static
|
|
16933
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
16934
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
16105
16935
|
*/
|
|
16106
|
-
|
|
16936
|
+
ResourceReference.verify = function verify(message) {
|
|
16937
|
+
if (typeof message !== "object" || message === null)
|
|
16938
|
+
return "object expected";
|
|
16939
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
16940
|
+
if (!$util.isString(message.type))
|
|
16941
|
+
return "type: string expected";
|
|
16942
|
+
if (message.childType != null && message.hasOwnProperty("childType"))
|
|
16943
|
+
if (!$util.isString(message.childType))
|
|
16944
|
+
return "childType: string expected";
|
|
16945
|
+
return null;
|
|
16946
|
+
};
|
|
16107
16947
|
|
|
16108
16948
|
/**
|
|
16109
|
-
*
|
|
16110
|
-
* @
|
|
16111
|
-
* @memberof google.api.
|
|
16112
|
-
* @
|
|
16949
|
+
* Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
|
|
16950
|
+
* @function fromObject
|
|
16951
|
+
* @memberof google.api.ResourceReference
|
|
16952
|
+
* @static
|
|
16953
|
+
* @param {Object.<string,*>} object Plain object
|
|
16954
|
+
* @returns {google.api.ResourceReference} ResourceReference
|
|
16113
16955
|
*/
|
|
16114
|
-
|
|
16956
|
+
ResourceReference.fromObject = function fromObject(object) {
|
|
16957
|
+
if (object instanceof $root.google.api.ResourceReference)
|
|
16958
|
+
return object;
|
|
16959
|
+
var message = new $root.google.api.ResourceReference();
|
|
16960
|
+
if (object.type != null)
|
|
16961
|
+
message.type = String(object.type);
|
|
16962
|
+
if (object.childType != null)
|
|
16963
|
+
message.childType = String(object.childType);
|
|
16964
|
+
return message;
|
|
16965
|
+
};
|
|
16115
16966
|
|
|
16116
16967
|
/**
|
|
16117
|
-
*
|
|
16118
|
-
* @
|
|
16119
|
-
* @memberof google.api.
|
|
16968
|
+
* Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
|
|
16969
|
+
* @function toObject
|
|
16970
|
+
* @memberof google.api.ResourceReference
|
|
16971
|
+
* @static
|
|
16972
|
+
* @param {google.api.ResourceReference} message ResourceReference
|
|
16973
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
16974
|
+
* @returns {Object.<string,*>} Plain object
|
|
16975
|
+
*/
|
|
16976
|
+
ResourceReference.toObject = function toObject(message, options) {
|
|
16977
|
+
if (!options)
|
|
16978
|
+
options = {};
|
|
16979
|
+
var object = {};
|
|
16980
|
+
if (options.defaults) {
|
|
16981
|
+
object.type = "";
|
|
16982
|
+
object.childType = "";
|
|
16983
|
+
}
|
|
16984
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
16985
|
+
object.type = message.type;
|
|
16986
|
+
if (message.childType != null && message.hasOwnProperty("childType"))
|
|
16987
|
+
object.childType = message.childType;
|
|
16988
|
+
return object;
|
|
16989
|
+
};
|
|
16990
|
+
|
|
16991
|
+
/**
|
|
16992
|
+
* Converts this ResourceReference to JSON.
|
|
16993
|
+
* @function toJSON
|
|
16994
|
+
* @memberof google.api.ResourceReference
|
|
16120
16995
|
* @instance
|
|
16996
|
+
* @returns {Object.<string,*>} JSON object
|
|
16121
16997
|
*/
|
|
16122
|
-
|
|
16998
|
+
ResourceReference.prototype.toJSON = function toJSON() {
|
|
16999
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
17000
|
+
};
|
|
16123
17001
|
|
|
16124
|
-
|
|
16125
|
-
|
|
17002
|
+
/**
|
|
17003
|
+
* Gets the default type url for ResourceReference
|
|
17004
|
+
* @function getTypeUrl
|
|
17005
|
+
* @memberof google.api.ResourceReference
|
|
17006
|
+
* @static
|
|
17007
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
17008
|
+
* @returns {string} The default type url
|
|
17009
|
+
*/
|
|
17010
|
+
ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
17011
|
+
if (typeUrlPrefix === undefined) {
|
|
17012
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
17013
|
+
}
|
|
17014
|
+
return typeUrlPrefix + "/google.api.ResourceReference";
|
|
17015
|
+
};
|
|
17016
|
+
|
|
17017
|
+
return ResourceReference;
|
|
17018
|
+
})();
|
|
17019
|
+
|
|
17020
|
+
api.Http = (function() {
|
|
16126
17021
|
|
|
16127
17022
|
/**
|
|
16128
|
-
*
|
|
16129
|
-
* @
|
|
16130
|
-
* @
|
|
17023
|
+
* Properties of a Http.
|
|
17024
|
+
* @memberof google.api
|
|
17025
|
+
* @interface IHttp
|
|
17026
|
+
* @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
|
|
17027
|
+
* @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
|
|
17028
|
+
*/
|
|
17029
|
+
|
|
17030
|
+
/**
|
|
17031
|
+
* Constructs a new Http.
|
|
17032
|
+
* @memberof google.api
|
|
17033
|
+
* @classdesc Represents a Http.
|
|
17034
|
+
* @implements IHttp
|
|
17035
|
+
* @constructor
|
|
17036
|
+
* @param {google.api.IHttp=} [properties] Properties to set
|
|
17037
|
+
*/
|
|
17038
|
+
function Http(properties) {
|
|
17039
|
+
this.rules = [];
|
|
17040
|
+
if (properties)
|
|
17041
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
17042
|
+
if (properties[keys[i]] != null)
|
|
17043
|
+
this[keys[i]] = properties[keys[i]];
|
|
17044
|
+
}
|
|
17045
|
+
|
|
17046
|
+
/**
|
|
17047
|
+
* Http rules.
|
|
17048
|
+
* @member {Array.<google.api.IHttpRule>} rules
|
|
17049
|
+
* @memberof google.api.Http
|
|
16131
17050
|
* @instance
|
|
16132
17051
|
*/
|
|
16133
|
-
|
|
16134
|
-
get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
|
|
16135
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
16136
|
-
});
|
|
17052
|
+
Http.prototype.rules = $util.emptyArray;
|
|
16137
17053
|
|
|
16138
17054
|
/**
|
|
16139
|
-
*
|
|
17055
|
+
* Http fullyDecodeReservedExpansion.
|
|
17056
|
+
* @member {boolean} fullyDecodeReservedExpansion
|
|
17057
|
+
* @memberof google.api.Http
|
|
17058
|
+
* @instance
|
|
17059
|
+
*/
|
|
17060
|
+
Http.prototype.fullyDecodeReservedExpansion = false;
|
|
17061
|
+
|
|
17062
|
+
/**
|
|
17063
|
+
* Creates a new Http instance using the specified properties.
|
|
16140
17064
|
* @function create
|
|
16141
|
-
* @memberof google.api.
|
|
17065
|
+
* @memberof google.api.Http
|
|
16142
17066
|
* @static
|
|
16143
|
-
* @param {google.api.
|
|
16144
|
-
* @returns {google.api.
|
|
17067
|
+
* @param {google.api.IHttp=} [properties] Properties to set
|
|
17068
|
+
* @returns {google.api.Http} Http instance
|
|
16145
17069
|
*/
|
|
16146
|
-
|
|
16147
|
-
return new
|
|
17070
|
+
Http.create = function create(properties) {
|
|
17071
|
+
return new Http(properties);
|
|
16148
17072
|
};
|
|
16149
17073
|
|
|
16150
17074
|
/**
|
|
16151
|
-
* Encodes the specified
|
|
17075
|
+
* Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
|
16152
17076
|
* @function encode
|
|
16153
|
-
* @memberof google.api.
|
|
17077
|
+
* @memberof google.api.Http
|
|
16154
17078
|
* @static
|
|
16155
|
-
* @param {google.api.
|
|
17079
|
+
* @param {google.api.IHttp} message Http message or plain object to encode
|
|
16156
17080
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16157
17081
|
* @returns {$protobuf.Writer} Writer
|
|
16158
17082
|
*/
|
|
16159
|
-
|
|
17083
|
+
Http.encode = function encode(message, writer) {
|
|
16160
17084
|
if (!writer)
|
|
16161
17085
|
writer = $Writer.create();
|
|
16162
|
-
if (message.
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
|
|
16166
|
-
|
|
16167
|
-
writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
|
|
16168
|
-
if (message.post != null && Object.hasOwnProperty.call(message, "post"))
|
|
16169
|
-
writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
|
|
16170
|
-
if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
|
16171
|
-
writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
|
|
16172
|
-
if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
|
|
16173
|
-
writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
|
|
16174
|
-
if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
|
16175
|
-
writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
|
|
16176
|
-
if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
|
|
16177
|
-
$root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
16178
|
-
if (message.additionalBindings != null && message.additionalBindings.length)
|
|
16179
|
-
for (var i = 0; i < message.additionalBindings.length; ++i)
|
|
16180
|
-
$root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
16181
|
-
if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
|
|
16182
|
-
writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
|
|
17086
|
+
if (message.rules != null && message.rules.length)
|
|
17087
|
+
for (var i = 0; i < message.rules.length; ++i)
|
|
17088
|
+
$root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
17089
|
+
if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
|
|
17090
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
|
|
16183
17091
|
return writer;
|
|
16184
17092
|
};
|
|
16185
17093
|
|
|
16186
17094
|
/**
|
|
16187
|
-
* Encodes the specified
|
|
17095
|
+
* Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
|
16188
17096
|
* @function encodeDelimited
|
|
16189
|
-
* @memberof google.api.
|
|
17097
|
+
* @memberof google.api.Http
|
|
16190
17098
|
* @static
|
|
16191
|
-
* @param {google.api.
|
|
17099
|
+
* @param {google.api.IHttp} message Http message or plain object to encode
|
|
16192
17100
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16193
17101
|
* @returns {$protobuf.Writer} Writer
|
|
16194
17102
|
*/
|
|
16195
|
-
|
|
17103
|
+
Http.encodeDelimited = function encodeDelimited(message, writer) {
|
|
16196
17104
|
return this.encode(message, writer).ldelim();
|
|
16197
17105
|
};
|
|
16198
17106
|
|
|
16199
17107
|
/**
|
|
16200
|
-
* Decodes a
|
|
17108
|
+
* Decodes a Http message from the specified reader or buffer.
|
|
16201
17109
|
* @function decode
|
|
16202
|
-
* @memberof google.api.
|
|
17110
|
+
* @memberof google.api.Http
|
|
16203
17111
|
* @static
|
|
16204
17112
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16205
17113
|
* @param {number} [length] Message length if known beforehand
|
|
16206
|
-
* @returns {google.api.
|
|
17114
|
+
* @returns {google.api.Http} Http
|
|
16207
17115
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16208
17116
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16209
17117
|
*/
|
|
16210
|
-
|
|
17118
|
+
Http.decode = function decode(reader, length) {
|
|
16211
17119
|
if (!(reader instanceof $Reader))
|
|
16212
17120
|
reader = $Reader.create(reader);
|
|
16213
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.
|
|
17121
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
|
|
16214
17122
|
while (reader.pos < end) {
|
|
16215
17123
|
var tag = reader.uint32();
|
|
16216
17124
|
switch (tag >>> 3) {
|
|
16217
17125
|
case 1: {
|
|
16218
|
-
message.
|
|
17126
|
+
if (!(message.rules && message.rules.length))
|
|
17127
|
+
message.rules = [];
|
|
17128
|
+
message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
16219
17129
|
break;
|
|
16220
17130
|
}
|
|
16221
17131
|
case 2: {
|
|
16222
|
-
message.
|
|
16223
|
-
break;
|
|
16224
|
-
}
|
|
16225
|
-
case 3: {
|
|
16226
|
-
message.put = reader.string();
|
|
16227
|
-
break;
|
|
16228
|
-
}
|
|
16229
|
-
case 4: {
|
|
16230
|
-
message.post = reader.string();
|
|
16231
|
-
break;
|
|
16232
|
-
}
|
|
16233
|
-
case 5: {
|
|
16234
|
-
message["delete"] = reader.string();
|
|
16235
|
-
break;
|
|
16236
|
-
}
|
|
16237
|
-
case 6: {
|
|
16238
|
-
message.patch = reader.string();
|
|
16239
|
-
break;
|
|
16240
|
-
}
|
|
16241
|
-
case 8: {
|
|
16242
|
-
message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
|
|
16243
|
-
break;
|
|
16244
|
-
}
|
|
16245
|
-
case 7: {
|
|
16246
|
-
message.body = reader.string();
|
|
16247
|
-
break;
|
|
16248
|
-
}
|
|
16249
|
-
case 12: {
|
|
16250
|
-
message.responseBody = reader.string();
|
|
16251
|
-
break;
|
|
16252
|
-
}
|
|
16253
|
-
case 11: {
|
|
16254
|
-
if (!(message.additionalBindings && message.additionalBindings.length))
|
|
16255
|
-
message.additionalBindings = [];
|
|
16256
|
-
message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
17132
|
+
message.fullyDecodeReservedExpansion = reader.bool();
|
|
16257
17133
|
break;
|
|
16258
17134
|
}
|
|
16259
17135
|
default:
|
|
@@ -16265,255 +17141,158 @@
|
|
|
16265
17141
|
};
|
|
16266
17142
|
|
|
16267
17143
|
/**
|
|
16268
|
-
* Decodes a
|
|
17144
|
+
* Decodes a Http message from the specified reader or buffer, length delimited.
|
|
16269
17145
|
* @function decodeDelimited
|
|
16270
|
-
* @memberof google.api.
|
|
17146
|
+
* @memberof google.api.Http
|
|
16271
17147
|
* @static
|
|
16272
17148
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16273
|
-
* @returns {google.api.
|
|
17149
|
+
* @returns {google.api.Http} Http
|
|
16274
17150
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16275
17151
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16276
17152
|
*/
|
|
16277
|
-
|
|
17153
|
+
Http.decodeDelimited = function decodeDelimited(reader) {
|
|
16278
17154
|
if (!(reader instanceof $Reader))
|
|
16279
17155
|
reader = new $Reader(reader);
|
|
16280
17156
|
return this.decode(reader, reader.uint32());
|
|
16281
17157
|
};
|
|
16282
17158
|
|
|
16283
17159
|
/**
|
|
16284
|
-
* Verifies a
|
|
17160
|
+
* Verifies a Http message.
|
|
16285
17161
|
* @function verify
|
|
16286
|
-
* @memberof google.api.
|
|
17162
|
+
* @memberof google.api.Http
|
|
16287
17163
|
* @static
|
|
16288
17164
|
* @param {Object.<string,*>} message Plain object to verify
|
|
16289
17165
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
16290
17166
|
*/
|
|
16291
|
-
|
|
17167
|
+
Http.verify = function verify(message) {
|
|
16292
17168
|
if (typeof message !== "object" || message === null)
|
|
16293
17169
|
return "object expected";
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
properties.pattern = 1;
|
|
16300
|
-
if (!$util.isString(message.get))
|
|
16301
|
-
return "get: string expected";
|
|
16302
|
-
}
|
|
16303
|
-
if (message.put != null && message.hasOwnProperty("put")) {
|
|
16304
|
-
if (properties.pattern === 1)
|
|
16305
|
-
return "pattern: multiple values";
|
|
16306
|
-
properties.pattern = 1;
|
|
16307
|
-
if (!$util.isString(message.put))
|
|
16308
|
-
return "put: string expected";
|
|
16309
|
-
}
|
|
16310
|
-
if (message.post != null && message.hasOwnProperty("post")) {
|
|
16311
|
-
if (properties.pattern === 1)
|
|
16312
|
-
return "pattern: multiple values";
|
|
16313
|
-
properties.pattern = 1;
|
|
16314
|
-
if (!$util.isString(message.post))
|
|
16315
|
-
return "post: string expected";
|
|
16316
|
-
}
|
|
16317
|
-
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
16318
|
-
if (properties.pattern === 1)
|
|
16319
|
-
return "pattern: multiple values";
|
|
16320
|
-
properties.pattern = 1;
|
|
16321
|
-
if (!$util.isString(message["delete"]))
|
|
16322
|
-
return "delete: string expected";
|
|
16323
|
-
}
|
|
16324
|
-
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
16325
|
-
if (properties.pattern === 1)
|
|
16326
|
-
return "pattern: multiple values";
|
|
16327
|
-
properties.pattern = 1;
|
|
16328
|
-
if (!$util.isString(message.patch))
|
|
16329
|
-
return "patch: string expected";
|
|
16330
|
-
}
|
|
16331
|
-
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
16332
|
-
if (properties.pattern === 1)
|
|
16333
|
-
return "pattern: multiple values";
|
|
16334
|
-
properties.pattern = 1;
|
|
16335
|
-
{
|
|
16336
|
-
var error = $root.google.api.CustomHttpPattern.verify(message.custom);
|
|
16337
|
-
if (error)
|
|
16338
|
-
return "custom." + error;
|
|
16339
|
-
}
|
|
16340
|
-
}
|
|
16341
|
-
if (message.body != null && message.hasOwnProperty("body"))
|
|
16342
|
-
if (!$util.isString(message.body))
|
|
16343
|
-
return "body: string expected";
|
|
16344
|
-
if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
|
16345
|
-
if (!$util.isString(message.responseBody))
|
|
16346
|
-
return "responseBody: string expected";
|
|
16347
|
-
if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
|
|
16348
|
-
if (!Array.isArray(message.additionalBindings))
|
|
16349
|
-
return "additionalBindings: array expected";
|
|
16350
|
-
for (var i = 0; i < message.additionalBindings.length; ++i) {
|
|
16351
|
-
var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
|
|
17170
|
+
if (message.rules != null && message.hasOwnProperty("rules")) {
|
|
17171
|
+
if (!Array.isArray(message.rules))
|
|
17172
|
+
return "rules: array expected";
|
|
17173
|
+
for (var i = 0; i < message.rules.length; ++i) {
|
|
17174
|
+
var error = $root.google.api.HttpRule.verify(message.rules[i]);
|
|
16352
17175
|
if (error)
|
|
16353
|
-
return "
|
|
17176
|
+
return "rules." + error;
|
|
16354
17177
|
}
|
|
16355
17178
|
}
|
|
17179
|
+
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
17180
|
+
if (typeof message.fullyDecodeReservedExpansion !== "boolean")
|
|
17181
|
+
return "fullyDecodeReservedExpansion: boolean expected";
|
|
16356
17182
|
return null;
|
|
16357
17183
|
};
|
|
16358
17184
|
|
|
16359
17185
|
/**
|
|
16360
|
-
* Creates a
|
|
17186
|
+
* Creates a Http message from a plain object. Also converts values to their respective internal types.
|
|
16361
17187
|
* @function fromObject
|
|
16362
|
-
* @memberof google.api.
|
|
17188
|
+
* @memberof google.api.Http
|
|
16363
17189
|
* @static
|
|
16364
17190
|
* @param {Object.<string,*>} object Plain object
|
|
16365
|
-
* @returns {google.api.
|
|
17191
|
+
* @returns {google.api.Http} Http
|
|
16366
17192
|
*/
|
|
16367
|
-
|
|
16368
|
-
if (object instanceof $root.google.api.
|
|
17193
|
+
Http.fromObject = function fromObject(object) {
|
|
17194
|
+
if (object instanceof $root.google.api.Http)
|
|
16369
17195
|
return object;
|
|
16370
|
-
var message = new $root.google.api.
|
|
16371
|
-
if (object.
|
|
16372
|
-
|
|
16373
|
-
|
|
16374
|
-
message.
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
|
|
16378
|
-
|
|
16379
|
-
if (object["delete"] != null)
|
|
16380
|
-
message["delete"] = String(object["delete"]);
|
|
16381
|
-
if (object.patch != null)
|
|
16382
|
-
message.patch = String(object.patch);
|
|
16383
|
-
if (object.custom != null) {
|
|
16384
|
-
if (typeof object.custom !== "object")
|
|
16385
|
-
throw TypeError(".google.api.HttpRule.custom: object expected");
|
|
16386
|
-
message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
|
|
16387
|
-
}
|
|
16388
|
-
if (object.body != null)
|
|
16389
|
-
message.body = String(object.body);
|
|
16390
|
-
if (object.responseBody != null)
|
|
16391
|
-
message.responseBody = String(object.responseBody);
|
|
16392
|
-
if (object.additionalBindings) {
|
|
16393
|
-
if (!Array.isArray(object.additionalBindings))
|
|
16394
|
-
throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
|
|
16395
|
-
message.additionalBindings = [];
|
|
16396
|
-
for (var i = 0; i < object.additionalBindings.length; ++i) {
|
|
16397
|
-
if (typeof object.additionalBindings[i] !== "object")
|
|
16398
|
-
throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
|
|
16399
|
-
message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
|
|
17196
|
+
var message = new $root.google.api.Http();
|
|
17197
|
+
if (object.rules) {
|
|
17198
|
+
if (!Array.isArray(object.rules))
|
|
17199
|
+
throw TypeError(".google.api.Http.rules: array expected");
|
|
17200
|
+
message.rules = [];
|
|
17201
|
+
for (var i = 0; i < object.rules.length; ++i) {
|
|
17202
|
+
if (typeof object.rules[i] !== "object")
|
|
17203
|
+
throw TypeError(".google.api.Http.rules: object expected");
|
|
17204
|
+
message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
|
|
16400
17205
|
}
|
|
16401
17206
|
}
|
|
17207
|
+
if (object.fullyDecodeReservedExpansion != null)
|
|
17208
|
+
message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
|
|
16402
17209
|
return message;
|
|
16403
17210
|
};
|
|
16404
17211
|
|
|
16405
17212
|
/**
|
|
16406
|
-
* Creates a plain object from a
|
|
17213
|
+
* Creates a plain object from a Http message. Also converts values to other types if specified.
|
|
16407
17214
|
* @function toObject
|
|
16408
|
-
* @memberof google.api.
|
|
17215
|
+
* @memberof google.api.Http
|
|
16409
17216
|
* @static
|
|
16410
|
-
* @param {google.api.
|
|
17217
|
+
* @param {google.api.Http} message Http
|
|
16411
17218
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
16412
17219
|
* @returns {Object.<string,*>} Plain object
|
|
16413
17220
|
*/
|
|
16414
|
-
|
|
17221
|
+
Http.toObject = function toObject(message, options) {
|
|
16415
17222
|
if (!options)
|
|
16416
17223
|
options = {};
|
|
16417
17224
|
var object = {};
|
|
16418
17225
|
if (options.arrays || options.defaults)
|
|
16419
|
-
object.
|
|
16420
|
-
if (options.defaults)
|
|
16421
|
-
object.
|
|
16422
|
-
|
|
16423
|
-
object.
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
object.selector = message.selector;
|
|
16427
|
-
if (message.get != null && message.hasOwnProperty("get")) {
|
|
16428
|
-
object.get = message.get;
|
|
16429
|
-
if (options.oneofs)
|
|
16430
|
-
object.pattern = "get";
|
|
16431
|
-
}
|
|
16432
|
-
if (message.put != null && message.hasOwnProperty("put")) {
|
|
16433
|
-
object.put = message.put;
|
|
16434
|
-
if (options.oneofs)
|
|
16435
|
-
object.pattern = "put";
|
|
16436
|
-
}
|
|
16437
|
-
if (message.post != null && message.hasOwnProperty("post")) {
|
|
16438
|
-
object.post = message.post;
|
|
16439
|
-
if (options.oneofs)
|
|
16440
|
-
object.pattern = "post";
|
|
16441
|
-
}
|
|
16442
|
-
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
16443
|
-
object["delete"] = message["delete"];
|
|
16444
|
-
if (options.oneofs)
|
|
16445
|
-
object.pattern = "delete";
|
|
16446
|
-
}
|
|
16447
|
-
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
16448
|
-
object.patch = message.patch;
|
|
16449
|
-
if (options.oneofs)
|
|
16450
|
-
object.pattern = "patch";
|
|
16451
|
-
}
|
|
16452
|
-
if (message.body != null && message.hasOwnProperty("body"))
|
|
16453
|
-
object.body = message.body;
|
|
16454
|
-
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
16455
|
-
object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
|
|
16456
|
-
if (options.oneofs)
|
|
16457
|
-
object.pattern = "custom";
|
|
16458
|
-
}
|
|
16459
|
-
if (message.additionalBindings && message.additionalBindings.length) {
|
|
16460
|
-
object.additionalBindings = [];
|
|
16461
|
-
for (var j = 0; j < message.additionalBindings.length; ++j)
|
|
16462
|
-
object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
|
|
17226
|
+
object.rules = [];
|
|
17227
|
+
if (options.defaults)
|
|
17228
|
+
object.fullyDecodeReservedExpansion = false;
|
|
17229
|
+
if (message.rules && message.rules.length) {
|
|
17230
|
+
object.rules = [];
|
|
17231
|
+
for (var j = 0; j < message.rules.length; ++j)
|
|
17232
|
+
object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
|
|
16463
17233
|
}
|
|
16464
|
-
if (message.
|
|
16465
|
-
object.
|
|
17234
|
+
if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
|
17235
|
+
object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
|
16466
17236
|
return object;
|
|
16467
17237
|
};
|
|
16468
17238
|
|
|
16469
17239
|
/**
|
|
16470
|
-
* Converts this
|
|
17240
|
+
* Converts this Http to JSON.
|
|
16471
17241
|
* @function toJSON
|
|
16472
|
-
* @memberof google.api.
|
|
17242
|
+
* @memberof google.api.Http
|
|
16473
17243
|
* @instance
|
|
16474
17244
|
* @returns {Object.<string,*>} JSON object
|
|
16475
17245
|
*/
|
|
16476
|
-
|
|
17246
|
+
Http.prototype.toJSON = function toJSON() {
|
|
16477
17247
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
16478
17248
|
};
|
|
16479
17249
|
|
|
16480
17250
|
/**
|
|
16481
|
-
* Gets the default type url for
|
|
17251
|
+
* Gets the default type url for Http
|
|
16482
17252
|
* @function getTypeUrl
|
|
16483
|
-
* @memberof google.api.
|
|
17253
|
+
* @memberof google.api.Http
|
|
16484
17254
|
* @static
|
|
16485
17255
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
16486
17256
|
* @returns {string} The default type url
|
|
16487
17257
|
*/
|
|
16488
|
-
|
|
17258
|
+
Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
16489
17259
|
if (typeUrlPrefix === undefined) {
|
|
16490
17260
|
typeUrlPrefix = "type.googleapis.com";
|
|
16491
17261
|
}
|
|
16492
|
-
return typeUrlPrefix + "/google.api.
|
|
17262
|
+
return typeUrlPrefix + "/google.api.Http";
|
|
16493
17263
|
};
|
|
16494
17264
|
|
|
16495
|
-
return
|
|
17265
|
+
return Http;
|
|
16496
17266
|
})();
|
|
16497
17267
|
|
|
16498
|
-
api.
|
|
16499
|
-
|
|
16500
|
-
/**
|
|
16501
|
-
* Properties of a CustomHttpPattern.
|
|
16502
|
-
* @memberof google.api
|
|
16503
|
-
* @interface ICustomHttpPattern
|
|
16504
|
-
* @property {string|null} [kind] CustomHttpPattern kind
|
|
16505
|
-
* @property {string|null} [path] CustomHttpPattern path
|
|
16506
|
-
*/
|
|
17268
|
+
api.HttpRule = (function() {
|
|
16507
17269
|
|
|
16508
17270
|
/**
|
|
16509
|
-
*
|
|
17271
|
+
* Properties of a HttpRule.
|
|
16510
17272
|
* @memberof google.api
|
|
16511
|
-
* @
|
|
16512
|
-
* @
|
|
17273
|
+
* @interface IHttpRule
|
|
17274
|
+
* @property {string|null} [selector] HttpRule selector
|
|
17275
|
+
* @property {string|null} [get] HttpRule get
|
|
17276
|
+
* @property {string|null} [put] HttpRule put
|
|
17277
|
+
* @property {string|null} [post] HttpRule post
|
|
17278
|
+
* @property {string|null} ["delete"] HttpRule delete
|
|
17279
|
+
* @property {string|null} [patch] HttpRule patch
|
|
17280
|
+
* @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
|
|
17281
|
+
* @property {string|null} [body] HttpRule body
|
|
17282
|
+
* @property {string|null} [responseBody] HttpRule responseBody
|
|
17283
|
+
* @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
|
|
17284
|
+
*/
|
|
17285
|
+
|
|
17286
|
+
/**
|
|
17287
|
+
* Constructs a new HttpRule.
|
|
17288
|
+
* @memberof google.api
|
|
17289
|
+
* @classdesc Represents a HttpRule.
|
|
17290
|
+
* @implements IHttpRule
|
|
16513
17291
|
* @constructor
|
|
16514
|
-
* @param {google.api.
|
|
17292
|
+
* @param {google.api.IHttpRule=} [properties] Properties to set
|
|
16515
17293
|
*/
|
|
16516
|
-
function
|
|
17294
|
+
function HttpRule(properties) {
|
|
17295
|
+
this.additionalBindings = [];
|
|
16517
17296
|
if (properties)
|
|
16518
17297
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
16519
17298
|
if (properties[keys[i]] != null)
|
|
@@ -16521,89 +17300,218 @@
|
|
|
16521
17300
|
}
|
|
16522
17301
|
|
|
16523
17302
|
/**
|
|
16524
|
-
*
|
|
16525
|
-
* @member {string}
|
|
16526
|
-
* @memberof google.api.
|
|
17303
|
+
* HttpRule selector.
|
|
17304
|
+
* @member {string} selector
|
|
17305
|
+
* @memberof google.api.HttpRule
|
|
16527
17306
|
* @instance
|
|
16528
17307
|
*/
|
|
16529
|
-
|
|
17308
|
+
HttpRule.prototype.selector = "";
|
|
16530
17309
|
|
|
16531
17310
|
/**
|
|
16532
|
-
*
|
|
16533
|
-
* @member {string}
|
|
16534
|
-
* @memberof google.api.
|
|
17311
|
+
* HttpRule get.
|
|
17312
|
+
* @member {string|null|undefined} get
|
|
17313
|
+
* @memberof google.api.HttpRule
|
|
16535
17314
|
* @instance
|
|
16536
17315
|
*/
|
|
16537
|
-
|
|
17316
|
+
HttpRule.prototype.get = null;
|
|
16538
17317
|
|
|
16539
17318
|
/**
|
|
16540
|
-
*
|
|
17319
|
+
* HttpRule put.
|
|
17320
|
+
* @member {string|null|undefined} put
|
|
17321
|
+
* @memberof google.api.HttpRule
|
|
17322
|
+
* @instance
|
|
17323
|
+
*/
|
|
17324
|
+
HttpRule.prototype.put = null;
|
|
17325
|
+
|
|
17326
|
+
/**
|
|
17327
|
+
* HttpRule post.
|
|
17328
|
+
* @member {string|null|undefined} post
|
|
17329
|
+
* @memberof google.api.HttpRule
|
|
17330
|
+
* @instance
|
|
17331
|
+
*/
|
|
17332
|
+
HttpRule.prototype.post = null;
|
|
17333
|
+
|
|
17334
|
+
/**
|
|
17335
|
+
* HttpRule delete.
|
|
17336
|
+
* @member {string|null|undefined} delete
|
|
17337
|
+
* @memberof google.api.HttpRule
|
|
17338
|
+
* @instance
|
|
17339
|
+
*/
|
|
17340
|
+
HttpRule.prototype["delete"] = null;
|
|
17341
|
+
|
|
17342
|
+
/**
|
|
17343
|
+
* HttpRule patch.
|
|
17344
|
+
* @member {string|null|undefined} patch
|
|
17345
|
+
* @memberof google.api.HttpRule
|
|
17346
|
+
* @instance
|
|
17347
|
+
*/
|
|
17348
|
+
HttpRule.prototype.patch = null;
|
|
17349
|
+
|
|
17350
|
+
/**
|
|
17351
|
+
* HttpRule custom.
|
|
17352
|
+
* @member {google.api.ICustomHttpPattern|null|undefined} custom
|
|
17353
|
+
* @memberof google.api.HttpRule
|
|
17354
|
+
* @instance
|
|
17355
|
+
*/
|
|
17356
|
+
HttpRule.prototype.custom = null;
|
|
17357
|
+
|
|
17358
|
+
/**
|
|
17359
|
+
* HttpRule body.
|
|
17360
|
+
* @member {string} body
|
|
17361
|
+
* @memberof google.api.HttpRule
|
|
17362
|
+
* @instance
|
|
17363
|
+
*/
|
|
17364
|
+
HttpRule.prototype.body = "";
|
|
17365
|
+
|
|
17366
|
+
/**
|
|
17367
|
+
* HttpRule responseBody.
|
|
17368
|
+
* @member {string} responseBody
|
|
17369
|
+
* @memberof google.api.HttpRule
|
|
17370
|
+
* @instance
|
|
17371
|
+
*/
|
|
17372
|
+
HttpRule.prototype.responseBody = "";
|
|
17373
|
+
|
|
17374
|
+
/**
|
|
17375
|
+
* HttpRule additionalBindings.
|
|
17376
|
+
* @member {Array.<google.api.IHttpRule>} additionalBindings
|
|
17377
|
+
* @memberof google.api.HttpRule
|
|
17378
|
+
* @instance
|
|
17379
|
+
*/
|
|
17380
|
+
HttpRule.prototype.additionalBindings = $util.emptyArray;
|
|
17381
|
+
|
|
17382
|
+
// OneOf field names bound to virtual getters and setters
|
|
17383
|
+
var $oneOfFields;
|
|
17384
|
+
|
|
17385
|
+
/**
|
|
17386
|
+
* HttpRule pattern.
|
|
17387
|
+
* @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
|
|
17388
|
+
* @memberof google.api.HttpRule
|
|
17389
|
+
* @instance
|
|
17390
|
+
*/
|
|
17391
|
+
Object.defineProperty(HttpRule.prototype, "pattern", {
|
|
17392
|
+
get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
|
|
17393
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17394
|
+
});
|
|
17395
|
+
|
|
17396
|
+
/**
|
|
17397
|
+
* Creates a new HttpRule instance using the specified properties.
|
|
16541
17398
|
* @function create
|
|
16542
|
-
* @memberof google.api.
|
|
17399
|
+
* @memberof google.api.HttpRule
|
|
16543
17400
|
* @static
|
|
16544
|
-
* @param {google.api.
|
|
16545
|
-
* @returns {google.api.
|
|
17401
|
+
* @param {google.api.IHttpRule=} [properties] Properties to set
|
|
17402
|
+
* @returns {google.api.HttpRule} HttpRule instance
|
|
16546
17403
|
*/
|
|
16547
|
-
|
|
16548
|
-
return new
|
|
17404
|
+
HttpRule.create = function create(properties) {
|
|
17405
|
+
return new HttpRule(properties);
|
|
16549
17406
|
};
|
|
16550
17407
|
|
|
16551
17408
|
/**
|
|
16552
|
-
* Encodes the specified
|
|
17409
|
+
* Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
|
16553
17410
|
* @function encode
|
|
16554
|
-
* @memberof google.api.
|
|
17411
|
+
* @memberof google.api.HttpRule
|
|
16555
17412
|
* @static
|
|
16556
|
-
* @param {google.api.
|
|
17413
|
+
* @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
|
16557
17414
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16558
17415
|
* @returns {$protobuf.Writer} Writer
|
|
16559
17416
|
*/
|
|
16560
|
-
|
|
17417
|
+
HttpRule.encode = function encode(message, writer) {
|
|
16561
17418
|
if (!writer)
|
|
16562
17419
|
writer = $Writer.create();
|
|
16563
|
-
if (message.
|
|
16564
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.
|
|
16565
|
-
if (message.
|
|
16566
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.
|
|
17420
|
+
if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
|
|
17421
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
|
|
17422
|
+
if (message.get != null && Object.hasOwnProperty.call(message, "get"))
|
|
17423
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
|
|
17424
|
+
if (message.put != null && Object.hasOwnProperty.call(message, "put"))
|
|
17425
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
|
|
17426
|
+
if (message.post != null && Object.hasOwnProperty.call(message, "post"))
|
|
17427
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
|
|
17428
|
+
if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
|
17429
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
|
|
17430
|
+
if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
|
|
17431
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
|
|
17432
|
+
if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
|
17433
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
|
|
17434
|
+
if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
|
|
17435
|
+
$root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
17436
|
+
if (message.additionalBindings != null && message.additionalBindings.length)
|
|
17437
|
+
for (var i = 0; i < message.additionalBindings.length; ++i)
|
|
17438
|
+
$root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
17439
|
+
if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
|
|
17440
|
+
writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
|
|
16567
17441
|
return writer;
|
|
16568
17442
|
};
|
|
16569
17443
|
|
|
16570
17444
|
/**
|
|
16571
|
-
* Encodes the specified
|
|
17445
|
+
* Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
|
16572
17446
|
* @function encodeDelimited
|
|
16573
|
-
* @memberof google.api.
|
|
17447
|
+
* @memberof google.api.HttpRule
|
|
16574
17448
|
* @static
|
|
16575
|
-
* @param {google.api.
|
|
17449
|
+
* @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
|
16576
17450
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16577
17451
|
* @returns {$protobuf.Writer} Writer
|
|
16578
17452
|
*/
|
|
16579
|
-
|
|
17453
|
+
HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
|
|
16580
17454
|
return this.encode(message, writer).ldelim();
|
|
16581
17455
|
};
|
|
16582
17456
|
|
|
16583
17457
|
/**
|
|
16584
|
-
* Decodes a
|
|
17458
|
+
* Decodes a HttpRule message from the specified reader or buffer.
|
|
16585
17459
|
* @function decode
|
|
16586
|
-
* @memberof google.api.
|
|
17460
|
+
* @memberof google.api.HttpRule
|
|
16587
17461
|
* @static
|
|
16588
17462
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16589
17463
|
* @param {number} [length] Message length if known beforehand
|
|
16590
|
-
* @returns {google.api.
|
|
17464
|
+
* @returns {google.api.HttpRule} HttpRule
|
|
16591
17465
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16592
17466
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16593
17467
|
*/
|
|
16594
|
-
|
|
17468
|
+
HttpRule.decode = function decode(reader, length) {
|
|
16595
17469
|
if (!(reader instanceof $Reader))
|
|
16596
17470
|
reader = $Reader.create(reader);
|
|
16597
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.
|
|
17471
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
|
|
16598
17472
|
while (reader.pos < end) {
|
|
16599
17473
|
var tag = reader.uint32();
|
|
16600
17474
|
switch (tag >>> 3) {
|
|
16601
17475
|
case 1: {
|
|
16602
|
-
message.
|
|
17476
|
+
message.selector = reader.string();
|
|
16603
17477
|
break;
|
|
16604
17478
|
}
|
|
16605
17479
|
case 2: {
|
|
16606
|
-
message.
|
|
17480
|
+
message.get = reader.string();
|
|
17481
|
+
break;
|
|
17482
|
+
}
|
|
17483
|
+
case 3: {
|
|
17484
|
+
message.put = reader.string();
|
|
17485
|
+
break;
|
|
17486
|
+
}
|
|
17487
|
+
case 4: {
|
|
17488
|
+
message.post = reader.string();
|
|
17489
|
+
break;
|
|
17490
|
+
}
|
|
17491
|
+
case 5: {
|
|
17492
|
+
message["delete"] = reader.string();
|
|
17493
|
+
break;
|
|
17494
|
+
}
|
|
17495
|
+
case 6: {
|
|
17496
|
+
message.patch = reader.string();
|
|
17497
|
+
break;
|
|
17498
|
+
}
|
|
17499
|
+
case 8: {
|
|
17500
|
+
message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
|
|
17501
|
+
break;
|
|
17502
|
+
}
|
|
17503
|
+
case 7: {
|
|
17504
|
+
message.body = reader.string();
|
|
17505
|
+
break;
|
|
17506
|
+
}
|
|
17507
|
+
case 12: {
|
|
17508
|
+
message.responseBody = reader.string();
|
|
17509
|
+
break;
|
|
17510
|
+
}
|
|
17511
|
+
case 11: {
|
|
17512
|
+
if (!(message.additionalBindings && message.additionalBindings.length))
|
|
17513
|
+
message.additionalBindings = [];
|
|
17514
|
+
message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
|
16607
17515
|
break;
|
|
16608
17516
|
}
|
|
16609
17517
|
default:
|
|
@@ -16615,133 +17523,255 @@
|
|
|
16615
17523
|
};
|
|
16616
17524
|
|
|
16617
17525
|
/**
|
|
16618
|
-
* Decodes a
|
|
17526
|
+
* Decodes a HttpRule message from the specified reader or buffer, length delimited.
|
|
16619
17527
|
* @function decodeDelimited
|
|
16620
|
-
* @memberof google.api.
|
|
17528
|
+
* @memberof google.api.HttpRule
|
|
16621
17529
|
* @static
|
|
16622
17530
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
16623
|
-
* @returns {google.api.
|
|
17531
|
+
* @returns {google.api.HttpRule} HttpRule
|
|
16624
17532
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
16625
17533
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
16626
17534
|
*/
|
|
16627
|
-
|
|
17535
|
+
HttpRule.decodeDelimited = function decodeDelimited(reader) {
|
|
16628
17536
|
if (!(reader instanceof $Reader))
|
|
16629
17537
|
reader = new $Reader(reader);
|
|
16630
17538
|
return this.decode(reader, reader.uint32());
|
|
16631
17539
|
};
|
|
16632
17540
|
|
|
16633
17541
|
/**
|
|
16634
|
-
* Verifies a
|
|
17542
|
+
* Verifies a HttpRule message.
|
|
16635
17543
|
* @function verify
|
|
16636
|
-
* @memberof google.api.
|
|
17544
|
+
* @memberof google.api.HttpRule
|
|
16637
17545
|
* @static
|
|
16638
17546
|
* @param {Object.<string,*>} message Plain object to verify
|
|
16639
17547
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
16640
17548
|
*/
|
|
16641
|
-
|
|
17549
|
+
HttpRule.verify = function verify(message) {
|
|
16642
17550
|
if (typeof message !== "object" || message === null)
|
|
16643
17551
|
return "object expected";
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
if (
|
|
16668
|
-
|
|
17552
|
+
var properties = {};
|
|
17553
|
+
if (message.selector != null && message.hasOwnProperty("selector"))
|
|
17554
|
+
if (!$util.isString(message.selector))
|
|
17555
|
+
return "selector: string expected";
|
|
17556
|
+
if (message.get != null && message.hasOwnProperty("get")) {
|
|
17557
|
+
properties.pattern = 1;
|
|
17558
|
+
if (!$util.isString(message.get))
|
|
17559
|
+
return "get: string expected";
|
|
17560
|
+
}
|
|
17561
|
+
if (message.put != null && message.hasOwnProperty("put")) {
|
|
17562
|
+
if (properties.pattern === 1)
|
|
17563
|
+
return "pattern: multiple values";
|
|
17564
|
+
properties.pattern = 1;
|
|
17565
|
+
if (!$util.isString(message.put))
|
|
17566
|
+
return "put: string expected";
|
|
17567
|
+
}
|
|
17568
|
+
if (message.post != null && message.hasOwnProperty("post")) {
|
|
17569
|
+
if (properties.pattern === 1)
|
|
17570
|
+
return "pattern: multiple values";
|
|
17571
|
+
properties.pattern = 1;
|
|
17572
|
+
if (!$util.isString(message.post))
|
|
17573
|
+
return "post: string expected";
|
|
17574
|
+
}
|
|
17575
|
+
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
17576
|
+
if (properties.pattern === 1)
|
|
17577
|
+
return "pattern: multiple values";
|
|
17578
|
+
properties.pattern = 1;
|
|
17579
|
+
if (!$util.isString(message["delete"]))
|
|
17580
|
+
return "delete: string expected";
|
|
17581
|
+
}
|
|
17582
|
+
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
17583
|
+
if (properties.pattern === 1)
|
|
17584
|
+
return "pattern: multiple values";
|
|
17585
|
+
properties.pattern = 1;
|
|
17586
|
+
if (!$util.isString(message.patch))
|
|
17587
|
+
return "patch: string expected";
|
|
17588
|
+
}
|
|
17589
|
+
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
17590
|
+
if (properties.pattern === 1)
|
|
17591
|
+
return "pattern: multiple values";
|
|
17592
|
+
properties.pattern = 1;
|
|
17593
|
+
{
|
|
17594
|
+
var error = $root.google.api.CustomHttpPattern.verify(message.custom);
|
|
17595
|
+
if (error)
|
|
17596
|
+
return "custom." + error;
|
|
17597
|
+
}
|
|
17598
|
+
}
|
|
17599
|
+
if (message.body != null && message.hasOwnProperty("body"))
|
|
17600
|
+
if (!$util.isString(message.body))
|
|
17601
|
+
return "body: string expected";
|
|
17602
|
+
if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
|
17603
|
+
if (!$util.isString(message.responseBody))
|
|
17604
|
+
return "responseBody: string expected";
|
|
17605
|
+
if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
|
|
17606
|
+
if (!Array.isArray(message.additionalBindings))
|
|
17607
|
+
return "additionalBindings: array expected";
|
|
17608
|
+
for (var i = 0; i < message.additionalBindings.length; ++i) {
|
|
17609
|
+
var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
|
|
17610
|
+
if (error)
|
|
17611
|
+
return "additionalBindings." + error;
|
|
17612
|
+
}
|
|
17613
|
+
}
|
|
17614
|
+
return null;
|
|
17615
|
+
};
|
|
17616
|
+
|
|
17617
|
+
/**
|
|
17618
|
+
* Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
|
|
17619
|
+
* @function fromObject
|
|
17620
|
+
* @memberof google.api.HttpRule
|
|
17621
|
+
* @static
|
|
17622
|
+
* @param {Object.<string,*>} object Plain object
|
|
17623
|
+
* @returns {google.api.HttpRule} HttpRule
|
|
17624
|
+
*/
|
|
17625
|
+
HttpRule.fromObject = function fromObject(object) {
|
|
17626
|
+
if (object instanceof $root.google.api.HttpRule)
|
|
17627
|
+
return object;
|
|
17628
|
+
var message = new $root.google.api.HttpRule();
|
|
17629
|
+
if (object.selector != null)
|
|
17630
|
+
message.selector = String(object.selector);
|
|
17631
|
+
if (object.get != null)
|
|
17632
|
+
message.get = String(object.get);
|
|
17633
|
+
if (object.put != null)
|
|
17634
|
+
message.put = String(object.put);
|
|
17635
|
+
if (object.post != null)
|
|
17636
|
+
message.post = String(object.post);
|
|
17637
|
+
if (object["delete"] != null)
|
|
17638
|
+
message["delete"] = String(object["delete"]);
|
|
17639
|
+
if (object.patch != null)
|
|
17640
|
+
message.patch = String(object.patch);
|
|
17641
|
+
if (object.custom != null) {
|
|
17642
|
+
if (typeof object.custom !== "object")
|
|
17643
|
+
throw TypeError(".google.api.HttpRule.custom: object expected");
|
|
17644
|
+
message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
|
|
17645
|
+
}
|
|
17646
|
+
if (object.body != null)
|
|
17647
|
+
message.body = String(object.body);
|
|
17648
|
+
if (object.responseBody != null)
|
|
17649
|
+
message.responseBody = String(object.responseBody);
|
|
17650
|
+
if (object.additionalBindings) {
|
|
17651
|
+
if (!Array.isArray(object.additionalBindings))
|
|
17652
|
+
throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
|
|
17653
|
+
message.additionalBindings = [];
|
|
17654
|
+
for (var i = 0; i < object.additionalBindings.length; ++i) {
|
|
17655
|
+
if (typeof object.additionalBindings[i] !== "object")
|
|
17656
|
+
throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
|
|
17657
|
+
message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
|
|
17658
|
+
}
|
|
17659
|
+
}
|
|
16669
17660
|
return message;
|
|
16670
17661
|
};
|
|
16671
17662
|
|
|
16672
17663
|
/**
|
|
16673
|
-
* Creates a plain object from a
|
|
17664
|
+
* Creates a plain object from a HttpRule message. Also converts values to other types if specified.
|
|
16674
17665
|
* @function toObject
|
|
16675
|
-
* @memberof google.api.
|
|
17666
|
+
* @memberof google.api.HttpRule
|
|
16676
17667
|
* @static
|
|
16677
|
-
* @param {google.api.
|
|
17668
|
+
* @param {google.api.HttpRule} message HttpRule
|
|
16678
17669
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
16679
17670
|
* @returns {Object.<string,*>} Plain object
|
|
16680
17671
|
*/
|
|
16681
|
-
|
|
17672
|
+
HttpRule.toObject = function toObject(message, options) {
|
|
16682
17673
|
if (!options)
|
|
16683
17674
|
options = {};
|
|
16684
17675
|
var object = {};
|
|
17676
|
+
if (options.arrays || options.defaults)
|
|
17677
|
+
object.additionalBindings = [];
|
|
16685
17678
|
if (options.defaults) {
|
|
16686
|
-
object.
|
|
16687
|
-
object.
|
|
17679
|
+
object.selector = "";
|
|
17680
|
+
object.body = "";
|
|
17681
|
+
object.responseBody = "";
|
|
16688
17682
|
}
|
|
16689
|
-
if (message.
|
|
16690
|
-
object.
|
|
16691
|
-
if (message.
|
|
16692
|
-
object.
|
|
17683
|
+
if (message.selector != null && message.hasOwnProperty("selector"))
|
|
17684
|
+
object.selector = message.selector;
|
|
17685
|
+
if (message.get != null && message.hasOwnProperty("get")) {
|
|
17686
|
+
object.get = message.get;
|
|
17687
|
+
if (options.oneofs)
|
|
17688
|
+
object.pattern = "get";
|
|
17689
|
+
}
|
|
17690
|
+
if (message.put != null && message.hasOwnProperty("put")) {
|
|
17691
|
+
object.put = message.put;
|
|
17692
|
+
if (options.oneofs)
|
|
17693
|
+
object.pattern = "put";
|
|
17694
|
+
}
|
|
17695
|
+
if (message.post != null && message.hasOwnProperty("post")) {
|
|
17696
|
+
object.post = message.post;
|
|
17697
|
+
if (options.oneofs)
|
|
17698
|
+
object.pattern = "post";
|
|
17699
|
+
}
|
|
17700
|
+
if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
|
17701
|
+
object["delete"] = message["delete"];
|
|
17702
|
+
if (options.oneofs)
|
|
17703
|
+
object.pattern = "delete";
|
|
17704
|
+
}
|
|
17705
|
+
if (message.patch != null && message.hasOwnProperty("patch")) {
|
|
17706
|
+
object.patch = message.patch;
|
|
17707
|
+
if (options.oneofs)
|
|
17708
|
+
object.pattern = "patch";
|
|
17709
|
+
}
|
|
17710
|
+
if (message.body != null && message.hasOwnProperty("body"))
|
|
17711
|
+
object.body = message.body;
|
|
17712
|
+
if (message.custom != null && message.hasOwnProperty("custom")) {
|
|
17713
|
+
object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
|
|
17714
|
+
if (options.oneofs)
|
|
17715
|
+
object.pattern = "custom";
|
|
17716
|
+
}
|
|
17717
|
+
if (message.additionalBindings && message.additionalBindings.length) {
|
|
17718
|
+
object.additionalBindings = [];
|
|
17719
|
+
for (var j = 0; j < message.additionalBindings.length; ++j)
|
|
17720
|
+
object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
|
|
17721
|
+
}
|
|
17722
|
+
if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
|
17723
|
+
object.responseBody = message.responseBody;
|
|
16693
17724
|
return object;
|
|
16694
17725
|
};
|
|
16695
17726
|
|
|
16696
17727
|
/**
|
|
16697
|
-
* Converts this
|
|
17728
|
+
* Converts this HttpRule to JSON.
|
|
16698
17729
|
* @function toJSON
|
|
16699
|
-
* @memberof google.api.
|
|
17730
|
+
* @memberof google.api.HttpRule
|
|
16700
17731
|
* @instance
|
|
16701
17732
|
* @returns {Object.<string,*>} JSON object
|
|
16702
17733
|
*/
|
|
16703
|
-
|
|
17734
|
+
HttpRule.prototype.toJSON = function toJSON() {
|
|
16704
17735
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
16705
17736
|
};
|
|
16706
17737
|
|
|
16707
17738
|
/**
|
|
16708
|
-
* Gets the default type url for
|
|
17739
|
+
* Gets the default type url for HttpRule
|
|
16709
17740
|
* @function getTypeUrl
|
|
16710
|
-
* @memberof google.api.
|
|
17741
|
+
* @memberof google.api.HttpRule
|
|
16711
17742
|
* @static
|
|
16712
17743
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
16713
17744
|
* @returns {string} The default type url
|
|
16714
17745
|
*/
|
|
16715
|
-
|
|
17746
|
+
HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
16716
17747
|
if (typeUrlPrefix === undefined) {
|
|
16717
17748
|
typeUrlPrefix = "type.googleapis.com";
|
|
16718
17749
|
}
|
|
16719
|
-
return typeUrlPrefix + "/google.api.
|
|
17750
|
+
return typeUrlPrefix + "/google.api.HttpRule";
|
|
16720
17751
|
};
|
|
16721
17752
|
|
|
16722
|
-
return
|
|
17753
|
+
return HttpRule;
|
|
16723
17754
|
})();
|
|
16724
17755
|
|
|
16725
|
-
api.
|
|
17756
|
+
api.CustomHttpPattern = (function() {
|
|
16726
17757
|
|
|
16727
17758
|
/**
|
|
16728
|
-
* Properties of a
|
|
17759
|
+
* Properties of a CustomHttpPattern.
|
|
16729
17760
|
* @memberof google.api
|
|
16730
|
-
* @interface
|
|
16731
|
-
* @property {string|null} [
|
|
16732
|
-
* @property {
|
|
17761
|
+
* @interface ICustomHttpPattern
|
|
17762
|
+
* @property {string|null} [kind] CustomHttpPattern kind
|
|
17763
|
+
* @property {string|null} [path] CustomHttpPattern path
|
|
16733
17764
|
*/
|
|
16734
17765
|
|
|
16735
17766
|
/**
|
|
16736
|
-
* Constructs a new
|
|
17767
|
+
* Constructs a new CustomHttpPattern.
|
|
16737
17768
|
* @memberof google.api
|
|
16738
|
-
* @classdesc Represents a
|
|
16739
|
-
* @implements
|
|
17769
|
+
* @classdesc Represents a CustomHttpPattern.
|
|
17770
|
+
* @implements ICustomHttpPattern
|
|
16740
17771
|
* @constructor
|
|
16741
|
-
* @param {google.api.
|
|
17772
|
+
* @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
|
16742
17773
|
*/
|
|
16743
|
-
function
|
|
16744
|
-
this.destinations = [];
|
|
17774
|
+
function CustomHttpPattern(properties) {
|
|
16745
17775
|
if (properties)
|
|
16746
17776
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
16747
17777
|
if (properties[keys[i]] != null)
|
|
@@ -16749,53 +17779,281 @@
|
|
|
16749
17779
|
}
|
|
16750
17780
|
|
|
16751
17781
|
/**
|
|
16752
|
-
*
|
|
16753
|
-
* @member {string}
|
|
16754
|
-
* @memberof google.api.
|
|
17782
|
+
* CustomHttpPattern kind.
|
|
17783
|
+
* @member {string} kind
|
|
17784
|
+
* @memberof google.api.CustomHttpPattern
|
|
16755
17785
|
* @instance
|
|
16756
17786
|
*/
|
|
16757
|
-
|
|
17787
|
+
CustomHttpPattern.prototype.kind = "";
|
|
16758
17788
|
|
|
16759
17789
|
/**
|
|
16760
|
-
*
|
|
16761
|
-
* @member {
|
|
16762
|
-
* @memberof google.api.
|
|
17790
|
+
* CustomHttpPattern path.
|
|
17791
|
+
* @member {string} path
|
|
17792
|
+
* @memberof google.api.CustomHttpPattern
|
|
16763
17793
|
* @instance
|
|
16764
17794
|
*/
|
|
16765
|
-
|
|
17795
|
+
CustomHttpPattern.prototype.path = "";
|
|
16766
17796
|
|
|
16767
17797
|
/**
|
|
16768
|
-
* Creates a new
|
|
17798
|
+
* Creates a new CustomHttpPattern instance using the specified properties.
|
|
16769
17799
|
* @function create
|
|
16770
|
-
* @memberof google.api.
|
|
17800
|
+
* @memberof google.api.CustomHttpPattern
|
|
16771
17801
|
* @static
|
|
16772
|
-
* @param {google.api.
|
|
16773
|
-
* @returns {google.api.
|
|
17802
|
+
* @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
|
17803
|
+
* @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
|
|
16774
17804
|
*/
|
|
16775
|
-
|
|
16776
|
-
return new
|
|
17805
|
+
CustomHttpPattern.create = function create(properties) {
|
|
17806
|
+
return new CustomHttpPattern(properties);
|
|
16777
17807
|
};
|
|
16778
17808
|
|
|
16779
17809
|
/**
|
|
16780
|
-
* Encodes the specified
|
|
17810
|
+
* Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
|
16781
17811
|
* @function encode
|
|
16782
|
-
* @memberof google.api.
|
|
17812
|
+
* @memberof google.api.CustomHttpPattern
|
|
16783
17813
|
* @static
|
|
16784
|
-
* @param {google.api.
|
|
17814
|
+
* @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
|
16785
17815
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
16786
17816
|
* @returns {$protobuf.Writer} Writer
|
|
16787
17817
|
*/
|
|
16788
|
-
|
|
17818
|
+
CustomHttpPattern.encode = function encode(message, writer) {
|
|
16789
17819
|
if (!writer)
|
|
16790
17820
|
writer = $Writer.create();
|
|
16791
|
-
if (message.
|
|
16792
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.
|
|
16793
|
-
if (message.
|
|
16794
|
-
writer.uint32(/* id 2, wireType 2 =*/18).
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
17821
|
+
if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
|
17822
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
|
|
17823
|
+
if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
|
17824
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
|
|
17825
|
+
return writer;
|
|
17826
|
+
};
|
|
17827
|
+
|
|
17828
|
+
/**
|
|
17829
|
+
* Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
|
17830
|
+
* @function encodeDelimited
|
|
17831
|
+
* @memberof google.api.CustomHttpPattern
|
|
17832
|
+
* @static
|
|
17833
|
+
* @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
|
17834
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
17835
|
+
* @returns {$protobuf.Writer} Writer
|
|
17836
|
+
*/
|
|
17837
|
+
CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
|
|
17838
|
+
return this.encode(message, writer).ldelim();
|
|
17839
|
+
};
|
|
17840
|
+
|
|
17841
|
+
/**
|
|
17842
|
+
* Decodes a CustomHttpPattern message from the specified reader or buffer.
|
|
17843
|
+
* @function decode
|
|
17844
|
+
* @memberof google.api.CustomHttpPattern
|
|
17845
|
+
* @static
|
|
17846
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
17847
|
+
* @param {number} [length] Message length if known beforehand
|
|
17848
|
+
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
17849
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
17850
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
17851
|
+
*/
|
|
17852
|
+
CustomHttpPattern.decode = function decode(reader, length) {
|
|
17853
|
+
if (!(reader instanceof $Reader))
|
|
17854
|
+
reader = $Reader.create(reader);
|
|
17855
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
|
|
17856
|
+
while (reader.pos < end) {
|
|
17857
|
+
var tag = reader.uint32();
|
|
17858
|
+
switch (tag >>> 3) {
|
|
17859
|
+
case 1: {
|
|
17860
|
+
message.kind = reader.string();
|
|
17861
|
+
break;
|
|
17862
|
+
}
|
|
17863
|
+
case 2: {
|
|
17864
|
+
message.path = reader.string();
|
|
17865
|
+
break;
|
|
17866
|
+
}
|
|
17867
|
+
default:
|
|
17868
|
+
reader.skipType(tag & 7);
|
|
17869
|
+
break;
|
|
17870
|
+
}
|
|
17871
|
+
}
|
|
17872
|
+
return message;
|
|
17873
|
+
};
|
|
17874
|
+
|
|
17875
|
+
/**
|
|
17876
|
+
* Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
|
|
17877
|
+
* @function decodeDelimited
|
|
17878
|
+
* @memberof google.api.CustomHttpPattern
|
|
17879
|
+
* @static
|
|
17880
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
17881
|
+
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
17882
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
17883
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
17884
|
+
*/
|
|
17885
|
+
CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
|
|
17886
|
+
if (!(reader instanceof $Reader))
|
|
17887
|
+
reader = new $Reader(reader);
|
|
17888
|
+
return this.decode(reader, reader.uint32());
|
|
17889
|
+
};
|
|
17890
|
+
|
|
17891
|
+
/**
|
|
17892
|
+
* Verifies a CustomHttpPattern message.
|
|
17893
|
+
* @function verify
|
|
17894
|
+
* @memberof google.api.CustomHttpPattern
|
|
17895
|
+
* @static
|
|
17896
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
17897
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
17898
|
+
*/
|
|
17899
|
+
CustomHttpPattern.verify = function verify(message) {
|
|
17900
|
+
if (typeof message !== "object" || message === null)
|
|
17901
|
+
return "object expected";
|
|
17902
|
+
if (message.kind != null && message.hasOwnProperty("kind"))
|
|
17903
|
+
if (!$util.isString(message.kind))
|
|
17904
|
+
return "kind: string expected";
|
|
17905
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
17906
|
+
if (!$util.isString(message.path))
|
|
17907
|
+
return "path: string expected";
|
|
17908
|
+
return null;
|
|
17909
|
+
};
|
|
17910
|
+
|
|
17911
|
+
/**
|
|
17912
|
+
* Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
|
|
17913
|
+
* @function fromObject
|
|
17914
|
+
* @memberof google.api.CustomHttpPattern
|
|
17915
|
+
* @static
|
|
17916
|
+
* @param {Object.<string,*>} object Plain object
|
|
17917
|
+
* @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
|
17918
|
+
*/
|
|
17919
|
+
CustomHttpPattern.fromObject = function fromObject(object) {
|
|
17920
|
+
if (object instanceof $root.google.api.CustomHttpPattern)
|
|
17921
|
+
return object;
|
|
17922
|
+
var message = new $root.google.api.CustomHttpPattern();
|
|
17923
|
+
if (object.kind != null)
|
|
17924
|
+
message.kind = String(object.kind);
|
|
17925
|
+
if (object.path != null)
|
|
17926
|
+
message.path = String(object.path);
|
|
17927
|
+
return message;
|
|
17928
|
+
};
|
|
17929
|
+
|
|
17930
|
+
/**
|
|
17931
|
+
* Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
|
|
17932
|
+
* @function toObject
|
|
17933
|
+
* @memberof google.api.CustomHttpPattern
|
|
17934
|
+
* @static
|
|
17935
|
+
* @param {google.api.CustomHttpPattern} message CustomHttpPattern
|
|
17936
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
17937
|
+
* @returns {Object.<string,*>} Plain object
|
|
17938
|
+
*/
|
|
17939
|
+
CustomHttpPattern.toObject = function toObject(message, options) {
|
|
17940
|
+
if (!options)
|
|
17941
|
+
options = {};
|
|
17942
|
+
var object = {};
|
|
17943
|
+
if (options.defaults) {
|
|
17944
|
+
object.kind = "";
|
|
17945
|
+
object.path = "";
|
|
17946
|
+
}
|
|
17947
|
+
if (message.kind != null && message.hasOwnProperty("kind"))
|
|
17948
|
+
object.kind = message.kind;
|
|
17949
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
17950
|
+
object.path = message.path;
|
|
17951
|
+
return object;
|
|
17952
|
+
};
|
|
17953
|
+
|
|
17954
|
+
/**
|
|
17955
|
+
* Converts this CustomHttpPattern to JSON.
|
|
17956
|
+
* @function toJSON
|
|
17957
|
+
* @memberof google.api.CustomHttpPattern
|
|
17958
|
+
* @instance
|
|
17959
|
+
* @returns {Object.<string,*>} JSON object
|
|
17960
|
+
*/
|
|
17961
|
+
CustomHttpPattern.prototype.toJSON = function toJSON() {
|
|
17962
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
17963
|
+
};
|
|
17964
|
+
|
|
17965
|
+
/**
|
|
17966
|
+
* Gets the default type url for CustomHttpPattern
|
|
17967
|
+
* @function getTypeUrl
|
|
17968
|
+
* @memberof google.api.CustomHttpPattern
|
|
17969
|
+
* @static
|
|
17970
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
17971
|
+
* @returns {string} The default type url
|
|
17972
|
+
*/
|
|
17973
|
+
CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
17974
|
+
if (typeUrlPrefix === undefined) {
|
|
17975
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
17976
|
+
}
|
|
17977
|
+
return typeUrlPrefix + "/google.api.CustomHttpPattern";
|
|
17978
|
+
};
|
|
17979
|
+
|
|
17980
|
+
return CustomHttpPattern;
|
|
17981
|
+
})();
|
|
17982
|
+
|
|
17983
|
+
api.CommonLanguageSettings = (function() {
|
|
17984
|
+
|
|
17985
|
+
/**
|
|
17986
|
+
* Properties of a CommonLanguageSettings.
|
|
17987
|
+
* @memberof google.api
|
|
17988
|
+
* @interface ICommonLanguageSettings
|
|
17989
|
+
* @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri
|
|
17990
|
+
* @property {Array.<google.api.ClientLibraryDestination>|null} [destinations] CommonLanguageSettings destinations
|
|
17991
|
+
*/
|
|
17992
|
+
|
|
17993
|
+
/**
|
|
17994
|
+
* Constructs a new CommonLanguageSettings.
|
|
17995
|
+
* @memberof google.api
|
|
17996
|
+
* @classdesc Represents a CommonLanguageSettings.
|
|
17997
|
+
* @implements ICommonLanguageSettings
|
|
17998
|
+
* @constructor
|
|
17999
|
+
* @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
|
|
18000
|
+
*/
|
|
18001
|
+
function CommonLanguageSettings(properties) {
|
|
18002
|
+
this.destinations = [];
|
|
18003
|
+
if (properties)
|
|
18004
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
18005
|
+
if (properties[keys[i]] != null)
|
|
18006
|
+
this[keys[i]] = properties[keys[i]];
|
|
18007
|
+
}
|
|
18008
|
+
|
|
18009
|
+
/**
|
|
18010
|
+
* CommonLanguageSettings referenceDocsUri.
|
|
18011
|
+
* @member {string} referenceDocsUri
|
|
18012
|
+
* @memberof google.api.CommonLanguageSettings
|
|
18013
|
+
* @instance
|
|
18014
|
+
*/
|
|
18015
|
+
CommonLanguageSettings.prototype.referenceDocsUri = "";
|
|
18016
|
+
|
|
18017
|
+
/**
|
|
18018
|
+
* CommonLanguageSettings destinations.
|
|
18019
|
+
* @member {Array.<google.api.ClientLibraryDestination>} destinations
|
|
18020
|
+
* @memberof google.api.CommonLanguageSettings
|
|
18021
|
+
* @instance
|
|
18022
|
+
*/
|
|
18023
|
+
CommonLanguageSettings.prototype.destinations = $util.emptyArray;
|
|
18024
|
+
|
|
18025
|
+
/**
|
|
18026
|
+
* Creates a new CommonLanguageSettings instance using the specified properties.
|
|
18027
|
+
* @function create
|
|
18028
|
+
* @memberof google.api.CommonLanguageSettings
|
|
18029
|
+
* @static
|
|
18030
|
+
* @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
|
|
18031
|
+
* @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance
|
|
18032
|
+
*/
|
|
18033
|
+
CommonLanguageSettings.create = function create(properties) {
|
|
18034
|
+
return new CommonLanguageSettings(properties);
|
|
18035
|
+
};
|
|
18036
|
+
|
|
18037
|
+
/**
|
|
18038
|
+
* Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
|
|
18039
|
+
* @function encode
|
|
18040
|
+
* @memberof google.api.CommonLanguageSettings
|
|
18041
|
+
* @static
|
|
18042
|
+
* @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode
|
|
18043
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
18044
|
+
* @returns {$protobuf.Writer} Writer
|
|
18045
|
+
*/
|
|
18046
|
+
CommonLanguageSettings.encode = function encode(message, writer) {
|
|
18047
|
+
if (!writer)
|
|
18048
|
+
writer = $Writer.create();
|
|
18049
|
+
if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri"))
|
|
18050
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri);
|
|
18051
|
+
if (message.destinations != null && message.destinations.length) {
|
|
18052
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
|
18053
|
+
for (var i = 0; i < message.destinations.length; ++i)
|
|
18054
|
+
writer.int32(message.destinations[i]);
|
|
18055
|
+
writer.ldelim();
|
|
18056
|
+
}
|
|
16799
18057
|
return writer;
|
|
16800
18058
|
};
|
|
16801
18059
|
|
|
@@ -20651,690 +21909,6 @@
|
|
|
20651
21909
|
return values;
|
|
20652
21910
|
})();
|
|
20653
21911
|
|
|
20654
|
-
api.ResourceDescriptor = (function() {
|
|
20655
|
-
|
|
20656
|
-
/**
|
|
20657
|
-
* Properties of a ResourceDescriptor.
|
|
20658
|
-
* @memberof google.api
|
|
20659
|
-
* @interface IResourceDescriptor
|
|
20660
|
-
* @property {string|null} [type] ResourceDescriptor type
|
|
20661
|
-
* @property {Array.<string>|null} [pattern] ResourceDescriptor pattern
|
|
20662
|
-
* @property {string|null} [nameField] ResourceDescriptor nameField
|
|
20663
|
-
* @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
|
|
20664
|
-
* @property {string|null} [plural] ResourceDescriptor plural
|
|
20665
|
-
* @property {string|null} [singular] ResourceDescriptor singular
|
|
20666
|
-
* @property {Array.<google.api.ResourceDescriptor.Style>|null} [style] ResourceDescriptor style
|
|
20667
|
-
*/
|
|
20668
|
-
|
|
20669
|
-
/**
|
|
20670
|
-
* Constructs a new ResourceDescriptor.
|
|
20671
|
-
* @memberof google.api
|
|
20672
|
-
* @classdesc Represents a ResourceDescriptor.
|
|
20673
|
-
* @implements IResourceDescriptor
|
|
20674
|
-
* @constructor
|
|
20675
|
-
* @param {google.api.IResourceDescriptor=} [properties] Properties to set
|
|
20676
|
-
*/
|
|
20677
|
-
function ResourceDescriptor(properties) {
|
|
20678
|
-
this.pattern = [];
|
|
20679
|
-
this.style = [];
|
|
20680
|
-
if (properties)
|
|
20681
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
20682
|
-
if (properties[keys[i]] != null)
|
|
20683
|
-
this[keys[i]] = properties[keys[i]];
|
|
20684
|
-
}
|
|
20685
|
-
|
|
20686
|
-
/**
|
|
20687
|
-
* ResourceDescriptor type.
|
|
20688
|
-
* @member {string} type
|
|
20689
|
-
* @memberof google.api.ResourceDescriptor
|
|
20690
|
-
* @instance
|
|
20691
|
-
*/
|
|
20692
|
-
ResourceDescriptor.prototype.type = "";
|
|
20693
|
-
|
|
20694
|
-
/**
|
|
20695
|
-
* ResourceDescriptor pattern.
|
|
20696
|
-
* @member {Array.<string>} pattern
|
|
20697
|
-
* @memberof google.api.ResourceDescriptor
|
|
20698
|
-
* @instance
|
|
20699
|
-
*/
|
|
20700
|
-
ResourceDescriptor.prototype.pattern = $util.emptyArray;
|
|
20701
|
-
|
|
20702
|
-
/**
|
|
20703
|
-
* ResourceDescriptor nameField.
|
|
20704
|
-
* @member {string} nameField
|
|
20705
|
-
* @memberof google.api.ResourceDescriptor
|
|
20706
|
-
* @instance
|
|
20707
|
-
*/
|
|
20708
|
-
ResourceDescriptor.prototype.nameField = "";
|
|
20709
|
-
|
|
20710
|
-
/**
|
|
20711
|
-
* ResourceDescriptor history.
|
|
20712
|
-
* @member {google.api.ResourceDescriptor.History} history
|
|
20713
|
-
* @memberof google.api.ResourceDescriptor
|
|
20714
|
-
* @instance
|
|
20715
|
-
*/
|
|
20716
|
-
ResourceDescriptor.prototype.history = 0;
|
|
20717
|
-
|
|
20718
|
-
/**
|
|
20719
|
-
* ResourceDescriptor plural.
|
|
20720
|
-
* @member {string} plural
|
|
20721
|
-
* @memberof google.api.ResourceDescriptor
|
|
20722
|
-
* @instance
|
|
20723
|
-
*/
|
|
20724
|
-
ResourceDescriptor.prototype.plural = "";
|
|
20725
|
-
|
|
20726
|
-
/**
|
|
20727
|
-
* ResourceDescriptor singular.
|
|
20728
|
-
* @member {string} singular
|
|
20729
|
-
* @memberof google.api.ResourceDescriptor
|
|
20730
|
-
* @instance
|
|
20731
|
-
*/
|
|
20732
|
-
ResourceDescriptor.prototype.singular = "";
|
|
20733
|
-
|
|
20734
|
-
/**
|
|
20735
|
-
* ResourceDescriptor style.
|
|
20736
|
-
* @member {Array.<google.api.ResourceDescriptor.Style>} style
|
|
20737
|
-
* @memberof google.api.ResourceDescriptor
|
|
20738
|
-
* @instance
|
|
20739
|
-
*/
|
|
20740
|
-
ResourceDescriptor.prototype.style = $util.emptyArray;
|
|
20741
|
-
|
|
20742
|
-
/**
|
|
20743
|
-
* Creates a new ResourceDescriptor instance using the specified properties.
|
|
20744
|
-
* @function create
|
|
20745
|
-
* @memberof google.api.ResourceDescriptor
|
|
20746
|
-
* @static
|
|
20747
|
-
* @param {google.api.IResourceDescriptor=} [properties] Properties to set
|
|
20748
|
-
* @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
|
|
20749
|
-
*/
|
|
20750
|
-
ResourceDescriptor.create = function create(properties) {
|
|
20751
|
-
return new ResourceDescriptor(properties);
|
|
20752
|
-
};
|
|
20753
|
-
|
|
20754
|
-
/**
|
|
20755
|
-
* Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
|
|
20756
|
-
* @function encode
|
|
20757
|
-
* @memberof google.api.ResourceDescriptor
|
|
20758
|
-
* @static
|
|
20759
|
-
* @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
|
|
20760
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
20761
|
-
* @returns {$protobuf.Writer} Writer
|
|
20762
|
-
*/
|
|
20763
|
-
ResourceDescriptor.encode = function encode(message, writer) {
|
|
20764
|
-
if (!writer)
|
|
20765
|
-
writer = $Writer.create();
|
|
20766
|
-
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
20767
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
|
|
20768
|
-
if (message.pattern != null && message.pattern.length)
|
|
20769
|
-
for (var i = 0; i < message.pattern.length; ++i)
|
|
20770
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
|
|
20771
|
-
if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
|
|
20772
|
-
writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
|
|
20773
|
-
if (message.history != null && Object.hasOwnProperty.call(message, "history"))
|
|
20774
|
-
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
|
|
20775
|
-
if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
|
|
20776
|
-
writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
|
|
20777
|
-
if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
|
|
20778
|
-
writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
|
|
20779
|
-
if (message.style != null && message.style.length) {
|
|
20780
|
-
writer.uint32(/* id 10, wireType 2 =*/82).fork();
|
|
20781
|
-
for (var i = 0; i < message.style.length; ++i)
|
|
20782
|
-
writer.int32(message.style[i]);
|
|
20783
|
-
writer.ldelim();
|
|
20784
|
-
}
|
|
20785
|
-
return writer;
|
|
20786
|
-
};
|
|
20787
|
-
|
|
20788
|
-
/**
|
|
20789
|
-
* Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
|
|
20790
|
-
* @function encodeDelimited
|
|
20791
|
-
* @memberof google.api.ResourceDescriptor
|
|
20792
|
-
* @static
|
|
20793
|
-
* @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
|
|
20794
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
20795
|
-
* @returns {$protobuf.Writer} Writer
|
|
20796
|
-
*/
|
|
20797
|
-
ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
|
|
20798
|
-
return this.encode(message, writer).ldelim();
|
|
20799
|
-
};
|
|
20800
|
-
|
|
20801
|
-
/**
|
|
20802
|
-
* Decodes a ResourceDescriptor message from the specified reader or buffer.
|
|
20803
|
-
* @function decode
|
|
20804
|
-
* @memberof google.api.ResourceDescriptor
|
|
20805
|
-
* @static
|
|
20806
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20807
|
-
* @param {number} [length] Message length if known beforehand
|
|
20808
|
-
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
20809
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20810
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20811
|
-
*/
|
|
20812
|
-
ResourceDescriptor.decode = function decode(reader, length) {
|
|
20813
|
-
if (!(reader instanceof $Reader))
|
|
20814
|
-
reader = $Reader.create(reader);
|
|
20815
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
|
|
20816
|
-
while (reader.pos < end) {
|
|
20817
|
-
var tag = reader.uint32();
|
|
20818
|
-
switch (tag >>> 3) {
|
|
20819
|
-
case 1: {
|
|
20820
|
-
message.type = reader.string();
|
|
20821
|
-
break;
|
|
20822
|
-
}
|
|
20823
|
-
case 2: {
|
|
20824
|
-
if (!(message.pattern && message.pattern.length))
|
|
20825
|
-
message.pattern = [];
|
|
20826
|
-
message.pattern.push(reader.string());
|
|
20827
|
-
break;
|
|
20828
|
-
}
|
|
20829
|
-
case 3: {
|
|
20830
|
-
message.nameField = reader.string();
|
|
20831
|
-
break;
|
|
20832
|
-
}
|
|
20833
|
-
case 4: {
|
|
20834
|
-
message.history = reader.int32();
|
|
20835
|
-
break;
|
|
20836
|
-
}
|
|
20837
|
-
case 5: {
|
|
20838
|
-
message.plural = reader.string();
|
|
20839
|
-
break;
|
|
20840
|
-
}
|
|
20841
|
-
case 6: {
|
|
20842
|
-
message.singular = reader.string();
|
|
20843
|
-
break;
|
|
20844
|
-
}
|
|
20845
|
-
case 10: {
|
|
20846
|
-
if (!(message.style && message.style.length))
|
|
20847
|
-
message.style = [];
|
|
20848
|
-
if ((tag & 7) === 2) {
|
|
20849
|
-
var end2 = reader.uint32() + reader.pos;
|
|
20850
|
-
while (reader.pos < end2)
|
|
20851
|
-
message.style.push(reader.int32());
|
|
20852
|
-
} else
|
|
20853
|
-
message.style.push(reader.int32());
|
|
20854
|
-
break;
|
|
20855
|
-
}
|
|
20856
|
-
default:
|
|
20857
|
-
reader.skipType(tag & 7);
|
|
20858
|
-
break;
|
|
20859
|
-
}
|
|
20860
|
-
}
|
|
20861
|
-
return message;
|
|
20862
|
-
};
|
|
20863
|
-
|
|
20864
|
-
/**
|
|
20865
|
-
* Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
|
|
20866
|
-
* @function decodeDelimited
|
|
20867
|
-
* @memberof google.api.ResourceDescriptor
|
|
20868
|
-
* @static
|
|
20869
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20870
|
-
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
20871
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20872
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20873
|
-
*/
|
|
20874
|
-
ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
|
|
20875
|
-
if (!(reader instanceof $Reader))
|
|
20876
|
-
reader = new $Reader(reader);
|
|
20877
|
-
return this.decode(reader, reader.uint32());
|
|
20878
|
-
};
|
|
20879
|
-
|
|
20880
|
-
/**
|
|
20881
|
-
* Verifies a ResourceDescriptor message.
|
|
20882
|
-
* @function verify
|
|
20883
|
-
* @memberof google.api.ResourceDescriptor
|
|
20884
|
-
* @static
|
|
20885
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
20886
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
20887
|
-
*/
|
|
20888
|
-
ResourceDescriptor.verify = function verify(message) {
|
|
20889
|
-
if (typeof message !== "object" || message === null)
|
|
20890
|
-
return "object expected";
|
|
20891
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
20892
|
-
if (!$util.isString(message.type))
|
|
20893
|
-
return "type: string expected";
|
|
20894
|
-
if (message.pattern != null && message.hasOwnProperty("pattern")) {
|
|
20895
|
-
if (!Array.isArray(message.pattern))
|
|
20896
|
-
return "pattern: array expected";
|
|
20897
|
-
for (var i = 0; i < message.pattern.length; ++i)
|
|
20898
|
-
if (!$util.isString(message.pattern[i]))
|
|
20899
|
-
return "pattern: string[] expected";
|
|
20900
|
-
}
|
|
20901
|
-
if (message.nameField != null && message.hasOwnProperty("nameField"))
|
|
20902
|
-
if (!$util.isString(message.nameField))
|
|
20903
|
-
return "nameField: string expected";
|
|
20904
|
-
if (message.history != null && message.hasOwnProperty("history"))
|
|
20905
|
-
switch (message.history) {
|
|
20906
|
-
default:
|
|
20907
|
-
return "history: enum value expected";
|
|
20908
|
-
case 0:
|
|
20909
|
-
case 1:
|
|
20910
|
-
case 2:
|
|
20911
|
-
break;
|
|
20912
|
-
}
|
|
20913
|
-
if (message.plural != null && message.hasOwnProperty("plural"))
|
|
20914
|
-
if (!$util.isString(message.plural))
|
|
20915
|
-
return "plural: string expected";
|
|
20916
|
-
if (message.singular != null && message.hasOwnProperty("singular"))
|
|
20917
|
-
if (!$util.isString(message.singular))
|
|
20918
|
-
return "singular: string expected";
|
|
20919
|
-
if (message.style != null && message.hasOwnProperty("style")) {
|
|
20920
|
-
if (!Array.isArray(message.style))
|
|
20921
|
-
return "style: array expected";
|
|
20922
|
-
for (var i = 0; i < message.style.length; ++i)
|
|
20923
|
-
switch (message.style[i]) {
|
|
20924
|
-
default:
|
|
20925
|
-
return "style: enum value[] expected";
|
|
20926
|
-
case 0:
|
|
20927
|
-
case 1:
|
|
20928
|
-
break;
|
|
20929
|
-
}
|
|
20930
|
-
}
|
|
20931
|
-
return null;
|
|
20932
|
-
};
|
|
20933
|
-
|
|
20934
|
-
/**
|
|
20935
|
-
* Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
|
|
20936
|
-
* @function fromObject
|
|
20937
|
-
* @memberof google.api.ResourceDescriptor
|
|
20938
|
-
* @static
|
|
20939
|
-
* @param {Object.<string,*>} object Plain object
|
|
20940
|
-
* @returns {google.api.ResourceDescriptor} ResourceDescriptor
|
|
20941
|
-
*/
|
|
20942
|
-
ResourceDescriptor.fromObject = function fromObject(object) {
|
|
20943
|
-
if (object instanceof $root.google.api.ResourceDescriptor)
|
|
20944
|
-
return object;
|
|
20945
|
-
var message = new $root.google.api.ResourceDescriptor();
|
|
20946
|
-
if (object.type != null)
|
|
20947
|
-
message.type = String(object.type);
|
|
20948
|
-
if (object.pattern) {
|
|
20949
|
-
if (!Array.isArray(object.pattern))
|
|
20950
|
-
throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
|
|
20951
|
-
message.pattern = [];
|
|
20952
|
-
for (var i = 0; i < object.pattern.length; ++i)
|
|
20953
|
-
message.pattern[i] = String(object.pattern[i]);
|
|
20954
|
-
}
|
|
20955
|
-
if (object.nameField != null)
|
|
20956
|
-
message.nameField = String(object.nameField);
|
|
20957
|
-
switch (object.history) {
|
|
20958
|
-
default:
|
|
20959
|
-
if (typeof object.history === "number") {
|
|
20960
|
-
message.history = object.history;
|
|
20961
|
-
break;
|
|
20962
|
-
}
|
|
20963
|
-
break;
|
|
20964
|
-
case "HISTORY_UNSPECIFIED":
|
|
20965
|
-
case 0:
|
|
20966
|
-
message.history = 0;
|
|
20967
|
-
break;
|
|
20968
|
-
case "ORIGINALLY_SINGLE_PATTERN":
|
|
20969
|
-
case 1:
|
|
20970
|
-
message.history = 1;
|
|
20971
|
-
break;
|
|
20972
|
-
case "FUTURE_MULTI_PATTERN":
|
|
20973
|
-
case 2:
|
|
20974
|
-
message.history = 2;
|
|
20975
|
-
break;
|
|
20976
|
-
}
|
|
20977
|
-
if (object.plural != null)
|
|
20978
|
-
message.plural = String(object.plural);
|
|
20979
|
-
if (object.singular != null)
|
|
20980
|
-
message.singular = String(object.singular);
|
|
20981
|
-
if (object.style) {
|
|
20982
|
-
if (!Array.isArray(object.style))
|
|
20983
|
-
throw TypeError(".google.api.ResourceDescriptor.style: array expected");
|
|
20984
|
-
message.style = [];
|
|
20985
|
-
for (var i = 0; i < object.style.length; ++i)
|
|
20986
|
-
switch (object.style[i]) {
|
|
20987
|
-
default:
|
|
20988
|
-
if (typeof object.style[i] === "number") {
|
|
20989
|
-
message.style[i] = object.style[i];
|
|
20990
|
-
break;
|
|
20991
|
-
}
|
|
20992
|
-
case "STYLE_UNSPECIFIED":
|
|
20993
|
-
case 0:
|
|
20994
|
-
message.style[i] = 0;
|
|
20995
|
-
break;
|
|
20996
|
-
case "DECLARATIVE_FRIENDLY":
|
|
20997
|
-
case 1:
|
|
20998
|
-
message.style[i] = 1;
|
|
20999
|
-
break;
|
|
21000
|
-
}
|
|
21001
|
-
}
|
|
21002
|
-
return message;
|
|
21003
|
-
};
|
|
21004
|
-
|
|
21005
|
-
/**
|
|
21006
|
-
* Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
|
|
21007
|
-
* @function toObject
|
|
21008
|
-
* @memberof google.api.ResourceDescriptor
|
|
21009
|
-
* @static
|
|
21010
|
-
* @param {google.api.ResourceDescriptor} message ResourceDescriptor
|
|
21011
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
21012
|
-
* @returns {Object.<string,*>} Plain object
|
|
21013
|
-
*/
|
|
21014
|
-
ResourceDescriptor.toObject = function toObject(message, options) {
|
|
21015
|
-
if (!options)
|
|
21016
|
-
options = {};
|
|
21017
|
-
var object = {};
|
|
21018
|
-
if (options.arrays || options.defaults) {
|
|
21019
|
-
object.pattern = [];
|
|
21020
|
-
object.style = [];
|
|
21021
|
-
}
|
|
21022
|
-
if (options.defaults) {
|
|
21023
|
-
object.type = "";
|
|
21024
|
-
object.nameField = "";
|
|
21025
|
-
object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
|
|
21026
|
-
object.plural = "";
|
|
21027
|
-
object.singular = "";
|
|
21028
|
-
}
|
|
21029
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
21030
|
-
object.type = message.type;
|
|
21031
|
-
if (message.pattern && message.pattern.length) {
|
|
21032
|
-
object.pattern = [];
|
|
21033
|
-
for (var j = 0; j < message.pattern.length; ++j)
|
|
21034
|
-
object.pattern[j] = message.pattern[j];
|
|
21035
|
-
}
|
|
21036
|
-
if (message.nameField != null && message.hasOwnProperty("nameField"))
|
|
21037
|
-
object.nameField = message.nameField;
|
|
21038
|
-
if (message.history != null && message.hasOwnProperty("history"))
|
|
21039
|
-
object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history;
|
|
21040
|
-
if (message.plural != null && message.hasOwnProperty("plural"))
|
|
21041
|
-
object.plural = message.plural;
|
|
21042
|
-
if (message.singular != null && message.hasOwnProperty("singular"))
|
|
21043
|
-
object.singular = message.singular;
|
|
21044
|
-
if (message.style && message.style.length) {
|
|
21045
|
-
object.style = [];
|
|
21046
|
-
for (var j = 0; j < message.style.length; ++j)
|
|
21047
|
-
object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
|
|
21048
|
-
}
|
|
21049
|
-
return object;
|
|
21050
|
-
};
|
|
21051
|
-
|
|
21052
|
-
/**
|
|
21053
|
-
* Converts this ResourceDescriptor to JSON.
|
|
21054
|
-
* @function toJSON
|
|
21055
|
-
* @memberof google.api.ResourceDescriptor
|
|
21056
|
-
* @instance
|
|
21057
|
-
* @returns {Object.<string,*>} JSON object
|
|
21058
|
-
*/
|
|
21059
|
-
ResourceDescriptor.prototype.toJSON = function toJSON() {
|
|
21060
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
21061
|
-
};
|
|
21062
|
-
|
|
21063
|
-
/**
|
|
21064
|
-
* Gets the default type url for ResourceDescriptor
|
|
21065
|
-
* @function getTypeUrl
|
|
21066
|
-
* @memberof google.api.ResourceDescriptor
|
|
21067
|
-
* @static
|
|
21068
|
-
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
21069
|
-
* @returns {string} The default type url
|
|
21070
|
-
*/
|
|
21071
|
-
ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
21072
|
-
if (typeUrlPrefix === undefined) {
|
|
21073
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
21074
|
-
}
|
|
21075
|
-
return typeUrlPrefix + "/google.api.ResourceDescriptor";
|
|
21076
|
-
};
|
|
21077
|
-
|
|
21078
|
-
/**
|
|
21079
|
-
* History enum.
|
|
21080
|
-
* @name google.api.ResourceDescriptor.History
|
|
21081
|
-
* @enum {number}
|
|
21082
|
-
* @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
|
|
21083
|
-
* @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
|
|
21084
|
-
* @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
|
|
21085
|
-
*/
|
|
21086
|
-
ResourceDescriptor.History = (function() {
|
|
21087
|
-
var valuesById = {}, values = Object.create(valuesById);
|
|
21088
|
-
values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
|
|
21089
|
-
values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
|
|
21090
|
-
values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
|
|
21091
|
-
return values;
|
|
21092
|
-
})();
|
|
21093
|
-
|
|
21094
|
-
/**
|
|
21095
|
-
* Style enum.
|
|
21096
|
-
* @name google.api.ResourceDescriptor.Style
|
|
21097
|
-
* @enum {number}
|
|
21098
|
-
* @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
|
|
21099
|
-
* @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
|
|
21100
|
-
*/
|
|
21101
|
-
ResourceDescriptor.Style = (function() {
|
|
21102
|
-
var valuesById = {}, values = Object.create(valuesById);
|
|
21103
|
-
values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
|
|
21104
|
-
values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
|
|
21105
|
-
return values;
|
|
21106
|
-
})();
|
|
21107
|
-
|
|
21108
|
-
return ResourceDescriptor;
|
|
21109
|
-
})();
|
|
21110
|
-
|
|
21111
|
-
api.ResourceReference = (function() {
|
|
21112
|
-
|
|
21113
|
-
/**
|
|
21114
|
-
* Properties of a ResourceReference.
|
|
21115
|
-
* @memberof google.api
|
|
21116
|
-
* @interface IResourceReference
|
|
21117
|
-
* @property {string|null} [type] ResourceReference type
|
|
21118
|
-
* @property {string|null} [childType] ResourceReference childType
|
|
21119
|
-
*/
|
|
21120
|
-
|
|
21121
|
-
/**
|
|
21122
|
-
* Constructs a new ResourceReference.
|
|
21123
|
-
* @memberof google.api
|
|
21124
|
-
* @classdesc Represents a ResourceReference.
|
|
21125
|
-
* @implements IResourceReference
|
|
21126
|
-
* @constructor
|
|
21127
|
-
* @param {google.api.IResourceReference=} [properties] Properties to set
|
|
21128
|
-
*/
|
|
21129
|
-
function ResourceReference(properties) {
|
|
21130
|
-
if (properties)
|
|
21131
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21132
|
-
if (properties[keys[i]] != null)
|
|
21133
|
-
this[keys[i]] = properties[keys[i]];
|
|
21134
|
-
}
|
|
21135
|
-
|
|
21136
|
-
/**
|
|
21137
|
-
* ResourceReference type.
|
|
21138
|
-
* @member {string} type
|
|
21139
|
-
* @memberof google.api.ResourceReference
|
|
21140
|
-
* @instance
|
|
21141
|
-
*/
|
|
21142
|
-
ResourceReference.prototype.type = "";
|
|
21143
|
-
|
|
21144
|
-
/**
|
|
21145
|
-
* ResourceReference childType.
|
|
21146
|
-
* @member {string} childType
|
|
21147
|
-
* @memberof google.api.ResourceReference
|
|
21148
|
-
* @instance
|
|
21149
|
-
*/
|
|
21150
|
-
ResourceReference.prototype.childType = "";
|
|
21151
|
-
|
|
21152
|
-
/**
|
|
21153
|
-
* Creates a new ResourceReference instance using the specified properties.
|
|
21154
|
-
* @function create
|
|
21155
|
-
* @memberof google.api.ResourceReference
|
|
21156
|
-
* @static
|
|
21157
|
-
* @param {google.api.IResourceReference=} [properties] Properties to set
|
|
21158
|
-
* @returns {google.api.ResourceReference} ResourceReference instance
|
|
21159
|
-
*/
|
|
21160
|
-
ResourceReference.create = function create(properties) {
|
|
21161
|
-
return new ResourceReference(properties);
|
|
21162
|
-
};
|
|
21163
|
-
|
|
21164
|
-
/**
|
|
21165
|
-
* Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
|
|
21166
|
-
* @function encode
|
|
21167
|
-
* @memberof google.api.ResourceReference
|
|
21168
|
-
* @static
|
|
21169
|
-
* @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
|
|
21170
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21171
|
-
* @returns {$protobuf.Writer} Writer
|
|
21172
|
-
*/
|
|
21173
|
-
ResourceReference.encode = function encode(message, writer) {
|
|
21174
|
-
if (!writer)
|
|
21175
|
-
writer = $Writer.create();
|
|
21176
|
-
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
21177
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
|
|
21178
|
-
if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
|
|
21179
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
|
|
21180
|
-
return writer;
|
|
21181
|
-
};
|
|
21182
|
-
|
|
21183
|
-
/**
|
|
21184
|
-
* Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
|
|
21185
|
-
* @function encodeDelimited
|
|
21186
|
-
* @memberof google.api.ResourceReference
|
|
21187
|
-
* @static
|
|
21188
|
-
* @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
|
|
21189
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21190
|
-
* @returns {$protobuf.Writer} Writer
|
|
21191
|
-
*/
|
|
21192
|
-
ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
|
|
21193
|
-
return this.encode(message, writer).ldelim();
|
|
21194
|
-
};
|
|
21195
|
-
|
|
21196
|
-
/**
|
|
21197
|
-
* Decodes a ResourceReference message from the specified reader or buffer.
|
|
21198
|
-
* @function decode
|
|
21199
|
-
* @memberof google.api.ResourceReference
|
|
21200
|
-
* @static
|
|
21201
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21202
|
-
* @param {number} [length] Message length if known beforehand
|
|
21203
|
-
* @returns {google.api.ResourceReference} ResourceReference
|
|
21204
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21205
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21206
|
-
*/
|
|
21207
|
-
ResourceReference.decode = function decode(reader, length) {
|
|
21208
|
-
if (!(reader instanceof $Reader))
|
|
21209
|
-
reader = $Reader.create(reader);
|
|
21210
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
|
|
21211
|
-
while (reader.pos < end) {
|
|
21212
|
-
var tag = reader.uint32();
|
|
21213
|
-
switch (tag >>> 3) {
|
|
21214
|
-
case 1: {
|
|
21215
|
-
message.type = reader.string();
|
|
21216
|
-
break;
|
|
21217
|
-
}
|
|
21218
|
-
case 2: {
|
|
21219
|
-
message.childType = reader.string();
|
|
21220
|
-
break;
|
|
21221
|
-
}
|
|
21222
|
-
default:
|
|
21223
|
-
reader.skipType(tag & 7);
|
|
21224
|
-
break;
|
|
21225
|
-
}
|
|
21226
|
-
}
|
|
21227
|
-
return message;
|
|
21228
|
-
};
|
|
21229
|
-
|
|
21230
|
-
/**
|
|
21231
|
-
* Decodes a ResourceReference message from the specified reader or buffer, length delimited.
|
|
21232
|
-
* @function decodeDelimited
|
|
21233
|
-
* @memberof google.api.ResourceReference
|
|
21234
|
-
* @static
|
|
21235
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21236
|
-
* @returns {google.api.ResourceReference} ResourceReference
|
|
21237
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21238
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21239
|
-
*/
|
|
21240
|
-
ResourceReference.decodeDelimited = function decodeDelimited(reader) {
|
|
21241
|
-
if (!(reader instanceof $Reader))
|
|
21242
|
-
reader = new $Reader(reader);
|
|
21243
|
-
return this.decode(reader, reader.uint32());
|
|
21244
|
-
};
|
|
21245
|
-
|
|
21246
|
-
/**
|
|
21247
|
-
* Verifies a ResourceReference message.
|
|
21248
|
-
* @function verify
|
|
21249
|
-
* @memberof google.api.ResourceReference
|
|
21250
|
-
* @static
|
|
21251
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
21252
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
21253
|
-
*/
|
|
21254
|
-
ResourceReference.verify = function verify(message) {
|
|
21255
|
-
if (typeof message !== "object" || message === null)
|
|
21256
|
-
return "object expected";
|
|
21257
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
21258
|
-
if (!$util.isString(message.type))
|
|
21259
|
-
return "type: string expected";
|
|
21260
|
-
if (message.childType != null && message.hasOwnProperty("childType"))
|
|
21261
|
-
if (!$util.isString(message.childType))
|
|
21262
|
-
return "childType: string expected";
|
|
21263
|
-
return null;
|
|
21264
|
-
};
|
|
21265
|
-
|
|
21266
|
-
/**
|
|
21267
|
-
* Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
|
|
21268
|
-
* @function fromObject
|
|
21269
|
-
* @memberof google.api.ResourceReference
|
|
21270
|
-
* @static
|
|
21271
|
-
* @param {Object.<string,*>} object Plain object
|
|
21272
|
-
* @returns {google.api.ResourceReference} ResourceReference
|
|
21273
|
-
*/
|
|
21274
|
-
ResourceReference.fromObject = function fromObject(object) {
|
|
21275
|
-
if (object instanceof $root.google.api.ResourceReference)
|
|
21276
|
-
return object;
|
|
21277
|
-
var message = new $root.google.api.ResourceReference();
|
|
21278
|
-
if (object.type != null)
|
|
21279
|
-
message.type = String(object.type);
|
|
21280
|
-
if (object.childType != null)
|
|
21281
|
-
message.childType = String(object.childType);
|
|
21282
|
-
return message;
|
|
21283
|
-
};
|
|
21284
|
-
|
|
21285
|
-
/**
|
|
21286
|
-
* Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
|
|
21287
|
-
* @function toObject
|
|
21288
|
-
* @memberof google.api.ResourceReference
|
|
21289
|
-
* @static
|
|
21290
|
-
* @param {google.api.ResourceReference} message ResourceReference
|
|
21291
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
21292
|
-
* @returns {Object.<string,*>} Plain object
|
|
21293
|
-
*/
|
|
21294
|
-
ResourceReference.toObject = function toObject(message, options) {
|
|
21295
|
-
if (!options)
|
|
21296
|
-
options = {};
|
|
21297
|
-
var object = {};
|
|
21298
|
-
if (options.defaults) {
|
|
21299
|
-
object.type = "";
|
|
21300
|
-
object.childType = "";
|
|
21301
|
-
}
|
|
21302
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
21303
|
-
object.type = message.type;
|
|
21304
|
-
if (message.childType != null && message.hasOwnProperty("childType"))
|
|
21305
|
-
object.childType = message.childType;
|
|
21306
|
-
return object;
|
|
21307
|
-
};
|
|
21308
|
-
|
|
21309
|
-
/**
|
|
21310
|
-
* Converts this ResourceReference to JSON.
|
|
21311
|
-
* @function toJSON
|
|
21312
|
-
* @memberof google.api.ResourceReference
|
|
21313
|
-
* @instance
|
|
21314
|
-
* @returns {Object.<string,*>} JSON object
|
|
21315
|
-
*/
|
|
21316
|
-
ResourceReference.prototype.toJSON = function toJSON() {
|
|
21317
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
21318
|
-
};
|
|
21319
|
-
|
|
21320
|
-
/**
|
|
21321
|
-
* Gets the default type url for ResourceReference
|
|
21322
|
-
* @function getTypeUrl
|
|
21323
|
-
* @memberof google.api.ResourceReference
|
|
21324
|
-
* @static
|
|
21325
|
-
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
21326
|
-
* @returns {string} The default type url
|
|
21327
|
-
*/
|
|
21328
|
-
ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
21329
|
-
if (typeUrlPrefix === undefined) {
|
|
21330
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
21331
|
-
}
|
|
21332
|
-
return typeUrlPrefix + "/google.api.ResourceReference";
|
|
21333
|
-
};
|
|
21334
|
-
|
|
21335
|
-
return ResourceReference;
|
|
21336
|
-
})();
|
|
21337
|
-
|
|
21338
21912
|
api.RoutingRule = (function() {
|
|
21339
21913
|
|
|
21340
21914
|
/**
|