001package com.box.sdkgen.managers.downloads;
002
003import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
004
005import java.util.Map;
006
007public class GetDownloadFileUrlHeaders {
008
009  /**
010   * The byte range of the content to download.
011   *
012   * <p>The format `bytes={start_byte}-{end_byte}` can be used to specify what section of the file
013   * to download.
014   */
015  public String range;
016
017  /**
018   * The URL, and optional password, for the shared link of this item.
019   *
020   * <p>This header can be used to access items that have not been explicitly shared with a user.
021   *
022   * <p>Use the format `shared_link=[link]` or if a password is required then use
023   * `shared_link=[link]&amp;shared_link_password=[password]`.
024   *
025   * <p>This header can be used on the file or folder shared, as well as on any files or folders
026   * nested within the item.
027   */
028  public String boxapi;
029
030  /** Extra headers that will be included in the HTTP request. */
031  public Map<String, String> extraHeaders;
032
033  public GetDownloadFileUrlHeaders() {
034    this.extraHeaders = mapOf();
035  }
036
037  protected GetDownloadFileUrlHeaders(Builder builder) {
038    this.range = builder.range;
039    this.boxapi = builder.boxapi;
040    this.extraHeaders = builder.extraHeaders;
041  }
042
043  public String getRange() {
044    return range;
045  }
046
047  public String getBoxapi() {
048    return boxapi;
049  }
050
051  public Map<String, String> getExtraHeaders() {
052    return extraHeaders;
053  }
054
055  public static class Builder {
056
057    protected String range;
058
059    protected String boxapi;
060
061    protected Map<String, String> extraHeaders;
062
063    public Builder() {}
064
065    public Builder range(String range) {
066      this.range = range;
067      return this;
068    }
069
070    public Builder boxapi(String boxapi) {
071      this.boxapi = boxapi;
072      return this;
073    }
074
075    public Builder extraHeaders(Map<String, String> extraHeaders) {
076      this.extraHeaders = extraHeaders;
077      return this;
078    }
079
080    public GetDownloadFileUrlHeaders build() {
081      if (this.extraHeaders == null) {
082        this.extraHeaders = mapOf();
083      }
084      return new GetDownloadFileUrlHeaders(this);
085    }
086  }
087}