import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSDate } from "../Foundation/NSDate.js";
import type { _NSDateInterval } from "../Foundation/NSDateInterval.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _HKDevice } from "./HKDevice.js";
import type { _HKHealthStore } from "./HKHealthStore.js";
import type { _HKQuantity } from "./HKQuantity.js";
import type { _HKQuantityType } from "./HKQuantityType.js";
export declare class _HKQuantitySeriesSampleBuilder extends _NSObject {
    static alloc(): _HKQuantitySeriesSampleBuilder;
    static new(): _HKQuantitySeriesSampleBuilder;
    init(): _HKQuantitySeriesSampleBuilder;
    /**
     * @method initWithHealthStore:quantityType:device: @abstract The designated initializer to create an HKQuantitySeriesSampleBuilder. @discussion The HKHealthStore is retained during the life of the object for the saving of the series data and final return of the series sample. @param healthStore Specifies the HKHealthStore object to use for building the series. @param quantityType Specifies the quantity type for which to build the series. @param startDate The date from which the produced sample(s) start. @param device The optional device represents the HKDevice from which the data is provided.
     */
    initWithHealthStore$quantityType$startDate$device$(healthStore: _HKHealthStore, quantityType: _HKQuantityType, startDate: _NSDate, device: _HKDevice | null): _HKQuantitySeriesSampleBuilder;
    /**
     * @method insertQuantity:dateInterval:completion: @abstract Associate a new quantity with the receiver with a specific date interval. @discussion Use this method to add a quantity to the series. The quantity must have a unit that is compatible with the receiver's quantity type. See -[HKQuantityType isCompatibleWithUnit:]. Note that quantities may be inserted in any order, but will be sorted by dateInterval.startDate when the series is finished. @param quantity The quantity to insert. @param dateInterval The dateInterval associated with the quantity. If dateInterval.startDate is the same as a previously-provided quantity, the new value will replace the old value. An HKErrorInvalidArgument will be returned if dateInterval.startDate is earlier than the receiver's startDate.
     */
    insertQuantity$dateInterval$error$(quantity: _HKQuantity, dateInterval: _NSDateInterval, error: NobjcObject | null): boolean;
    /**
     * @method insertQuantity:date:completion: @abstract Associate a new quantity with the receiver at a specific instantaneous date interval. @discussion This method acts as a convenience for insertQuantity:dateInterval:completion: where dateInterval has a duration of 0. @param quantity The quantity to insert. @param date The start date associated with the quantity. If this is the same start date as a previously-provided quantity, the new value will replace the old value. An HKErrorInvalidArgument will be returned if date is earlier than the receiver's startDate.
     */
    insertQuantity$date$error$(quantity: _HKQuantity, date: _NSDate, error: NobjcObject | null): boolean;
    /**
     * @method finishSeriesWithMetadata:endDate:completion: @abstract Finalizes the series and returns the resulting HKQuantitySample(s). @discussion Call this method when all quantities for the series have been inserted. The completion handler will return the resulting HKQuantitySample(s) Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If no quantity data was added, then samples will be nil and an error will be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error. @param metadata Optional metadata may be added to associate with the series. Predefined keys are found in HKMetadata.h, or custom NSString keys used by the client are allowed. Acceptable metadata value types are NSString, NSDate, NSNumber and HKQuantity. @param endDate Optional date at which the produced sample(s) end. An HKErrorInvalidArgument will be returned if endDate is earlier than the receiver's startDate, or is earlier than the dateInterval.endDate of any inserted quantity. @param completion The completion handler will return the resulting HKQuantitySample(s) for the series. Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If data could not be inserted because of an authorization failure, samples will be nil and and an error with code HKErrorAuthorizationDenied or HKErrorAuthorizationNotDetermined will be returned. If the resulting sample(s) could not be accessed after they have been created, then samples will be nil and an error with code HKErrorDatabaseInaccessible will be returned. Any other error indicates the resulting samples could not be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.
     */
    finishSeriesWithMetadata$endDate$completion$(metadata: _NSDictionary | null, endDate: _NSDate | null, completion: ((samples: _NSArray, error: _NSError) => void) | null): void;
    /**
     * @method finishSeriesWithMetadata:completion: @abstract Finalizes the series and returns the resulting HKQuantitySample(s). @discussion Call this method when all quantities for the series have been inserted. The completion handler will return the resulting HKQuantitySample(s) Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If no quantity data was added, then samples will be nil and an error will be returned. This method functions as a convenience for finishSeriesWithMetadata:endDate:completion: when endDate is nil. After calling this method, the receiver will be considered invalid and calling any other method will result in an error. @param metadata Optional metadata may be added to associate with the series. Predefined keys are found in HKMetadata.h, or custom NSString keys used by the client are allowed. Acceptable metadata value types are NSString, NSDate, NSNumber and HKQuantity. @param completion The completion handler will return the resulting HKQuantitySample(s) for the series. Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If data could not be inserted because of an authorization failure, samples will be nil and and an error with code HKErrorAuthorizationDenied or HKErrorAuthorizationNotDetermined will be returned. If the resulting sample(s) could not be accessed after they have been created, then samples will be nil and an error with code HKErrorDatabaseInaccessible will be returned. Any other error indicates the resulting samples could not be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.
     */
    finishSeriesWithMetadata$completion$(metadata: _NSDictionary | null, completion: ((samples: _NSArray, error: _NSError) => void) | null): void;
    /**
     * @method discard @abstract Discards all previously inserted data and invalidates the series. @discussion Calling this method will delete all quantities that were previously inserted into the series and invalidate the receiver. Calling other methods on the receiver after calling -discard will result in an exception.
     */
    discard(): void;
    /** @property quantityType */
    quantityType(): _HKQuantityType;
    /** @property startDate */
    startDate(): _NSDate;
    /** @property device */
    device(): _HKDevice | null;
}
