// 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 TXCAVRoomParam extends NSObject  {
  //region constants
  static const String name__ = 'TXCAVRoomParam';

  
  //endregion

  //region creators
  static Future<TXCAVRoomParam> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXCAVRoomParam', {'init': init});
    final object = TXCAVRoomParam()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXCAVRoomParam>> 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_batchTXCAVRoomParam', {'length': length, 'init': init});
  
    final List<TXCAVRoomParam> typedResult = resultBatch.map((result) => TXCAVRoomParam()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<int> get_roomID() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_roomID", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<TXEAVRoomAuthBits> get_authBits() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_authBits", {'__this__': this});
    return __result__ == null ? null : ((__result__ as int).toTXEAVRoomAuthBits());
  }
  
  Future<NSData> get_authBuffer() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_authBuffer", {'__this__': this});
    return __result__ == null ? null : (NSData()..refId = __result__..tag__ = 'tencent_live_fluttify');
  }
  
  //endregion

  //region setters
  Future<void> set_roomID(int roomID) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXCAVRoomParam::set_roomID', <String, dynamic>{'__this__': this, "roomID": roomID});
  
  
  }
  
  Future<void> set_authBits(TXEAVRoomAuthBits authBits) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXCAVRoomParam::set_authBits', <String, dynamic>{'__this__': this, "authBits": authBits.toValue()});
  
  
  }
  
  Future<void> set_authBuffer(NSData authBuffer) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXCAVRoomParam::set_authBuffer', <String, dynamic>{'__this__': this, "authBuffer": authBuffer});
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}

extension TXCAVRoomParam_Batch on List<TXCAVRoomParam> {
  //region getters
  Future<List<int>> get_roomID_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_roomID_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<TXEAVRoomAuthBits>> get_authBits_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_authBits_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => (__result__ as int).toTXEAVRoomAuthBits()).toList();
    return typedResult;
  }
  
  Future<List<NSData>> get_authBuffer_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXCAVRoomParam::get_authBuffer_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => NSData()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_roomID_batch(List<int> roomID) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXCAVRoomParam::set_roomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "roomID": roomID[__i__]}]);
  
  
  }
  
  Future<void> set_authBits_batch(List<TXEAVRoomAuthBits> authBits) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXCAVRoomParam::set_authBits_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "authBits": authBits[__i__].toValue()}]);
  
  
  }
  
  Future<void> set_authBuffer_batch(List<NSData> authBuffer) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXCAVRoomParam::set_authBuffer_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "authBuffer": authBuffer[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}