import _m0 from 'protobufjs/minimal';
export declare const protobufPackage = "yandex.cloud.mdb.kafka.v1";
/**
 * A Kafka user.
 * For more information, see the [Operations -> Accounts](/docs/managed-kafka/operations/cluster-accounts) section of the documentation.
 */
export interface User {
    /** Name of the Kafka user. */
    name: string;
    /**
     * ID of the Apache Kafka® cluster the user belongs to.
     *
     * To get the Apache Kafka® cluster ID, make a [ClusterService.List] request.
     */
    clusterId: string;
    /** Set of permissions granted to this user. */
    permissions: Permission[];
}
export interface UserSpec {
    /** Name of the Kafka user. */
    name: string;
    /** Password of the Kafka user. */
    password: string;
    /** Set of permissions granted to the user. */
    permissions: Permission[];
}
export interface Permission {
    /**
     * Name or prefix-pattern with wildcard for the topic that the permission grants access to.
     *
     * To get the topic name, make a [TopicService.List] request.
     */
    topicName: string;
    /** Access role type to grant to the user. */
    role: Permission_AccessRole;
    /**
     * Lists hosts allowed for this permission.
     * Only ip-addresses allowed as value of single host.
     * When not defined, access from any host is allowed.
     *
     * Bare in mind that the same host might appear in multiple permissions at the same time,
     * hence removing individual permission doesn't automatically restricts access from the [allow_hosts] of the permission.
     * If the same host(s) is listed for another permission of the same principal/topic, the host(s) remains allowed.
     */
    allowHosts: string[];
}
export declare enum Permission_AccessRole {
    ACCESS_ROLE_UNSPECIFIED = 0,
    /** ACCESS_ROLE_PRODUCER - Producer role for the user. */
    ACCESS_ROLE_PRODUCER = 1,
    /** ACCESS_ROLE_CONSUMER - Consumer role for the user. */
    ACCESS_ROLE_CONSUMER = 2,
    /** ACCESS_ROLE_ADMIN - Admin role for the user. */
    ACCESS_ROLE_ADMIN = 3,
    /** ACCESS_ROLE_TOPIC_ADMIN - Admin permissions on topics role for the user. */
    ACCESS_ROLE_TOPIC_ADMIN = 4,
    UNRECOGNIZED = -1
}
export declare function permission_AccessRoleFromJSON(object: any): Permission_AccessRole;
export declare function permission_AccessRoleToJSON(object: Permission_AccessRole): string;
export declare const User: {
    encode(message: User, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): User;
    fromJSON(object: any): User;
    toJSON(message: User): unknown;
    fromPartial<I extends {
        name?: string | undefined;
        clusterId?: string | undefined;
        permissions?: {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[] | undefined;
    } & {
        name?: string | undefined;
        clusterId?: string | undefined;
        permissions?: ({
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[] & ({
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        } & {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: (string[] & string[] & Record<Exclude<keyof I["permissions"][number]["allowHosts"], keyof string[]>, never>) | undefined;
        } & Record<Exclude<keyof I["permissions"][number], keyof Permission>, never>)[] & Record<Exclude<keyof I["permissions"], keyof {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof User>, never>>(object: I): User;
};
export declare const UserSpec: {
    encode(message: UserSpec, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): UserSpec;
    fromJSON(object: any): UserSpec;
    toJSON(message: UserSpec): unknown;
    fromPartial<I extends {
        name?: string | undefined;
        password?: string | undefined;
        permissions?: {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[] | undefined;
    } & {
        name?: string | undefined;
        password?: string | undefined;
        permissions?: ({
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[] & ({
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        } & {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: (string[] & string[] & Record<Exclude<keyof I["permissions"][number]["allowHosts"], keyof string[]>, never>) | undefined;
        } & Record<Exclude<keyof I["permissions"][number], keyof Permission>, never>)[] & Record<Exclude<keyof I["permissions"], keyof {
            topicName?: string | undefined;
            role?: Permission_AccessRole | undefined;
            allowHosts?: string[] | undefined;
        }[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof UserSpec>, never>>(object: I): UserSpec;
};
export declare const Permission: {
    encode(message: Permission, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): Permission;
    fromJSON(object: any): Permission;
    toJSON(message: Permission): unknown;
    fromPartial<I extends {
        topicName?: string | undefined;
        role?: Permission_AccessRole | undefined;
        allowHosts?: string[] | undefined;
    } & {
        topicName?: string | undefined;
        role?: Permission_AccessRole | undefined;
        allowHosts?: (string[] & string[] & Record<Exclude<keyof I["allowHosts"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof Permission>, never>>(object: I): Permission;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
    [K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
export {};
