HeraResponse constructor

HeraResponse({
  1. User? user,
  2. Iterable<User>? users,
  3. Int64? amount,
  4. Token? token,
  5. Iterable<Token>? tokens,
  6. Map<String, String>? publicKeys,
  7. Config? config,
  8. LoginSession? loginSession,
  9. String? privateKey,
})

Implementation

factory HeraResponse({
  User? user,
  $core.Iterable<User>? users,
  $fixnum.Int64? amount,
  Token? token,
  $core.Iterable<Token>? tokens,
  $core.Map<$core.String, $core.String>? publicKeys,
  Config? config,
  LoginSession? loginSession,
  $core.String? privateKey,
}) {
  final _result = create();
  if (user != null) {
    _result.user = user;
  }
  if (users != null) {
    _result.users.addAll(users);
  }
  if (amount != null) {
    _result.amount = amount;
  }
  if (token != null) {
    _result.token = token;
  }
  if (tokens != null) {
    _result.tokens.addAll(tokens);
  }
  if (publicKeys != null) {
    _result.publicKeys.addAll(publicKeys);
  }
  if (config != null) {
    _result.config = config;
  }
  if (loginSession != null) {
    _result.loginSession = loginSession;
  }
  if (privateKey != null) {
    _result.privateKey = privateKey;
  }
  return _result;
}