001package com.box.sdkgen.schemas.filefull;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.fasterxml.jackson.annotation.JsonFilter;
006import java.util.Objects;
007
008@JsonFilter("nullablePropertyFilter")
009public class FileFullClassificationField extends SerializableObject {
010
011  /** The name of the classification. */
012  protected String name;
013
014  /** An explanation of the meaning of this classification. */
015  protected String definition;
016
017  /**
018   * The color that is used to display the classification label in a user-interface. Colors are
019   * defined by the admin or co-admin who created the classification in the Box web app.
020   */
021  protected String color;
022
023  public FileFullClassificationField() {
024    super();
025  }
026
027  protected FileFullClassificationField(Builder builder) {
028    super();
029    this.name = builder.name;
030    this.definition = builder.definition;
031    this.color = builder.color;
032    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
033  }
034
035  public String getName() {
036    return name;
037  }
038
039  public String getDefinition() {
040    return definition;
041  }
042
043  public String getColor() {
044    return color;
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    FileFullClassificationField casted = (FileFullClassificationField) o;
056    return Objects.equals(name, casted.name)
057        && Objects.equals(definition, casted.definition)
058        && Objects.equals(color, casted.color);
059  }
060
061  @Override
062  public int hashCode() {
063    return Objects.hash(name, definition, color);
064  }
065
066  @Override
067  public String toString() {
068    return "FileFullClassificationField{"
069        + "name='"
070        + name
071        + '\''
072        + ", "
073        + "definition='"
074        + definition
075        + '\''
076        + ", "
077        + "color='"
078        + color
079        + '\''
080        + "}";
081  }
082
083  public static class Builder extends NullableFieldTracker {
084
085    protected String name;
086
087    protected String definition;
088
089    protected String color;
090
091    public Builder name(String name) {
092      this.name = name;
093      return this;
094    }
095
096    public Builder definition(String definition) {
097      this.definition = definition;
098      return this;
099    }
100
101    public Builder color(String color) {
102      this.color = color;
103      return this;
104    }
105
106    public FileFullClassificationField build() {
107      return new FileFullClassificationField(this);
108    }
109  }
110}