// ignore_for_file: non_constant_identifier_names, avoid_init_to_null

import 'package:json_annotation/json_annotation.dart';
import 'package:oto/oto/data/base_data.dart';

part 'infra_data.g.dart';

//Protobuf
@JsonSerializable()
class DataProtobuf extends DataParam {
  DataProtobuf();

  late List<String> commands;

  factory DataProtobuf.fromJson(Map<String, dynamic> json) =>
      _$DataProtobufFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$DataProtobufToJson(this);
}

//AwsCli
@JsonSerializable()
class DataAwsCli extends DataParam {
  DataAwsCli();

  @JsonKey(name: "sub-command")
  late String subCommand;
  late List<String> args;

  factory DataAwsCli.fromJson(Map<String, dynamic> json) =>
      _$DataAwsCliFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$DataAwsCliToJson(this);
}

//Docker
@JsonSerializable()
class DataDocker extends DataParam {
  DataDocker();

  late String command;
  late List<String> args;

  factory DataDocker.fromJson(Map<String, dynamic> json) =>
      _$DataDockerFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$DataDockerToJson(this);
}

//Gradle
@JsonSerializable()
class DataGradle extends DataParam {
  DataGradle();

  late List<String> args;

  factory DataGradle.fromJson(Map<String, dynamic> json) =>
      _$DataGradleFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$DataGradleToJson(this);
}
