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. Template? template,
  9. Iterable<Template>? templates,
  10. Iterable<LoginType>? availableLoginMechanisms,
  11. Iterable<TextProviderType>? availableTextProviders,
  12. Iterable<EmailProviderType>? availableEmailProviders,
  13. VerificationCode? verificationCode,
  14. LoginSession? loginSession,
  15. Iterable<Contact>? contacts,
})

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,
  Template? template,
  $core.Iterable<Template>? templates,
  $core.Iterable<LoginType>? availableLoginMechanisms,
  $core.Iterable<TextProviderType>? availableTextProviders,
  $core.Iterable<EmailProviderType>? availableEmailProviders,
  VerificationCode? verificationCode,
  LoginSession? loginSession,
  $core.Iterable<Contact>? contacts,
}) {
  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 (template != null) {
    _result.template = template;
  }
  if (templates != null) {
    _result.templates.addAll(templates);
  }
  if (availableLoginMechanisms != null) {
    _result.availableLoginMechanisms.addAll(availableLoginMechanisms);
  }
  if (availableTextProviders != null) {
    _result.availableTextProviders.addAll(availableTextProviders);
  }
  if (availableEmailProviders != null) {
    _result.availableEmailProviders.addAll(availableEmailProviders);
  }
  if (verificationCode != null) {
    _result.verificationCode = verificationCode;
  }
  if (loginSession != null) {
    _result.loginSession = loginSession;
  }
  if (contacts != null) {
    _result.contacts.addAll(contacts);
  }
  return _result;
}