//*****************************************************************
//             Generate by vsc-wisdom-flutter-kit
//*****************************************************************

///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10076](http://yapi.wisdomcity.com.cn/project/40/interface/api/10076)
///
///update 2020-10-9 15:35:5
///
///住户抄表列表-统计
// ignore: library_names
library meterReading_house_count.get;

import 'response_model.dart';
import 'package:dio/dio.dart';

///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10076](http://yapi.wisdomcity.com.cn/project/40/interface/api/10076)
///
///update 2020-10-9 15:35:5
///
///住户抄表列表-统计
class Interface {
  Interface._();

  static const String path = '/app/admin/meterReading/house/count';

  static const String method = 'get';

  static Future<ResponseModel<$DataModel>> request(
    Dio dio, {
    Options? options,
    Map<String, dynamic>? pathParameters,
    Map<String, dynamic>? queryParameters,
    data,
    CancelToken? cancelToken,
    ProgressCallback? onSendProgress,
    ProgressCallback? onReceiveProgress,
  }) async {
    final res = await dio.request(
      _path(pathParameters ?? {}),
      data: data,
      queryParameters: queryParameters,
      cancelToken: cancelToken,
      options: Options(method: 'get'),
      onSendProgress: onSendProgress,
      onReceiveProgress: onReceiveProgress,
    );

    return ResponseModel(
      json: res.data,
      to: (v) => v.toJson(),
      from: (v) => $DataModel.fromJson(v),
    );
  }

  static String _path(Map<String, dynamic> pathParameters) {
    String back = path;
    for (final key in pathParameters.keys) {
      back = back.replaceAll('{$key}', pathParameters[key].toString());
    }
    return back;
  }
}

///http://yapi.wisdomcity.com.cn/project/40/interface/api/10076
///
///
///
///`communityNoTranscribe` 小区未抄表总数
///
///`communityHasTranscribe` 小区已经抄表总数
///
///`currentYearMonth` 当前账期
///
// ignore: camel_case_types
class $DataModel {
  ///`communityNoTranscribe` 小区未抄表总数
  num? communityNoTranscribe;

  ///`communityHasTranscribe` 小区已经抄表总数
  num? communityHasTranscribe;

  ///`currentYearMonth` 当前账期
  String? currentYearMonth;

  ///http://yapi.wisdomcity.com.cn/project/40/interface/api/10076
  ///
  ///
  ///
  ///`communityNoTranscribe` 小区未抄表总数
  ///
  ///`communityHasTranscribe` 小区已经抄表总数
  ///
  ///`currentYearMonth` 当前账期
  $DataModel({
    this.communityNoTranscribe,
    this.communityHasTranscribe,
    this.currentYearMonth,
  });

  $DataModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json);
    this.communityNoTranscribe = map['communityNoTranscribe'];
    this.communityHasTranscribe = map['communityHasTranscribe'];
    this.currentYearMonth = map['currentYearMonth'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();
    json['communityNoTranscribe'] = this.communityNoTranscribe;
    json['communityHasTranscribe'] = this.communityHasTranscribe;
    json['currentYearMonth'] = this.currentYearMonth;
    return Map.from(json);
  }
}
