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

com.sinch.sdk.domains.sms.models.dto.v1.GroupObjectDto 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;

/** GroupObjectDto */
@JsonPropertyOrder({
  GroupObjectDto.JSON_PROPERTY_NAME,
  GroupObjectDto.JSON_PROPERTY_MEMBERS,
  GroupObjectDto.JSON_PROPERTY_CHILD_GROUPS,
  GroupObjectDto.JSON_PROPERTY_AUTO_UPDATE
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class GroupObjectDto {
  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_MEMBERS = "members";
  private List members;
  private boolean membersDefined = false;

  public static final String JSON_PROPERTY_CHILD_GROUPS = "child_groups";
  private List childGroups;
  private boolean childGroupsDefined = false;

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

  public GroupObjectDto() {}

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

  /**
   * Name of the group
   *
   * @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 GroupObjectDto members(List members) {
    this.members = members;
    this.membersDefined = true;
    return this;
  }

  public GroupObjectDto addMembersItem(String membersItem) {
    if (this.members == null) {
      this.members = new ArrayList<>();
    }
    this.membersDefined = true;
    this.members.add(membersItem);
    return this;
  }

  /**
   * \"Initial list of phone numbers in <a
   * href=\"https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\"
   * target=\"_blank\">E.164</a> format <a
   * href=\"https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628\"
   * target=\"_blank\">MSISDNs</a> for the group.\"
   *
   * @return members
   */
  @JsonProperty(JSON_PROPERTY_MEMBERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getMembers() {
    return members;
  }

  @JsonIgnore
  public boolean getMembersDefined() {
    return membersDefined;
  }

  @JsonProperty(JSON_PROPERTY_MEMBERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMembers(List members) {
    this.members = members;
    this.membersDefined = true;
  }

  public GroupObjectDto childGroups(List childGroups) {
    this.childGroups = childGroups;
    this.childGroupsDefined = true;
    return this;
  }

  public GroupObjectDto addChildGroupsItem(String childGroupsItem) {
    if (this.childGroups == null) {
      this.childGroups = new ArrayList<>();
    }
    this.childGroupsDefined = true;
    this.childGroups.add(childGroupsItem);
    return this;
  }

  /**
   * Phone numbers (<a
   * href=\"https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628\"
   * target=\"_blank\">MSISDNs</a>) of child group will be included in this
   * group. If present then this group will be auto populated. Constraints: Elements must be group
   * IDs.
   *
   * @return childGroups
   */
  @JsonProperty(JSON_PROPERTY_CHILD_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getChildGroups() {
    return childGroups;
  }

  @JsonIgnore
  public boolean getChildGroupsDefined() {
    return childGroupsDefined;
  }

  @JsonProperty(JSON_PROPERTY_CHILD_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setChildGroups(List childGroups) {
    this.childGroups = childGroups;
    this.childGroupsDefined = true;
  }

  public GroupObjectDto autoUpdate(GroupObjectAutoUpdateDto 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 GroupObjectAutoUpdateDto getAutoUpdate() {
    return autoUpdate;
  }

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

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

  /** Return true if this groupObject object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GroupObjectDto groupObject = (GroupObjectDto) o;
    return Objects.equals(this.name, groupObject.name)
        && Objects.equals(this.members, groupObject.members)
        && Objects.equals(this.childGroups, groupObject.childGroups)
        && Objects.equals(this.autoUpdate, groupObject.autoUpdate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, members, childGroups, autoUpdate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GroupObjectDto {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    members: ").append(toIndentedString(members)).append("\n");
    sb.append("    childGroups: ").append(toIndentedString(childGroups)).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