toCli method

  1. @override
String toCli()
override

Implementation

@override
String toCli() {
  final argList = <String>[];
  if (start != null) {
    argList.add('start=$start');
  }
  if (stop != null) {
    argList.add('stop=$stop');
  }
  if (startDuration != null) {
    argList.add('start_duration=${startDuration!.toSeconds()}');
  }
  if (stopDuration != null) {
    argList.add('stop_duration=${stopDuration!.toSeconds()}');
  }
  if (startMode != null) {
    argList.add('start_mode=$startMode');
  }
  if (stopMode != null) {
    argList.add('stop_mode=$stopMode');
  }
  if (color != null) {
    argList.add('color=$color');
  }

  return 'tpad=${argList.join(':')}';
}