///
/// QueryCorrelationSamplesWithAnchorResponse.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

import NitroModules

/**
 * Represents an instance of `QueryCorrelationSamplesWithAnchorResponse`, backed by a C++ struct.
 */
public typealias QueryCorrelationSamplesWithAnchorResponse = margelo.nitro.healthkit.QueryCorrelationSamplesWithAnchorResponse

public extension QueryCorrelationSamplesWithAnchorResponse {
  private typealias bridge = margelo.nitro.healthkit.bridge.swift

  /**
   * Create a new instance of `QueryCorrelationSamplesWithAnchorResponse`.
   */
  init(correlations: [CorrelationSample], deletedSamples: [DeletedSample], newAnchor: String) {
    self.init({ () -> bridge.std__vector_CorrelationSample_ in
      var __vector = bridge.create_std__vector_CorrelationSample_(correlations.count)
      for __item in correlations {
        __vector.push_back(__item)
      }
      return __vector
    }(), { () -> bridge.std__vector_DeletedSample_ in
      var __vector = bridge.create_std__vector_DeletedSample_(deletedSamples.count)
      for __item in deletedSamples {
        __vector.push_back(__item)
      }
      return __vector
    }(), std.string(newAnchor))
  }

  @inline(__always)
  var correlations: [CorrelationSample] {
    return self.__correlations.map({ __item in __item })
  }
  
  @inline(__always)
  var deletedSamples: [DeletedSample] {
    return self.__deletedSamples.map({ __item in __item })
  }
  
  @inline(__always)
  var newAnchor: String {
    return String(self.__newAnchor)
  }
}
