All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.sms.models.DeliveryReportRecipientSMS Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.sinch.sdk.domains.sms.models;

import java.time.Instant;

/**
 * SMS Delivery Report Recipient for SMS
 *
 * @since 1.0
 */
public class DeliveryReportRecipientSMS extends DeliveryReportRecipient {

  /**
   * Recipient Delivery Report for SMS
   *
   * @param batchId Required. The ID of the batch this delivery report belongs to.
   * @param clientReference The client identifier of the batch this delivery report belongs to, if
   *     set when submitting batch.
   * @param at Required. A timestamp of when the Delivery Report was created in the
   *     Sinch service
   * @param code Required. The detailed status
   *     code.
   * @param recipient Required. Phone number that was queried.
   * @param status Required. The simplified status as described in Delivery Report
   *     Statuses
   * @param appliedOriginator The default originator used for the recipient this delivery report
   *     belongs to, if default originator pool configured and no originator set when submitting
   *     batch.
   * @param encoding Applied encoding for message. Present only if smart encoding is enabled.
   * @param numberOfMessageParts The number of parts the message was split into. Present only if
   *     max_number_of_message_parts parameter was set.
   * @param operator The operator that was used for delivering the message to this recipient, if
   *     enabled on the account by Sinch.
   * @param operatorStatusAt A timestamp extracted from the Delivery Receipt from the originating
   *     SMSC
   */
  public DeliveryReportRecipientSMS(
      String batchId,
      String clientReference,
      Instant at,
      DeliveryReportErrorCode code,
      String recipient,
      DeliveryReportStatus status,
      String appliedOriginator,
      DeliveryReportRecipientEncoding encoding,
      Integer numberOfMessageParts,
      String operator,
      Instant operatorStatusAt) {
    super(
        batchId,
        clientReference,
        at,
        code,
        recipient,
        status,
        appliedOriginator,
        encoding,
        numberOfMessageParts,
        operator,
        operatorStatusAt);
  }

  @Override
  public String toString() {
    return "DeliveryReportRecipientSMS{} " + super.toString();
  }

  public static Builder builder() {
    return new Builder();
  }

  public static class Builder extends DeliveryReportRecipient.Builder {

    protected Builder() {
      super();
    }

    public DeliveryReportRecipientSMS build() {
      return new DeliveryReportRecipientSMS(
          batchId,
          clientReference,
          at,
          code,
          recipient,
          status,
          appliedOriginator,
          encoding,
          numberOfMessageParts,
          operator,
          operatorStatusAt);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy