///
/// AppIntentInvocation.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 `AppIntentInvocation`, backed by a C++ struct.
 */
public typealias AppIntentInvocation = margelo.nitro.one.AppIntentInvocation

public extension AppIntentInvocation {
  private typealias bridge = margelo.nitro.one.bridge.swift

  /**
   * Create a new instance of `AppIntentInvocation`.
   */
  init(executionId: String, identifier: String, text: String?) {
    self.init(std.string(executionId), std.string(identifier), { () -> bridge.std__optional_std__string_ in
      if let __unwrappedValue = text {
        return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
      } else {
        return .init()
      }
    }())
  }

  @inline(__always)
  var executionId: String {
    return String(self.__executionId)
  }

  @inline(__always)
  var identifier: String {
    return String(self.__identifier)
  }

  @inline(__always)
  var text: String? {
    return { () -> String? in
      if bridge.has_value_std__optional_std__string_(self.__text) {
        let __unwrapped = bridge.get_std__optional_std__string_(self.__text)
        return String(__unwrapped)
      } else {
        return nil
      }
    }()
  }
}
