001package com.box.sdkgen.managers.termsofserviceuserstatuses;
002
003import com.box.sdkgen.internal.SerializableObject;
004import com.fasterxml.jackson.annotation.JsonFilter;
005import com.fasterxml.jackson.annotation.JsonProperty;
006import java.util.Objects;
007
008@JsonFilter("nullablePropertyFilter")
009public class CreateTermsOfServiceStatusForUserRequestBody extends SerializableObject {
010
011  /** The terms of service to set the status for. */
012  protected final CreateTermsOfServiceStatusForUserRequestBodyTosField tos;
013
014  /** The user to set the status for. */
015  protected final CreateTermsOfServiceStatusForUserRequestBodyUserField user;
016
017  /** Whether the user has accepted the terms. */
018  @JsonProperty("is_accepted")
019  protected final boolean isAccepted;
020
021  public CreateTermsOfServiceStatusForUserRequestBody(
022      @JsonProperty("tos") CreateTermsOfServiceStatusForUserRequestBodyTosField tos,
023      @JsonProperty("user") CreateTermsOfServiceStatusForUserRequestBodyUserField user,
024      @JsonProperty("is_accepted") boolean isAccepted) {
025    super();
026    this.tos = tos;
027    this.user = user;
028    this.isAccepted = isAccepted;
029  }
030
031  public CreateTermsOfServiceStatusForUserRequestBodyTosField getTos() {
032    return tos;
033  }
034
035  public CreateTermsOfServiceStatusForUserRequestBodyUserField getUser() {
036    return user;
037  }
038
039  public boolean getIsAccepted() {
040    return isAccepted;
041  }
042
043  @Override
044  public boolean equals(Object o) {
045    if (this == o) {
046      return true;
047    }
048    if (o == null || getClass() != o.getClass()) {
049      return false;
050    }
051    CreateTermsOfServiceStatusForUserRequestBody casted =
052        (CreateTermsOfServiceStatusForUserRequestBody) o;
053    return Objects.equals(tos, casted.tos)
054        && Objects.equals(user, casted.user)
055        && Objects.equals(isAccepted, casted.isAccepted);
056  }
057
058  @Override
059  public int hashCode() {
060    return Objects.hash(tos, user, isAccepted);
061  }
062
063  @Override
064  public String toString() {
065    return "CreateTermsOfServiceStatusForUserRequestBody{"
066        + "tos='"
067        + tos
068        + '\''
069        + ", "
070        + "user='"
071        + user
072        + '\''
073        + ", "
074        + "isAccepted='"
075        + isAccepted
076        + '\''
077        + "}";
078  }
079}