001package com.box.sdkgen.managers.uploads;
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 PreflightFileUploadCheckRequestBody extends SerializableObject {
010
011  /** The name for the file. */
012  protected String name;
013
014  /** The size of the file in bytes. */
015  protected Integer size;
016
017  protected PreflightFileUploadCheckRequestBodyParentField parent;
018
019  public PreflightFileUploadCheckRequestBody() {
020    super();
021  }
022
023  protected PreflightFileUploadCheckRequestBody(Builder builder) {
024    super();
025    this.name = builder.name;
026    this.size = builder.size;
027    this.parent = builder.parent;
028    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
029  }
030
031  public String getName() {
032    return name;
033  }
034
035  public Integer getSize() {
036    return size;
037  }
038
039  public PreflightFileUploadCheckRequestBodyParentField getParent() {
040    return parent;
041  }
042
043  @Override
044  public boolean equals(Object o) {
045    if (this == o) {
046      return true;
047    }
048    if (o == null || getClass() != o.getClass()) {
049      return false;
050    }
051    PreflightFileUploadCheckRequestBody casted = (PreflightFileUploadCheckRequestBody) o;
052    return Objects.equals(name, casted.name)
053        && Objects.equals(size, casted.size)
054        && Objects.equals(parent, casted.parent);
055  }
056
057  @Override
058  public int hashCode() {
059    return Objects.hash(name, size, parent);
060  }
061
062  @Override
063  public String toString() {
064    return "PreflightFileUploadCheckRequestBody{"
065        + "name='"
066        + name
067        + '\''
068        + ", "
069        + "size='"
070        + size
071        + '\''
072        + ", "
073        + "parent='"
074        + parent
075        + '\''
076        + "}";
077  }
078
079  public static class Builder extends NullableFieldTracker {
080
081    protected String name;
082
083    protected Integer size;
084
085    protected PreflightFileUploadCheckRequestBodyParentField parent;
086
087    public Builder name(String name) {
088      this.name = name;
089      return this;
090    }
091
092    public Builder size(Integer size) {
093      this.size = size;
094      return this;
095    }
096
097    public Builder parent(PreflightFileUploadCheckRequestBodyParentField parent) {
098      this.parent = parent;
099      return this;
100    }
101
102    public PreflightFileUploadCheckRequestBody build() {
103      return new PreflightFileUploadCheckRequestBody(this);
104    }
105  }
106}