001package com.box.sdkgen.schemas.comment;
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 CommentItemField extends SerializableObject {
010
011  /** The unique identifier for this object. */
012  protected String id;
013
014  /** The type for this object. */
015  protected String type;
016
017  public CommentItemField() {
018    super();
019  }
020
021  protected CommentItemField(Builder builder) {
022    super();
023    this.id = builder.id;
024    this.type = builder.type;
025    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
026  }
027
028  public String getId() {
029    return id;
030  }
031
032  public String getType() {
033    return type;
034  }
035
036  @Override
037  public boolean equals(Object o) {
038    if (this == o) {
039      return true;
040    }
041    if (o == null || getClass() != o.getClass()) {
042      return false;
043    }
044    CommentItemField casted = (CommentItemField) o;
045    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
046  }
047
048  @Override
049  public int hashCode() {
050    return Objects.hash(id, type);
051  }
052
053  @Override
054  public String toString() {
055    return "CommentItemField{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
056  }
057
058  public static class Builder extends NullableFieldTracker {
059
060    protected String id;
061
062    protected String type;
063
064    public Builder id(String id) {
065      this.id = id;
066      return this;
067    }
068
069    public Builder type(String type) {
070      this.type = type;
071      return this;
072    }
073
074    public CommentItemField build() {
075      return new CommentItemField(this);
076    }
077  }
078}