001package com.box.sdkgen.managers.metadatataxonomies;
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 AddMetadataTaxonomyLevelRequestBody extends SerializableObject {
011
012  /** The display name of the taxonomy level. */
013  protected final String displayName;
014
015  /** The description of the taxonomy level. */
016  protected String description;
017
018  public AddMetadataTaxonomyLevelRequestBody(@JsonProperty("displayName") String displayName) {
019    super();
020    this.displayName = displayName;
021  }
022
023  protected AddMetadataTaxonomyLevelRequestBody(Builder builder) {
024    super();
025    this.displayName = builder.displayName;
026    this.description = builder.description;
027    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
028  }
029
030  public String getDisplayName() {
031    return displayName;
032  }
033
034  public String getDescription() {
035    return description;
036  }
037
038  @Override
039  public boolean equals(Object o) {
040    if (this == o) {
041      return true;
042    }
043    if (o == null || getClass() != o.getClass()) {
044      return false;
045    }
046    AddMetadataTaxonomyLevelRequestBody casted = (AddMetadataTaxonomyLevelRequestBody) o;
047    return Objects.equals(displayName, casted.displayName)
048        && Objects.equals(description, casted.description);
049  }
050
051  @Override
052  public int hashCode() {
053    return Objects.hash(displayName, description);
054  }
055
056  @Override
057  public String toString() {
058    return "AddMetadataTaxonomyLevelRequestBody{"
059        + "displayName='"
060        + displayName
061        + '\''
062        + ", "
063        + "description='"
064        + description
065        + '\''
066        + "}";
067  }
068
069  public static class Builder extends NullableFieldTracker {
070
071    protected final String displayName;
072
073    protected String description;
074
075    public Builder(String displayName) {
076      super();
077      this.displayName = displayName;
078    }
079
080    public Builder description(String description) {
081      this.description = description;
082      return this;
083    }
084
085    public AddMetadataTaxonomyLevelRequestBody build() {
086      return new AddMetadataTaxonomyLevelRequestBody(this);
087    }
088  }
089}