MercuryResponse constructor

MercuryResponse({
  1. User? user,
  2. Iterable<User>? users,
  3. Message? message,
  4. Iterable<Message>? messages,
  5. Conversation? conversation,
  6. Iterable<Conversation>? conversations,
  7. MessageReaction? reaction,
  8. Iterable<User>? contacts,
})

Implementation

factory MercuryResponse({
  $0.User? user,
  $core.Iterable<$0.User>? users,
  Message? message,
  $core.Iterable<Message>? messages,
  Conversation? conversation,
  $core.Iterable<Conversation>? conversations,
  MessageReaction? reaction,
  $core.Iterable<$0.User>? contacts,
}) {
  final _result = create();
  if (user != null) {
    _result.user = user;
  }
  if (users != null) {
    _result.users.addAll(users);
  }
  if (message != null) {
    _result.message = message;
  }
  if (messages != null) {
    _result.messages.addAll(messages);
  }
  if (conversation != null) {
    _result.conversation = conversation;
  }
  if (conversations != null) {
    _result.conversations.addAll(conversations);
  }
  if (reaction != null) {
    _result.reaction = reaction;
  }
  if (contacts != null) {
    _result.contacts.addAll(contacts);
  }
  return _result;
}