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

com.sinch.sdk.domains.sms.models.requests.UpdateSmsBatchTextRequest 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 com.sinch.sdk.domains.sms.models.Parameters;
import java.time.Instant;
import java.util.Collection;

public class UpdateSmsBatchTextRequest extends UpdateBaseBatchRequest {
  private final OptionalValue parameters;

  public UpdateSmsBatchTextRequest(
      OptionalValue> toAdd,
      OptionalValue> toRemove,
      OptionalValue from,
      OptionalValue body,
      OptionalValue deliveryReport,
      OptionalValue sendAt,
      OptionalValue expireAt,
      OptionalValue callbackUrl,
      OptionalValue parameters) {
    super(toAdd, toRemove, from, body, deliveryReport, sendAt, expireAt, callbackUrl);
    this.parameters = parameters;
  }

  public OptionalValue getParameters() {
    return parameters;
  }

  @Override
  public String toString() {
    return "UpdateSmsBatchTextRequest{" + "parameters=" + parameters + "} " + super.toString();
  }

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

  public static class Builder extends UpdateBaseBatchRequest.Builder {
    private OptionalValue parameters = OptionalValue.empty();

    private Builder() {}

    /**
     * @param parameters Contains the parameters that will be used for customizing the message for
     *     each recipient. * @return current builder
     */
    public Builder setParameters(Parameters parameters) {
      this.parameters = OptionalValue.of(parameters);
      return this;
    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy