001package com.box.sdkgen.managers.metadatatemplates;
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 CreateMetadataTemplateRequestBodyFieldsOptionsField extends SerializableObject {
010
011  /**
012   * The text value of the option. This represents both the display name of the option and the
013   * internal key used when updating templates.
014   */
015  protected final String key;
016
017  public CreateMetadataTemplateRequestBodyFieldsOptionsField(@JsonProperty("key") String key) {
018    super();
019    this.key = key;
020  }
021
022  public String getKey() {
023    return key;
024  }
025
026  @Override
027  public boolean equals(Object o) {
028    if (this == o) {
029      return true;
030    }
031    if (o == null || getClass() != o.getClass()) {
032      return false;
033    }
034    CreateMetadataTemplateRequestBodyFieldsOptionsField casted =
035        (CreateMetadataTemplateRequestBodyFieldsOptionsField) o;
036    return Objects.equals(key, casted.key);
037  }
038
039  @Override
040  public int hashCode() {
041    return Objects.hash(key);
042  }
043
044  @Override
045  public String toString() {
046    return "CreateMetadataTemplateRequestBodyFieldsOptionsField{" + "key='" + key + '\'' + "}";
047  }
048}