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

com.sinch.sdk.domains.sms.models.requests.GroupAutoUpdateRequestParameters 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.GroupAutoUpdate.Builder;

public class GroupAutoUpdateRequestParameters {
  private final OptionalValue to;
  private final OptionalValue add;
  private final OptionalValue remove;

  private GroupAutoUpdateRequestParameters(
      OptionalValue to,
      OptionalValue add,
      OptionalValue remove) {
    this.to = to;
    this.add = add;
    this.remove = remove;
  }

  public OptionalValue getTo() {
    return to;
  }

  public OptionalValue getAdd() {
    return add;
  }

  public OptionalValue getRemove() {
    return remove;
  }

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

  @Override
  public String toString() {
    return "GroupAutoUpdateRequestParameters{"
        + "to='"
        + to
        + '\''
        + ", add="
        + add
        + ", remove="
        + remove
        + '}';
  }

  public static class Builder {

    OptionalValue to = OptionalValue.empty();
    OptionalValue add = OptionalValue.empty();
    OptionalValue remove = OptionalValue.empty();

    private Builder() {}

    /**
     * @param to Short code or long number addressed in MO.
* Constraints: Must be valid MSISDN or short code. * @return current builder */ public Builder setTo(String to) { this.to = OptionalValue.of(to); return this; } /*** * * @param add Keyword to be sent in MO to add MSISDN to a group * @return current builder */ public Builder setAdd(GroupAutoUpdateKeywordRequestParameters add) { this.add = OptionalValue.of(add); return this; } /** * @param remove Keyword to be sent in MO to remove MSISDN to a group * @return current builder */ public Builder setRemove(GroupAutoUpdateKeywordRequestParameters remove) { this.remove = OptionalValue.of(remove); return this; } public GroupAutoUpdateRequestParameters build() { return new GroupAutoUpdateRequestParameters(to, add, remove); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy