@cerbos/http
Version:
Client library for interacting with the Cerbos policy decision point service over HTTP from browser-based applications
29 lines • 916 B
JavaScript
;
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// source: google/protobuf/timestamp.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.Timestamp = exports.protobufPackage = void 0;
/* eslint-disable */
exports.protobufPackage = "google.protobuf";
exports.Timestamp = {
fromJSON(object) {
return {
seconds: isSet(object.seconds) ? globalThis.String(object.seconds) : "0",
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
};
},
toJSON(message) {
const obj = {};
if (message.seconds !== "0") {
obj.seconds = message.seconds;
}
if (message.nanos !== 0) {
obj.nanos = Math.round(message.nanos);
}
return obj;
},
};
function isSet(value) {
return value !== null && value !== undefined;
}
//# sourceMappingURL=timestamp.js.map