/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { OriginMeta, Origin } from '../../../../yandex/cloud/cdn/v1/origin';
import { Operation } from '../../../../yandex/cloud/operation/operation';
export declare const protobufPackage = "yandex.cloud.cdn.v1";
export interface GetOriginRequest {
    /** ID of the folder that the origin belongs to. */
    folderId: string;
    /** [origin_id] group ID to request origin from. */
    originId: number;
}
export interface ListOriginsRequest {
    /** ID of the folder that the origin belongs to. */
    folderId: string;
    /** ID of the group to request origins from. */
    originGroupId: number;
}
export interface ListOriginsResponse {
    /** Origin from response. */
    origins: Origin[];
}
export interface CreateOriginRequest {
    /** ID of the folder that the origin belongs to. */
    folderId: string;
    /** [origin_group_id] group ID to request origins from. */
    originGroupId: number;
    /**
     * IP address or Domain name of your origin and the port (if custom).
     * Used if [meta] variant is `common`.
     */
    source: string;
    /**
     * The setting allows to enable or disable an Origin source in the Origins group.
     *
     * It has two possible values:
     *
     * True - The origin is enabled and used as a source for the CDN. An origins
     * group must contain at least one enabled origin. Default value.
     * False - The origin is disabled and the CDN is not using it to pull content.
     */
    enabled?: boolean;
    /**
     * Specifies whether the origin is used in its origin group as backup.
     * A backup origin is used when one of active origins becomes unavailable.
     *
     * Default value: False.
     */
    backup?: boolean;
    /** Set up origin of the content. */
    meta?: OriginMeta;
}
export interface CreateOriginMetadata {
    /** ID of the origin. */
    originId: number;
    /** ID pf the parent origins group. */
    originGroupId: number;
}
export interface UpdateOriginRequest {
    /** ID of the folder that the origin belongs to. */
    folderId: string;
    /** ID of the origin. */
    originId: number;
    /**
     * IP address or Domain name of your origin and the port (if custom).
     * Used if [meta] variant is `common`.
     * Required.
     */
    source: string;
    /**
     * The setting allows to enable or disable an Origin source in the Origins group.
     *
     * It has two possible values:
     *
     * True - The origin is enabled and used as a source for the CDN. An origins
     * group must contain at least one enabled origin. Default value.
     * False - The origin is disabled and the CDN is not using it to pull content.
     *
     * Required.
     */
    enabled: boolean;
    /**
     * Specifies whether the origin is used in its origin group as backup.
     * A backup origin is used when one of active origins becomes unavailable.
     *
     * Required.
     */
    backup: boolean;
    /** Set up type of the origin. */
    meta?: OriginMeta;
}
export interface UpdateOriginMetadata {
    /** ID of the origin. */
    originId: number;
    /** Parent origins group ID. */
    originGroupId: number;
}
export interface DeleteOriginRequest {
    /** ID of the folder that the origin belongs to. */
    folderId: string;
    /** ID of the origin. */
    originId: number;
}
export interface DeleteOriginMetadata {
    /** ID of the origin. */
    originId: number;
}
export declare const GetOriginRequest: {
    encode(message: GetOriginRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GetOriginRequest;
    fromJSON(object: any): GetOriginRequest;
    toJSON(message: GetOriginRequest): unknown;
    fromPartial<I extends {
        folderId?: string | undefined;
        originId?: number | undefined;
    } & {
        folderId?: string | undefined;
        originId?: number | undefined;
    } & Record<Exclude<keyof I, keyof GetOriginRequest>, never>>(object: I): GetOriginRequest;
};
export declare const ListOriginsRequest: {
    encode(message: ListOriginsRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListOriginsRequest;
    fromJSON(object: any): ListOriginsRequest;
    toJSON(message: ListOriginsRequest): unknown;
    fromPartial<I extends {
        folderId?: string | undefined;
        originGroupId?: number | undefined;
    } & {
        folderId?: string | undefined;
        originGroupId?: number | undefined;
    } & Record<Exclude<keyof I, keyof ListOriginsRequest>, never>>(object: I): ListOriginsRequest;
};
export declare const ListOriginsResponse: {
    encode(message: ListOriginsResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListOriginsResponse;
    fromJSON(object: any): ListOriginsResponse;
    toJSON(message: ListOriginsResponse): unknown;
    fromPartial<I extends {
        origins?: {
            id?: number | undefined;
            originGroupId?: number | undefined;
            source?: string | undefined;
            enabled?: boolean | undefined;
            backup?: boolean | undefined;
            meta?: {
                common?: {
                    name?: string | undefined;
                } | undefined;
                bucket?: {
                    name?: string | undefined;
                } | undefined;
                website?: {
                    name?: string | undefined;
                } | undefined;
                balancer?: {
                    id?: string | undefined;
                } | undefined;
            } | undefined;
        }[] | undefined;
    } & {
        origins?: ({
            id?: number | undefined;
            originGroupId?: number | undefined;
            source?: string | undefined;
            enabled?: boolean | undefined;
            backup?: boolean | undefined;
            meta?: {
                common?: {
                    name?: string | undefined;
                } | undefined;
                bucket?: {
                    name?: string | undefined;
                } | undefined;
                website?: {
                    name?: string | undefined;
                } | undefined;
                balancer?: {
                    id?: string | undefined;
                } | undefined;
            } | undefined;
        }[] & ({
            id?: number | undefined;
            originGroupId?: number | undefined;
            source?: string | undefined;
            enabled?: boolean | undefined;
            backup?: boolean | undefined;
            meta?: {
                common?: {
                    name?: string | undefined;
                } | undefined;
                bucket?: {
                    name?: string | undefined;
                } | undefined;
                website?: {
                    name?: string | undefined;
                } | undefined;
                balancer?: {
                    id?: string | undefined;
                } | undefined;
            } | undefined;
        } & {
            id?: number | undefined;
            originGroupId?: number | undefined;
            source?: string | undefined;
            enabled?: boolean | undefined;
            backup?: boolean | undefined;
            meta?: ({
                common?: {
                    name?: string | undefined;
                } | undefined;
                bucket?: {
                    name?: string | undefined;
                } | undefined;
                website?: {
                    name?: string | undefined;
                } | undefined;
                balancer?: {
                    id?: string | undefined;
                } | undefined;
            } & {
                common?: ({
                    name?: string | undefined;
                } & {
                    name?: string | undefined;
                } & Record<Exclude<keyof I["origins"][number]["meta"]["common"], "name">, never>) | undefined;
                bucket?: ({
                    name?: string | undefined;
                } & {
                    name?: string | undefined;
                } & Record<Exclude<keyof I["origins"][number]["meta"]["bucket"], "name">, never>) | undefined;
                website?: ({
                    name?: string | undefined;
                } & {
                    name?: string | undefined;
                } & Record<Exclude<keyof I["origins"][number]["meta"]["website"], "name">, never>) | undefined;
                balancer?: ({
                    id?: string | undefined;
                } & {
                    id?: string | undefined;
                } & Record<Exclude<keyof I["origins"][number]["meta"]["balancer"], "id">, never>) | undefined;
            } & Record<Exclude<keyof I["origins"][number]["meta"], keyof OriginMeta>, never>) | undefined;
        } & Record<Exclude<keyof I["origins"][number], keyof Origin>, never>)[] & Record<Exclude<keyof I["origins"], keyof {
            id?: number | undefined;
            originGroupId?: number | undefined;
            source?: string | undefined;
            enabled?: boolean | undefined;
            backup?: boolean | undefined;
            meta?: {
                common?: {
                    name?: string | undefined;
                } | undefined;
                bucket?: {
                    name?: string | undefined;
                } | undefined;
                website?: {
                    name?: string | undefined;
                } | undefined;
                balancer?: {
                    id?: string | undefined;
                } | undefined;
            } | undefined;
        }[]>, never>) | undefined;
    } & Record<Exclude<keyof I, "origins">, never>>(object: I): ListOriginsResponse;
};
export declare const CreateOriginRequest: {
    encode(message: CreateOriginRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateOriginRequest;
    fromJSON(object: any): CreateOriginRequest;
    toJSON(message: CreateOriginRequest): unknown;
    fromPartial<I extends {
        folderId?: string | undefined;
        originGroupId?: number | undefined;
        source?: string | undefined;
        enabled?: boolean | undefined;
        backup?: boolean | undefined;
        meta?: {
            common?: {
                name?: string | undefined;
            } | undefined;
            bucket?: {
                name?: string | undefined;
            } | undefined;
            website?: {
                name?: string | undefined;
            } | undefined;
            balancer?: {
                id?: string | undefined;
            } | undefined;
        } | undefined;
    } & {
        folderId?: string | undefined;
        originGroupId?: number | undefined;
        source?: string | undefined;
        enabled?: boolean | undefined;
        backup?: boolean | undefined;
        meta?: ({
            common?: {
                name?: string | undefined;
            } | undefined;
            bucket?: {
                name?: string | undefined;
            } | undefined;
            website?: {
                name?: string | undefined;
            } | undefined;
            balancer?: {
                id?: string | undefined;
            } | undefined;
        } & {
            common?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["common"], "name">, never>) | undefined;
            bucket?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["bucket"], "name">, never>) | undefined;
            website?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["website"], "name">, never>) | undefined;
            balancer?: ({
                id?: string | undefined;
            } & {
                id?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["balancer"], "id">, never>) | undefined;
        } & Record<Exclude<keyof I["meta"], keyof OriginMeta>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof CreateOriginRequest>, never>>(object: I): CreateOriginRequest;
};
export declare const CreateOriginMetadata: {
    encode(message: CreateOriginMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateOriginMetadata;
    fromJSON(object: any): CreateOriginMetadata;
    toJSON(message: CreateOriginMetadata): unknown;
    fromPartial<I extends {
        originId?: number | undefined;
        originGroupId?: number | undefined;
    } & {
        originId?: number | undefined;
        originGroupId?: number | undefined;
    } & Record<Exclude<keyof I, keyof CreateOriginMetadata>, never>>(object: I): CreateOriginMetadata;
};
export declare const UpdateOriginRequest: {
    encode(message: UpdateOriginRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): UpdateOriginRequest;
    fromJSON(object: any): UpdateOriginRequest;
    toJSON(message: UpdateOriginRequest): unknown;
    fromPartial<I extends {
        folderId?: string | undefined;
        originId?: number | undefined;
        source?: string | undefined;
        enabled?: boolean | undefined;
        backup?: boolean | undefined;
        meta?: {
            common?: {
                name?: string | undefined;
            } | undefined;
            bucket?: {
                name?: string | undefined;
            } | undefined;
            website?: {
                name?: string | undefined;
            } | undefined;
            balancer?: {
                id?: string | undefined;
            } | undefined;
        } | undefined;
    } & {
        folderId?: string | undefined;
        originId?: number | undefined;
        source?: string | undefined;
        enabled?: boolean | undefined;
        backup?: boolean | undefined;
        meta?: ({
            common?: {
                name?: string | undefined;
            } | undefined;
            bucket?: {
                name?: string | undefined;
            } | undefined;
            website?: {
                name?: string | undefined;
            } | undefined;
            balancer?: {
                id?: string | undefined;
            } | undefined;
        } & {
            common?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["common"], "name">, never>) | undefined;
            bucket?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["bucket"], "name">, never>) | undefined;
            website?: ({
                name?: string | undefined;
            } & {
                name?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["website"], "name">, never>) | undefined;
            balancer?: ({
                id?: string | undefined;
            } & {
                id?: string | undefined;
            } & Record<Exclude<keyof I["meta"]["balancer"], "id">, never>) | undefined;
        } & Record<Exclude<keyof I["meta"], keyof OriginMeta>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof UpdateOriginRequest>, never>>(object: I): UpdateOriginRequest;
};
export declare const UpdateOriginMetadata: {
    encode(message: UpdateOriginMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): UpdateOriginMetadata;
    fromJSON(object: any): UpdateOriginMetadata;
    toJSON(message: UpdateOriginMetadata): unknown;
    fromPartial<I extends {
        originId?: number | undefined;
        originGroupId?: number | undefined;
    } & {
        originId?: number | undefined;
        originGroupId?: number | undefined;
    } & Record<Exclude<keyof I, keyof UpdateOriginMetadata>, never>>(object: I): UpdateOriginMetadata;
};
export declare const DeleteOriginRequest: {
    encode(message: DeleteOriginRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): DeleteOriginRequest;
    fromJSON(object: any): DeleteOriginRequest;
    toJSON(message: DeleteOriginRequest): unknown;
    fromPartial<I extends {
        folderId?: string | undefined;
        originId?: number | undefined;
    } & {
        folderId?: string | undefined;
        originId?: number | undefined;
    } & Record<Exclude<keyof I, keyof DeleteOriginRequest>, never>>(object: I): DeleteOriginRequest;
};
export declare const DeleteOriginMetadata: {
    encode(message: DeleteOriginMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): DeleteOriginMetadata;
    fromJSON(object: any): DeleteOriginMetadata;
    toJSON(message: DeleteOriginMetadata): unknown;
    fromPartial<I extends {
        originId?: number | undefined;
    } & {
        originId?: number | undefined;
    } & Record<Exclude<keyof I, "originId">, never>>(object: I): DeleteOriginMetadata;
};
/**
 * Origin management service.
 * Origin is not a standalone entity. It can live only within origin group.
 */
export declare const OriginServiceService: {
    /** Get origin in origin group. */
    readonly get: {
        readonly path: "/yandex.cloud.cdn.v1.OriginService/Get";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: GetOriginRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => GetOriginRequest;
        readonly responseSerialize: (value: Origin) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Origin;
    };
    /** Lists origins of origin group. */
    readonly list: {
        readonly path: "/yandex.cloud.cdn.v1.OriginService/List";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: ListOriginsRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ListOriginsRequest;
        readonly responseSerialize: (value: ListOriginsResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => ListOriginsResponse;
    };
    /** Creates origin inside origin group. */
    readonly create: {
        readonly path: "/yandex.cloud.cdn.v1.OriginService/Create";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: CreateOriginRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => CreateOriginRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
    /**
     * Updates the specified origin from the origin group.
     *
     * Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
     * use the origin via a [CacheService.Purge] request.
     */
    readonly update: {
        readonly path: "/yandex.cloud.cdn.v1.OriginService/Update";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: UpdateOriginRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => UpdateOriginRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
    /** Deletes origin from origin group. */
    readonly delete: {
        readonly path: "/yandex.cloud.cdn.v1.OriginService/Delete";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: DeleteOriginRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => DeleteOriginRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
};
export interface OriginServiceServer extends UntypedServiceImplementation {
    /** Get origin in origin group. */
    get: handleUnaryCall<GetOriginRequest, Origin>;
    /** Lists origins of origin group. */
    list: handleUnaryCall<ListOriginsRequest, ListOriginsResponse>;
    /** Creates origin inside origin group. */
    create: handleUnaryCall<CreateOriginRequest, Operation>;
    /**
     * Updates the specified origin from the origin group.
     *
     * Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
     * use the origin via a [CacheService.Purge] request.
     */
    update: handleUnaryCall<UpdateOriginRequest, Operation>;
    /** Deletes origin from origin group. */
    delete: handleUnaryCall<DeleteOriginRequest, Operation>;
}
export interface OriginServiceClient extends Client {
    /** Get origin in origin group. */
    get(request: GetOriginRequest, callback: (error: ServiceError | null, response: Origin) => void): ClientUnaryCall;
    get(request: GetOriginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Origin) => void): ClientUnaryCall;
    get(request: GetOriginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Origin) => void): ClientUnaryCall;
    /** Lists origins of origin group. */
    list(request: ListOriginsRequest, callback: (error: ServiceError | null, response: ListOriginsResponse) => void): ClientUnaryCall;
    list(request: ListOriginsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListOriginsResponse) => void): ClientUnaryCall;
    list(request: ListOriginsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListOriginsResponse) => void): ClientUnaryCall;
    /** Creates origin inside origin group. */
    create(request: CreateOriginRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    create(request: CreateOriginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    create(request: CreateOriginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    /**
     * Updates the specified origin from the origin group.
     *
     * Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
     * use the origin via a [CacheService.Purge] request.
     */
    update(request: UpdateOriginRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    update(request: UpdateOriginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    update(request: UpdateOriginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    /** Deletes origin from origin group. */
    delete(request: DeleteOriginRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    delete(request: DeleteOriginRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    delete(request: DeleteOriginRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
}
export declare const OriginServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): OriginServiceClient;
    service: typeof OriginServiceService;
};
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 {};
