@SuppressWarnings("CheckReturnValue") @Test(expectedExceptions = IllegalStateException.class) public void testTTLGreaterThanMax() { UpdateCDNContainerOptions options = new UpdateCDNContainerOptions().ttl(CDN_TTL_MAX + 1); options.buildRequestHeaders().get(CDN_TTL); }
public UpdateCDNContainerOptions ttl(int ttl) { checkState(ttl >= Integer.valueOf(CDN_TTL_MIN), "ttl must be >= " + CDN_TTL_MIN); checkState(ttl <= Integer.valueOf(CDN_TTL_MAX), "ttl must be <= " + CDN_TTL_MAX); headers.put(CDN_TTL, Integer.toString(ttl)); return this; }
UpdateCDNContainerOptions extends BaseHttpRequestOptions { public UpdateCDNContainerOptions ttl(int ttl) { checkState(ttl >= Integer.valueOf(CDN_TTL_MIN), "ttl must be >= " + CDN_TTL_MIN); checkState(ttl <= Integer.valueOf(CDN_TTL_MAX), "ttl must be <= " + CDN_TTL_MAX); headers.put(CDN_TTL, Integer.toString(ttl)); return this; } }
UpdateCDNContainerOptions extends BaseHttpRequestOptions { public UpdateCDNContainerOptions ttl(int ttl) { checkState(ttl >= Integer.valueOf(CDN_TTL_MIN), "ttl must be >= " + CDN_TTL_MIN); checkState(ttl <= Integer.valueOf(CDN_TTL_MAX), "ttl must be <= " + CDN_TTL_MAX); headers.put(CDN_TTL, Integer.toString(ttl)); return this; }  }
UpdateCDNContainerOptions extends BaseHttpRequestOptions { public UpdateCDNContainerOptions ttl(int ttl) { checkState(ttl >= Integer.valueOf(CDN_TTL_MIN), "ttl must be >= " + CDN_TTL_MIN); checkState(ttl <= Integer.valueOf(CDN_TTL_MAX), "ttl must be <= " + CDN_TTL_MAX); headers.put(CDN_TTL, Integer.toString(ttl)); return this; }  UpdateCDNContainerOptions ttl(int ttl); UpdateCDNContainerOptions logRetention(boolean logRetention); UpdateCDNContainerOptions enabled(boolean enabled); UpdateCDNContainerOptions staticWebsiteDirectoryType(MediaType directoryType); UpdateCDNContainerOptions staticWebsiteErrorPage(String errorPage); UpdateCDNContainerOptions staticWebsiteIndexPage(String indexPage); UpdateCDNContainerOptions staticWebsiteListings(boolean listings); UpdateCDNContainerOptions staticWebsiteListingsCSS(String listingsCSS); }
UpdateCDNContainerOptions extends BaseHttpRequestOptions { public UpdateCDNContainerOptions ttl(int ttl) { checkState(ttl >= Integer.valueOf(CDN_TTL_MIN), "ttl must be >= " + CDN_TTL_MIN); checkState(ttl <= Integer.valueOf(CDN_TTL_MAX), "ttl must be <= " + CDN_TTL_MAX); headers.put(CDN_TTL, Integer.toString(ttl)); return this; }  UpdateCDNContainerOptions ttl(int ttl); UpdateCDNContainerOptions logRetention(boolean logRetention); UpdateCDNContainerOptions enabled(boolean enabled); UpdateCDNContainerOptions staticWebsiteDirectoryType(MediaType directoryType); UpdateCDNContainerOptions staticWebsiteErrorPage(String errorPage); UpdateCDNContainerOptions staticWebsiteIndexPage(String indexPage); UpdateCDNContainerOptions staticWebsiteListings(boolean listings); UpdateCDNContainerOptions staticWebsiteListingsCSS(String listingsCSS); static final UpdateCDNContainerOptions NONE; }