// 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:io';

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

import 'package:foundation_fluttify/foundation_fluttify.dart';

// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import
extension TypeOpTencentLiveFluttifyIOS on Object {
  // type check
  Future<bool> is__<T>() async {
    final typeName = T.toString();
    if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
      return this is T;
    }
    else if (T == TXLivePush) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXLivePush', {'__this__': this});
      return result;
    }
    else if (T == TXCAVRoom) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXCAVRoom', {'__this__': this});
      return result;
    }
    else if (T == TXImageSprite) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXImageSprite', {'__this__': this});
      return result;
    }
    else if (T == TXLiveBase) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXLiveBase', {'__this__': this});
      return result;
    }
    else if (T == TXLivePlayConfig) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXLivePlayConfig', {'__this__': this});
      return result;
    }
    else if (T == TXCAVRoomConfig) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXCAVRoomConfig', {'__this__': this});
      return result;
    }
    else if (T == TXVideoInfoReader) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXVideoInfoReader', {'__this__': this});
      return result;
    }
    else if (T == TXVideoEditer) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXVideoEditer', {'__this__': this});
      return result;
    }
    else if (T == TXVideoJoiner) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXVideoJoiner', {'__this__': this});
      return result;
    }
    else if (T == TXCAVRoomParam) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXCAVRoomParam', {'__this__': this});
      return result;
    }
    else if (T == TXBitrateItem) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXBitrateItem', {'__this__': this});
      return result;
    }
    else if (T == TXPlayerAuthParams) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXPlayerAuthParams', {'__this__': this});
      return result;
    }
    else if (T == TXLivePushConfig) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXLivePushConfig', {'__this__': this});
      return result;
    }
    else if (T == TXBeautyManager) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXBeautyManager', {'__this__': this});
      return result;
    }
    else if (T == TXLivePlayer) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXLivePlayer', {'__this__': this});
      return result;
    }
    else if (T == TXRecordResult) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXRecordResult', {'__this__': this});
      return result;
    }
    else if (T == TXVideoInfo) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXVideoInfo', {'__this__': this});
      return result;
    }
    else if (T == TXPreviewParam) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXPreviewParam', {'__this__': this});
      return result;
    }
    else if (T == TXSubtitle) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXSubtitle', {'__this__': this});
      return result;
    }
    else if (T == TXPaster) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXPaster', {'__this__': this});
      return result;
    }
    else if (T == TXAnimatedPaster) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXAnimatedPaster', {'__this__': this});
      return result;
    }
    else if (T == TXRepeat) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXRepeat', {'__this__': this});
      return result;
    }
    else if (T == TXSpeed) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXSpeed', {'__this__': this});
      return result;
    }
    else if (T == TXGenerateResult) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXGenerateResult', {'__this__': this});
      return result;
    }
    else if (T == TXJoinerResult) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfTXJoinerResult', {'__this__': this});
      return result;
    }
    else if (T == CGRect) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfCGRect', {'__this__': this});
      return result;
    }
    else if (T == CGPoint) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfCGPoint', {'__this__': this});
      return result;
    }
    else if (T == CGSize) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfCGSize', {'__this__': this});
      return result;
    }
    else if (T == UIEdgeInsets) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIEdgeInsets', {'__this__': this});
      return result;
    }
    else if (T == NSError) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfNSError', {'__this__': this});
      return result;
    }
    else if (T == UIView) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIView', {'__this__': this});
      return result;
    }
    else if (T == UIViewController) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIViewController', {'__this__': this});
      return result;
    }
    else if (T == UIControl) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIControl', {'__this__': this});
      return result;
    }
    else if (T == UIImage) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIImage', {'__this__': this});
      return result;
    }
    else if (T == UIColor) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfUIColor', {'__this__': this});
      return result;
    }
    else if (T == NSData) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfNSData', {'__this__': this});
      return result;
    }
    else if (T == NSOperation) {
      final result = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('RefClass::isKindOfNSOperation', {'__this__': this});
      return result;
    }
  }

  // type cast
  T as__<T>() {
    final typeName = T.toString();
    // jsonable 直接造型 返回
    if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
      return this as T;
    }
    // 如果是Ref类的cast, 那么取其refId, 如果本身是refId, 那么直接使用(int)
    else if (T == TXLivePush) {
      return (TXLivePush()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXCAVRoom) {
      return (TXCAVRoom()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXImageSprite) {
      return (TXImageSprite()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXLiveBase) {
      return (TXLiveBase()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXLivePlayConfig) {
      return (TXLivePlayConfig()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXCAVRoomConfig) {
      return (TXCAVRoomConfig()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXVideoInfoReader) {
      return (TXVideoInfoReader()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXVideoEditer) {
      return (TXVideoEditer()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXVideoJoiner) {
      return (TXVideoJoiner()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXCAVRoomParam) {
      return (TXCAVRoomParam()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXBitrateItem) {
      return (TXBitrateItem()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXPlayerAuthParams) {
      return (TXPlayerAuthParams()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXLivePushConfig) {
      return (TXLivePushConfig()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXBeautyManager) {
      return (TXBeautyManager()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXLivePlayer) {
      return (TXLivePlayer()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXRecordResult) {
      return (TXRecordResult()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXVideoInfo) {
      return (TXVideoInfo()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXPreviewParam) {
      return (TXPreviewParam()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXSubtitle) {
      return (TXSubtitle()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXPaster) {
      return (TXPaster()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXAnimatedPaster) {
      return (TXAnimatedPaster()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXRepeat) {
      return (TXRepeat()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXSpeed) {
      return (TXSpeed()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXGenerateResult) {
      return (TXGenerateResult()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == TXJoinerResult) {
      return (TXJoinerResult()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == CGRect) {
      return (CGRect()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == CGPoint) {
      return (CGPoint()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == CGSize) {
      return (CGSize()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIEdgeInsets) {
      return (UIEdgeInsets()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == NSError) {
      return (NSError()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIView) {
      return (UIView()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIViewController) {
      return (UIViewController()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIControl) {
      return (UIControl()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIImage) {
      return (UIImage()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == UIColor) {
      return (UIColor()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == NSData) {
      return (NSData()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
    else if (T == NSOperation) {
      return (NSOperation()..refId = (this is Ref ? (this as Ref).refId : this as String)..tag__ = 'tencent_live_fluttify') as T;
    }
  }
}