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

#pragma once

#include <fbjni/fbjni.h>
#include "WhiteBalanceTemperatureAndTint.hpp"



namespace margelo::nitro::camera {

  using namespace facebook;

  /**
   * The C++ JNI bridge between the C++ struct "WhiteBalanceTemperatureAndTint" and the the Kotlin data class "WhiteBalanceTemperatureAndTint".
   */
  struct JWhiteBalanceTemperatureAndTint final: public jni::JavaClass<JWhiteBalanceTemperatureAndTint> {
  public:
    static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/camera/WhiteBalanceTemperatureAndTint;";

  public:
    /**
     * Convert this Java/Kotlin-based struct to the C++ struct WhiteBalanceTemperatureAndTint by copying all values to C++.
     */
    [[maybe_unused]]
    [[nodiscard]]
    WhiteBalanceTemperatureAndTint toCpp() const {
      static const auto clazz = javaClassStatic();
      static const auto fieldTemperature = clazz->getField<double>("temperature");
      double temperature = this->getFieldValue(fieldTemperature);
      static const auto fieldTint = clazz->getField<double>("tint");
      double tint = this->getFieldValue(fieldTint);
      return WhiteBalanceTemperatureAndTint(
        temperature,
        tint
      );
    }

  public:
    /**
     * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
     */
    [[maybe_unused]]
    static jni::local_ref<JWhiteBalanceTemperatureAndTint::javaobject> fromCpp(const WhiteBalanceTemperatureAndTint& value) {
      using JSignature = JWhiteBalanceTemperatureAndTint(double, double);
      static const auto clazz = javaClassStatic();
      static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
      return create(
        clazz,
        value.temperature,
        value.tint
      );
    }
  };

} // namespace margelo::nitro::camera
