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

com.sinch.sdk.domains.sms.models.requests.UpdateSmsBatchBinaryRequest Maven / Gradle / Ivy

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

import com.sinch.sdk.core.models.OptionalValue;
import com.sinch.sdk.domains.sms.models.DeliveryReportType;
import java.time.Instant;
import java.util.Collection;

public class UpdateSmsBatchBinaryRequest extends UpdateBaseBatchRequest {
  private final OptionalValue udh;

  private UpdateSmsBatchBinaryRequest(
      OptionalValue> toAdd,
      OptionalValue> toRemove,
      OptionalValue from,
      OptionalValue body,
      OptionalValue deliveryReport,
      OptionalValue sendAt,
      OptionalValue expireAt,
      OptionalValue callbackUrl,
      OptionalValue udh) {
    super(toAdd, toRemove, from, body, deliveryReport, sendAt, expireAt, callbackUrl);
    this.udh = udh;
  }

  public OptionalValue getUdh() {
    return udh;
  }

  @Override
  public String toString() {
    return "UpdateSmsBatchBinaryRequest{" + "udh='" + udh + '\'' + "} " + super.toString();
  }

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

  public static class Builder extends UpdateBaseBatchRequest.Builder {

    private OptionalValue udh;

    private Builder() {}

    /**
     * @param udh The UDH header of a binary message HEX encoded. Max 140 bytes including the body.
     * @return current builder
     */
    public Builder setUdh(String udh) {
      this.udh = OptionalValue.of(udh);
      return this;
    }

    public UpdateSmsBatchBinaryRequest build() {
      return new UpdateSmsBatchBinaryRequest(
          toAdd, toRemove, from, body, deliveryReportType, sendAt, expireAt, callbackUrl, udh);
    }

    @Override
    protected Builder self() {
      return this;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy