// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:tencent_live_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class TXGenerateResult extends NSObject  {
  //region constants
  static const String name__ = 'TXGenerateResult';

  
  //endregion

  //region creators
  static Future<TXGenerateResult> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXGenerateResult', {'init': init});
    final object = TXGenerateResult()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXGenerateResult>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchTXGenerateResult', {'length': length, 'init': init});
  
    final List<TXGenerateResult> typedResult = resultBatch.map((result) => TXGenerateResult()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<TXGenerateResultCode> get_retCode() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXGenerateResult::get_retCode", {'__this__': this});
    return __result__ == null ? null : ((__result__ as int).toTXGenerateResultCode());
  }
  
  Future<String> get_descMsg() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXGenerateResult::get_descMsg", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_retCode(TXGenerateResultCode retCode) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXGenerateResult::set_retCode', <String, dynamic>{'__this__': this, "retCode": retCode.toValue()});
  
  
  }
  
  Future<void> set_descMsg(String descMsg) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXGenerateResult::set_descMsg', <String, dynamic>{'__this__': this, "descMsg": descMsg});
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}

extension TXGenerateResult_Batch on List<TXGenerateResult> {
  //region getters
  Future<List<TXGenerateResultCode>> get_retCode_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXGenerateResult::get_retCode_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => (__result__ as int).toTXGenerateResultCode()).toList();
    return typedResult;
  }
  
  Future<List<String>> get_descMsg_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXGenerateResult::get_descMsg_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_retCode_batch(List<TXGenerateResultCode> retCode) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXGenerateResult::set_retCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "retCode": retCode[__i__].toValue()}]);
  
  
  }
  
  Future<void> set_descMsg_batch(List<String> descMsg) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXGenerateResult::set_descMsg_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "descMsg": descMsg[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}