You've already forked npm-core-sdk
678 lines
34 KiB
TypeScript
678 lines
34 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "user-groups.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 { RequestProjectHeader } from "./shared";
|
|
/**
|
|
* @generated from protobuf message api.UserGroup
|
|
*/
|
|
export interface UserGroup {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 1
|
|
*/
|
|
ProjectID: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 2
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.EntityRefType EntityRefType = 3
|
|
*/
|
|
EntityRefType: EntityRefType;
|
|
/**
|
|
* @generated from protobuf field: repeated string AllowedRoles = 4
|
|
*/
|
|
AllowedRoles: string[];
|
|
/**
|
|
* @generated from protobuf field: bool AllowAllRoles = 5
|
|
*/
|
|
AllowAllRoles: boolean; // if true, AllowedRoles is ignored
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PutUserGroupsRequest
|
|
*/
|
|
export interface PutUserGroupsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 2
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.EntityRefType EntityRefType = 3
|
|
*/
|
|
EntityRefType: EntityRefType;
|
|
/**
|
|
* @generated from protobuf field: repeated string AllowedRoles = 4
|
|
*/
|
|
AllowedRoles: string[];
|
|
/**
|
|
* @generated from protobuf field: bool AllowAllRoles = 5
|
|
*/
|
|
AllowAllRoles: boolean; // if true, AllowedRoles is ignored
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.PutUserGroupsResult
|
|
*/
|
|
export interface PutUserGroupsResult {
|
|
/**
|
|
* @generated from protobuf field: api.UserGroup UserGroup = 1
|
|
*/
|
|
UserGroup?: UserGroup;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.GetUserGroupsRequest
|
|
*/
|
|
export interface GetUserGroupsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 2
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.EntityRefType EntityRefType = 3
|
|
*/
|
|
EntityRefType: EntityRefType;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.GetUserGroupsResult
|
|
*/
|
|
export interface GetUserGroupsResult {
|
|
/**
|
|
* @generated from protobuf field: api.UserGroup UserGroup = 1
|
|
*/
|
|
UserGroup?: UserGroup;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteUserGroupsRequest
|
|
*/
|
|
export interface DeleteUserGroupsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 2
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.EntityRefType EntityRefType = 3
|
|
*/
|
|
EntityRefType: EntityRefType;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteUserGroupsResult
|
|
*/
|
|
export interface DeleteUserGroupsResult {
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ListUserGroupsRequest
|
|
*/
|
|
export interface ListUserGroupsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityRefType EntityRefType = 2
|
|
*/
|
|
EntityRefType: EntityRefType;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ListUserGroupsResult
|
|
*/
|
|
export interface ListUserGroupsResult {
|
|
/**
|
|
* @generated from protobuf field: repeated api.UserGroup UserGroups = 1
|
|
*/
|
|
UserGroups: UserGroup[];
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.EntityRefType
|
|
*/
|
|
export enum EntityRefType {
|
|
/**
|
|
* @generated from protobuf enum value: REF_TYPE_UNKNOWN = 0;
|
|
*/
|
|
REF_TYPE_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: REF_TYPE_PARTNER = 1;
|
|
*/
|
|
REF_TYPE_PARTNER = 1
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UserGroup$Type extends MessageType<UserGroup> {
|
|
constructor() {
|
|
super("api.UserGroup", [
|
|
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "EntityRefType", kind: "enum", localName: "EntityRefType", jsonName: "EntityRefType", T: () => ["api.EntityRefType", EntityRefType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
{ no: 4, name: "AllowedRoles", kind: "scalar", localName: "AllowedRoles", jsonName: "AllowedRoles", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 5, name: "AllowAllRoles", kind: "scalar", localName: "AllowAllRoles", jsonName: "AllowAllRoles", T: 8 /*ScalarType.BOOL*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<UserGroup>): UserGroup {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
message.EntityRefID = "";
|
|
message.EntityRefType = 0;
|
|
message.AllowedRoles = [];
|
|
message.AllowAllRoles = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UserGroup>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserGroup): UserGroup {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ProjectID */ 1:
|
|
message.ProjectID = reader.string();
|
|
break;
|
|
case /* string EntityRefID */ 2:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.EntityRefType EntityRefType */ 3:
|
|
message.EntityRefType = reader.int32();
|
|
break;
|
|
case /* repeated string AllowedRoles */ 4:
|
|
message.AllowedRoles.push(reader.string());
|
|
break;
|
|
case /* bool AllowAllRoles */ 5:
|
|
message.AllowAllRoles = reader.bool();
|
|
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: UserGroup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ProjectID = 1; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* string EntityRefID = 2; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.EntityRefType EntityRefType = 3; */
|
|
if (message.EntityRefType !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.EntityRefType);
|
|
/* repeated string AllowedRoles = 4; */
|
|
for (let i = 0; i < message.AllowedRoles.length; i++)
|
|
writer.tag(4, WireType.LengthDelimited).string(message.AllowedRoles[i]);
|
|
/* bool AllowAllRoles = 5; */
|
|
if (message.AllowAllRoles !== false)
|
|
writer.tag(5, WireType.Varint).bool(message.AllowAllRoles);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.UserGroup
|
|
*/
|
|
export const UserGroup = new UserGroup$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PutUserGroupsRequest$Type extends MessageType<PutUserGroupsRequest> {
|
|
constructor() {
|
|
super("api.PutUserGroupsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "EntityRefType", kind: "enum", localName: "EntityRefType", jsonName: "EntityRefType", T: () => ["api.EntityRefType", EntityRefType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
{ no: 4, name: "AllowedRoles", kind: "scalar", localName: "AllowedRoles", jsonName: "AllowedRoles", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 5, name: "AllowAllRoles", kind: "scalar", localName: "AllowAllRoles", jsonName: "AllowAllRoles", T: 8 /*ScalarType.BOOL*/ }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "EntityRefType", "EntityRefID"] } } });
|
|
}
|
|
create(value?: PartialMessage<PutUserGroupsRequest>): PutUserGroupsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
message.EntityRefType = 0;
|
|
message.AllowedRoles = [];
|
|
message.AllowAllRoles = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PutUserGroupsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutUserGroupsRequest): PutUserGroupsRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 2:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.EntityRefType EntityRefType */ 3:
|
|
message.EntityRefType = reader.int32();
|
|
break;
|
|
case /* repeated string AllowedRoles */ 4:
|
|
message.AllowedRoles.push(reader.string());
|
|
break;
|
|
case /* bool AllowAllRoles */ 5:
|
|
message.AllowAllRoles = reader.bool();
|
|
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: PutUserGroupsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 2; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.EntityRefType EntityRefType = 3; */
|
|
if (message.EntityRefType !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.EntityRefType);
|
|
/* repeated string AllowedRoles = 4; */
|
|
for (let i = 0; i < message.AllowedRoles.length; i++)
|
|
writer.tag(4, WireType.LengthDelimited).string(message.AllowedRoles[i]);
|
|
/* bool AllowAllRoles = 5; */
|
|
if (message.AllowAllRoles !== false)
|
|
writer.tag(5, WireType.Varint).bool(message.AllowAllRoles);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.PutUserGroupsRequest
|
|
*/
|
|
export const PutUserGroupsRequest = new PutUserGroupsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PutUserGroupsResult$Type extends MessageType<PutUserGroupsResult> {
|
|
constructor() {
|
|
super("api.PutUserGroupsResult", [
|
|
{ no: 1, name: "UserGroup", kind: "message", localName: "UserGroup", jsonName: "UserGroup", T: () => UserGroup }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<PutUserGroupsResult>): PutUserGroupsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PutUserGroupsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutUserGroupsResult): PutUserGroupsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.UserGroup UserGroup */ 1:
|
|
message.UserGroup = UserGroup.internalBinaryRead(reader, reader.uint32(), options, message.UserGroup);
|
|
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: PutUserGroupsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.UserGroup UserGroup = 1; */
|
|
if (message.UserGroup)
|
|
UserGroup.internalBinaryWrite(message.UserGroup, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.PutUserGroupsResult
|
|
*/
|
|
export const PutUserGroupsResult = new PutUserGroupsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetUserGroupsRequest$Type extends MessageType<GetUserGroupsRequest> {
|
|
constructor() {
|
|
super("api.GetUserGroupsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "EntityRefType", kind: "enum", localName: "EntityRefType", jsonName: "EntityRefType", T: () => ["api.EntityRefType", EntityRefType], options: { "validate.rules": { enum: { definedOnly: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "EntityRefType", "EntityRefID"] } } });
|
|
}
|
|
create(value?: PartialMessage<GetUserGroupsRequest>): GetUserGroupsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
message.EntityRefType = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetUserGroupsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserGroupsRequest): GetUserGroupsRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 2:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.EntityRefType EntityRefType */ 3:
|
|
message.EntityRefType = reader.int32();
|
|
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: GetUserGroupsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 2; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.EntityRefType EntityRefType = 3; */
|
|
if (message.EntityRefType !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.EntityRefType);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.GetUserGroupsRequest
|
|
*/
|
|
export const GetUserGroupsRequest = new GetUserGroupsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetUserGroupsResult$Type extends MessageType<GetUserGroupsResult> {
|
|
constructor() {
|
|
super("api.GetUserGroupsResult", [
|
|
{ no: 1, name: "UserGroup", kind: "message", localName: "UserGroup", jsonName: "UserGroup", T: () => UserGroup }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<GetUserGroupsResult>): GetUserGroupsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetUserGroupsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserGroupsResult): GetUserGroupsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.UserGroup UserGroup */ 1:
|
|
message.UserGroup = UserGroup.internalBinaryRead(reader, reader.uint32(), options, message.UserGroup);
|
|
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: GetUserGroupsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.UserGroup UserGroup = 1; */
|
|
if (message.UserGroup)
|
|
UserGroup.internalBinaryWrite(message.UserGroup, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.GetUserGroupsResult
|
|
*/
|
|
export const GetUserGroupsResult = new GetUserGroupsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteUserGroupsRequest$Type extends MessageType<DeleteUserGroupsRequest> {
|
|
constructor() {
|
|
super("api.DeleteUserGroupsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "EntityRefType", kind: "enum", localName: "EntityRefType", jsonName: "EntityRefType", T: () => ["api.EntityRefType", EntityRefType], options: { "validate.rules": { enum: { definedOnly: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "EntityRefType", "EntityRefID"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteUserGroupsRequest>): DeleteUserGroupsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
message.EntityRefType = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteUserGroupsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserGroupsRequest): DeleteUserGroupsRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 2:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.EntityRefType EntityRefType */ 3:
|
|
message.EntityRefType = reader.int32();
|
|
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: DeleteUserGroupsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 2; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.EntityRefType EntityRefType = 3; */
|
|
if (message.EntityRefType !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.EntityRefType);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteUserGroupsRequest
|
|
*/
|
|
export const DeleteUserGroupsRequest = new DeleteUserGroupsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteUserGroupsResult$Type extends MessageType<DeleteUserGroupsResult> {
|
|
constructor() {
|
|
super("api.DeleteUserGroupsResult", []);
|
|
}
|
|
create(value?: PartialMessage<DeleteUserGroupsResult>): DeleteUserGroupsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteUserGroupsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserGroupsResult): DeleteUserGroupsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
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: DeleteUserGroupsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteUserGroupsResult
|
|
*/
|
|
export const DeleteUserGroupsResult = new DeleteUserGroupsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListUserGroupsRequest$Type extends MessageType<ListUserGroupsRequest> {
|
|
constructor() {
|
|
super("api.ListUserGroupsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "EntityRefType", kind: "enum", localName: "EntityRefType", jsonName: "EntityRefType", T: () => ["api.EntityRefType", EntityRefType] }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<ListUserGroupsRequest>): ListUserGroupsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefType = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListUserGroupsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserGroupsRequest): ListUserGroupsRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityRefType EntityRefType */ 2:
|
|
message.EntityRefType = reader.int32();
|
|
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: ListUserGroupsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityRefType EntityRefType = 2; */
|
|
if (message.EntityRefType !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.EntityRefType);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ListUserGroupsRequest
|
|
*/
|
|
export const ListUserGroupsRequest = new ListUserGroupsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListUserGroupsResult$Type extends MessageType<ListUserGroupsResult> {
|
|
constructor() {
|
|
super("api.ListUserGroupsResult", [
|
|
{ no: 1, name: "UserGroups", kind: "message", localName: "UserGroups", jsonName: "UserGroups", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserGroup }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ListUserGroupsResult>): ListUserGroupsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.UserGroups = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListUserGroupsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserGroupsResult): ListUserGroupsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.UserGroup UserGroups */ 1:
|
|
message.UserGroups.push(UserGroup.internalBinaryRead(reader, reader.uint32(), options));
|
|
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: ListUserGroupsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.UserGroup UserGroups = 1; */
|
|
for (let i = 0; i < message.UserGroups.length; i++)
|
|
UserGroup.internalBinaryWrite(message.UserGroups[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ListUserGroupsResult
|
|
*/
|
|
export const ListUserGroupsResult = new ListUserGroupsResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.UserGroupsService
|
|
*/
|
|
export const UserGroupsService = new ServiceType("api.UserGroupsService", [
|
|
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Groups"], description: "Get" }, "api.rscType": "Project", "api.roles": "Platform.UserGroups", "google.api.method_visibility": { restriction: "SDK" } }, I: GetUserGroupsRequest, O: GetUserGroupsResult },
|
|
{ name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Groups"], description: "Update or create a UserGroup" }, "api.rscType": "Project", "google.api.method_visibility": { restriction: "SDK" } }, I: PutUserGroupsRequest, O: PutUserGroupsResult },
|
|
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Groups"], description: "Delete" }, "api.rscType": "Project", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteUserGroupsRequest, O: DeleteUserGroupsResult },
|
|
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Groups"], description: "List" }, "api.rscType": "Project", "google.api.method_visibility": { restriction: "SDK" } }, I: ListUserGroupsRequest, O: ListUserGroupsResult }
|
|
], { "api.k8sService": "organisation-server", "api.roleManager": true, "api.resourceManager": true });
|