// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "nats-api.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 { RequestPartnerAppHeader } from "./shared";
import { RequestProjectHeader } from "./shared";
import { NatsCredentials } from "./shared";
/**
 * @generated from protobuf message api.CreateProjectAccountRequest
 */
export interface CreateProjectAccountRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string OrganisationID = 2 [json_name = "OrganisationID"];
     */
    organisationID: string;
}
/**
 * @generated from protobuf message api.CreateProjectAccountResult
 */
export interface CreateProjectAccountResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
/**
 * @generated from protobuf message api.CreatePartnerAppUserRequest
 */
export interface CreatePartnerAppUserRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string PartnerAppID = 2 [json_name = "PartnerAppID"];
     */
    partnerAppID: string;
}
/**
 * @generated from protobuf message api.CreatePartnerAppUserResult
 */
export interface CreatePartnerAppUserResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
    /**
     * @generated from protobuf field: string NatsRootSubject = 2 [json_name = "NatsRootSubject"];
     */
    natsRootSubject: string;
}
/**
 * @generated from protobuf message api.DeleteProjectAccountRequest
 */
export interface DeleteProjectAccountRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
}
/**
 * @generated from protobuf message api.DeleteProjectAccountResult
 */
export interface DeleteProjectAccountResult {
}
/**
 * @generated from protobuf message api.DeletePartnerAppUserRequest
 */
export interface DeletePartnerAppUserRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string PartnerAppID = 2 [json_name = "PartnerAppID"];
     */
    partnerAppID: string;
}
/**
 * @generated from protobuf message api.DeletePartnerAppUserResult
 */
export interface DeletePartnerAppUserResult {
}
/**
 * @generated from protobuf message api.RenewPartnerAppUserCredentialsRequest
 */
export interface RenewPartnerAppUserCredentialsRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: string PartnerAppID = 2 [json_name = "PartnerAppID"];
     */
    partnerAppID: string;
}
/**
 * @generated from protobuf message api.RenewPartnerAppUserCredentialsResult
 */
export interface RenewPartnerAppUserCredentialsResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
/**
 * @generated from protobuf message api.RenewProjectAccountCredentialsRequest
 */
export interface RenewProjectAccountCredentialsRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
}
/**
 * @generated from protobuf message api.RenewProjectAccountCredentialsResult
 */
export interface RenewProjectAccountCredentialsResult {
    /**
     * @generated from protobuf field: api.NatsCredentials Credentials = 1 [json_name = "Credentials"];
     */
    credentials?: NatsCredentials;
}
/**
 * @generated from protobuf message api.PushMessageRequest
 */
export interface PushMessageRequest {
    /**
     * @generated from protobuf field: api.RequestPartnerAppHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestPartnerAppHeader;
    /**
     * @generated from protobuf field: string JWT = 2 [json_name = "JWT"];
     */
    jWT: string;
    /**
     * @generated from protobuf field: string SubjectSuffix = 3 [json_name = "SubjectSuffix"];
     */
    subjectSuffix: string;
    /**
     * @generated from protobuf field: string Payload = 4 [json_name = "Payload"];
     */
    payload: string;
}
/**
 * @generated from protobuf message api.PushMessageResult
 */
export interface PushMessageResult {
}
// @generated message type with reflection information, may provide speed optimized methods
class CreateProjectAccountRequest$Type extends MessageType<CreateProjectAccountRequest> {
    constructor() {
        super("api.CreateProjectAccountRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<CreateProjectAccountRequest>): CreateProjectAccountRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.organisationID = "";
        if (value !== undefined)
            reflectionMergePartial<CreateProjectAccountRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectAccountRequest): CreateProjectAccountRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string OrganisationID = 2 [json_name = "OrganisationID"];*/ 2:
                    message.organisationID = 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: CreateProjectAccountRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string OrganisationID = 2 [json_name = "OrganisationID"]; */
        if (message.organisationID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.organisationID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreateProjectAccountRequest
 */
export const CreateProjectAccountRequest = new CreateProjectAccountRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateProjectAccountResult$Type extends MessageType<CreateProjectAccountResult> {
    constructor() {
        super("api.CreateProjectAccountResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials }
        ]);
    }
    create(value?: PartialMessage<CreateProjectAccountResult>): CreateProjectAccountResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<CreateProjectAccountResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectAccountResult): CreateProjectAccountResult {
        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: CreateProjectAccountResult, 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.CreateProjectAccountResult
 */
export const CreateProjectAccountResult = new CreateProjectAccountResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreatePartnerAppUserRequest$Type extends MessageType<CreatePartnerAppUserRequest> {
    constructor() {
        super("api.CreatePartnerAppUserRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "PartnerAppID", kind: "scalar", jsonName: "PartnerAppID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<CreatePartnerAppUserRequest>): CreatePartnerAppUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.partnerAppID = "";
        if (value !== undefined)
            reflectionMergePartial<CreatePartnerAppUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePartnerAppUserRequest): CreatePartnerAppUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string PartnerAppID = 2 [json_name = "PartnerAppID"];*/ 2:
                    message.partnerAppID = 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: CreatePartnerAppUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string PartnerAppID = 2 [json_name = "PartnerAppID"]; */
        if (message.partnerAppID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.partnerAppID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreatePartnerAppUserRequest
 */
export const CreatePartnerAppUserRequest = new CreatePartnerAppUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreatePartnerAppUserResult$Type extends MessageType<CreatePartnerAppUserResult> {
    constructor() {
        super("api.CreatePartnerAppUserResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials },
            { no: 2, name: "NatsRootSubject", kind: "scalar", jsonName: "NatsRootSubject", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<CreatePartnerAppUserResult>): CreatePartnerAppUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.natsRootSubject = "";
        if (value !== undefined)
            reflectionMergePartial<CreatePartnerAppUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePartnerAppUserResult): CreatePartnerAppUserResult {
        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;
                case /* string NatsRootSubject = 2 [json_name = "NatsRootSubject"];*/ 2:
                    message.natsRootSubject = 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: CreatePartnerAppUserResult, 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();
        /* string NatsRootSubject = 2 [json_name = "NatsRootSubject"]; */
        if (message.natsRootSubject !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.natsRootSubject);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreatePartnerAppUserResult
 */
export const CreatePartnerAppUserResult = new CreatePartnerAppUserResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectAccountRequest$Type extends MessageType<DeleteProjectAccountRequest> {
    constructor() {
        super("api.DeleteProjectAccountRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<DeleteProjectAccountRequest>): DeleteProjectAccountRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        if (value !== undefined)
            reflectionMergePartial<DeleteProjectAccountRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectAccountRequest): DeleteProjectAccountRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = 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: DeleteProjectAccountRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeleteProjectAccountRequest
 */
export const DeleteProjectAccountRequest = new DeleteProjectAccountRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectAccountResult$Type extends MessageType<DeleteProjectAccountResult> {
    constructor() {
        super("api.DeleteProjectAccountResult", []);
    }
    create(value?: PartialMessage<DeleteProjectAccountResult>): DeleteProjectAccountResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteProjectAccountResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectAccountResult): DeleteProjectAccountResult {
        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: DeleteProjectAccountResult, 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.DeleteProjectAccountResult
 */
export const DeleteProjectAccountResult = new DeleteProjectAccountResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeletePartnerAppUserRequest$Type extends MessageType<DeletePartnerAppUserRequest> {
    constructor() {
        super("api.DeletePartnerAppUserRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "PartnerAppID", kind: "scalar", jsonName: "PartnerAppID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<DeletePartnerAppUserRequest>): DeletePartnerAppUserRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.partnerAppID = "";
        if (value !== undefined)
            reflectionMergePartial<DeletePartnerAppUserRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeletePartnerAppUserRequest): DeletePartnerAppUserRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string PartnerAppID = 2 [json_name = "PartnerAppID"];*/ 2:
                    message.partnerAppID = 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: DeletePartnerAppUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string PartnerAppID = 2 [json_name = "PartnerAppID"]; */
        if (message.partnerAppID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.partnerAppID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeletePartnerAppUserRequest
 */
export const DeletePartnerAppUserRequest = new DeletePartnerAppUserRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeletePartnerAppUserResult$Type extends MessageType<DeletePartnerAppUserResult> {
    constructor() {
        super("api.DeletePartnerAppUserResult", []);
    }
    create(value?: PartialMessage<DeletePartnerAppUserResult>): DeletePartnerAppUserResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeletePartnerAppUserResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeletePartnerAppUserResult): DeletePartnerAppUserResult {
        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: DeletePartnerAppUserResult, 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.DeletePartnerAppUserResult
 */
export const DeletePartnerAppUserResult = new DeletePartnerAppUserResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenewPartnerAppUserCredentialsRequest$Type extends MessageType<RenewPartnerAppUserCredentialsRequest> {
    constructor() {
        super("api.RenewPartnerAppUserCredentialsRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "PartnerAppID", kind: "scalar", jsonName: "PartnerAppID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<RenewPartnerAppUserCredentialsRequest>): RenewPartnerAppUserCredentialsRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.partnerAppID = "";
        if (value !== undefined)
            reflectionMergePartial<RenewPartnerAppUserCredentialsRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenewPartnerAppUserCredentialsRequest): RenewPartnerAppUserCredentialsRequest {
        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 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string PartnerAppID = 2 [json_name = "PartnerAppID"];*/ 2:
                    message.partnerAppID = 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: RenewPartnerAppUserCredentialsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string PartnerAppID = 2 [json_name = "PartnerAppID"]; */
        if (message.partnerAppID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.partnerAppID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.RenewPartnerAppUserCredentialsRequest
 */
export const RenewPartnerAppUserCredentialsRequest = new RenewPartnerAppUserCredentialsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenewPartnerAppUserCredentialsResult$Type extends MessageType<RenewPartnerAppUserCredentialsResult> {
    constructor() {
        super("api.RenewPartnerAppUserCredentialsResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials }
        ]);
    }
    create(value?: PartialMessage<RenewPartnerAppUserCredentialsResult>): RenewPartnerAppUserCredentialsResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<RenewPartnerAppUserCredentialsResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenewPartnerAppUserCredentialsResult): RenewPartnerAppUserCredentialsResult {
        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: RenewPartnerAppUserCredentialsResult, 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.RenewPartnerAppUserCredentialsResult
 */
export const RenewPartnerAppUserCredentialsResult = new RenewPartnerAppUserCredentialsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenewProjectAccountCredentialsRequest$Type extends MessageType<RenewProjectAccountCredentialsRequest> {
    constructor() {
        super("api.RenewProjectAccountCredentialsRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<RenewProjectAccountCredentialsRequest>): RenewProjectAccountCredentialsRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<RenewProjectAccountCredentialsRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenewProjectAccountCredentialsRequest): RenewProjectAccountCredentialsRequest {
        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 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    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: RenewProjectAccountCredentialsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.internalBinaryWrite(message.header, 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.RenewProjectAccountCredentialsRequest
 */
export const RenewProjectAccountCredentialsRequest = new RenewProjectAccountCredentialsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RenewProjectAccountCredentialsResult$Type extends MessageType<RenewProjectAccountCredentialsResult> {
    constructor() {
        super("api.RenewProjectAccountCredentialsResult", [
            { no: 1, name: "Credentials", kind: "message", jsonName: "Credentials", T: () => NatsCredentials }
        ]);
    }
    create(value?: PartialMessage<RenewProjectAccountCredentialsResult>): RenewProjectAccountCredentialsResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<RenewProjectAccountCredentialsResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RenewProjectAccountCredentialsResult): RenewProjectAccountCredentialsResult {
        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: RenewProjectAccountCredentialsResult, 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.RenewProjectAccountCredentialsResult
 */
export const RenewProjectAccountCredentialsResult = new RenewProjectAccountCredentialsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PushMessageRequest$Type extends MessageType<PushMessageRequest> {
    constructor() {
        super("api.PushMessageRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestPartnerAppHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "JWT", kind: "scalar", jsonName: "JWT", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The JWT holding the PartnerApp identity to which parent subject the message will be pushed. It is a signed JWT issued by Reflex Platform upon PartnerApp creation. The PartnerApp from the JWT must be the same as the one in the Header field meaning you cannot push a message for a PartnerApp different than the one you're allowed to." } } },
            { no: 3, name: "SubjectSuffix", kind: "scalar", jsonName: "SubjectSuffix", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The subject suffix to which the message will be pushed. The subject will be composed of the parent subject of the PartnerApp (from the JWT) and this suffix." } } },
            { no: 4, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The message payload." } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "JWT", "Subject"] } } });
    }
    create(value?: PartialMessage<PushMessageRequest>): PushMessageRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.jWT = "";
        message.subjectSuffix = "";
        message.payload = "";
        if (value !== undefined)
            reflectionMergePartial<PushMessageRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PushMessageRequest): PushMessageRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestPartnerAppHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestPartnerAppHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string JWT = 2 [json_name = "JWT"];*/ 2:
                    message.jWT = reader.string();
                    break;
                case /* string SubjectSuffix = 3 [json_name = "SubjectSuffix"];*/ 3:
                    message.subjectSuffix = reader.string();
                    break;
                case /* string Payload = 4 [json_name = "Payload"];*/ 4:
                    message.payload = 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: PushMessageRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestPartnerAppHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestPartnerAppHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string JWT = 2 [json_name = "JWT"]; */
        if (message.jWT !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.jWT);
        /* string SubjectSuffix = 3 [json_name = "SubjectSuffix"]; */
        if (message.subjectSuffix !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.subjectSuffix);
        /* string Payload = 4 [json_name = "Payload"]; */
        if (message.payload !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.payload);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.PushMessageRequest
 */
export const PushMessageRequest = new PushMessageRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PushMessageResult$Type extends MessageType<PushMessageResult> {
    constructor() {
        super("api.PushMessageResult", []);
    }
    create(value?: PartialMessage<PushMessageResult>): PushMessageResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<PushMessageResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PushMessageResult): PushMessageResult {
        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: PushMessageResult, 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.PushMessageResult
 */
export const PushMessageResult = new PushMessageResult$Type();
/**
 * @generated ServiceType for protobuf service api.NatsService
 */
export const NatsService = new ServiceType("api.NatsService", [
    { name: "CreateProjectAccount", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Create an account and an user in NATS" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Nats", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateProjectAccountRequest, O: CreateProjectAccountResult },
    { name: "DeleteProjectAccount", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Delete a NATS account and its users" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Nats", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteProjectAccountRequest, O: DeleteProjectAccountResult },
    { name: "CreatePartnerAppUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Create an user in NATS under its associated account" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Nats", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreatePartnerAppUserRequest, O: CreatePartnerAppUserResult },
    { name: "DeletePartnerAppUser", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Delete a NATS user" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Nats", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeletePartnerAppUserRequest, O: DeletePartnerAppUserResult },
    { name: "RenewProjectAccountCredentials", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Renew (revoke + create) NATS Credentials for an account" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: RenewProjectAccountCredentialsRequest, O: RenewProjectAccountCredentialsResult },
    { name: "RenewPartnerAppUserCredentials", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Renew (revoke + create) NATS Credentials for a user" }, "api.rscType": "Project", "api.roles": "Platform.Project-Nats", "google.api.method_visibility": { restriction: "SDK" } }, I: RenewPartnerAppUserCredentialsRequest, O: RenewPartnerAppUserCredentialsResult },
    { name: "PushMessage", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin NATS"], description: "Push a message to a NATS subject" }, "api.rscType": "PartnerApp", "api.roles": "Platform.PartnerApp-Nats", "google.api.method_visibility": { restriction: "SDK" } }, I: PushMessageRequest, O: PushMessageResult }
], { "api.k8sService": "nats-api" });
