// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "users.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 { NamedNscCredentials } from "./nsc-base";
import { NatsCredentials } from "./shared";
import { NscPermission } from "./nsc-base";
// Entity creation messages 

/**
 * @generated from protobuf message api.CreateUserRequest
 */
export interface CreateUserRequest {
    /**
     * @generated from protobuf field: string accountName = 1;
     */
    accountName: string;
    /**
     * @generated from protobuf field: string name = 2;
     */
    name: string;
    /**
     * @generated from protobuf field: api.NscPermission permission = 3;
     */
    permission?: NscPermission;
}
/**
 * @generated from protobuf message api.CreateUserResult
 */
export interface CreateUserResult {
    /**
     * NatsCredentials holds the configuration for interacting with Platform's NATS
     *
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
// Entity read messages 

/**
 * @generated from protobuf message api.GetUserRequest
 */
export interface GetUserRequest {
    /**
     * @generated from protobuf field: string accountName = 1;
     */
    accountName: string;
    /**
     * @generated from protobuf field: string name = 2;
     */
    name: string;
}
/**
 * @generated from protobuf message api.GetUserResult
 */
export interface GetUserResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
/**
 * @generated from protobuf message api.ListUsersRequest
 */
export interface ListUsersRequest {
    /**
     * @generated from protobuf field: string accountName = 1;
     */
    accountName: string;
}
/**
 * @generated from protobuf message api.ListUsersResult
 */
export interface ListUsersResult {
    /**
     * @generated from protobuf field: repeated api.NamedNscCredentials entities = 1;
     */
    entities: NamedNscCredentials[];
}
/**
 * Entity edition messages
 *
 * @generated from protobuf message api.EditUserRequest
 */
export interface EditUserRequest {
    /**
     * @generated from protobuf field: string accountName = 1;
     */
    accountName: string;
    /**
     * @generated from protobuf field: string name = 2;
     */
    name: string;
    /**
     * @generated from protobuf field: api.NscPermission permission = 3;
     */
    permission?: NscPermission;
    /**
     * @generated from protobuf field: repeated string rmPerms = 4;
     */
    rmPerms: string[];
}
/**
 * @generated from protobuf message api.EditUserResult
 */
export interface EditUserResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
// Entity deletion messages 

/**
 * @generated from protobuf message api.DeleteUserRequest
 */
export interface DeleteUserRequest {
    /**
     * @generated from protobuf field: string accountName = 1;
     */
    accountName: string;
    /**
     * @generated from protobuf field: string userName = 2;
     */
    userName: string;
}
/**
 * @generated from protobuf message api.DeleteUserResult
 */
export interface DeleteUserResult {
}
// @generated message type with reflection information, may provide speed optimized methods
class CreateUserRequest$Type extends MessageType<CreateUserRequest> {
    constructor() {
        super("api.CreateUserRequest", [
            { no: 1, name: "accountName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "permission", kind: "message", T: () => NscPermission }
        ]);
    }
    create(value?: PartialMessage<CreateUserRequest>): CreateUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accountName = "";
        message.name = "";
        if (value !== undefined)
            reflectionMergePartial<CreateUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateUserRequest): CreateUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accountName */ 1:
                    message.accountName = reader.string();
                    break;
                case /* string name */ 2:
                    message.name = reader.string();
                    break;
                case /* api.NscPermission permission */ 3:
                    message.permission = NscPermission.internalBinaryRead(reader, reader.uint32(), options, message.permission);
                    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: CreateUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accountName = 1; */
        if (message.accountName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accountName);
        /* string name = 2; */
        if (message.name !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.name);
        /* api.NscPermission permission = 3; */
        if (message.permission)
            NscPermission.internalBinaryWrite(message.permission, writer.tag(3, 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.CreateUserRequest
 */
export const CreateUserRequest = new CreateUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateUserResult$Type extends MessageType<CreateUserResult> {
    constructor() {
        super("api.CreateUserResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "NatsCredentials holds the configuration for interacting with Platform's NATS" } } }
        ]);
    }
    create(value?: PartialMessage<CreateUserResult>): CreateUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<CreateUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateUserResult): CreateUserResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"];*/ 1:
                    message.credentials = NatsCredentials.internalBinaryRead(reader, reader.uint32(), options, message.credentials);
                    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: CreateUserResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"]; */
        if (message.credentials)
            NatsCredentials.internalBinaryWrite(message.credentials, 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.CreateUserResult
 */
export const CreateUserResult = new CreateUserResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetUserRequest$Type extends MessageType<GetUserRequest> {
    constructor() {
        super("api.GetUserRequest", [
            { no: 1, name: "accountName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<GetUserRequest>): GetUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accountName = "";
        message.name = "";
        if (value !== undefined)
            reflectionMergePartial<GetUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserRequest): GetUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accountName */ 1:
                    message.accountName = reader.string();
                    break;
                case /* string name */ 2:
                    message.name = 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: GetUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accountName = 1; */
        if (message.accountName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accountName);
        /* string name = 2; */
        if (message.name !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.name);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetUserRequest
 */
export const GetUserRequest = new GetUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetUserResult$Type extends MessageType<GetUserResult> {
    constructor() {
        super("api.GetUserResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials }
        ]);
    }
    create(value?: PartialMessage<GetUserResult>): GetUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserResult): GetUserResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"];*/ 1:
                    message.credentials = NatsCredentials.internalBinaryRead(reader, reader.uint32(), options, message.credentials);
                    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: GetUserResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"]; */
        if (message.credentials)
            NatsCredentials.internalBinaryWrite(message.credentials, 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.GetUserResult
 */
export const GetUserResult = new GetUserResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUsersRequest$Type extends MessageType<ListUsersRequest> {
    constructor() {
        super("api.ListUsersRequest", [
            { no: 1, name: "accountName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<ListUsersRequest>): ListUsersRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accountName = "";
        if (value !== undefined)
            reflectionMergePartial<ListUsersRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUsersRequest): ListUsersRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accountName */ 1:
                    message.accountName = 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: ListUsersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accountName = 1; */
        if (message.accountName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accountName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ListUsersRequest
 */
export const ListUsersRequest = new ListUsersRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUsersResult$Type extends MessageType<ListUsersResult> {
    constructor() {
        super("api.ListUsersResult", [
            { no: 1, name: "entities", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => NamedNscCredentials }
        ]);
    }
    create(value?: PartialMessage<ListUsersResult>): ListUsersResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entities = [];
        if (value !== undefined)
            reflectionMergePartial<ListUsersResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUsersResult): ListUsersResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.NamedNscCredentials entities */ 1:
                    message.entities.push(NamedNscCredentials.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: ListUsersResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.NamedNscCredentials entities = 1; */
        for (let i = 0; i < message.entities.length; i++)
            NamedNscCredentials.internalBinaryWrite(message.entities[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.ListUsersResult
 */
export const ListUsersResult = new ListUsersResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EditUserRequest$Type extends MessageType<EditUserRequest> {
    constructor() {
        super("api.EditUserRequest", [
            { no: 1, name: "accountName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "permission", kind: "message", T: () => NscPermission },
            { no: 4, name: "rmPerms", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Entity edition messages", required: ["accountName", "name"] } } });
    }
    create(value?: PartialMessage<EditUserRequest>): EditUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accountName = "";
        message.name = "";
        message.rmPerms = [];
        if (value !== undefined)
            reflectionMergePartial<EditUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EditUserRequest): EditUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accountName */ 1:
                    message.accountName = reader.string();
                    break;
                case /* string name */ 2:
                    message.name = reader.string();
                    break;
                case /* api.NscPermission permission */ 3:
                    message.permission = NscPermission.internalBinaryRead(reader, reader.uint32(), options, message.permission);
                    break;
                case /* repeated string rmPerms */ 4:
                    message.rmPerms.push(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: EditUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accountName = 1; */
        if (message.accountName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accountName);
        /* string name = 2; */
        if (message.name !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.name);
        /* api.NscPermission permission = 3; */
        if (message.permission)
            NscPermission.internalBinaryWrite(message.permission, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated string rmPerms = 4; */
        for (let i = 0; i < message.rmPerms.length; i++)
            writer.tag(4, WireType.LengthDelimited).string(message.rmPerms[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.EditUserRequest
 */
export const EditUserRequest = new EditUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EditUserResult$Type extends MessageType<EditUserResult> {
    constructor() {
        super("api.EditUserResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials }
        ]);
    }
    create(value?: PartialMessage<EditUserResult>): EditUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<EditUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EditUserResult): EditUserResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"];*/ 1:
                    message.credentials = NatsCredentials.internalBinaryRead(reader, reader.uint32(), options, message.credentials);
                    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: EditUserResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.NatsCredentials Credentials = 1 [json_name = "Credentials"]; */
        if (message.credentials)
            NatsCredentials.internalBinaryWrite(message.credentials, 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.EditUserResult
 */
export const EditUserResult = new EditUserResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserRequest$Type extends MessageType<DeleteUserRequest> {
    constructor() {
        super("api.DeleteUserRequest", [
            { no: 1, name: "accountName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "userName", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<DeleteUserRequest>): DeleteUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accountName = "";
        message.userName = "";
        if (value !== undefined)
            reflectionMergePartial<DeleteUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserRequest): DeleteUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accountName */ 1:
                    message.accountName = reader.string();
                    break;
                case /* string userName */ 2:
                    message.userName = 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: DeleteUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accountName = 1; */
        if (message.accountName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accountName);
        /* string userName = 2; */
        if (message.userName !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.userName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteUserRequest
 */
export const DeleteUserRequest = new DeleteUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserResult$Type extends MessageType<DeleteUserResult> {
    constructor() {
        super("api.DeleteUserResult", []);
    }
    create(value?: PartialMessage<DeleteUserResult>): DeleteUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserResult): DeleteUserResult {
        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: DeleteUserResult, 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.DeleteUserResult
 */
export const DeleteUserResult = new DeleteUserResult$Type();
/**
 * @generated ServiceType for protobuf service api.Users
 */
export const Users = new ServiceType("api.Users", [
    { name: "CreateUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["NSC Admin"], description: "Create an user" }, "api.rscType": "Platform", "api.roles": "Platform.Nsc-Manage", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateUserRequest, O: CreateUserResult },
    { name: "GetUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["NSC Admin"], description: "Get an user" }, "api.rscType": "Platform", "api.roles": "Platform.Nsc-Manage", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetUserRequest, O: GetUserResult },
    { name: "ListUsers", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["NSC Admin"], description: "List users" }, "api.rscType": "Platform", "api.roles": "Platform.Nsc-Manage", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ListUsersRequest, O: ListUsersResult },
    { name: "EditUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["NSC Admin"], description: "Edit an user" }, "api.rscType": "Platform", "api.roles": "Platform.Nsc-Manage", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: EditUserRequest, O: EditUserResult },
    { name: "DeleteUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["NSC Admin"], description: "Delete an user" }, "api.rscType": "Platform", "api.roles": "Platform.Nsc-Manage", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteUserRequest, O: DeleteUserResult }
], { "api.k8sService": "nsc-admin" });
