/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
export declare const protobufPackage = "yandex.cloud.iam.v1";
export interface CreateIamTokenRequest {
    /**
     * OAuth token for a Yandex account.
     * For more information, see [OAuth token](/docs/iam/concepts/authorization/oauth-token).
     */
    yandexPassportOauthToken: string | undefined;
    /**
     * JSON Web Token (JWT) for a service account.
     * For more information, see [Get IAM token for a service account](/docs/iam/operations/iam-token/create-for-sa).
     */
    jwt: string | undefined;
}
export interface CreateIamTokenResponse {
    /**
     * IAM token for the specified identity.
     *
     * You should pass the token in the `Authorization` header for any further API requests.
     * For example, `Authorization: Bearer [iam_token]`.
     */
    iamToken: string;
    /** IAM token expiration time. */
    expiresAt?: Date;
}
export interface CreateIamTokenForServiceAccountRequest {
    serviceAccountId: string;
}
export interface RevokeIamTokenRequest {
    iamToken: string;
}
export interface RevokeIamTokenResponse {
    subjectId: string;
}
export declare const CreateIamTokenRequest: {
    encode(message: CreateIamTokenRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateIamTokenRequest;
    fromJSON(object: any): CreateIamTokenRequest;
    toJSON(message: CreateIamTokenRequest): unknown;
    fromPartial<I extends {
        yandexPassportOauthToken?: string | undefined;
        jwt?: string | undefined;
    } & {
        yandexPassportOauthToken?: string | undefined;
        jwt?: string | undefined;
    } & Record<Exclude<keyof I, keyof CreateIamTokenRequest>, never>>(object: I): CreateIamTokenRequest;
};
export declare const CreateIamTokenResponse: {
    encode(message: CreateIamTokenResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateIamTokenResponse;
    fromJSON(object: any): CreateIamTokenResponse;
    toJSON(message: CreateIamTokenResponse): unknown;
    fromPartial<I extends {
        iamToken?: string | undefined;
        expiresAt?: Date | undefined;
    } & {
        iamToken?: string | undefined;
        expiresAt?: Date | undefined;
    } & Record<Exclude<keyof I, keyof CreateIamTokenResponse>, never>>(object: I): CreateIamTokenResponse;
};
export declare const CreateIamTokenForServiceAccountRequest: {
    encode(message: CreateIamTokenForServiceAccountRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateIamTokenForServiceAccountRequest;
    fromJSON(object: any): CreateIamTokenForServiceAccountRequest;
    toJSON(message: CreateIamTokenForServiceAccountRequest): unknown;
    fromPartial<I extends {
        serviceAccountId?: string | undefined;
    } & {
        serviceAccountId?: string | undefined;
    } & Record<Exclude<keyof I, "serviceAccountId">, never>>(object: I): CreateIamTokenForServiceAccountRequest;
};
export declare const RevokeIamTokenRequest: {
    encode(message: RevokeIamTokenRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): RevokeIamTokenRequest;
    fromJSON(object: any): RevokeIamTokenRequest;
    toJSON(message: RevokeIamTokenRequest): unknown;
    fromPartial<I extends {
        iamToken?: string | undefined;
    } & {
        iamToken?: string | undefined;
    } & Record<Exclude<keyof I, "iamToken">, never>>(object: I): RevokeIamTokenRequest;
};
export declare const RevokeIamTokenResponse: {
    encode(message: RevokeIamTokenResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): RevokeIamTokenResponse;
    fromJSON(object: any): RevokeIamTokenResponse;
    toJSON(message: RevokeIamTokenResponse): unknown;
    fromPartial<I extends {
        subjectId?: string | undefined;
    } & {
        subjectId?: string | undefined;
    } & Record<Exclude<keyof I, "subjectId">, never>>(object: I): RevokeIamTokenResponse;
};
/** A set of methods for managing IAM tokens. */
export declare const IamTokenServiceService: {
    /** Create an IAM token for the specified identity. */
    readonly create: {
        readonly path: "/yandex.cloud.iam.v1.IamTokenService/Create";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: CreateIamTokenRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => CreateIamTokenRequest;
        readonly responseSerialize: (value: CreateIamTokenResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => CreateIamTokenResponse;
    };
    /** Create an IAM token for service account. */
    readonly createForServiceAccount: {
        readonly path: "/yandex.cloud.iam.v1.IamTokenService/CreateForServiceAccount";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: CreateIamTokenForServiceAccountRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => CreateIamTokenForServiceAccountRequest;
        readonly responseSerialize: (value: CreateIamTokenResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => CreateIamTokenResponse;
    };
    /** Revoke the IAM token. */
    readonly revoke: {
        readonly path: "/yandex.cloud.iam.v1.IamTokenService/Revoke";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: RevokeIamTokenRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => RevokeIamTokenRequest;
        readonly responseSerialize: (value: RevokeIamTokenResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => RevokeIamTokenResponse;
    };
};
export interface IamTokenServiceServer extends UntypedServiceImplementation {
    /** Create an IAM token for the specified identity. */
    create: handleUnaryCall<CreateIamTokenRequest, CreateIamTokenResponse>;
    /** Create an IAM token for service account. */
    createForServiceAccount: handleUnaryCall<CreateIamTokenForServiceAccountRequest, CreateIamTokenResponse>;
    /** Revoke the IAM token. */
    revoke: handleUnaryCall<RevokeIamTokenRequest, RevokeIamTokenResponse>;
}
export interface IamTokenServiceClient extends Client {
    /** Create an IAM token for the specified identity. */
    create(request: CreateIamTokenRequest, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    create(request: CreateIamTokenRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    create(request: CreateIamTokenRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    /** Create an IAM token for service account. */
    createForServiceAccount(request: CreateIamTokenForServiceAccountRequest, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    createForServiceAccount(request: CreateIamTokenForServiceAccountRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    createForServiceAccount(request: CreateIamTokenForServiceAccountRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateIamTokenResponse) => void): ClientUnaryCall;
    /** Revoke the IAM token. */
    revoke(request: RevokeIamTokenRequest, callback: (error: ServiceError | null, response: RevokeIamTokenResponse) => void): ClientUnaryCall;
    revoke(request: RevokeIamTokenRequest, metadata: Metadata, callback: (error: ServiceError | null, response: RevokeIamTokenResponse) => void): ClientUnaryCall;
    revoke(request: RevokeIamTokenRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: RevokeIamTokenResponse) => void): ClientUnaryCall;
}
export declare const IamTokenServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): IamTokenServiceClient;
    service: typeof IamTokenServiceService;
};
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 {};
