HeraResponse constructor

HeraResponse({
  1. User? user,
  2. Iterable<User>? users,
  3. Int64? amount,
  4. Token? token,
  5. Iterable<Token>? tokens,
  6. String? publicKey,
  7. HeraConfig? config,
  8. Template? template,
  9. Iterable<Template>? templates,
  10. Iterable<LoginType>? availableLoginMechanisms,
  11. VerificationCode? verificationCode,
  12. LoginSession? loginSession,
  13. Iterable<Contact>? contacts,
  14. Group? group,
  15. Iterable<Group>? groups,
  16. String? namespace,
})

Implementation

factory HeraResponse({
  User? user,
  $core.Iterable<User>? users,
  $fixnum.Int64? amount,
  Token? token,
  $core.Iterable<Token>? tokens,
  $core.String? publicKey,
  HeraConfig? config,
  Template? template,
  $core.Iterable<Template>? templates,
  $core.Iterable<LoginType>? availableLoginMechanisms,
  VerificationCode? verificationCode,
  LoginSession? loginSession,
  $core.Iterable<Contact>? contacts,
  Group? group,
  $core.Iterable<Group>? groups,
  $core.String? namespace,
}) {
  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 (publicKey != null) {
    _result.publicKey = publicKey;
  }
  if (config != null) {
    _result.config = config;
  }
  if (template != null) {
    _result.template = template;
  }
  if (templates != null) {
    _result.templates.addAll(templates);
  }
  if (availableLoginMechanisms != null) {
    _result.availableLoginMechanisms.addAll(availableLoginMechanisms);
  }
  if (verificationCode != null) {
    _result.verificationCode = verificationCode;
  }
  if (loginSession != null) {
    _result.loginSession = loginSession;
  }
  if (contacts != null) {
    _result.contacts.addAll(contacts);
  }
  if (group != null) {
    _result.group = group;
  }
  if (groups != null) {
    _result.groups.addAll(groups);
  }
  if (namespace != null) {
    _result.namespace = namespace;
  }
  return _result;
}