/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { OriginGroup } from '../../../../yandex/cloud/cdn/v1/origin_group'; import { OriginParams } from '../../../../yandex/cloud/cdn/v1/origin'; import { Operation } from '../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.cdn.v1"; export interface GetOriginGroupRequest { /** ID of the folder that the origin group belongs to. */ folderId: string; /** * ID of the origin group to return. * * To get a origin group ID, make a [OriginGroupService.List] request. */ originGroupId: number; } export interface ListOriginGroupsRequest { /** ID of the folder that the origin group belongs to.. */ folderId: string; /** * The maximum number of results per page to return. If the number of available * results is larger than [page_size], * the service returns a [ListOriginGroupsResponse.next_page_token] * that can be used to get the next page of results in subsequent list requests. */ pageSize: number; /** * Page token. To get the next page of results, * set [page_token] to the [ListOriginGroupsResponse.next_page_token] * returned by a previous list request. */ pageToken: string; } export interface ListOriginGroupsResponse { /** List of all Origin Groups associated with folder. */ originGroups: OriginGroup[]; /** * [next_page_token] token allows you to get the next page of results for list requests. * If the number of results is larger than [ListOriginGroupsRequest.page_size], use * the [next_page_token] as the value for the [ListOriginGroupsRequest.page_token] query parameter * in the next list request. Each subsequent list request will have its own * [next_page_token] to continue paging through the results. */ nextPageToken: string; } export interface CreateOriginGroupRequest { /** ID of the folder that the origin group belongs to. */ folderId: string; /** Name of the origin group. */ name: string; /** * This option have two possible conditions: * true - The option is active. In case the origin responds with 4XX or 5XX codes, * use the next origin from the list. * false - The option is disabled. * * default value is true */ useNext?: boolean; /** * List of origins: IP addresses or Domain names of your origins and the port * (if custom). */ origins: OriginParams[]; } export interface CreateOriginGroupMetadata { /** ID of created origin group. */ originGroupId: number; } export interface UpdateOriginGroupRequest { /** ID of the folder that the origin group belongs to. */ folderId: string; /** ID of the origin group. */ originGroupId: number; /** Name of the origin group. */ groupName?: string; /** * This option have two possible values: * * True - The option is active. In case the origin responds with 4XX or 5XX * codes, use the next origin from the list. * False - The option is disabled. */ useNext?: boolean; /** * List of origins: IP addresses or Domain names of your origins and the port * (if custom). */ origins: OriginParams[]; } export interface UpdateOriginGroupMetadata { /** ID of the origin group. */ originGroupId: number; } export interface DeleteOriginGroupRequest { /** ID of the folder that the origin group belongs to. */ folderId: string; /** ID of the origin group. */ originGroupId: number; } export interface DeleteOriginGroupMetadata { /** ID of the origin group. */ originGroupId: number; } export declare const GetOriginGroupRequest: { encode(message: GetOriginGroupRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetOriginGroupRequest; fromJSON(object: any): GetOriginGroupRequest; toJSON(message: GetOriginGroupRequest): unknown; fromPartial, never>>(object: I): GetOriginGroupRequest; }; export declare const ListOriginGroupsRequest: { encode(message: ListOriginGroupsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListOriginGroupsRequest; fromJSON(object: any): ListOriginGroupsRequest; toJSON(message: ListOriginGroupsRequest): unknown; fromPartial, never>>(object: I): ListOriginGroupsRequest; }; export declare const ListOriginGroupsResponse: { encode(message: ListOriginGroupsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListOriginGroupsResponse; fromJSON(object: any): ListOriginGroupsResponse; toJSON(message: ListOriginGroupsResponse): unknown; fromPartial, never>) | undefined; bucket?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; website?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; balancer?: ({ id?: string | undefined; } & { id?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListOriginGroupsResponse; }; export declare const CreateOriginGroupRequest: { encode(message: CreateOriginGroupRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateOriginGroupRequest; fromJSON(object: any): CreateOriginGroupRequest; toJSON(message: CreateOriginGroupRequest): unknown; fromPartial, never>) | undefined; bucket?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; website?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; balancer?: ({ id?: string | undefined; } & { id?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): CreateOriginGroupRequest; }; export declare const CreateOriginGroupMetadata: { encode(message: CreateOriginGroupMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateOriginGroupMetadata; fromJSON(object: any): CreateOriginGroupMetadata; toJSON(message: CreateOriginGroupMetadata): unknown; fromPartial, never>>(object: I): CreateOriginGroupMetadata; }; export declare const UpdateOriginGroupRequest: { encode(message: UpdateOriginGroupRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateOriginGroupRequest; fromJSON(object: any): UpdateOriginGroupRequest; toJSON(message: UpdateOriginGroupRequest): unknown; fromPartial, never>) | undefined; bucket?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; website?: ({ name?: string | undefined; } & { name?: string | undefined; } & Record, never>) | undefined; balancer?: ({ id?: string | undefined; } & { id?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): UpdateOriginGroupRequest; }; export declare const UpdateOriginGroupMetadata: { encode(message: UpdateOriginGroupMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateOriginGroupMetadata; fromJSON(object: any): UpdateOriginGroupMetadata; toJSON(message: UpdateOriginGroupMetadata): unknown; fromPartial, never>>(object: I): UpdateOriginGroupMetadata; }; export declare const DeleteOriginGroupRequest: { encode(message: DeleteOriginGroupRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteOriginGroupRequest; fromJSON(object: any): DeleteOriginGroupRequest; toJSON(message: DeleteOriginGroupRequest): unknown; fromPartial, never>>(object: I): DeleteOriginGroupRequest; }; export declare const DeleteOriginGroupMetadata: { encode(message: DeleteOriginGroupMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteOriginGroupMetadata; fromJSON(object: any): DeleteOriginGroupMetadata; toJSON(message: DeleteOriginGroupMetadata): unknown; fromPartial, never>>(object: I): DeleteOriginGroupMetadata; }; /** Origin Groups management service. */ export declare const OriginGroupServiceService: { /** Gets origin group with specified origin group id. */ readonly get: { readonly path: "/yandex.cloud.cdn.v1.OriginGroupService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetOriginGroupRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetOriginGroupRequest; readonly responseSerialize: (value: OriginGroup) => Buffer; readonly responseDeserialize: (value: Buffer) => OriginGroup; }; /** Lists origins of origin group. */ readonly list: { readonly path: "/yandex.cloud.cdn.v1.OriginGroupService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListOriginGroupsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListOriginGroupsRequest; readonly responseSerialize: (value: ListOriginGroupsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListOriginGroupsResponse; }; /** Creates origin group. */ readonly create: { readonly path: "/yandex.cloud.cdn.v1.OriginGroupService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateOriginGroupRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateOriginGroupRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** * Updates the specified 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 group via a [CacheService.Purge] request. */ readonly update: { readonly path: "/yandex.cloud.cdn.v1.OriginGroupService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateOriginGroupRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateOriginGroupRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Deletes origin group with specified origin group id. */ readonly delete: { readonly path: "/yandex.cloud.cdn.v1.OriginGroupService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteOriginGroupRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteOriginGroupRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; export interface OriginGroupServiceServer extends UntypedServiceImplementation { /** Gets origin group with specified origin group id. */ get: handleUnaryCall; /** Lists origins of origin group. */ list: handleUnaryCall; /** Creates origin group. */ create: handleUnaryCall; /** * Updates the specified 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 group via a [CacheService.Purge] request. */ update: handleUnaryCall; /** Deletes origin group with specified origin group id. */ delete: handleUnaryCall; } export interface OriginGroupServiceClient extends Client { /** Gets origin group with specified origin group id. */ get(request: GetOriginGroupRequest, callback: (error: ServiceError | null, response: OriginGroup) => void): ClientUnaryCall; get(request: GetOriginGroupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: OriginGroup) => void): ClientUnaryCall; get(request: GetOriginGroupRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: OriginGroup) => void): ClientUnaryCall; /** Lists origins of origin group. */ list(request: ListOriginGroupsRequest, callback: (error: ServiceError | null, response: ListOriginGroupsResponse) => void): ClientUnaryCall; list(request: ListOriginGroupsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListOriginGroupsResponse) => void): ClientUnaryCall; list(request: ListOriginGroupsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListOriginGroupsResponse) => void): ClientUnaryCall; /** Creates origin group. */ create(request: CreateOriginGroupRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateOriginGroupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateOriginGroupRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** * Updates the specified 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 group via a [CacheService.Purge] request. */ update(request: UpdateOriginGroupRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateOriginGroupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateOriginGroupRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Deletes origin group with specified origin group id. */ delete(request: DeleteOriginGroupRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteOriginGroupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteOriginGroupRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; } export declare const OriginGroupServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): OriginGroupServiceClient; service: typeof OriginGroupServiceService; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};