001package com.box.sdkgen.managers.files;
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 UpdateFileByIdRequestBodyCollectionsField 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 UpdateFileByIdRequestBodyCollectionsField() {
018    super();
019  }
020
021  protected UpdateFileByIdRequestBodyCollectionsField(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    UpdateFileByIdRequestBodyCollectionsField casted =
045        (UpdateFileByIdRequestBodyCollectionsField) o;
046    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
047  }
048
049  @Override
050  public int hashCode() {
051    return Objects.hash(id, type);
052  }
053
054  @Override
055  public String toString() {
056    return "UpdateFileByIdRequestBodyCollectionsField{"
057        + "id='"
058        + id
059        + '\''
060        + ", "
061        + "type='"
062        + type
063        + '\''
064        + "}";
065  }
066
067  public static class Builder extends NullableFieldTracker {
068
069    protected String id;
070
071    protected String type;
072
073    public Builder id(String id) {
074      this.id = id;
075      return this;
076    }
077
078    public Builder type(String type) {
079      this.type = type;
080      return this;
081    }
082
083    public UpdateFileByIdRequestBodyCollectionsField build() {
084      return new UpdateFileByIdRequestBodyCollectionsField(this);
085    }
086  }
087}