// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.134.4 clang-1400.0.29.51)
// swift-module-flags: -target arm64e-apple-macos13.1 -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftHealthKit -swift-version 5 -enforce-exclusivity=checked -O -library-level api -module-name HealthKit
// swift-module-flags-ignorable: -enable-bare-slash-regex -user-module-version 3232.2.1.14
import CoreLocation
import Foundation
@_exported import HealthKit
import Swift
import _Concurrency
import _StringProcessing
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKAnchoredObjectQueryDescriptor<Sample> where Sample : HealthKit.HKSample {
  public var predicates: [HealthKit.HKSamplePredicate<Sample>] {
    get
    set
  }
  public var anchor: HealthKit.HKQueryAnchor?
  public var limit: Swift.Int?
  public struct Result {
    public let addedSamples: [Sample]
    public let deletedObjects: [HealthKit.HKDeletedObject]
    public let newAnchor: HealthKit.HKQueryAnchor
  }
  public init(predicates: [HealthKit.HKSamplePredicate<Sample>], anchor: HealthKit.HKQueryAnchor?, limit: Swift.Int? = nil)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKAnchoredObjectQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Result
  #endif
  public typealias Output = HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Result
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKAnchoredObjectQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Result
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      #if compiler(>=5.3) && $AsyncAwait
      public mutating func next() async throws -> HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results.Element?
      #endif
      public typealias Element = HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKAnchoredObjectQueryDescriptor<Sample>.Results
  #endif
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKStatisticsQueryDescriptor {
  public var predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>
  public var options: HealthKit.HKStatisticsOptions
  public init(predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>, options: HealthKit.HKStatisticsOptions)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKStatisticsQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> HealthKit.HKStatistics?
  #endif
  public typealias Output = HealthKit.HKStatistics?
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
@usableFromInline
@frozen internal struct _AsyncBytesBuffer {
  internal var storage: Swift.AnyObject?
  @usableFromInline
  internal var nextPointer: Swift.UnsafeRawPointer
  @usableFromInline
  internal var endPointer: Swift.UnsafeRawPointer
  internal var totalBytesRead: Swift.Int = 0
  #if compiler(>=5.3) && $AsyncAwait
  @usableFromInline
  internal init(capacity: Swift.Int, readFunction: @escaping (Swift.UnsafeMutableRawBufferPointer, Swift.Int) async throws -> Swift.Int)
  #endif
  #if compiler(>=5.3) && $AsyncAwait
  @usableFromInline
  @inline(never) internal mutating func reloadBufferAndNext() async throws -> Swift.UInt8?
  #endif
  #if compiler(>=5.3) && $AsyncAwait
  @inlinable @inline(__always) internal mutating func next() async throws -> Swift.UInt8? {
        if _fastPath(nextPointer != endPointer) {
            let byte = nextPointer.load(fromByteOffset: 0, as: UInt8.self)
            nextPointer += 1
            return byte
        }
        return try await reloadBufferAndNext()
    }
  #endif
}
#if compiler(>=5.3) && $RethrowsProtocol
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
public struct BufferedAsyncByteIterator : _Concurrency.AsyncIteratorProtocol {
  public typealias Element = Swift.UInt8
  @usableFromInline
  internal var buffer: HealthKit._AsyncBytesBuffer
  #if compiler(>=5.3) && $AsyncAwait
  @inlinable @inline(__always) public mutating func next() async throws -> Swift.UInt8? {
        return try await buffer.next()
    }
  #endif
}
#endif
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKActivitySummaryQueryDescriptor {
  public var predicate: Foundation.NSPredicate?
  public init(predicate: Foundation.NSPredicate?)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKActivitySummaryQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> [HealthKit.HKActivitySummary]
  #endif
  public typealias Output = [HealthKit.HKActivitySummary]
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKActivitySummaryQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = [HealthKit.HKActivitySummary]
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      #if compiler(>=5.3) && $AsyncAwait
      public mutating func next() async throws -> HealthKit.HKActivitySummaryQueryDescriptor.Results.Element?
      #endif
      public typealias Element = HealthKit.HKActivitySummaryQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKActivitySummaryQueryDescriptor.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKActivitySummaryQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKActivitySummaryQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKActivitySummaryQueryDescriptor.Results
  #endif
}
extension HealthKit.HKCategoryType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKCategoryTypeIdentifier)
}
extension HealthKit.HKCharacteristicType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKCharacteristicTypeIdentifier)
}
@available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
extension HealthKit.HKClinicalType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKClinicalTypeIdentifier)
}
extension HealthKit.HKCorrelationType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKCorrelationTypeIdentifier)
}
extension HealthKit.HKDocumentType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKDocumentTypeIdentifier)
}
extension HealthKit.HKQuantityType {
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  convenience public init(_ identifier: HealthKit.HKQuantityTypeIdentifier)
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
public protocol HKCategoryValuePredicateProviding : Swift.Hashable, Swift.RawRepresentable {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValuePredicateProviding where Self.RawValue == Swift.Int {
  public static func predicateForSamples(_ operatorType: Foundation.NSComparisonPredicate.Operator, value: Self) -> Foundation.NSPredicate
  public static func predicateForSamples(equalTo values: Swift.Set<Self>) -> Foundation.NSPredicate
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValue : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueAppetiteChanges : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueAppleStandHour : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueAppleWalkingSteadinessEvent : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueCervicalMucusQuality : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueContraceptive : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueEnvironmentalAudioExposureEvent : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueHeadphoneAudioExposureEvent : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueLowCardioFitnessEvent : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueMenstrualFlow : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueOvulationTestResult : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValuePregnancyTestResult : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValuePresence : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueProgesteroneTestResult : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueSeverity : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueSleepAnalysis : HealthKit.HKCategoryValuePredicateProviding {
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKCategoryValueSleepAnalysis {
  public static var allAsleepValues: Swift.Set<HealthKit.HKCategoryValueSleepAnalysis> {
    get
  }
}
@available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
extension HealthKit.HKAppleWalkingSteadinessClassification {
  public init(for appleWalkingSteadiness: HealthKit.HKQuantity) throws
  public var minimum: HealthKit.HKQuantity {
    get
  }
  public var maximum: HealthKit.HKQuantity {
    get
  }
}
@available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
extension HealthKit.HKAppleWalkingSteadinessClassification : Swift.CaseIterable {
  public static var allCases: [HealthKit.HKAppleWalkingSteadinessClassification] {
    get
  }
  public typealias AllCases = [HealthKit.HKAppleWalkingSteadinessClassification]
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKHeartbeatSeriesQueryDescriptor {
  public var sample: HealthKit.HKHeartbeatSeriesSample
  public init(_ sample: HealthKit.HKHeartbeatSeriesSample)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKHeartbeatSeriesQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  public struct Heartbeat : Swift.Equatable, Swift.Hashable {
    public let timeIntervalSinceStart: Foundation.TimeInterval
    public let precededByGap: Swift.Bool
    public static func == (a: HealthKit.HKHeartbeatSeriesQueryDescriptor.Heartbeat, b: HealthKit.HKHeartbeatSeriesQueryDescriptor.Heartbeat) -> Swift.Bool
    public func hash(into hasher: inout Swift.Hasher)
    public var hashValue: Swift.Int {
      get
    }
  }
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = HealthKit.HKHeartbeatSeriesQueryDescriptor.Heartbeat
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      @usableFromInline
      internal var heartbeatIterator: HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.HeartbeatIterator?
      #if compiler(>=5.3) && $AsyncAwait
      @usableFromInline
      internal mutating func nextHeartbeatIterator() async throws -> HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.HeartbeatIterator?
      #endif
      #if compiler(>=5.3) && $AsyncAwait
      @inlinable public mutating func next() async throws -> HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.Element? {
                // Dequeue a heartbeat from the current batch iterator. If there is no current iterator or the current
                // iterator is exhausted then await the next batch.
                guard let next = heartbeatIterator?.next() else {
                    heartbeatIterator = try await nextHeartbeatIterator()
                    return heartbeatIterator?.next()
                }
                return next
            }
      #endif
      public typealias Element = HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.Iterator
    @usableFromInline
    internal struct HeartbeatIterator : Swift.IteratorProtocol {
      @usableFromInline
      internal mutating func next() -> HealthKit.HKHeartbeatSeriesQueryDescriptor.Heartbeat?
      @usableFromInline
      internal typealias Element = HealthKit.HKHeartbeatSeriesQueryDescriptor.Heartbeat
    }
    public typealias AsyncIterator = HealthKit.HKHeartbeatSeriesQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKHeartbeatSeriesQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKHeartbeatSeriesQueryDescriptor.Results
  #endif
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKSourceQueryDescriptor<Sample> where Sample : HealthKit.HKSample {
  public var predicate: HealthKit.HKSamplePredicate<Sample>
  public init(predicate: HealthKit.HKSamplePredicate<Sample>)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKSourceQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> [HealthKit.HKSource]
  #endif
  public typealias Output = [HealthKit.HKSource]
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKSamplePredicate<Sample> : Swift.Equatable, Swift.Hashable where Sample : HealthKit.HKSample {
  public let sampleType: HealthKit.HKSampleType
  public let nsPredicate: Foundation.NSPredicate?
  public static func audiogram(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKAudiogramSample>
  public static func categorySample(type categoryType: HealthKit.HKCategoryType, predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKCategorySample>
  @available(watchOS, unavailable)
  public static func clinicalRecord(type clinicalType: HealthKit.HKClinicalType, predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKClinicalRecord>
  public static func correlation(type correlationType: HealthKit.HKCorrelationType, predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKCorrelation>
  public static func electrocardiogram(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKElectrocardiogram>
  public static func heartbeatSeries(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKHeartbeatSeriesSample>
  public static func quantitySample(type quantityType: HealthKit.HKQuantityType, predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>
  public static func sample(type sampleType: HealthKit.HKSampleType, predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKSample>
  public static func workout(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKWorkout>
  public static func workoutRoute(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKWorkoutRoute>
  public static func == (a: HealthKit.HKSamplePredicate<Sample>, b: HealthKit.HKSamplePredicate<Sample>) -> Swift.Bool
  public func hash(into hasher: inout Swift.Hasher)
  public var hashValue: Swift.Int {
    get
  }
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKSamplePredicate {
  public static func visionPrescription(_ predicate: Foundation.NSPredicate? = nil) -> HealthKit.HKSamplePredicate<HealthKit.HKVisionPrescription>
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKAttachmentStore {
  public func addAttachment(to object: HealthKit.HKObject, name: Swift.String, contentType: UniformTypeIdentifiers.UTType, url: Foundation.URL, metadata: [Swift.String : Any] = [:], completion: @escaping (HealthKit.HKAttachment?, Swift.Error?) -> Swift.Void)
  #if compiler(>=5.3) && $AsyncAwait
  public func addAttachment(to object: HealthKit.HKObject, name: Swift.String, contentType: UniformTypeIdentifiers.UTType, url: Foundation.URL, metadata: [Swift.String : Any] = [:]) async throws -> HealthKit.HKAttachment
  #endif
  public func dataReader(for attachment: HealthKit.HKAttachment) -> HealthKit.HKAttachmentDataReader
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKElectrocardiogramQueryDescriptor {
  public var electrocardiogram: HealthKit.HKElectrocardiogram
  public init(_ electrocardiogram: HealthKit.HKElectrocardiogram)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKElectrocardiogramQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = HealthKit.HKElectrocardiogram.VoltageMeasurement
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      #if compiler(>=5.3) && $AsyncAwait
      @inlinable public mutating func next() async throws -> HealthKit.HKElectrocardiogramQueryDescriptor.Results.Element? {
                // Dequeue a voltage measurement from the current enumerator. If there is no current enumerator or the
                // current enumerator is exhausted then await the next batch.
                guard let next = nextMeasurement() else {
                    try await awaitMeasurementEnumerator()
                    return nextMeasurement()
                }
                return next
            }
      #endif
      @usableFromInline
      internal func nextMeasurement() -> HealthKit.HKElectrocardiogram.VoltageMeasurement?
      #if compiler(>=5.3) && $AsyncAwait
      @usableFromInline
      internal mutating func awaitMeasurementEnumerator() async throws
      #endif
      public typealias Element = HealthKit.HKElectrocardiogramQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKElectrocardiogramQueryDescriptor.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKElectrocardiogramQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKElectrocardiogramQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKElectrocardiogramQueryDescriptor.Results
  #endif
}
@available(iOS 15.4, macCatalyst 15.4, macOS 13.0, *)
@available(watchOS, unavailable)
public struct HKVerifiableClinicalRecordQueryDescriptor {
  public var recordTypes: [HealthKit.HKVerifiableClinicalRecordCredentialType]
  public var sourceTypes: [HealthKit.HKVerifiableClinicalRecordSourceType]
  public var predicate: Foundation.NSPredicate?
  public init(recordTypes: [HealthKit.HKVerifiableClinicalRecordCredentialType], sourceTypes: [HealthKit.HKVerifiableClinicalRecordSourceType], predicate: Foundation.NSPredicate? = nil)
}
@available(iOS 15.4, macCatalyst 15.4, macOS 13.0, *)
@available(watchOS, unavailable)
extension HealthKit.HKVerifiableClinicalRecordQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> [HealthKit.HKVerifiableClinicalRecord]
  #endif
  public typealias Output = [HealthKit.HKVerifiableClinicalRecord]
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKWorkoutRouteQueryDescriptor {
  public var workoutRoute: HealthKit.HKWorkoutRoute
  public init(_ workoutRoute: HealthKit.HKWorkoutRoute)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKWorkoutRouteQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = CoreLocation.CLLocation
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      @usableFromInline
      internal var locationIterator: Swift.Array<CoreLocation.CLLocation>.Iterator?
      #if compiler(>=5.3) && $AsyncAwait
      @usableFromInline
      internal mutating func nextLocationIterator() async throws -> Swift.Array<CoreLocation.CLLocation>.Iterator?
      #endif
      #if compiler(>=5.3) && $AsyncAwait
      @inlinable public mutating func next() async throws -> HealthKit.HKWorkoutRouteQueryDescriptor.Results.Element? {
                // Dequeue a location from the current batch iterator. If there is no current iterator or the current
                // iterator is exhausted then await the next batch.
                guard let next = locationIterator?.next() else {
                    locationIterator = try await nextLocationIterator()
                    return locationIterator?.next()
                }
                return next
            }
      #endif
      public typealias Element = HealthKit.HKWorkoutRouteQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKWorkoutRouteQueryDescriptor.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKWorkoutRouteQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKWorkoutRouteQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKWorkoutRouteQueryDescriptor.Results
  #endif
}
extension HealthKit.HKHealthStore {
  #if compiler(>=5.3) && $AsyncAwait
  @available(iOS 15.0, watchOS 8.0, macCatalyst 15.0, macOS 13.0, *)
  public func requestAuthorization(toShare typesToShare: Swift.Set<HealthKit.HKSampleType>, read typesToRead: Swift.Set<HealthKit.HKObjectType>) async throws
  #endif
}
@available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
extension HealthKit.HKAttachment {
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct AsyncBytes : _Concurrency.AsyncSequence {
    public typealias Element = Swift.UInt8
    public func makeAsyncIterator() -> HealthKit.BufferedAsyncByteIterator
    public typealias AsyncIterator = HealthKit.BufferedAsyncByteIterator
  }
  #endif
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKStatisticsCollectionQueryDescriptor {
  public var predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>
  public var options: HealthKit.HKStatisticsOptions
  public var anchorDate: Foundation.Date
  public var intervalComponents: Foundation.DateComponents
  public init(predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>, options: HealthKit.HKStatisticsOptions, anchorDate: Foundation.Date, intervalComponents: Foundation.DateComponents)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKStatisticsCollectionQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> HealthKit.HKStatisticsCollection
  #endif
  public typealias Output = HealthKit.HKStatisticsCollection
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKStatisticsCollectionQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  public struct Result {
    public let statisticsCollection: HealthKit.HKStatisticsCollection
    public let updatedStatistics: [HealthKit.HKStatistics]?
  }
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = HealthKit.HKStatisticsCollectionQueryDescriptor.Result
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      #if compiler(>=5.3) && $AsyncAwait
      public mutating func next() async throws -> HealthKit.HKStatisticsCollectionQueryDescriptor.Results.Element?
      #endif
      public typealias Element = HealthKit.HKStatisticsCollectionQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKStatisticsCollectionQueryDescriptor.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKStatisticsCollectionQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKStatisticsCollectionQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKStatisticsCollectionQueryDescriptor.Results
  #endif
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public protocol HKAsyncQuery {
  associatedtype Output
  #if compiler(>=5.3) && $AsyncAwait
  func result(for healthStore: HealthKit.HKHealthStore) async throws -> Self.Output
  #endif
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public protocol HKAsyncSequenceQuery {
  associatedtype Sequence : _Concurrency.AsyncSequence
  func results(for healthStore: HealthKit.HKHealthStore) -> Self.Sequence
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKSampleQueryDescriptor<Sample> where Sample : HealthKit.HKSample {
  public var predicates: [HealthKit.HKSamplePredicate<Sample>] {
    get
    set
  }
  public var sortDescriptors: [Foundation.SortDescriptor<Sample>]
  public var limit: Swift.Int?
  public init(predicates: [HealthKit.HKSamplePredicate<Sample>], sortDescriptors: [Foundation.SortDescriptor<Sample>], limit: Swift.Int? = nil)
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKSampleQueryDescriptor : HealthKit.HKAsyncQuery {
  #if compiler(>=5.3) && $AsyncAwait
  public func result(for healthStore: HealthKit.HKHealthStore) async throws -> [Sample]
  #endif
  public typealias Output = [Sample]
}
@_hasMissingDesignatedInitializers @available(iOS 16.0, watchOS 9.0, macCatalyst 16.0, macOS 13.0, *)
public class HKAttachmentDataReader {
  public var attachment: HealthKit.HKAttachment {
    get
  }
  public var progress: Foundation.Progress {
    get
  }
  #if compiler(>=5.3) && $EffectfulProp
  public var data: Foundation.Data {
    get async throws
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public var bytes: HealthKit.HKAttachment.AsyncBytes {
    get
  }
  #endif
  @objc deinit
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
public struct HKQuantitySeriesSampleQueryDescriptor {
  public var predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>
  public struct Options : Swift.OptionSet {
    public static let includeSample: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options
    public static let orderByQuantitySampleStartDate: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options
    public let rawValue: Swift.Int
    public init(rawValue: Swift.Int)
    public typealias ArrayLiteralElement = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options
    public typealias Element = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options
    public typealias RawValue = Swift.Int
  }
  public var options: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options
  public init(predicate: HealthKit.HKSamplePredicate<HealthKit.HKQuantitySample>, options: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Options = [])
}
@available(iOS 15.4, watchOS 8.5, macCatalyst 15.4, macOS 13.0, *)
extension HealthKit.HKQuantitySeriesSampleQueryDescriptor : HealthKit.HKAsyncSequenceQuery {
  public struct Result : Swift.Equatable, Swift.Hashable {
    public let quantity: HealthKit.HKQuantity
    public let dateInterval: Foundation.DateInterval
    public let sample: HealthKit.HKQuantitySample?
    public static func == (a: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Result, b: HealthKit.HKQuantitySeriesSampleQueryDescriptor.Result) -> Swift.Bool
    public func hash(into hasher: inout Swift.Hasher)
    public var hashValue: Swift.Int {
      get
    }
  }
  #if compiler(>=5.3) && $RethrowsProtocol
  public struct Results : _Concurrency.AsyncSequence {
    public typealias Element = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Result
    public struct Iterator : _Concurrency.AsyncIteratorProtocol {
      @usableFromInline
      internal var resultIterator: Swift.Array<HealthKit.HKQuantitySeriesSampleQueryDescriptor.Result>.Iterator?
      #if compiler(>=5.3) && $AsyncAwait
      @inlinable public mutating func next() async throws -> HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results.Element? {
                // Dequeue a result from the current iterator. If there is no current iterator or the current iterator
                // is exhausted then await the next batch.
                guard let next = resultIterator?.next() else {
                    resultIterator = try await nextResultIterator()
                    return resultIterator?.next()
                }
                return next
            }
      #endif
      #if compiler(>=5.3) && $AsyncAwait
      @usableFromInline
      internal mutating func nextResultIterator() async throws -> Swift.Array<HealthKit.HKQuantitySeriesSampleQueryDescriptor.Result>.Iterator?
      #endif
      public typealias Element = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results.Element
    }
    public func makeAsyncIterator() -> HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results.Iterator
    public typealias AsyncIterator = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results.Iterator
  }
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public func results(for healthStore: HealthKit.HKHealthStore) -> HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results
  #endif
  #if compiler(>=5.3) && $RethrowsProtocol
  public typealias Sequence = HealthKit.HKQuantitySeriesSampleQueryDescriptor.Results
  #endif
}
@available(iOS 14.0, watchOS 7.0, macCatalyst 14.0, macOS 13.0, *)
extension HealthKit.HKElectrocardiogramQuery {
  public enum Result {
    case measurement(HealthKit.HKElectrocardiogram.VoltageMeasurement)
    case error(Swift.Error)
    case done
  }
  convenience public init(_ ecg: HealthKit.HKElectrocardiogram, dataHandler: @escaping (HealthKit.HKElectrocardiogramQuery, HealthKit.HKElectrocardiogramQuery.Result) -> Swift.Void)
}
