001package com.box.sdkgen.schemas.classificationtemplate;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.fasterxml.jackson.annotation.JsonFilter;
006import com.fasterxml.jackson.annotation.JsonProperty;
007import java.util.Objects;
008
009@JsonFilter("nullablePropertyFilter")
010public class ClassificationTemplateFieldsOptionsStaticConfigClassificationField
011    extends SerializableObject {
012
013  /** A longer description of the classification. */
014  protected String classificationDefinition;
015
016  /**
017   * An internal Box identifier used to assign a color to a classification label.
018   *
019   * <p>Mapping between a `colorID` and a color may change without notice. Currently, the color
020   * mappings are as follows.
021   *
022   * <p>* `0`: Yellow. * `1`: Orange. * `2`: Watermelon red. * `3`: Purple rain. * `4`: Light blue.
023   * * `5`: Dark blue. * `6`: Light green. * `7`: Gray.
024   */
025  @JsonProperty("colorID")
026  protected Long colorId;
027
028  public ClassificationTemplateFieldsOptionsStaticConfigClassificationField() {
029    super();
030  }
031
032  protected ClassificationTemplateFieldsOptionsStaticConfigClassificationField(Builder builder) {
033    super();
034    this.classificationDefinition = builder.classificationDefinition;
035    this.colorId = builder.colorId;
036    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
037  }
038
039  public String getClassificationDefinition() {
040    return classificationDefinition;
041  }
042
043  public Long getColorId() {
044    return colorId;
045  }
046
047  @Override
048  public boolean equals(Object o) {
049    if (this == o) {
050      return true;
051    }
052    if (o == null || getClass() != o.getClass()) {
053      return false;
054    }
055    ClassificationTemplateFieldsOptionsStaticConfigClassificationField casted =
056        (ClassificationTemplateFieldsOptionsStaticConfigClassificationField) o;
057    return Objects.equals(classificationDefinition, casted.classificationDefinition)
058        && Objects.equals(colorId, casted.colorId);
059  }
060
061  @Override
062  public int hashCode() {
063    return Objects.hash(classificationDefinition, colorId);
064  }
065
066  @Override
067  public String toString() {
068    return "ClassificationTemplateFieldsOptionsStaticConfigClassificationField{"
069        + "classificationDefinition='"
070        + classificationDefinition
071        + '\''
072        + ", "
073        + "colorId='"
074        + colorId
075        + '\''
076        + "}";
077  }
078
079  public static class Builder extends NullableFieldTracker {
080
081    protected String classificationDefinition;
082
083    protected Long colorId;
084
085    public Builder classificationDefinition(String classificationDefinition) {
086      this.classificationDefinition = classificationDefinition;
087      return this;
088    }
089
090    public Builder colorId(Long colorId) {
091      this.colorId = colorId;
092      return this;
093    }
094
095    public ClassificationTemplateFieldsOptionsStaticConfigClassificationField build() {
096      return new ClassificationTemplateFieldsOptionsStaticConfigClassificationField(this);
097    }
098  }
099}