// 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:amap_search_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:amap_core_fluttify/amap_core_fluttify.dart';

class AMapPOISearchBaseRequest extends AMapSearchObject with NSCoding, NSCopying {
  //region constants
  static const String name__ = 'AMapPOISearchBaseRequest';

  @override
  final String tag__ = 'amap_search_fluttify';

  
  //endregion

  //region creators
  static Future<AMapPOISearchBaseRequest> create__({ bool init = true /* ios only */ }) async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod(
      'ObjectFactory::createAMapPOISearchBaseRequest',
      {'init': init}
    );
    return AmapSearchFluttifyIOSAs<AMapPOISearchBaseRequest>(__result__)!;
  }
  
  static Future<List<AMapPOISearchBaseRequest>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    assert(true);
    final __result_batch__ = await  kAmapSearchFluttifyChannel.invokeListMethod(
      'ObjectFactory::create_batchAMapPOISearchBaseRequest',
      {'length': length, 'init': init}
    );
    return __result_batch__
        ?.map((it) => AmapSearchFluttifyIOSAs<AMapPOISearchBaseRequest>(it))
        .where((element) => element !=null)
        .cast<AMapPOISearchBaseRequest>()
        .toList() ?? <AMapPOISearchBaseRequest>[];
  }
  
  //endregion

  //region getters
  Future<String?> get_types() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_types", {'__this__': this});
    return __result__;
  }
  
  Future<int?> get_sortrule() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_sortrule", {'__this__': this});
    return __result__;
  }
  
  Future<int?> get_offset() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_offset", {'__this__': this});
    return __result__;
  }
  
  Future<int?> get_page() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_page", {'__this__': this});
    return __result__;
  }
  
  Future<String?> get_building() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_building", {'__this__': this});
    return __result__;
  }
  
  Future<bool?> get_requireExtension() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_requireExtension", {'__this__': this});
    return __result__;
  }
  
  Future<bool?> get_requireSubPOIs() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_requireSubPOIs", {'__this__': this});
    return __result__;
  }
  
  //endregion

  //region setters
  Future<void> set_types(String types) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_types', <String, dynamic>{'__this__': this, "types": types});
  }
  
  Future<void> set_sortrule(int sortrule) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_sortrule', <String, dynamic>{'__this__': this, "sortrule": sortrule});
  }
  
  Future<void> set_offset(int offset) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_offset', <String, dynamic>{'__this__': this, "offset": offset});
  }
  
  Future<void> set_page(int page) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_page', <String, dynamic>{'__this__': this, "page": page});
  }
  
  Future<void> set_building(String building) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_building', <String, dynamic>{'__this__': this, "building": building});
  }
  
  Future<void> set_requireExtension(bool requireExtension) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_requireExtension', <String, dynamic>{'__this__': this, "requireExtension": requireExtension});
  }
  
  Future<void> set_requireSubPOIs(bool requireSubPOIs) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_requireSubPOIs', <String, dynamic>{'__this__': this, "requireSubPOIs": requireSubPOIs});
  }
  
  //endregion

  //region methods
  
  //endregion

  @override
  String toString() {
    return 'AMapPOISearchBaseRequest{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
  }
}

extension AMapPOISearchBaseRequest_Batch on List<AMapPOISearchBaseRequest?> {
  String? get refId {
    if (isEmpty) return null;
    return first?.refId;
  }

  //region getters
  Future<List<String?>> get_types_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_types_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
  }
  
  Future<List<int?>> get_sortrule_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_sortrule_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
  }
  
  Future<List<int?>> get_offset_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_offset_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
  }
  
  Future<List<int?>> get_page_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_page_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
  }
  
  Future<List<String?>> get_building_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_building_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
  }
  
  Future<List<bool?>> get_requireExtension_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_requireExtension_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
  }
  
  Future<List<bool?>> get_requireSubPOIs_batch() async {
    final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapPOISearchBaseRequest::get_requireSubPOIs_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
  }
  
  //endregion

  //region setters
  Future<void> set_types_batch(List<String> types) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_types_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "types": types[__i__]}]);
  
  
  }
  
  Future<void> set_sortrule_batch(List<int> sortrule) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_sortrule_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "sortrule": sortrule[__i__]}]);
  
  
  }
  
  Future<void> set_offset_batch(List<int> offset) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_offset_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "offset": offset[__i__]}]);
  
  
  }
  
  Future<void> set_page_batch(List<int> page) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_page_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "page": page[__i__]}]);
  
  
  }
  
  Future<void> set_building_batch(List<String> building) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_building_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "building": building[__i__]}]);
  
  
  }
  
  Future<void> set_requireExtension_batch(List<bool> requireExtension) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_requireExtension_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "requireExtension": requireExtension[__i__]}]);
  
  
  }
  
  Future<void> set_requireSubPOIs_batch(List<bool> requireSubPOIs) async {
    await kAmapSearchFluttifyChannel.invokeMethod('AMapPOISearchBaseRequest::set_requireSubPOIs_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "requireSubPOIs": requireSubPOIs[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}