001package com.box.sdkgen.schemas.skillcardsmetadata;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.box.sdkgen.schemas.skillcard.SkillCard;
006import com.fasterxml.jackson.annotation.JsonFilter;
007import com.fasterxml.jackson.annotation.JsonProperty;
008import java.util.List;
009import java.util.Objects;
010
011/** The metadata assigned to a using for Box skills. */
012@JsonFilter("nullablePropertyFilter")
013public class SkillCardsMetadata extends SerializableObject {
014
015  /** Whether the user can edit this metadata. */
016  @JsonProperty("$canEdit")
017  protected Boolean canEdit;
018
019  /** A UUID to identify the metadata object. */
020  @JsonProperty("$id")
021  protected String id;
022
023  /** An ID for the parent folder. */
024  @JsonProperty("$parent")
025  protected String parent;
026
027  /** An ID for the scope in which this template has been applied. */
028  @JsonProperty("$scope")
029  protected String scope;
030
031  /** The name of the template. */
032  @JsonProperty("$template")
033  protected String template;
034
035  /**
036   * A unique identifier for the "type" of this instance. This is an internal system property and
037   * should not be used by a client application.
038   */
039  @JsonProperty("$type")
040  protected String type;
041
042  /**
043   * The last-known version of the template of the object. This is an internal system property and
044   * should not be used by a client application.
045   */
046  @JsonProperty("$typeVersion")
047  protected Long typeVersion;
048
049  /**
050   * The version of the metadata object. Starts at 0 and increases every time a user-defined
051   * property is modified.
052   */
053  @JsonProperty("$version")
054  protected Long version;
055
056  /** A list of Box Skill cards that have been applied to this file. */
057  protected List<SkillCard> cards;
058
059  public SkillCardsMetadata() {
060    super();
061  }
062
063  protected SkillCardsMetadata(Builder builder) {
064    super();
065    this.canEdit = builder.canEdit;
066    this.id = builder.id;
067    this.parent = builder.parent;
068    this.scope = builder.scope;
069    this.template = builder.template;
070    this.type = builder.type;
071    this.typeVersion = builder.typeVersion;
072    this.version = builder.version;
073    this.cards = builder.cards;
074    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
075  }
076
077  public Boolean getCanEdit() {
078    return canEdit;
079  }
080
081  public String getId() {
082    return id;
083  }
084
085  public String getParent() {
086    return parent;
087  }
088
089  public String getScope() {
090    return scope;
091  }
092
093  public String getTemplate() {
094    return template;
095  }
096
097  public String getType() {
098    return type;
099  }
100
101  public Long getTypeVersion() {
102    return typeVersion;
103  }
104
105  public Long getVersion() {
106    return version;
107  }
108
109  public List<SkillCard> getCards() {
110    return cards;
111  }
112
113  @Override
114  public boolean equals(Object o) {
115    if (this == o) {
116      return true;
117    }
118    if (o == null || getClass() != o.getClass()) {
119      return false;
120    }
121    SkillCardsMetadata casted = (SkillCardsMetadata) o;
122    return Objects.equals(canEdit, casted.canEdit)
123        && Objects.equals(id, casted.id)
124        && Objects.equals(parent, casted.parent)
125        && Objects.equals(scope, casted.scope)
126        && Objects.equals(template, casted.template)
127        && Objects.equals(type, casted.type)
128        && Objects.equals(typeVersion, casted.typeVersion)
129        && Objects.equals(version, casted.version)
130        && Objects.equals(cards, casted.cards);
131  }
132
133  @Override
134  public int hashCode() {
135    return Objects.hash(canEdit, id, parent, scope, template, type, typeVersion, version, cards);
136  }
137
138  @Override
139  public String toString() {
140    return "SkillCardsMetadata{"
141        + "canEdit='"
142        + canEdit
143        + '\''
144        + ", "
145        + "id='"
146        + id
147        + '\''
148        + ", "
149        + "parent='"
150        + parent
151        + '\''
152        + ", "
153        + "scope='"
154        + scope
155        + '\''
156        + ", "
157        + "template='"
158        + template
159        + '\''
160        + ", "
161        + "type='"
162        + type
163        + '\''
164        + ", "
165        + "typeVersion='"
166        + typeVersion
167        + '\''
168        + ", "
169        + "version='"
170        + version
171        + '\''
172        + ", "
173        + "cards='"
174        + cards
175        + '\''
176        + "}";
177  }
178
179  public static class Builder extends NullableFieldTracker {
180
181    protected Boolean canEdit;
182
183    protected String id;
184
185    protected String parent;
186
187    protected String scope;
188
189    protected String template;
190
191    protected String type;
192
193    protected Long typeVersion;
194
195    protected Long version;
196
197    protected List<SkillCard> cards;
198
199    public Builder canEdit(Boolean canEdit) {
200      this.canEdit = canEdit;
201      return this;
202    }
203
204    public Builder id(String id) {
205      this.id = id;
206      return this;
207    }
208
209    public Builder parent(String parent) {
210      this.parent = parent;
211      return this;
212    }
213
214    public Builder scope(String scope) {
215      this.scope = scope;
216      return this;
217    }
218
219    public Builder template(String template) {
220      this.template = template;
221      return this;
222    }
223
224    public Builder type(String type) {
225      this.type = type;
226      return this;
227    }
228
229    public Builder typeVersion(Long typeVersion) {
230      this.typeVersion = typeVersion;
231      return this;
232    }
233
234    public Builder version(Long version) {
235      this.version = version;
236      return this;
237    }
238
239    public Builder cards(List<SkillCard> cards) {
240      this.cards = cards;
241      return this;
242    }
243
244    public SkillCardsMetadata build() {
245      return new SkillCardsMetadata(this);
246    }
247  }
248}