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