/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { Job, MapreduceJob, SparkJob, PysparkJob, HiveJob } from '../../../../yandex/cloud/dataproc/v1/job'; import { Operation } from '../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.dataproc.v1"; export interface GetJobRequest { /** ID of the cluster to request a job from. */ clusterId: string; /** * ID of the job to return. * * To get a job ID make a [JobService.List] request. */ jobId: string; } export interface ListJobsRequest { /** ID of the cluster to list jobs for. */ clusterId: 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 [ListJobsResponse.next_page_token] * that can be used to get the next page of results in subsequent list requests. * Default value: 100. */ pageSize: number; /** * Page token. To get the next page of results, set `page_token` to the * [ListJobsResponse.next_page_token] returned by a previous list request. */ pageToken: string; /** * A filter expression that filters jobs listed in the response. * * The expression must specify: * 1. The field name. Currently you can use filtering only on [Job.name] field. * 2. An `=` operator. * 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`. * Example of a filter: `name=my-job`. */ filter: string; } export interface ListJobsResponse { /** List of jobs for the specified cluster. */ jobs: Job[]; /** * Token for getting the next page of the list. If the number of results is greater than * the specified [ListJobsRequest.page_size], use `next_page_token` as the value * for the [ListJobsRequest.page_token] parameter in the next list request. * * Each subsequent page will have its own `next_page_token` to continue paging through the results. */ nextPageToken: string; } export interface CreateJobRequest { /** ID of the cluster to create a job for. */ clusterId: string; /** Name of the job. */ name: string; /** Specification for a MapReduce job. */ mapreduceJob?: MapreduceJob | undefined; /** Specification for a Spark job. */ sparkJob?: SparkJob | undefined; /** Specification for a PySpark job. */ pysparkJob?: PysparkJob | undefined; /** Specification for a Hive job. */ hiveJob?: HiveJob | undefined; } export interface CreateJobMetadata { /** ID of the cluster that the job is being created for. */ clusterId: string; /** ID of the job being created. */ jobId: string; } export interface CancelJobRequest { /** Required. ID of the Yandex Data Processing cluster. */ clusterId: string; /** Required. ID of the Yandex Data Processing job to cancel. */ jobId: string; } export interface ListJobLogRequest { /** ID of the cluster that the job is being created for. */ clusterId: string; /** ID of the job being created. */ jobId: string; /** * The maximum bytes of job log per response to return. If the number of available * bytes is larger than [page_size], the service returns a [ListJobLogResponse.next_page_token] * that can be used to get the next page of output in subsequent list requests. * Default value: 1048576. */ pageSize: number; /** * Page token. To get the next page of results, set `page_token` to the * [ListJobLogResponse.next_page_token] returned by a previous list request. */ pageToken: string; } export interface ListJobLogResponse { /** Requested part of Yandex Data Processing Job log. */ content: string; /** * This token allows you to get the next page of results for ListLog requests, * if the number of results is larger than `page_size` specified in the request. * To get the next page, specify the value of `next_page_token` as a value for * the `page_token` parameter in the next ListLog request. Subsequent ListLog * requests will have their own `next_page_token` to continue paging through the results. */ nextPageToken: string; } export declare const GetJobRequest: { encode(message: GetJobRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetJobRequest; fromJSON(object: any): GetJobRequest; toJSON(message: GetJobRequest): unknown; fromPartial, never>>(object: I): GetJobRequest; }; export declare const ListJobsRequest: { encode(message: ListJobsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListJobsRequest; fromJSON(object: any): ListJobsRequest; toJSON(message: ListJobsRequest): unknown; fromPartial, never>>(object: I): ListJobsRequest; }; export declare const ListJobsResponse: { encode(message: ListJobsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListJobsResponse; fromJSON(object: any): ListJobsResponse; toJSON(message: ListJobsResponse): unknown; fromPartial, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; } & Record, never>) | undefined; sparkJob?: ({ args?: string[] | undefined; jarFileUris?: string[] | undefined; fileUris?: string[] | undefined; archiveUris?: string[] | undefined; properties?: { [x: string]: string | undefined; } | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; packages?: string[] | undefined; repositories?: string[] | undefined; excludePackages?: string[] | undefined; } & { args?: (string[] & string[] & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; packages?: (string[] & string[] & Record, never>) | undefined; repositories?: (string[] & string[] & Record, never>) | undefined; excludePackages?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; pysparkJob?: ({ args?: string[] | undefined; jarFileUris?: string[] | undefined; fileUris?: string[] | undefined; archiveUris?: string[] | undefined; properties?: { [x: string]: string | undefined; } | undefined; mainPythonFileUri?: string | undefined; pythonFileUris?: string[] | undefined; packages?: string[] | undefined; repositories?: string[] | undefined; excludePackages?: string[] | undefined; } & { args?: (string[] & string[] & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainPythonFileUri?: string | undefined; pythonFileUris?: (string[] & string[] & Record, never>) | undefined; packages?: (string[] & string[] & Record, never>) | undefined; repositories?: (string[] & string[] & Record, never>) | undefined; excludePackages?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; hiveJob?: ({ properties?: { [x: string]: string | undefined; } | undefined; continueOnFailure?: boolean | undefined; scriptVariables?: { [x: string]: string | undefined; } | undefined; jarFileUris?: string[] | undefined; queryFileUri?: string | undefined; queryList?: { queries?: string[] | undefined; } | undefined; } & { properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; continueOnFailure?: boolean | undefined; scriptVariables?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; queryFileUri?: string | undefined; queryList?: ({ queries?: string[] | undefined; } & { queries?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; applicationInfo?: ({ id?: string | undefined; applicationAttempts?: { id?: string | undefined; amContainerId?: string | undefined; }[] | undefined; } & { id?: string | undefined; applicationAttempts?: ({ id?: string | undefined; amContainerId?: string | undefined; }[] & ({ id?: string | undefined; amContainerId?: string | undefined; } & { id?: string | undefined; amContainerId?: string | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListJobsResponse; }; export declare const CreateJobRequest: { encode(message: CreateJobRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateJobRequest; fromJSON(object: any): CreateJobRequest; toJSON(message: CreateJobRequest): unknown; fromPartial, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; } & Record, never>) | undefined; sparkJob?: ({ args?: string[] | undefined; jarFileUris?: string[] | undefined; fileUris?: string[] | undefined; archiveUris?: string[] | undefined; properties?: { [x: string]: string | undefined; } | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; packages?: string[] | undefined; repositories?: string[] | undefined; excludePackages?: string[] | undefined; } & { args?: (string[] & string[] & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainJarFileUri?: string | undefined; mainClass?: string | undefined; packages?: (string[] & string[] & Record, never>) | undefined; repositories?: (string[] & string[] & Record, never>) | undefined; excludePackages?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; pysparkJob?: ({ args?: string[] | undefined; jarFileUris?: string[] | undefined; fileUris?: string[] | undefined; archiveUris?: string[] | undefined; properties?: { [x: string]: string | undefined; } | undefined; mainPythonFileUri?: string | undefined; pythonFileUris?: string[] | undefined; packages?: string[] | undefined; repositories?: string[] | undefined; excludePackages?: string[] | undefined; } & { args?: (string[] & string[] & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; fileUris?: (string[] & string[] & Record, never>) | undefined; archiveUris?: (string[] & string[] & Record, never>) | undefined; properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; mainPythonFileUri?: string | undefined; pythonFileUris?: (string[] & string[] & Record, never>) | undefined; packages?: (string[] & string[] & Record, never>) | undefined; repositories?: (string[] & string[] & Record, never>) | undefined; excludePackages?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; hiveJob?: ({ properties?: { [x: string]: string | undefined; } | undefined; continueOnFailure?: boolean | undefined; scriptVariables?: { [x: string]: string | undefined; } | undefined; jarFileUris?: string[] | undefined; queryFileUri?: string | undefined; queryList?: { queries?: string[] | undefined; } | undefined; } & { properties?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; continueOnFailure?: boolean | undefined; scriptVariables?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; jarFileUris?: (string[] & string[] & Record, never>) | undefined; queryFileUri?: string | undefined; queryList?: ({ queries?: string[] | undefined; } & { queries?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): CreateJobRequest; }; export declare const CreateJobMetadata: { encode(message: CreateJobMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateJobMetadata; fromJSON(object: any): CreateJobMetadata; toJSON(message: CreateJobMetadata): unknown; fromPartial, never>>(object: I): CreateJobMetadata; }; export declare const CancelJobRequest: { encode(message: CancelJobRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CancelJobRequest; fromJSON(object: any): CancelJobRequest; toJSON(message: CancelJobRequest): unknown; fromPartial, never>>(object: I): CancelJobRequest; }; export declare const ListJobLogRequest: { encode(message: ListJobLogRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListJobLogRequest; fromJSON(object: any): ListJobLogRequest; toJSON(message: ListJobLogRequest): unknown; fromPartial, never>>(object: I): ListJobLogRequest; }; export declare const ListJobLogResponse: { encode(message: ListJobLogResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListJobLogResponse; fromJSON(object: any): ListJobLogResponse; toJSON(message: ListJobLogResponse): unknown; fromPartial, never>>(object: I): ListJobLogResponse; }; /** A set of methods for managing Yandex Data Processing jobs. */ export declare const JobServiceService: { /** Retrieves a list of jobs for a cluster. */ readonly list: { readonly path: "/yandex.cloud.dataproc.v1.JobService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListJobsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListJobsRequest; readonly responseSerialize: (value: ListJobsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListJobsResponse; }; /** Creates a job for a cluster. */ readonly create: { readonly path: "/yandex.cloud.dataproc.v1.JobService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateJobRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateJobRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Returns the specified job. */ readonly get: { readonly path: "/yandex.cloud.dataproc.v1.JobService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetJobRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetJobRequest; readonly responseSerialize: (value: Job) => Buffer; readonly responseDeserialize: (value: Buffer) => Job; }; /** Returns a log for specified job. */ readonly listLog: { readonly path: "/yandex.cloud.dataproc.v1.JobService/ListLog"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListJobLogRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListJobLogRequest; readonly responseSerialize: (value: ListJobLogResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListJobLogResponse; }; /** Cancels the specified Yandex Data Processing job. */ readonly cancel: { readonly path: "/yandex.cloud.dataproc.v1.JobService/Cancel"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CancelJobRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CancelJobRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; export interface JobServiceServer extends UntypedServiceImplementation { /** Retrieves a list of jobs for a cluster. */ list: handleUnaryCall; /** Creates a job for a cluster. */ create: handleUnaryCall; /** Returns the specified job. */ get: handleUnaryCall; /** Returns a log for specified job. */ listLog: handleUnaryCall; /** Cancels the specified Yandex Data Processing job. */ cancel: handleUnaryCall; } export interface JobServiceClient extends Client { /** Retrieves a list of jobs for a cluster. */ list(request: ListJobsRequest, callback: (error: ServiceError | null, response: ListJobsResponse) => void): ClientUnaryCall; list(request: ListJobsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListJobsResponse) => void): ClientUnaryCall; list(request: ListJobsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListJobsResponse) => void): ClientUnaryCall; /** Creates a job for a cluster. */ create(request: CreateJobRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateJobRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateJobRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Returns the specified job. */ get(request: GetJobRequest, callback: (error: ServiceError | null, response: Job) => void): ClientUnaryCall; get(request: GetJobRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Job) => void): ClientUnaryCall; get(request: GetJobRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Job) => void): ClientUnaryCall; /** Returns a log for specified job. */ listLog(request: ListJobLogRequest, callback: (error: ServiceError | null, response: ListJobLogResponse) => void): ClientUnaryCall; listLog(request: ListJobLogRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListJobLogResponse) => void): ClientUnaryCall; listLog(request: ListJobLogRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListJobLogResponse) => void): ClientUnaryCall; /** Cancels the specified Yandex Data Processing job. */ cancel(request: CancelJobRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; cancel(request: CancelJobRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; cancel(request: CancelJobRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; } export declare const JobServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): JobServiceClient; service: typeof JobServiceService; }; 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 {};
= P extends Builtin ? P : P & { [K in keyof P]: Exact
; } & Record>, never>; export {};