001package com.box.sdkgen.managers.folders;
002
003import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
004
005import java.util.Map;
006
007public class UpdateFolderByIdHeaders {
008
009  /**
010   * Ensures this item hasn't recently changed before making changes.
011   *
012   * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail
013   * with a `412 Precondition Failed` if it has changed since.
014   */
015  public String ifMatch;
016
017  /** Extra headers that will be included in the HTTP request. */
018  public Map<String, String> extraHeaders;
019
020  public UpdateFolderByIdHeaders() {
021    this.extraHeaders = mapOf();
022  }
023
024  protected UpdateFolderByIdHeaders(Builder builder) {
025    this.ifMatch = builder.ifMatch;
026    this.extraHeaders = builder.extraHeaders;
027  }
028
029  public String getIfMatch() {
030    return ifMatch;
031  }
032
033  public Map<String, String> getExtraHeaders() {
034    return extraHeaders;
035  }
036
037  public static class Builder {
038
039    protected String ifMatch;
040
041    protected Map<String, String> extraHeaders;
042
043    public Builder() {}
044
045    public Builder ifMatch(String ifMatch) {
046      this.ifMatch = ifMatch;
047      return this;
048    }
049
050    public Builder extraHeaders(Map<String, String> extraHeaders) {
051      this.extraHeaders = extraHeaders;
052      return this;
053    }
054
055    public UpdateFolderByIdHeaders build() {
056      if (this.extraHeaders == null) {
057        this.extraHeaders = mapOf();
058      }
059      return new UpdateFolderByIdHeaders(this);
060    }
061  }
062}