/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { Job, SparkJob, PysparkJob } from '../../../../yandex/cloud/spark/v1/job'; import { Operation } from '../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.spark.v1"; export interface GetJobRequest { /** ID of the Spark cluster. */ clusterId: string; /** ID of the Spark job to return. */ jobId: string; } export interface ListJobsRequest { /** ID of the cluster to list Spark jobs of. */ clusterId: string; /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `page_size`, the service returns a `next_page_token` that can be used * to get the next page of results in subsequent ListJobs requests. * Acceptable values are 0 to 1000, inclusive. Default value: 100. */ pageSize: number; /** * Page token. Set `page_token` to the `next_page_token` returned by a previous ListJobs * request to get the next page of results. */ pageToken: string; /** String that describes a display filter. */ filter: string; } export interface ListJobsResponse { /** Requested list of Spark jobs. */ jobs: Job[]; /** * This token allows you to get the next page of results for ListJobs 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 ListClusters request. Subsequent ListClusters * requests will have their own `next_page_token` to continue paging through the results. */ nextPageToken: string; } export interface CreateJobRequest { /** ID of the cluster to create Spark job in. */ clusterId: string; /** Optional. Name of the job. */ name: string; sparkJob?: SparkJob | undefined; pysparkJob?: PysparkJob | undefined; } export interface CreateJobMetadata { /** ID of the Spark cluster. */ clusterId: string; /** ID of the Spark job. */ jobId: string; } export interface CancelJobRequest { /** ID of the Spark cluster. */ clusterId: string; /** ID of the Spark job to cancel. */ jobId: string; } export interface ListJobLogRequest { /** ID of the Spark cluster. */ clusterId: string; /** ID of the Spark job to return. */ jobId: string; /** * The maximum length of job output per papge that should be returned. * If the number of available output is larger tha `page_size`, the service returns * a `next_page_token` that can be used to get the next page of job output in subsequent ListLog requests. * Acceptable values are 0 to 1048576. Default value: 1048576. */ pageSize: number; /** * Page token. Set `page_token` to the `next_page_token` returned by a previous ListLog * request to get the next page of results. */ pageToken: string; } export interface ListJobLogResponse { /** Requested part of Spark 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; 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; uiUrl?: string | 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; 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; } & 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 jobs for Spark cluster. */ export declare const JobServiceService: { /** Retrieves a list of jobs for Spark cluster. */ readonly list: { readonly path: "/yandex.cloud.spark.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 Spark cluster. */ readonly create: { readonly path: "/yandex.cloud.spark.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 Spark job. */ readonly get: { readonly path: "/yandex.cloud.spark.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 Spark job. */ readonly listLog: { readonly path: "/yandex.cloud.spark.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 Spark job. */ readonly cancel: { readonly path: "/yandex.cloud.spark.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 Spark cluster. */ list: handleUnaryCall; /** Creates a job for Spark cluster. */ create: handleUnaryCall; /** Returns the specified Spark job. */ get: handleUnaryCall; /** Returns a log for Spark job. */ listLog: handleUnaryCall; /** Cancels the specified Spark job. */ cancel: handleUnaryCall; } export interface JobServiceClient extends Client { /** Retrieves a list of jobs for Spark 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 Spark 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 Spark 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 Spark 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 Spark 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 {};