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

com.sinch.sdk.domains.sms.models.dto.v1.UpdateGroupRequestDto Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * API Overview | Sinch
 * Sinch SMS API is one of the easiest APIs we offer and enables you to add fast and reliable global SMS to your applications. Send single messages, scheduled batch messages, use available message templates and more.
 *
 * The version of the OpenAPI document: v1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.sinch.sdk.domains.sms.models.dto.v1;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** UpdateGroupRequestDto */
@JsonPropertyOrder({
  UpdateGroupRequestDto.JSON_PROPERTY_NAME,
  UpdateGroupRequestDto.JSON_PROPERTY_ADD,
  UpdateGroupRequestDto.JSON_PROPERTY_REMOVE,
  UpdateGroupRequestDto.JSON_PROPERTY_ADD_FROM_GROUP,
  UpdateGroupRequestDto.JSON_PROPERTY_REMOVE_FROM_GROUP,
  UpdateGroupRequestDto.JSON_PROPERTY_AUTO_UPDATE
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class UpdateGroupRequestDto {
  private static final long serialVersionUID = 1L;
  public static final String JSON_PROPERTY_NAME = "name";
  private String name;
  private boolean nameDefined = false;

  public static final String JSON_PROPERTY_ADD = "add";
  private List add;
  private boolean addDefined = false;

  public static final String JSON_PROPERTY_REMOVE = "remove";
  private List remove;
  private boolean removeDefined = false;

  public static final String JSON_PROPERTY_ADD_FROM_GROUP = "add_from_group";
  private String addFromGroup;
  private boolean addFromGroupDefined = false;

  public static final String JSON_PROPERTY_REMOVE_FROM_GROUP = "remove_from_group";
  private String removeFromGroup;
  private boolean removeFromGroupDefined = false;

  public static final String JSON_PROPERTY_AUTO_UPDATE = "auto_update";
  private UpdateGroupRequestAutoUpdateDto autoUpdate;
  private boolean autoUpdateDefined = false;

  public UpdateGroupRequestDto() {}

  public UpdateGroupRequestDto name(String name) {
    this.name = name;
    this.nameDefined = true;
    return this;
  }

  /**
   * The name of the group. Omitting `name` from the JSON body will leave the name
   * unchanged. To remove an existing name set, name explicitly to the JSON value `null`.
   *
   * @return name
   */
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getName() {
    return name;
  }

  @JsonIgnore
  public boolean getNameDefined() {
    return nameDefined;
  }

  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(String name) {
    this.name = name;
    this.nameDefined = true;
  }

  public UpdateGroupRequestDto add(List add) {
    this.add = add;
    this.addDefined = true;
    return this;
  }

  public UpdateGroupRequestDto addAddItem(String addItem) {
    if (this.add == null) {
      this.add = new ArrayList<>();
    }
    this.addDefined = true;
    this.add.add(addItem);
    return this;
  }

  /**
   * Add a list of phone numbers (MSISDNs) to this group. The phone numbers are a strings within an
   * array and must be in <a
   * href=\"https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\"
   * target=\"_blank\">E.164 format</a>.
   *
   * @return add
   */
  @JsonProperty(JSON_PROPERTY_ADD)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getAdd() {
    return add;
  }

  @JsonIgnore
  public boolean getAddDefined() {
    return addDefined;
  }

  @JsonProperty(JSON_PROPERTY_ADD)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAdd(List add) {
    this.add = add;
    this.addDefined = true;
  }

  public UpdateGroupRequestDto remove(List remove) {
    this.remove = remove;
    this.removeDefined = true;
    return this;
  }

  public UpdateGroupRequestDto addRemoveItem(String removeItem) {
    if (this.remove == null) {
      this.remove = new ArrayList<>();
    }
    this.removeDefined = true;
    this.remove.add(removeItem);
    return this;
  }

  /**
   * Remove a list of phone numbers (MSISDNs) to this group.The phone numbers are a strings within
   * an array and must be in <a
   * href=\"https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\"
   * target=\"_blank\">E.164 format</a>.
   *
   * @return remove
   */
  @JsonProperty(JSON_PROPERTY_REMOVE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getRemove() {
    return remove;
  }

  @JsonIgnore
  public boolean getRemoveDefined() {
    return removeDefined;
  }

  @JsonProperty(JSON_PROPERTY_REMOVE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRemove(List remove) {
    this.remove = remove;
    this.removeDefined = true;
  }

  public UpdateGroupRequestDto addFromGroup(String addFromGroup) {
    this.addFromGroup = addFromGroup;
    this.addFromGroupDefined = true;
    return this;
  }

  /**
   * Copy the members from the another group into this group. Constraints: Must be valid group ID
   *
   * @return addFromGroup
   */
  @JsonProperty(JSON_PROPERTY_ADD_FROM_GROUP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getAddFromGroup() {
    return addFromGroup;
  }

  @JsonIgnore
  public boolean getAddFromGroupDefined() {
    return addFromGroupDefined;
  }

  @JsonProperty(JSON_PROPERTY_ADD_FROM_GROUP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAddFromGroup(String addFromGroup) {
    this.addFromGroup = addFromGroup;
    this.addFromGroupDefined = true;
  }

  public UpdateGroupRequestDto removeFromGroup(String removeFromGroup) {
    this.removeFromGroup = removeFromGroup;
    this.removeFromGroupDefined = true;
    return this;
  }

  /**
   * Remove the members in a specified group from this group. Constraints: Must be valid group ID
   *
   * @return removeFromGroup
   */
  @JsonProperty(JSON_PROPERTY_REMOVE_FROM_GROUP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getRemoveFromGroup() {
    return removeFromGroup;
  }

  @JsonIgnore
  public boolean getRemoveFromGroupDefined() {
    return removeFromGroupDefined;
  }

  @JsonProperty(JSON_PROPERTY_REMOVE_FROM_GROUP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRemoveFromGroup(String removeFromGroup) {
    this.removeFromGroup = removeFromGroup;
    this.removeFromGroupDefined = true;
  }

  public UpdateGroupRequestDto autoUpdate(UpdateGroupRequestAutoUpdateDto autoUpdate) {
    this.autoUpdate = autoUpdate;
    this.autoUpdateDefined = true;
    return this;
  }

  /**
   * Get autoUpdate
   *
   * @return autoUpdate
   */
  @JsonProperty(JSON_PROPERTY_AUTO_UPDATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public UpdateGroupRequestAutoUpdateDto getAutoUpdate() {
    return autoUpdate;
  }

  @JsonIgnore
  public boolean getAutoUpdateDefined() {
    return autoUpdateDefined;
  }

  @JsonProperty(JSON_PROPERTY_AUTO_UPDATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAutoUpdate(UpdateGroupRequestAutoUpdateDto autoUpdate) {
    this.autoUpdate = autoUpdate;
    this.autoUpdateDefined = true;
  }

  /** Return true if this UpdateGroup_request object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdateGroupRequestDto updateGroupRequest = (UpdateGroupRequestDto) o;
    return Objects.equals(this.name, updateGroupRequest.name)
        && Objects.equals(this.add, updateGroupRequest.add)
        && Objects.equals(this.remove, updateGroupRequest.remove)
        && Objects.equals(this.addFromGroup, updateGroupRequest.addFromGroup)
        && Objects.equals(this.removeFromGroup, updateGroupRequest.removeFromGroup)
        && Objects.equals(this.autoUpdate, updateGroupRequest.autoUpdate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, add, remove, addFromGroup, removeFromGroup, autoUpdate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdateGroupRequestDto {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    add: ").append(toIndentedString(add)).append("\n");
    sb.append("    remove: ").append(toIndentedString(remove)).append("\n");
    sb.append("    addFromGroup: ").append(toIndentedString(addFromGroup)).append("\n");
    sb.append("    removeFromGroup: ").append(toIndentedString(removeFromGroup)).append("\n");
    sb.append("    autoUpdate: ").append(toIndentedString(autoUpdate)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy