@firestore-emulator/proto
Version:
Generated Firestore Protobufs For Firestore Emulator
610 lines (609 loc) • 19.6 kB
text/typescript
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.19.1
* source: google/protobuf/wrappers.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
export class DoubleValue extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): DoubleValue {
const message = new DoubleValue({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeDouble(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DoubleValue {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DoubleValue();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readDouble();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): DoubleValue {
return DoubleValue.deserialize(bytes);
}
}
export class FloatValue extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): FloatValue {
const message = new FloatValue({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeFloat(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FloatValue {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FloatValue();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readFloat();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): FloatValue {
return FloatValue.deserialize(bytes);
}
}
export class Int64Value extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): Int64Value {
const message = new Int64Value({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeInt64(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Int64Value {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Int64Value();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readInt64();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): Int64Value {
return Int64Value.deserialize(bytes);
}
}
export class UInt64Value extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): UInt64Value {
const message = new UInt64Value({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeUint64(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UInt64Value {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UInt64Value();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readUint64();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): UInt64Value {
return UInt64Value.deserialize(bytes);
}
}
export class Int32Value extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): Int32Value {
const message = new Int32Value({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeInt32(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Int32Value {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Int32Value();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readInt32();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): Int32Value {
return Int32Value.deserialize(bytes);
}
}
export class UInt32Value extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set value(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: number;
}): UInt32Value {
const message = new UInt32Value({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: number;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != 0)
writer.writeUint32(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UInt32Value {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UInt32Value();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readUint32();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): UInt32Value {
return UInt32Value.deserialize(bytes);
}
}
export class BoolValue extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: boolean;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean;
}
set value(value: boolean) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: boolean;
}): BoolValue {
const message = new BoolValue({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: boolean;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value != false)
writer.writeBool(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BoolValue {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BoolValue();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readBool();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): BoolValue {
return BoolValue.deserialize(bytes);
}
}
export class StringValue extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set value(value: string) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: string;
}): StringValue {
const message = new StringValue({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: string;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value.length)
writer.writeString(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StringValue {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StringValue();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): StringValue {
return StringValue.deserialize(bytes);
}
}
export class BytesValue extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
value?: Uint8Array;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
}
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array;
}
set value(value: Uint8Array) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
value?: Uint8Array;
}): BytesValue {
const message = new BytesValue({});
if (data.value != null) {
message.value = data.value;
}
return message;
}
toObject() {
const data: {
value?: Uint8Array;
} = {};
if (this.value != null) {
data.value = this.value;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.value.length)
writer.writeBytes(1, this.value);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BytesValue {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BytesValue();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.value = reader.readBytes();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static override deserializeBinary(bytes: Uint8Array): BytesValue {
return BytesValue.deserialize(bytes);
}
}