001package com.box.sdkgen.managers.sharedlinksfolders; 002 003import static com.box.sdkgen.internal.utils.UtilsManager.mapOf; 004 005import java.util.Map; 006 007public class FindFolderForSharedLinkHeaders { 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 * A header containing the shared link and optional password for the shared link. 019 * 020 * <p>The format for this header is as follows: 021 * 022 * <p>`shared_link=[link]&shared_link_password=[password]`. 023 */ 024 public final String boxapi; 025 026 /** Extra headers that will be included in the HTTP request. */ 027 public Map<String, String> extraHeaders; 028 029 public FindFolderForSharedLinkHeaders(String boxapi) { 030 this.boxapi = boxapi; 031 this.extraHeaders = mapOf(); 032 } 033 034 protected FindFolderForSharedLinkHeaders(Builder builder) { 035 this.ifNoneMatch = builder.ifNoneMatch; 036 this.boxapi = builder.boxapi; 037 this.extraHeaders = builder.extraHeaders; 038 } 039 040 public String getIfNoneMatch() { 041 return ifNoneMatch; 042 } 043 044 public String getBoxapi() { 045 return boxapi; 046 } 047 048 public Map<String, String> getExtraHeaders() { 049 return extraHeaders; 050 } 051 052 public static class Builder { 053 054 protected String ifNoneMatch; 055 056 protected final String boxapi; 057 058 protected Map<String, String> extraHeaders; 059 060 public Builder(String boxapi) { 061 this.boxapi = boxapi; 062 } 063 064 public Builder ifNoneMatch(String ifNoneMatch) { 065 this.ifNoneMatch = ifNoneMatch; 066 return this; 067 } 068 069 public Builder extraHeaders(Map<String, String> extraHeaders) { 070 this.extraHeaders = extraHeaders; 071 return this; 072 } 073 074 public FindFolderForSharedLinkHeaders build() { 075 if (this.extraHeaders == null) { 076 this.extraHeaders = mapOf(); 077 } 078 return new FindFolderForSharedLinkHeaders(this); 079 } 080 } 081}