001package com.box.sdkgen.managers.folders; 002 003import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; 004 005import java.util.Map; 006 007public class GetFolderByIdHeaders { 008 009 /** 010 * Ensures an item is only returned if it has changed. 011 * 012 * <p>Pass in the item's last observed `etag` value into this header and the endpoint will fail 013 * with a `304 Not Modified` if the item has not changed since. 014 */ 015 public String ifNoneMatch; 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]&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 GetFolderByIdHeaders() { 034 this.extraHeaders = mapOf(); 035 } 036 037 protected GetFolderByIdHeaders(Builder builder) { 038 this.ifNoneMatch = builder.ifNoneMatch; 039 this.boxapi = builder.boxapi; 040 this.extraHeaders = builder.extraHeaders; 041 } 042 043 public String getIfNoneMatch() { 044 return ifNoneMatch; 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 ifNoneMatch; 058 059 protected String boxapi; 060 061 protected Map<String, String> extraHeaders; 062 063 public Builder() {} 064 065 public Builder ifNoneMatch(String ifNoneMatch) { 066 this.ifNoneMatch = ifNoneMatch; 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 GetFolderByIdHeaders build() { 081 if (this.extraHeaders == null) { 082 this.extraHeaders = mapOf(); 083 } 084 return new GetFolderByIdHeaders(this); 085 } 086 } 087}