copyWithWrapped method

MarketingMessageDTO copyWithWrapped({
  1. Wrapped<int?>? id,
  2. Wrapped<MarketingMessageTypeDTO?>? messageType,
  3. Wrapped<MarketingMessageTargetDTO?>? target,
  4. Wrapped<List<String>?>? ccEmails,
  5. Wrapped<List<String>?>? bccEmails,
  6. Wrapped<String?>? subject,
  7. Wrapped<String?>? plainTextBody,
  8. Wrapped<DateTime?>? creationTimestamp,
  9. Wrapped<bool?>? isSent,
  10. Wrapped<String?>? senderEmail,
  11. Wrapped<DateTime?>? sentTimestamp,
})

Implementation

MarketingMessageDTO copyWithWrapped(
    {Wrapped<int?>? id,
    Wrapped<enums.MarketingMessageTypeDTO?>? messageType,
    Wrapped<enums.MarketingMessageTargetDTO?>? target,
    Wrapped<List<String>?>? ccEmails,
    Wrapped<List<String>?>? bccEmails,
    Wrapped<String?>? subject,
    Wrapped<String?>? plainTextBody,
    Wrapped<DateTime?>? creationTimestamp,
    Wrapped<bool?>? isSent,
    Wrapped<String?>? senderEmail,
    Wrapped<DateTime?>? sentTimestamp}) {
  return MarketingMessageDTO(
      id: (id != null ? id.value : this.id),
      messageType:
          (messageType != null ? messageType.value : this.messageType),
      target: (target != null ? target.value : this.target),
      ccEmails: (ccEmails != null ? ccEmails.value : this.ccEmails),
      bccEmails: (bccEmails != null ? bccEmails.value : this.bccEmails),
      subject: (subject != null ? subject.value : this.subject),
      plainTextBody:
          (plainTextBody != null ? plainTextBody.value : this.plainTextBody),
      creationTimestamp: (creationTimestamp != null
          ? creationTimestamp.value
          : this.creationTimestamp),
      isSent: (isSent != null ? isSent.value : this.isSent),
      senderEmail:
          (senderEmail != null ? senderEmail.value : this.senderEmail),
      sentTimestamp:
          (sentTimestamp != null ? sentTimestamp.value : this.sentTimestamp));
}