import 'package:json_annotation/json_annotation.dart';

part 'upload_file_interface_config_params.g.dart';

@JsonSerializable()
class UploadFileInterfaceConfigParams extends Object {
  @JsonKey(name: 'fileName')
  String fileName;

  @JsonKey(name: 'fileMd5')
  String fileMd5;

  @JsonKey(name: 'contentLength')
  int contentLength;

  @JsonKey(name: 'objectName', includeIfNull: false)
  String? objectName;

  UploadFileInterfaceConfigParams({
    required this.fileName,
    required this.fileMd5,
    required this.contentLength,
    this.objectName,
  });

  factory UploadFileInterfaceConfigParams.fromJson(Map<String, dynamic> srcJson) =>
      _$UploadFileInterfaceConfigParamsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$UploadFileInterfaceConfigParamsToJson(this);
}
