CommandResultModel constructor

CommandResultModel({
  1. bool? success,
  2. Iterable<CommandMessageModel>? messages,
  3. String? usage,
  4. CommandErrorModel? error,
  5. Iterable<LogEntryModel>? logs,
  6. EnvironmentListModel? environmentList,
  7. EnvironmentUpgradeModel? environmentUpgrade,
})

Implementation

factory CommandResultModel({
  $core.bool? success,
  $core.Iterable<CommandMessageModel>? messages,
  $core.String? usage,
  CommandErrorModel? error,
  $core.Iterable<LogEntryModel>? logs,
  EnvironmentListModel? environmentList,
  EnvironmentUpgradeModel? environmentUpgrade,
}) {
  final _result = create();
  if (success != null) {
    _result.success = success;
  }
  if (messages != null) {
    _result.messages.addAll(messages);
  }
  if (usage != null) {
    _result.usage = usage;
  }
  if (error != null) {
    _result.error = error;
  }
  if (logs != null) {
    _result.logs.addAll(logs);
  }
  if (environmentList != null) {
    _result.environmentList = environmentList;
  }
  if (environmentUpgrade != null) {
    _result.environmentUpgrade = environmentUpgrade;
  }
  return _result;
}