com.sinch.sdk.domains.sms.models.requests.GroupReplaceRequestParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
package com.sinch.sdk.domains.sms.models.requests;
import com.sinch.sdk.core.models.OptionalValue;
import java.util.Collection;
/**
* Parameters request to replace a group
*
* @see https://developers.sinch.com/docs/sms/api-reference/sms/tag/Groups/#tag/Groups/operation/ReplaceGroup
* @since 1.0
*/
public class GroupReplaceRequestParameters {
private final OptionalValue name;
private final OptionalValue> members;
private GroupReplaceRequestParameters(
OptionalValue name, OptionalValue> members) {
this.name = name;
this.members = members;
}
public OptionalValue getName() {
return name;
}
public OptionalValue> getMembers() {
return members;
}
@Override
public String toString() {
return "GroupCreateRequestParameters{" + "name='" + name + '\'' + ", members=" + members + '}';
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GroupReplaceRequestParameters parameters) {
return new Builder(parameters);
}
public static class Builder {
OptionalValue name = OptionalValue.empty();
OptionalValue> members = OptionalValue.empty();
private Builder() {}
private Builder(GroupReplaceRequestParameters parameters) {
this.name = parameters.getName();
this.members = parameters.getMembers();
}
/**
* @param name Name of the group
* @return current builder
*/
public Builder setName(String name) {
this.name = OptionalValue.of(name);
return this;
}
/**
* @param members The initial members of the group.
* Constraints: Elements must be phone numbers in E.164 format MSISDNs.
* @return current builder
*/
public Builder setMembers(Collection members) {
this.members = OptionalValue.of(members);
return this;
}
public GroupReplaceRequestParameters build() {
return new GroupReplaceRequestParameters(name, members);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy