import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { Duration } from "../protobuf/duration";
import { Status } from "../rpc/status";
import { Any } from "../protobuf/any";
/**
 * This resource represents a long-running operation that is the result of a
 * network API call.
 *
 * @generated from protobuf message google.longrunning.Operation
 */
export interface Operation {
    /**
     * The server-assigned name, which is only unique within the same service that
     * originally returns it. If you use the default HTTP mapping, the
     * `name` should be a resource name ending with `operations/{unique_id}`.
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
    /**
     * Service-specific metadata associated with the operation.  It typically
     * contains progress information and common metadata such as create time.
     * Some services might not provide such metadata.  Any method that returns a
     * long-running operation should document the metadata type, if any.
     *
     * @generated from protobuf field: google.protobuf.Any metadata = 2;
     */
    metadata?: Any;
    /**
     * If the value is `false`, it means the operation is still in progress.
     * If `true`, the operation is completed, and either `error` or `response` is
     * available.
     *
     * @generated from protobuf field: bool done = 3;
     */
    done: boolean;
    /**
     * @generated from protobuf oneof: result
     */
    result: {
        oneofKind: "error";
        /**
         * The error result of the operation in case of failure or cancellation.
         *
         * @generated from protobuf field: google.rpc.Status error = 4;
         */
        error: Status;
    } | {
        oneofKind: "response";
        /**
         * The normal response of the operation in case of success.  If the original
         * method returns no data on success, such as `Delete`, the response is
         * `google.protobuf.Empty`.  If the original method is standard
         * `Get`/`Create`/`Update`, the response should be the resource.  For other
         * methods, the response should have the type `XxxResponse`, where `Xxx`
         * is the original method name.  For example, if the original method name
         * is `TakeSnapshot()`, the inferred response type is
         * `TakeSnapshotResponse`.
         *
         * @generated from protobuf field: google.protobuf.Any response = 5;
         */
        response: Any;
    } | {
        oneofKind: undefined;
    };
}
/**
 * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
 *
 * @generated from protobuf message google.longrunning.GetOperationRequest
 */
export interface GetOperationRequest {
    /**
     * The name of the operation resource.
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
}
/**
 * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
 *
 * @generated from protobuf message google.longrunning.ListOperationsRequest
 */
export interface ListOperationsRequest {
    /**
     * The name of the operation's parent resource.
     *
     * @generated from protobuf field: string name = 4;
     */
    name: string;
    /**
     * The standard list filter.
     *
     * @generated from protobuf field: string filter = 1;
     */
    filter: string;
    /**
     * The standard list page size.
     *
     * @generated from protobuf field: int32 page_size = 2;
     */
    pageSize: number;
    /**
     * The standard list page token.
     *
     * @generated from protobuf field: string page_token = 3;
     */
    pageToken: string;
}
/**
 * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
 *
 * @generated from protobuf message google.longrunning.ListOperationsResponse
 */
export interface ListOperationsResponse {
    /**
     * A list of operations that matches the specified filter in the request.
     *
     * @generated from protobuf field: repeated google.longrunning.Operation operations = 1;
     */
    operations: Operation[];
    /**
     * The standard List next-page token.
     *
     * @generated from protobuf field: string next_page_token = 2;
     */
    nextPageToken: string;
}
/**
 * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
 *
 * @generated from protobuf message google.longrunning.CancelOperationRequest
 */
export interface CancelOperationRequest {
    /**
     * The name of the operation resource to be cancelled.
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
}
/**
 * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
 *
 * @generated from protobuf message google.longrunning.DeleteOperationRequest
 */
export interface DeleteOperationRequest {
    /**
     * The name of the operation resource to be deleted.
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
}
/**
 * The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
 *
 * @generated from protobuf message google.longrunning.WaitOperationRequest
 */
export interface WaitOperationRequest {
    /**
     * The name of the operation resource to wait on.
     *
     * @generated from protobuf field: string name = 1;
     */
    name: string;
    /**
     * The maximum duration to wait before timing out. If left blank, the wait
     * will be at most the time permitted by the underlying HTTP/RPC protocol.
     * If RPC context deadline is also specified, the shorter one will be used.
     *
     * @generated from protobuf field: google.protobuf.Duration timeout = 2;
     */
    timeout?: Duration;
}
/**
 * A message representing the message types used by a long-running operation.
 *
 * Example:
 *
 *   rpc LongRunningRecognize(LongRunningRecognizeRequest)
 *       returns (google.longrunning.Operation) {
 *     option (google.longrunning.operation_info) = {
 *       response_type: "LongRunningRecognizeResponse"
 *       metadata_type: "LongRunningRecognizeMetadata"
 *     };
 *   }
 *
 * @generated from protobuf message google.longrunning.OperationInfo
 */
export interface OperationInfo {
    /**
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     *
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     *
     * Note: Altering this value constitutes a breaking change.
     *
     * @generated from protobuf field: string response_type = 1;
     */
    responseType: string;
    /**
     * Required. The message name of the metadata type for this long-running
     * operation.
     *
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     *
     * Note: Altering this value constitutes a breaking change.
     *
     * @generated from protobuf field: string metadata_type = 2;
     */
    metadataType: string;
}
declare class Operation$Type extends MessageType<Operation> {
    constructor();
    create(value?: PartialMessage<Operation>): Operation;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operation): Operation;
    internalBinaryWrite(message: Operation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.Operation
 */
export declare const Operation: Operation$Type;
declare class GetOperationRequest$Type extends MessageType<GetOperationRequest> {
    constructor();
    create(value?: PartialMessage<GetOperationRequest>): GetOperationRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetOperationRequest): GetOperationRequest;
    internalBinaryWrite(message: GetOperationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.GetOperationRequest
 */
export declare const GetOperationRequest: GetOperationRequest$Type;
declare class ListOperationsRequest$Type extends MessageType<ListOperationsRequest> {
    constructor();
    create(value?: PartialMessage<ListOperationsRequest>): ListOperationsRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListOperationsRequest): ListOperationsRequest;
    internalBinaryWrite(message: ListOperationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.ListOperationsRequest
 */
export declare const ListOperationsRequest: ListOperationsRequest$Type;
declare class ListOperationsResponse$Type extends MessageType<ListOperationsResponse> {
    constructor();
    create(value?: PartialMessage<ListOperationsResponse>): ListOperationsResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListOperationsResponse): ListOperationsResponse;
    internalBinaryWrite(message: ListOperationsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.ListOperationsResponse
 */
export declare const ListOperationsResponse: ListOperationsResponse$Type;
declare class CancelOperationRequest$Type extends MessageType<CancelOperationRequest> {
    constructor();
    create(value?: PartialMessage<CancelOperationRequest>): CancelOperationRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CancelOperationRequest): CancelOperationRequest;
    internalBinaryWrite(message: CancelOperationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.CancelOperationRequest
 */
export declare const CancelOperationRequest: CancelOperationRequest$Type;
declare class DeleteOperationRequest$Type extends MessageType<DeleteOperationRequest> {
    constructor();
    create(value?: PartialMessage<DeleteOperationRequest>): DeleteOperationRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteOperationRequest): DeleteOperationRequest;
    internalBinaryWrite(message: DeleteOperationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.DeleteOperationRequest
 */
export declare const DeleteOperationRequest: DeleteOperationRequest$Type;
declare class WaitOperationRequest$Type extends MessageType<WaitOperationRequest> {
    constructor();
    create(value?: PartialMessage<WaitOperationRequest>): WaitOperationRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WaitOperationRequest): WaitOperationRequest;
    internalBinaryWrite(message: WaitOperationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.WaitOperationRequest
 */
export declare const WaitOperationRequest: WaitOperationRequest$Type;
declare class OperationInfo$Type extends MessageType<OperationInfo> {
    constructor();
    create(value?: PartialMessage<OperationInfo>): OperationInfo;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OperationInfo): OperationInfo;
    internalBinaryWrite(message: OperationInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message google.longrunning.OperationInfo
 */
export declare const OperationInfo: OperationInfo$Type;
/**
 * @generated ServiceType for protobuf service google.longrunning.Operations
 */
export declare const Operations: ServiceType;
export {};
