1 /* 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"). 5 * You may not use this file except in compliance with the License. 6 * A copy of the License is located at 7 * 8 * http://aws.amazon.com/apache2.0 9 * 10 * or in the "license" file accompanying this file. This file is distributed 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 * express or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package software.amazon.awssdk.services.cloudfront.cookie; 17 18 import software.amazon.awssdk.annotations.NotThreadSafe; 19 import software.amazon.awssdk.annotations.SdkPublicApi; 20 import software.amazon.awssdk.utils.builder.CopyableBuilder; 21 import software.amazon.awssdk.utils.builder.ToCopyableBuilder; 22 23 /** 24 * Base interface class for CloudFront cookies with canned policies 25 */ 26 @SdkPublicApi 27 public interface CookiesForCannedPolicy extends SignedCookie, 28 ToCopyableBuilder<CookiesForCannedPolicy.Builder, CookiesForCannedPolicy> { 29 30 /** 31 * Returns the cookie expires header value that can be appended to an HTTP GET request 32 * i.e., "CloudFront-Expires=[EXPIRES_VALUE]" 33 */ expiresHeaderValue()34 String expiresHeaderValue(); 35 36 @NotThreadSafe 37 interface Builder extends CopyableBuilder<CookiesForCannedPolicy.Builder, CookiesForCannedPolicy> { 38 39 /** 40 * Configure the resource URL 41 */ resourceUrl(String resourceUrl)42 Builder resourceUrl(String resourceUrl); 43 44 /** 45 * Configure the cookie signature header value 46 */ signatureHeaderValue(String signatureHeaderValue)47 Builder signatureHeaderValue(String signatureHeaderValue); 48 49 /** 50 * Configure the cookie key pair ID header value 51 */ keyPairIdHeaderValue(String keyPairIdHeaderValue)52 Builder keyPairIdHeaderValue(String keyPairIdHeaderValue); 53 54 /** 55 * Configure the cookie expires header value 56 */ expiresHeaderValue(String expiresHeaderValue)57 Builder expiresHeaderValue(String expiresHeaderValue); 58 } 59 60 } 61