001package com.box.sdkgen.schemas.uploadsession;
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.Objects;
008
009@JsonFilter("nullablePropertyFilter")
010public class UploadSessionSessionEndpointsField extends SerializableObject {
011
012  /** The URL to upload parts to. */
013  @JsonProperty("upload_part")
014  protected String uploadPart;
015
016  /** The URL used to commit the file. */
017  protected String commit;
018
019  /** The URL for used to abort the session. */
020  protected String abort;
021
022  /** The URL users to list all parts. */
023  @JsonProperty("list_parts")
024  protected String listParts;
025
026  /** The URL used to get the status of the upload. */
027  protected String status;
028
029  /** The URL used to get the upload log from. */
030  @JsonProperty("log_event")
031  protected String logEvent;
032
033  public UploadSessionSessionEndpointsField() {
034    super();
035  }
036
037  protected UploadSessionSessionEndpointsField(Builder builder) {
038    super();
039    this.uploadPart = builder.uploadPart;
040    this.commit = builder.commit;
041    this.abort = builder.abort;
042    this.listParts = builder.listParts;
043    this.status = builder.status;
044    this.logEvent = builder.logEvent;
045    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
046  }
047
048  public String getUploadPart() {
049    return uploadPart;
050  }
051
052  public String getCommit() {
053    return commit;
054  }
055
056  public String getAbort() {
057    return abort;
058  }
059
060  public String getListParts() {
061    return listParts;
062  }
063
064  public String getStatus() {
065    return status;
066  }
067
068  public String getLogEvent() {
069    return logEvent;
070  }
071
072  @Override
073  public boolean equals(Object o) {
074    if (this == o) {
075      return true;
076    }
077    if (o == null || getClass() != o.getClass()) {
078      return false;
079    }
080    UploadSessionSessionEndpointsField casted = (UploadSessionSessionEndpointsField) o;
081    return Objects.equals(uploadPart, casted.uploadPart)
082        && Objects.equals(commit, casted.commit)
083        && Objects.equals(abort, casted.abort)
084        && Objects.equals(listParts, casted.listParts)
085        && Objects.equals(status, casted.status)
086        && Objects.equals(logEvent, casted.logEvent);
087  }
088
089  @Override
090  public int hashCode() {
091    return Objects.hash(uploadPart, commit, abort, listParts, status, logEvent);
092  }
093
094  @Override
095  public String toString() {
096    return "UploadSessionSessionEndpointsField{"
097        + "uploadPart='"
098        + uploadPart
099        + '\''
100        + ", "
101        + "commit='"
102        + commit
103        + '\''
104        + ", "
105        + "abort='"
106        + abort
107        + '\''
108        + ", "
109        + "listParts='"
110        + listParts
111        + '\''
112        + ", "
113        + "status='"
114        + status
115        + '\''
116        + ", "
117        + "logEvent='"
118        + logEvent
119        + '\''
120        + "}";
121  }
122
123  public static class Builder extends NullableFieldTracker {
124
125    protected String uploadPart;
126
127    protected String commit;
128
129    protected String abort;
130
131    protected String listParts;
132
133    protected String status;
134
135    protected String logEvent;
136
137    public Builder uploadPart(String uploadPart) {
138      this.uploadPart = uploadPart;
139      return this;
140    }
141
142    public Builder commit(String commit) {
143      this.commit = commit;
144      return this;
145    }
146
147    public Builder abort(String abort) {
148      this.abort = abort;
149      return this;
150    }
151
152    public Builder listParts(String listParts) {
153      this.listParts = listParts;
154      return this;
155    }
156
157    public Builder status(String status) {
158      this.status = status;
159      return this;
160    }
161
162    public Builder logEvent(String logEvent) {
163      this.logEvent = logEvent;
164      return this;
165    }
166
167    public UploadSessionSessionEndpointsField build() {
168      return new UploadSessionSessionEndpointsField(this);
169    }
170  }
171}