// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "gcs-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 { RequestProjectHeader } from "./shared";
import { RequestPartnerAppHeader } from "./shared";
// ===================== 
// ===== Requests ======
// =====================

/**
 * @generated from protobuf message api.GetPartnerReadTokenRequest
 */
export interface GetPartnerReadTokenRequest {
    /**
     * @generated from protobuf field: api.RequestPartnerAppHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestPartnerAppHeader;
}
/**
 * @generated from protobuf message api.GetPartnerWriteTokenRequest
 */
export interface GetPartnerWriteTokenRequest {
    /**
     * @generated from protobuf field: api.RequestPartnerAppHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestPartnerAppHeader;
}
/**
 * @generated from protobuf message api.GetProjectReadTokenRequest
 */
export interface GetProjectReadTokenRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
}
/**
 * @generated from protobuf message api.GetProjectWriteTokenRequest
 */
export interface GetProjectWriteTokenRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
}
/**
 * @generated from protobuf message api.GetBucketSTSRequest
 */
export interface GetBucketSTSRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
}
/**
 * @generated from protobuf message api.CreatePartnerBucketRequest
 */
export interface CreatePartnerBucketRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string BucketName = 2 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.CreateProjectBucketRequest
 */
export interface CreateProjectBucketRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
}
/**
 * @generated from protobuf message api.DeletePartnerBucketRequest
 */
export interface DeletePartnerBucketRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string BucketName = 2 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.DeleteProjectBucketRequest
 */
export interface DeleteProjectBucketRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
}
/**
 * @generated from protobuf message api.DeleteOrganisationBucketRequest
 */
export interface DeleteOrganisationBucketRequest {
    /**
     * @generated from protobuf field: string OrganisationID = 1 [json_name = "OrganisationID"];
     */
    organisationID: string;
}
// ===================== 
// ===== Responses =====
// =====================

/**
 * @generated from protobuf message api.GetPartnerReadTokenResult
 */
export interface GetPartnerReadTokenResult {
    /**
     * @generated from protobuf field: string AccessToken = 1 [json_name = "AccessToken"];
     */
    accessToken: string;
    /**
     * @generated from protobuf field: int64 ExpiresIn = 2 [json_name = "ExpiresIn"];
     */
    expiresIn: bigint;
    /**
     * @generated from protobuf field: string Resource = 3 [json_name = "Resource"];
     */
    resource: string;
    /**
     * @generated from protobuf field: string BucketName = 4 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.GetPartnerWriteTokenResult
 */
export interface GetPartnerWriteTokenResult {
    /**
     * @generated from protobuf field: string AccessToken = 1 [json_name = "AccessToken"];
     */
    accessToken: string;
    /**
     * @generated from protobuf field: int64 ExpiresIn = 2 [json_name = "ExpiresIn"];
     */
    expiresIn: bigint;
    /**
     * @generated from protobuf field: string Resource = 3 [json_name = "Resource"];
     */
    resource: string;
    /**
     * @generated from protobuf field: string BucketName = 4 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.GetProjectReadTokenResult
 */
export interface GetProjectReadTokenResult {
    /**
     * @generated from protobuf field: string AccessToken = 1 [json_name = "AccessToken"];
     */
    accessToken: string;
    /**
     * @generated from protobuf field: int64 ExpiresIn = 2 [json_name = "ExpiresIn"];
     */
    expiresIn: bigint;
    /**
     * @generated from protobuf field: string Resource = 3 [json_name = "Resource"];
     */
    resource: string;
    /**
     * @generated from protobuf field: string BucketName = 4 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.GetProjectWriteTokenResult
 */
export interface GetProjectWriteTokenResult {
    /**
     * @generated from protobuf field: string AccessToken = 1 [json_name = "AccessToken"];
     */
    accessToken: string;
    /**
     * @generated from protobuf field: int64 ExpiresIn = 2 [json_name = "ExpiresIn"];
     */
    expiresIn: bigint;
    /**
     * @generated from protobuf field: string Resource = 3 [json_name = "Resource"];
     */
    resource: string;
    /**
     * @generated from protobuf field: string BucketName = 4 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.GetBucketSTSResult
 */
export interface GetBucketSTSResult {
    /**
     * @generated from protobuf field: string AccessToken = 1 [json_name = "AccessToken"];
     */
    accessToken: string;
    /**
     * @generated from protobuf field: int64 ExpiresIn = 2 [json_name = "ExpiresIn"];
     */
    expiresIn: bigint;
    /**
     * @generated from protobuf field: repeated string Resources = 3 [json_name = "Resources"];
     */
    resources: string[];
    /**
     * @generated from protobuf field: string BucketName = 4 [json_name = "BucketName"];
     */
    bucketName: string;
}
/**
 * @generated from protobuf message api.CreateBucketResult
 */
export interface CreateBucketResult {
    /**
     * @generated from protobuf field: string BucketPath = 1 [json_name = "BucketPath"];
     */
    bucketPath: string;
}
/**
 * @generated from protobuf message api.DeleteBucketResult
 */
export interface DeleteBucketResult {
}
// @generated message type with reflection information, may provide speed optimized methods
class GetPartnerReadTokenRequest$Type extends MessageType<GetPartnerReadTokenRequest> {
    constructor() {
        super("api.GetPartnerReadTokenRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestPartnerAppHeader, options: { "validate.rules": { message: { required: true } } } }
        ]);
    }
    create(value?: PartialMessage<GetPartnerReadTokenRequest>): GetPartnerReadTokenRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetPartnerReadTokenRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPartnerReadTokenRequest): GetPartnerReadTokenRequest {
        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;
                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: GetPartnerReadTokenRequest, 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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetPartnerReadTokenRequest
 */
export const GetPartnerReadTokenRequest = new GetPartnerReadTokenRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPartnerWriteTokenRequest$Type extends MessageType<GetPartnerWriteTokenRequest> {
    constructor() {
        super("api.GetPartnerWriteTokenRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestPartnerAppHeader, options: { "validate.rules": { message: { required: true } } } }
        ]);
    }
    create(value?: PartialMessage<GetPartnerWriteTokenRequest>): GetPartnerWriteTokenRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetPartnerWriteTokenRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPartnerWriteTokenRequest): GetPartnerWriteTokenRequest {
        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;
                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: GetPartnerWriteTokenRequest, 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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetPartnerWriteTokenRequest
 */
export const GetPartnerWriteTokenRequest = new GetPartnerWriteTokenRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectReadTokenRequest$Type extends MessageType<GetProjectReadTokenRequest> {
    constructor() {
        super("api.GetProjectReadTokenRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
        ]);
    }
    create(value?: PartialMessage<GetProjectReadTokenRequest>): GetProjectReadTokenRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetProjectReadTokenRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectReadTokenRequest): GetProjectReadTokenRequest {
        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: GetProjectReadTokenRequest, 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.GetProjectReadTokenRequest
 */
export const GetProjectReadTokenRequest = new GetProjectReadTokenRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectWriteTokenRequest$Type extends MessageType<GetProjectWriteTokenRequest> {
    constructor() {
        super("api.GetProjectWriteTokenRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
        ]);
    }
    create(value?: PartialMessage<GetProjectWriteTokenRequest>): GetProjectWriteTokenRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<GetProjectWriteTokenRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectWriteTokenRequest): GetProjectWriteTokenRequest {
        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: GetProjectWriteTokenRequest, 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.GetProjectWriteTokenRequest
 */
export const GetProjectWriteTokenRequest = new GetProjectWriteTokenRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetBucketSTSRequest$Type extends MessageType<GetBucketSTSRequest> {
    constructor() {
        super("api.GetBucketSTSRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetBucketSTSRequest>): GetBucketSTSRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        if (value !== undefined)
            reflectionMergePartial<GetBucketSTSRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetBucketSTSRequest): GetBucketSTSRequest {
        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: GetBucketSTSRequest, 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.GetBucketSTSRequest
 */
export const GetBucketSTSRequest = new GetBucketSTSRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreatePartnerBucketRequest$Type extends MessageType<CreatePartnerBucketRequest> {
    constructor() {
        super("api.CreatePartnerBucketRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
    }
    create(value?: PartialMessage<CreatePartnerBucketRequest>): CreatePartnerBucketRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<CreatePartnerBucketRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePartnerBucketRequest): CreatePartnerBucketRequest {
        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 BucketName = 2 [json_name = "BucketName"];*/ 2:
                    message.bucketName = 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: CreatePartnerBucketRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string BucketName = 2 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreatePartnerBucketRequest
 */
export const CreatePartnerBucketRequest = new CreatePartnerBucketRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateProjectBucketRequest$Type extends MessageType<CreateProjectBucketRequest> {
    constructor() {
        super("api.CreateProjectBucketRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
    }
    create(value?: PartialMessage<CreateProjectBucketRequest>): CreateProjectBucketRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        if (value !== undefined)
            reflectionMergePartial<CreateProjectBucketRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectBucketRequest): CreateProjectBucketRequest {
        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: CreateProjectBucketRequest, 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.CreateProjectBucketRequest
 */
export const CreateProjectBucketRequest = new CreateProjectBucketRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeletePartnerBucketRequest$Type extends MessageType<DeletePartnerBucketRequest> {
    constructor() {
        super("api.DeletePartnerBucketRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
    }
    create(value?: PartialMessage<DeletePartnerBucketRequest>): DeletePartnerBucketRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<DeletePartnerBucketRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeletePartnerBucketRequest): DeletePartnerBucketRequest {
        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 BucketName = 2 [json_name = "BucketName"];*/ 2:
                    message.bucketName = 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: DeletePartnerBucketRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string BucketName = 2 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DeletePartnerBucketRequest
 */
export const DeletePartnerBucketRequest = new DeletePartnerBucketRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectBucketRequest$Type extends MessageType<DeleteProjectBucketRequest> {
    constructor() {
        super("api.DeleteProjectBucketRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
    }
    create(value?: PartialMessage<DeleteProjectBucketRequest>): DeleteProjectBucketRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        if (value !== undefined)
            reflectionMergePartial<DeleteProjectBucketRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectBucketRequest): DeleteProjectBucketRequest {
        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: DeleteProjectBucketRequest, 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.DeleteProjectBucketRequest
 */
export const DeleteProjectBucketRequest = new DeleteProjectBucketRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteOrganisationBucketRequest$Type extends MessageType<DeleteOrganisationBucketRequest> {
    constructor() {
        super("api.DeleteOrganisationBucketRequest", [
            { no: 1, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["OrganisationID"] } } });
    }
    create(value?: PartialMessage<DeleteOrganisationBucketRequest>): DeleteOrganisationBucketRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.organisationID = "";
        if (value !== undefined)
            reflectionMergePartial<DeleteOrganisationBucketRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteOrganisationBucketRequest): DeleteOrganisationBucketRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string OrganisationID = 1 [json_name = "OrganisationID"];*/ 1:
                    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: DeleteOrganisationBucketRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string OrganisationID = 1 [json_name = "OrganisationID"]; */
        if (message.organisationID !== "")
            writer.tag(1, 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.DeleteOrganisationBucketRequest
 */
export const DeleteOrganisationBucketRequest = new DeleteOrganisationBucketRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPartnerReadTokenResult$Type extends MessageType<GetPartnerReadTokenResult> {
    constructor() {
        super("api.GetPartnerReadTokenResult", [
            { no: 1, name: "AccessToken", kind: "scalar", jsonName: "AccessToken", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ExpiresIn", kind: "scalar", jsonName: "ExpiresIn", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 3, name: "Resource", kind: "scalar", jsonName: "Resource", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetPartnerReadTokenResult>): GetPartnerReadTokenResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accessToken = "";
        message.expiresIn = 0n;
        message.resource = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<GetPartnerReadTokenResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPartnerReadTokenResult): GetPartnerReadTokenResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string AccessToken = 1 [json_name = "AccessToken"];*/ 1:
                    message.accessToken = reader.string();
                    break;
                case /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"];*/ 2:
                    message.expiresIn = reader.int64().toBigInt();
                    break;
                case /* string Resource = 3 [json_name = "Resource"];*/ 3:
                    message.resource = reader.string();
                    break;
                case /* string BucketName = 4 [json_name = "BucketName"];*/ 4:
                    message.bucketName = 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: GetPartnerReadTokenResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string AccessToken = 1 [json_name = "AccessToken"]; */
        if (message.accessToken !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accessToken);
        /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"]; */
        if (message.expiresIn !== 0n)
            writer.tag(2, WireType.Varint).int64(message.expiresIn);
        /* string Resource = 3 [json_name = "Resource"]; */
        if (message.resource !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.resource);
        /* string BucketName = 4 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetPartnerReadTokenResult
 */
export const GetPartnerReadTokenResult = new GetPartnerReadTokenResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPartnerWriteTokenResult$Type extends MessageType<GetPartnerWriteTokenResult> {
    constructor() {
        super("api.GetPartnerWriteTokenResult", [
            { no: 1, name: "AccessToken", kind: "scalar", jsonName: "AccessToken", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ExpiresIn", kind: "scalar", jsonName: "ExpiresIn", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 3, name: "Resource", kind: "scalar", jsonName: "Resource", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetPartnerWriteTokenResult>): GetPartnerWriteTokenResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accessToken = "";
        message.expiresIn = 0n;
        message.resource = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<GetPartnerWriteTokenResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPartnerWriteTokenResult): GetPartnerWriteTokenResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string AccessToken = 1 [json_name = "AccessToken"];*/ 1:
                    message.accessToken = reader.string();
                    break;
                case /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"];*/ 2:
                    message.expiresIn = reader.int64().toBigInt();
                    break;
                case /* string Resource = 3 [json_name = "Resource"];*/ 3:
                    message.resource = reader.string();
                    break;
                case /* string BucketName = 4 [json_name = "BucketName"];*/ 4:
                    message.bucketName = 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: GetPartnerWriteTokenResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string AccessToken = 1 [json_name = "AccessToken"]; */
        if (message.accessToken !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accessToken);
        /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"]; */
        if (message.expiresIn !== 0n)
            writer.tag(2, WireType.Varint).int64(message.expiresIn);
        /* string Resource = 3 [json_name = "Resource"]; */
        if (message.resource !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.resource);
        /* string BucketName = 4 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetPartnerWriteTokenResult
 */
export const GetPartnerWriteTokenResult = new GetPartnerWriteTokenResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectReadTokenResult$Type extends MessageType<GetProjectReadTokenResult> {
    constructor() {
        super("api.GetProjectReadTokenResult", [
            { no: 1, name: "AccessToken", kind: "scalar", jsonName: "AccessToken", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ExpiresIn", kind: "scalar", jsonName: "ExpiresIn", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 3, name: "Resource", kind: "scalar", jsonName: "Resource", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetProjectReadTokenResult>): GetProjectReadTokenResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accessToken = "";
        message.expiresIn = 0n;
        message.resource = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<GetProjectReadTokenResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectReadTokenResult): GetProjectReadTokenResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string AccessToken = 1 [json_name = "AccessToken"];*/ 1:
                    message.accessToken = reader.string();
                    break;
                case /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"];*/ 2:
                    message.expiresIn = reader.int64().toBigInt();
                    break;
                case /* string Resource = 3 [json_name = "Resource"];*/ 3:
                    message.resource = reader.string();
                    break;
                case /* string BucketName = 4 [json_name = "BucketName"];*/ 4:
                    message.bucketName = 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: GetProjectReadTokenResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string AccessToken = 1 [json_name = "AccessToken"]; */
        if (message.accessToken !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accessToken);
        /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"]; */
        if (message.expiresIn !== 0n)
            writer.tag(2, WireType.Varint).int64(message.expiresIn);
        /* string Resource = 3 [json_name = "Resource"]; */
        if (message.resource !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.resource);
        /* string BucketName = 4 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetProjectReadTokenResult
 */
export const GetProjectReadTokenResult = new GetProjectReadTokenResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectWriteTokenResult$Type extends MessageType<GetProjectWriteTokenResult> {
    constructor() {
        super("api.GetProjectWriteTokenResult", [
            { no: 1, name: "AccessToken", kind: "scalar", jsonName: "AccessToken", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ExpiresIn", kind: "scalar", jsonName: "ExpiresIn", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 3, name: "Resource", kind: "scalar", jsonName: "Resource", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetProjectWriteTokenResult>): GetProjectWriteTokenResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accessToken = "";
        message.expiresIn = 0n;
        message.resource = "";
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<GetProjectWriteTokenResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectWriteTokenResult): GetProjectWriteTokenResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string AccessToken = 1 [json_name = "AccessToken"];*/ 1:
                    message.accessToken = reader.string();
                    break;
                case /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"];*/ 2:
                    message.expiresIn = reader.int64().toBigInt();
                    break;
                case /* string Resource = 3 [json_name = "Resource"];*/ 3:
                    message.resource = reader.string();
                    break;
                case /* string BucketName = 4 [json_name = "BucketName"];*/ 4:
                    message.bucketName = 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: GetProjectWriteTokenResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string AccessToken = 1 [json_name = "AccessToken"]; */
        if (message.accessToken !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accessToken);
        /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"]; */
        if (message.expiresIn !== 0n)
            writer.tag(2, WireType.Varint).int64(message.expiresIn);
        /* string Resource = 3 [json_name = "Resource"]; */
        if (message.resource !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.resource);
        /* string BucketName = 4 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetProjectWriteTokenResult
 */
export const GetProjectWriteTokenResult = new GetProjectWriteTokenResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetBucketSTSResult$Type extends MessageType<GetBucketSTSResult> {
    constructor() {
        super("api.GetBucketSTSResult", [
            { no: 1, name: "AccessToken", kind: "scalar", jsonName: "AccessToken", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ExpiresIn", kind: "scalar", jsonName: "ExpiresIn", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 3, name: "Resources", kind: "scalar", jsonName: "Resources", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "BucketName", kind: "scalar", jsonName: "BucketName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetBucketSTSResult>): GetBucketSTSResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.accessToken = "";
        message.expiresIn = 0n;
        message.resources = [];
        message.bucketName = "";
        if (value !== undefined)
            reflectionMergePartial<GetBucketSTSResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetBucketSTSResult): GetBucketSTSResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string AccessToken = 1 [json_name = "AccessToken"];*/ 1:
                    message.accessToken = reader.string();
                    break;
                case /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"];*/ 2:
                    message.expiresIn = reader.int64().toBigInt();
                    break;
                case /* repeated string Resources = 3 [json_name = "Resources"];*/ 3:
                    message.resources.push(reader.string());
                    break;
                case /* string BucketName = 4 [json_name = "BucketName"];*/ 4:
                    message.bucketName = 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: GetBucketSTSResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string AccessToken = 1 [json_name = "AccessToken"]; */
        if (message.accessToken !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accessToken);
        /* int64 ExpiresIn = 2 [json_name = "ExpiresIn"]; */
        if (message.expiresIn !== 0n)
            writer.tag(2, WireType.Varint).int64(message.expiresIn);
        /* repeated string Resources = 3 [json_name = "Resources"]; */
        for (let i = 0; i < message.resources.length; i++)
            writer.tag(3, WireType.LengthDelimited).string(message.resources[i]);
        /* string BucketName = 4 [json_name = "BucketName"]; */
        if (message.bucketName !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.bucketName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetBucketSTSResult
 */
export const GetBucketSTSResult = new GetBucketSTSResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateBucketResult$Type extends MessageType<CreateBucketResult> {
    constructor() {
        super("api.CreateBucketResult", [
            { no: 1, name: "BucketPath", kind: "scalar", jsonName: "BucketPath", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<CreateBucketResult>): CreateBucketResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.bucketPath = "";
        if (value !== undefined)
            reflectionMergePartial<CreateBucketResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateBucketResult): CreateBucketResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string BucketPath = 1 [json_name = "BucketPath"];*/ 1:
                    message.bucketPath = 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: CreateBucketResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string BucketPath = 1 [json_name = "BucketPath"]; */
        if (message.bucketPath !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.bucketPath);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreateBucketResult
 */
export const CreateBucketResult = new CreateBucketResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteBucketResult$Type extends MessageType<DeleteBucketResult> {
    constructor() {
        super("api.DeleteBucketResult", []);
    }
    create(value?: PartialMessage<DeleteBucketResult>): DeleteBucketResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DeleteBucketResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteBucketResult): DeleteBucketResult {
        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: DeleteBucketResult, 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.DeleteBucketResult
 */
export const DeleteBucketResult = new DeleteBucketResult$Type();
/**
 * @generated ServiceType for protobuf service api.GcsApi
 */
export const GcsApi = new ServiceType("api.GcsApi", [
    { name: "GetPartnerReadToken", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Get a folder read STS of the given PartnerApp" }, "api.rscType": "PartnerApp", "api.roles": "PartnerApp.Bucket-Reader", "google.api.method_visibility": { restriction: "SDK" } }, I: GetPartnerReadTokenRequest, O: GetPartnerReadTokenResult },
    { name: "GetPartnerWriteToken", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Get a folder write STS of the given PartnerApp" }, "api.rscType": "PartnerApp", "api.roles": "PartnerApp.Bucket-Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: GetPartnerWriteTokenRequest, O: GetPartnerWriteTokenResult },
    { name: "GetProjectReadToken", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Get a folder read STS of the given Project" }, "api.rscType": "Project", "api.roles": "Project.Bucket-Reader", "google.api.method_visibility": { restriction: "SDK" } }, I: GetProjectReadTokenRequest, O: GetProjectReadTokenResult },
    { name: "GetProjectWriteToken", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Get a folder write STS of the given Project" }, "api.rscType": "Project", "api.roles": "Project.Bucket-Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: GetProjectWriteTokenRequest, O: GetProjectWriteTokenResult },
    { name: "GetBucketSTS", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Get a folder STS of a given project" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetBucketSTSRequest, O: GetBucketSTSResult },
    { name: "CreatePartnerBucket", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Create a storage bucket for a partner in a specific project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Storage", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreatePartnerBucketRequest, O: CreateBucketResult },
    { name: "CreateProjectBucket", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Create a storage bucket for a project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Storage", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateProjectBucketRequest, O: CreateBucketResult },
    { name: "DeletePartnerBucket", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Delete a storage bucket for a partner in a specific project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Storage", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeletePartnerBucketRequest, O: DeleteBucketResult },
    { name: "DeleteProjectBucket", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Delete a storage bucket for a project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Storage", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteProjectBucketRequest, O: DeleteBucketResult },
    { name: "DeleteOrganisationBucket", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["GCS"], description: "Delete a storage bucket for an organisation" }, "api.rscType": "Platform", "api.roles": "Platform.Organisation-Storage", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteOrganisationBucketRequest, O: DeleteBucketResult }
], { "api.k8sService": "gcs-api" });
