You've already forked npm-core-sdk
191 lines
8.5 KiB
TypeScript
191 lines
8.5 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "object_db_query.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { ObjectDB } from "./object_db";
|
|
/**
|
|
* @generated from protobuf message api.CliGetObjectIdRequest
|
|
*/
|
|
export interface CliGetObjectIdRequest {
|
|
/**
|
|
* @generated from protobuf field: string project = 1
|
|
*/
|
|
project: string;
|
|
/**
|
|
* @generated from protobuf field: string object = 2
|
|
*/
|
|
object: string;
|
|
/**
|
|
* @generated from protobuf field: repeated string ids = 3
|
|
*/
|
|
ids: string[];
|
|
/**
|
|
* @generated from protobuf field: string pageState = 4
|
|
*/
|
|
pageState: string;
|
|
/**
|
|
* @generated from protobuf field: string limit = 5
|
|
*/
|
|
limit: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CliRepeatedObjectsGottenResponse
|
|
*/
|
|
export interface CliRepeatedObjectsGottenResponse {
|
|
/**
|
|
* @generated from protobuf field: repeated api.ObjectDB objectDBs = 1
|
|
*/
|
|
objectDBs: ObjectDB[];
|
|
/**
|
|
* @generated from protobuf field: string pageState = 2
|
|
*/
|
|
pageState: string;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CliGetObjectIdRequest$Type extends MessageType<CliGetObjectIdRequest> {
|
|
constructor() {
|
|
super("api.CliGetObjectIdRequest", [
|
|
{ no: 1, name: "project", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "object", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "pageState", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 5, name: "limit", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CliGetObjectIdRequest>): CliGetObjectIdRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.project = "";
|
|
message.object = "";
|
|
message.ids = [];
|
|
message.pageState = "";
|
|
message.limit = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CliGetObjectIdRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CliGetObjectIdRequest): CliGetObjectIdRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string project */ 1:
|
|
message.project = reader.string();
|
|
break;
|
|
case /* string object */ 2:
|
|
message.object = reader.string();
|
|
break;
|
|
case /* repeated string ids */ 3:
|
|
message.ids.push(reader.string());
|
|
break;
|
|
case /* string pageState */ 4:
|
|
message.pageState = reader.string();
|
|
break;
|
|
case /* string limit */ 5:
|
|
message.limit = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: CliGetObjectIdRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string project = 1; */
|
|
if (message.project !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.project);
|
|
/* string object = 2; */
|
|
if (message.object !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.object);
|
|
/* repeated string ids = 3; */
|
|
for (let i = 0; i < message.ids.length; i++)
|
|
writer.tag(3, WireType.LengthDelimited).string(message.ids[i]);
|
|
/* string pageState = 4; */
|
|
if (message.pageState !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.pageState);
|
|
/* string limit = 5; */
|
|
if (message.limit !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.limit);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CliGetObjectIdRequest
|
|
*/
|
|
export const CliGetObjectIdRequest = new CliGetObjectIdRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CliRepeatedObjectsGottenResponse$Type extends MessageType<CliRepeatedObjectsGottenResponse> {
|
|
constructor() {
|
|
super("api.CliRepeatedObjectsGottenResponse", [
|
|
{ no: 1, name: "objectDBs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ObjectDB },
|
|
{ no: 2, name: "pageState", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CliRepeatedObjectsGottenResponse>): CliRepeatedObjectsGottenResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.objectDBs = [];
|
|
message.pageState = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CliRepeatedObjectsGottenResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CliRepeatedObjectsGottenResponse): CliRepeatedObjectsGottenResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.ObjectDB objectDBs */ 1:
|
|
message.objectDBs.push(ObjectDB.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string pageState */ 2:
|
|
message.pageState = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: CliRepeatedObjectsGottenResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.ObjectDB objectDBs = 1; */
|
|
for (let i = 0; i < message.objectDBs.length; i++)
|
|
ObjectDB.internalBinaryWrite(message.objectDBs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string pageState = 2; */
|
|
if (message.pageState !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.pageState);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CliRepeatedObjectsGottenResponse
|
|
*/
|
|
export const CliRepeatedObjectsGottenResponse = new CliRepeatedObjectsGottenResponse$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.QueryObjectServices
|
|
*/
|
|
export const QueryObjectServices = new ServiceType("api.QueryObjectServices", []);
|