001package com.box.sdkgen.schemas.timelineskillcard;
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.List;
008import java.util.Objects;
009
010@JsonFilter("nullablePropertyFilter")
011public class TimelineSkillCardEntriesField extends SerializableObject {
012
013  /**
014   * The text of the entry. This would be the display name for an item being placed on the timeline,
015   * for example the name of the person who was detected in a video.
016   */
017  protected String text;
018
019  /** Defines a list of timestamps for when this item should appear on the timeline. */
020  protected List<TimelineSkillCardEntriesAppearsField> appears;
021
022  /**
023   * The image to show on a for an entry that appears on a timeline. This image URL is required for
024   * every entry.
025   *
026   * <p>The image will be shown in a list of items (for example faces), and clicking the image will
027   * show the user where that entry appears during the duration of this entry.
028   */
029  @JsonProperty("image_url")
030  protected String imageUrl;
031
032  public TimelineSkillCardEntriesField() {
033    super();
034  }
035
036  protected TimelineSkillCardEntriesField(Builder builder) {
037    super();
038    this.text = builder.text;
039    this.appears = builder.appears;
040    this.imageUrl = builder.imageUrl;
041    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
042  }
043
044  public String getText() {
045    return text;
046  }
047
048  public List<TimelineSkillCardEntriesAppearsField> getAppears() {
049    return appears;
050  }
051
052  public String getImageUrl() {
053    return imageUrl;
054  }
055
056  @Override
057  public boolean equals(Object o) {
058    if (this == o) {
059      return true;
060    }
061    if (o == null || getClass() != o.getClass()) {
062      return false;
063    }
064    TimelineSkillCardEntriesField casted = (TimelineSkillCardEntriesField) o;
065    return Objects.equals(text, casted.text)
066        && Objects.equals(appears, casted.appears)
067        && Objects.equals(imageUrl, casted.imageUrl);
068  }
069
070  @Override
071  public int hashCode() {
072    return Objects.hash(text, appears, imageUrl);
073  }
074
075  @Override
076  public String toString() {
077    return "TimelineSkillCardEntriesField{"
078        + "text='"
079        + text
080        + '\''
081        + ", "
082        + "appears='"
083        + appears
084        + '\''
085        + ", "
086        + "imageUrl='"
087        + imageUrl
088        + '\''
089        + "}";
090  }
091
092  public static class Builder extends NullableFieldTracker {
093
094    protected String text;
095
096    protected List<TimelineSkillCardEntriesAppearsField> appears;
097
098    protected String imageUrl;
099
100    public Builder text(String text) {
101      this.text = text;
102      return this;
103    }
104
105    public Builder appears(List<TimelineSkillCardEntriesAppearsField> appears) {
106      this.appears = appears;
107      return this;
108    }
109
110    public Builder imageUrl(String imageUrl) {
111      this.imageUrl = imageUrl;
112      return this;
113    }
114
115    public TimelineSkillCardEntriesField build() {
116      return new TimelineSkillCardEntriesField(this);
117    }
118  }
119}