// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.networkservices;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceState;
import com.pulumi.gcp.networkservices.outputs.EdgeCacheServiceLogConfig;
import com.pulumi.gcp.networkservices.outputs.EdgeCacheServiceRouting;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * EdgeCacheService defines the IP addresses, protocols, security policies, cache policies and routing configuration.
 * 
 * &gt; **Warning:** These resources require allow-listing to use, and are not openly available to all Cloud customers. Engage with your Cloud account team to discuss how to onboard.
 * 
 * ## Example Usage
 * ### Network Services Edge Cache Service Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.storage.Bucket;
 * import com.pulumi.gcp.storage.BucketArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
 * import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginTimeoutArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheService;
 * import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var dest = new Bucket(&#34;dest&#34;, BucketArgs.builder()        
 *             .location(&#34;US&#34;)
 *             .forceDestroy(true)
 *             .build());
 * 
 *         var instanceEdgeCacheOrigin = new EdgeCacheOrigin(&#34;instanceEdgeCacheOrigin&#34;, EdgeCacheOriginArgs.builder()        
 *             .originAddress(dest.url())
 *             .description(&#34;The default bucket for media edge test&#34;)
 *             .maxAttempts(2)
 *             .timeout(EdgeCacheOriginTimeoutArgs.builder()
 *                 .connectTimeout(&#34;10s&#34;)
 *                 .build())
 *             .build());
 * 
 *         var instanceEdgeCacheService = new EdgeCacheService(&#34;instanceEdgeCacheService&#34;, EdgeCacheServiceArgs.builder()        
 *             .description(&#34;some description&#34;)
 *             .routing(EdgeCacheServiceRoutingArgs.builder()
 *                 .hostRules(EdgeCacheServiceRoutingHostRuleArgs.builder()
 *                     .description(&#34;host rule description&#34;)
 *                     .hosts(&#34;sslcert.tf-test.club&#34;)
 *                     .pathMatcher(&#34;routes&#34;)
 *                     .build())
 *                 .pathMatchers(EdgeCacheServiceRoutingPathMatcherArgs.builder()
 *                     .name(&#34;routes&#34;)
 *                     .routeRules(EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                         .description(&#34;a route rule to match against&#34;)
 *                         .priority(1)
 *                         .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                             .prefixMatch(&#34;/&#34;)
 *                             .build())
 *                         .origin(instanceEdgeCacheOrigin.name())
 *                         .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                             .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                 .cacheMode(&#34;CACHE_ALL_STATIC&#34;)
 *                                 .defaultTtl(&#34;3600s&#34;)
 *                                 .build())
 *                             .build())
 *                         .headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
 *                             .responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
 *                                 .headerName(&#34;x-cache-status&#34;)
 *                                 .headerValue(&#34;{cdn_cache_status}&#34;)
 *                                 .build())
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Network Services Edge Cache Service Advanced
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.storage.Bucket;
 * import com.pulumi.gcp.storage.BucketArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
 * import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginTimeoutArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheService;
 * import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceLogConfigArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var dest = new Bucket(&#34;dest&#34;, BucketArgs.builder()        
 *             .location(&#34;US&#34;)
 *             .forceDestroy(true)
 *             .build());
 * 
 *         var google = new EdgeCacheOrigin(&#34;google&#34;, EdgeCacheOriginArgs.builder()        
 *             .originAddress(&#34;google.com&#34;)
 *             .description(&#34;The default bucket for media edge test&#34;)
 *             .maxAttempts(2)
 *             .timeout(EdgeCacheOriginTimeoutArgs.builder()
 *                 .connectTimeout(&#34;10s&#34;)
 *                 .build())
 *             .build());
 * 
 *         var instanceEdgeCacheOrigin = new EdgeCacheOrigin(&#34;instanceEdgeCacheOrigin&#34;, EdgeCacheOriginArgs.builder()        
 *             .originAddress(dest.url())
 *             .description(&#34;The default bucket for media edge test&#34;)
 *             .maxAttempts(2)
 *             .timeout(EdgeCacheOriginTimeoutArgs.builder()
 *                 .connectTimeout(&#34;10s&#34;)
 *                 .build())
 *             .build());
 * 
 *         var instanceEdgeCacheService = new EdgeCacheService(&#34;instanceEdgeCacheService&#34;, EdgeCacheServiceArgs.builder()        
 *             .description(&#34;some description&#34;)
 *             .disableQuic(true)
 *             .disableHttp2(true)
 *             .labels(Map.of(&#34;a&#34;, &#34;b&#34;))
 *             .routing(EdgeCacheServiceRoutingArgs.builder()
 *                 .hostRules(                
 *                     EdgeCacheServiceRoutingHostRuleArgs.builder()
 *                         .description(&#34;host rule description&#34;)
 *                         .hosts(&#34;sslcert.tf-test.club&#34;)
 *                         .pathMatcher(&#34;routes&#34;)
 *                         .build(),
 *                     EdgeCacheServiceRoutingHostRuleArgs.builder()
 *                         .description(&#34;host rule2&#34;)
 *                         .hosts(&#34;sslcert.tf-test2.club&#34;)
 *                         .pathMatcher(&#34;routes&#34;)
 *                         .build(),
 *                     EdgeCacheServiceRoutingHostRuleArgs.builder()
 *                         .description(&#34;host rule3&#34;)
 *                         .hosts(&#34;sslcert.tf-test3.club&#34;)
 *                         .pathMatcher(&#34;routesAdvanced&#34;)
 *                         .build())
 *                 .pathMatchers(                
 *                     EdgeCacheServiceRoutingPathMatcherArgs.builder()
 *                         .name(&#34;routes&#34;)
 *                         .routeRules(EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                             .description(&#34;a route rule to match against&#34;)
 *                             .priority(1)
 *                             .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                 .prefixMatch(&#34;/&#34;)
 *                                 .build())
 *                             .origin(instanceEdgeCacheOrigin.name())
 *                             .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                 .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                     .cacheMode(&#34;CACHE_ALL_STATIC&#34;)
 *                                     .defaultTtl(&#34;3600s&#34;)
 *                                     .build())
 *                                 .build())
 *                             .headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
 *                                 .responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
 *                                     .headerName(&#34;x-cache-status&#34;)
 *                                     .headerValue(&#34;{cdn_cache_status}&#34;)
 *                                     .build())
 *                                 .build())
 *                             .build())
 *                         .build(),
 *                     EdgeCacheServiceRoutingPathMatcherArgs.builder()
 *                         .name(&#34;routesAdvanced&#34;)
 *                         .description(&#34;an advanced ruleset&#34;)
 *                         .routeRules(                        
 *                             EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                                 .description(&#34;an advanced route rule to match against&#34;)
 *                                 .priority(1)
 *                                 .matchRules(                                
 *                                     EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                         .prefixMatch(&#34;/potato/&#34;)
 *                                         .queryParameterMatches(                                        
 *                                             EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs.builder()
 *                                                 .name(&#34;debug&#34;)
 *                                                 .presentMatch(true)
 *                                                 .build(),
 *                                             EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs.builder()
 *                                                 .name(&#34;state&#34;)
 *                                                 .exactMatch(&#34;debug&#34;)
 *                                                 .build())
 *                                         .build(),
 *                                     EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                         .fullPathMatch(&#34;/apple&#34;)
 *                                         .build())
 *                                 .headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
 *                                     .requestHeaderToAdds(                                    
 *                                         EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs.builder()
 *                                             .headerName(&#34;debug&#34;)
 *                                             .headerValue(&#34;true&#34;)
 *                                             .replace(true)
 *                                             .build(),
 *                                         EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs.builder()
 *                                             .headerName(&#34;potato&#34;)
 *                                             .headerValue(&#34;plant&#34;)
 *                                             .build())
 *                                     .responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
 *                                         .headerName(&#34;potato&#34;)
 *                                         .headerValue(&#34;plant&#34;)
 *                                         .replace(true)
 *                                         .build())
 *                                     .requestHeaderToRemoves(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs.builder()
 *                                         .headerName(&#34;prod&#34;)
 *                                         .build())
 *                                     .responseHeaderToRemoves(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs.builder()
 *                                         .headerName(&#34;prod&#34;)
 *                                         .build())
 *                                     .build())
 *                                 .origin(instanceEdgeCacheOrigin.name())
 *                                 .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                     .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                         .cacheMode(&#34;CACHE_ALL_STATIC&#34;)
 *                                         .defaultTtl(&#34;3800s&#34;)
 *                                         .clientTtl(&#34;3600s&#34;)
 *                                         .maxTtl(&#34;9000s&#34;)
 *                                         .cacheKeyPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs.builder()
 *                                             .includeProtocol(true)
 *                                             .excludeHost(true)
 *                                             .includedQueryParameters(                                            
 *                                                 &#34;apple&#34;,
 *                                                 &#34;dev&#34;,
 *                                                 &#34;santa&#34;,
 *                                                 &#34;claus&#34;)
 *                                             .includedHeaderNames(&#34;banana&#34;)
 *                                             .includedCookieNames(&#34;orange&#34;)
 *                                             .build())
 *                                         .negativeCaching(true)
 *                                         .signedRequestMode(&#34;DISABLED&#34;)
 *                                         .negativeCachingPolicy(Map.of(&#34;500&#34;, &#34;3000s&#34;))
 *                                         .build())
 *                                     .urlRewrite(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs.builder()
 *                                         .pathPrefixRewrite(&#34;/dev&#34;)
 *                                         .hostRewrite(&#34;dev.club&#34;)
 *                                         .build())
 *                                     .corsPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs.builder()
 *                                         .maxAge(&#34;2500s&#34;)
 *                                         .allowCredentials(true)
 *                                         .allowOrigins(&#34;*&#34;)
 *                                         .allowMethods(&#34;GET&#34;)
 *                                         .allowHeaders(&#34;dev&#34;)
 *                                         .exposeHeaders(&#34;prod&#34;)
 *                                         .build())
 *                                     .build())
 *                                 .build(),
 *                             EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                                 .description(&#34;a second route rule to match against&#34;)
 *                                 .priority(2)
 *                                 .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                     .fullPathMatch(&#34;/yay&#34;)
 *                                     .build())
 *                                 .origin(instanceEdgeCacheOrigin.name())
 *                                 .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                     .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                         .cacheMode(&#34;CACHE_ALL_STATIC&#34;)
 *                                         .defaultTtl(&#34;3600s&#34;)
 *                                         .cacheKeyPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs.builder()
 *                                             .excludedQueryParameters(&#34;dev&#34;)
 *                                             .build())
 *                                         .build())
 *                                     .corsPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs.builder()
 *                                         .maxAge(&#34;3000s&#34;)
 *                                         .allowHeaders(&#34;dev&#34;)
 *                                         .disabled(true)
 *                                         .build())
 *                                     .build())
 *                                 .build())
 *                         .build())
 *                 .build())
 *             .logConfig(EdgeCacheServiceLogConfigArgs.builder()
 *                 .enable(true)
 *                 .sampleRate(0.01)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Network Services Edge Cache Service Dual Token
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.secretmanager.Secret;
 * import com.pulumi.gcp.secretmanager.SecretArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
 * import com.pulumi.gcp.secretmanager.SecretVersion;
 * import com.pulumi.gcp.secretmanager.SecretVersionArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheKeyset;
 * import com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetPublicKeyArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetValidationSharedKeyArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
 * import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheService;
 * import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var secret_basic = new Secret(&#34;secret-basic&#34;, SecretArgs.builder()        
 *             .secretId(&#34;secret-name&#34;)
 *             .replication(SecretReplicationArgs.builder()
 *                 .automatic(true)
 *                 .build())
 *             .build());
 * 
 *         var secret_version_basic = new SecretVersion(&#34;secret-version-basic&#34;, SecretVersionArgs.builder()        
 *             .secret(secret_basic.id())
 *             .secretData(&#34;secret-data&#34;)
 *             .build());
 * 
 *         var keyset = new EdgeCacheKeyset(&#34;keyset&#34;, EdgeCacheKeysetArgs.builder()        
 *             .description(&#34;The default keyset&#34;)
 *             .publicKeys(EdgeCacheKeysetPublicKeyArgs.builder()
 *                 .id(&#34;my-public-key&#34;)
 *                 .managed(true)
 *                 .build())
 *             .validationSharedKeys(EdgeCacheKeysetValidationSharedKeyArgs.builder()
 *                 .secretVersion(secret_version_basic.id())
 *                 .build())
 *             .build());
 * 
 *         var instanceEdgeCacheOrigin = new EdgeCacheOrigin(&#34;instanceEdgeCacheOrigin&#34;, EdgeCacheOriginArgs.builder()        
 *             .originAddress(&#34;gs://media-edge-default&#34;)
 *             .description(&#34;The default bucket for media edge test&#34;)
 *             .build());
 * 
 *         var instanceEdgeCacheService = new EdgeCacheService(&#34;instanceEdgeCacheService&#34;, EdgeCacheServiceArgs.builder()        
 *             .description(&#34;some description&#34;)
 *             .routing(EdgeCacheServiceRoutingArgs.builder()
 *                 .hostRules(EdgeCacheServiceRoutingHostRuleArgs.builder()
 *                     .description(&#34;host rule description&#34;)
 *                     .hosts(&#34;sslcert.tf-test.club&#34;)
 *                     .pathMatcher(&#34;routes&#34;)
 *                     .build())
 *                 .pathMatchers(EdgeCacheServiceRoutingPathMatcherArgs.builder()
 *                     .name(&#34;routes&#34;)
 *                     .routeRules(                    
 *                         EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                             .description(&#34;a route rule to match against master playlist&#34;)
 *                             .priority(1)
 *                             .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                 .pathTemplateMatch(&#34;/master.m3u8&#34;)
 *                                 .build())
 *                             .origin(instanceEdgeCacheOrigin.name())
 *                             .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                 .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                     .signedRequestMode(&#34;REQUIRE_TOKENS&#34;)
 *                                     .signedRequestKeyset(keyset.id())
 *                                     .signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
 *                                         .tokenQueryParameter(&#34;edge-cache-token&#34;)
 *                                         .build())
 *                                     .signedRequestMaximumExpirationTtl(&#34;600s&#34;)
 *                                     .addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
 *                                         .actions(&#34;GENERATE_COOKIE&#34;)
 *                                         .keyset(keyset.id())
 *                                         .copiedParameters(                                        
 *                                             &#34;PathGlobs&#34;,
 *                                             &#34;SessionID&#34;)
 *                                         .build())
 *                                     .build())
 *                                 .build())
 *                             .build(),
 *                         EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                             .description(&#34;a route rule to match against all playlists&#34;)
 *                             .priority(2)
 *                             .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                 .pathTemplateMatch(&#34;/*.m3u8&#34;)
 *                                 .build())
 *                             .origin(instanceEdgeCacheOrigin.name())
 *                             .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                 .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                     .signedRequestMode(&#34;REQUIRE_TOKENS&#34;)
 *                                     .signedRequestKeyset(keyset.id())
 *                                     .signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
 *                                         .tokenQueryParameter(&#34;hdnts&#34;)
 *                                         .allowedSignatureAlgorithms(                                        
 *                                             &#34;ED25519&#34;,
 *                                             &#34;HMAC_SHA_256&#34;,
 *                                             &#34;HMAC_SHA1&#34;)
 *                                         .build())
 *                                     .addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
 *                                         .actions(&#34;GENERATE_TOKEN_HLS_COOKIELESS&#34;)
 *                                         .keyset(keyset.id())
 *                                         .tokenTtl(&#34;1200s&#34;)
 *                                         .tokenQueryParameter(&#34;hdntl&#34;)
 *                                         .copiedParameters(&#34;URLPrefix&#34;)
 *                                         .build())
 *                                     .build())
 *                                 .build())
 *                             .build(),
 *                         EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
 *                             .description(&#34;a route rule to match against&#34;)
 *                             .priority(3)
 *                             .matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
 *                                 .pathTemplateMatch(&#34;/**.m3u8&#34;)
 *                                 .build())
 *                             .origin(instanceEdgeCacheOrigin.name())
 *                             .routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
 *                                 .cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
 *                                     .signedRequestMode(&#34;REQUIRE_TOKENS&#34;)
 *                                     .signedRequestKeyset(keyset.id())
 *                                     .signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
 *                                         .tokenQueryParameter(&#34;hdntl&#34;)
 *                                         .build())
 *                                     .addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
 *                                         .actions(&#34;PROPAGATE_TOKEN_HLS_COOKIELESS&#34;)
 *                                         .tokenQueryParameter(&#34;hdntl&#34;)
 *                                         .build())
 *                                     .build())
 *                                 .build())
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * EdgeCacheService can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default projects/{{project}}/locations/global/edgeCacheServices/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default {{project}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default {{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:networkservices/edgeCacheService:EdgeCacheService")
public class EdgeCacheService extends com.pulumi.resources.CustomResource {
    /**
     * A human-readable description of the hostRule.
     * 
     * (Optional)
     * A human-readable description of the resource.
     * 
     * (Optional)
     * A human-readable description of the routeRule.
     * 
     * (Optional)
     * A human-readable description of the resource.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return A human-readable description of the hostRule.
     * 
     * (Optional)
     * A human-readable description of the resource.
     * 
     * (Optional)
     * A human-readable description of the routeRule.
     * 
     * (Optional)
     * A human-readable description of the resource.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * Disables HTTP/2.
     * HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection.
     * Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
     * 
     */
    @Export(name="disableHttp2", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> disableHttp2;

    /**
     * @return Disables HTTP/2.
     * HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection.
     * Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
     * 
     */
    public Output<Optional<Boolean>> disableHttp2() {
        return Codegen.optional(this.disableHttp2);
    }
    /**
     * HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
     * 
     */
    @Export(name="disableQuic", type=Boolean.class, parameters={})
    private Output<Boolean> disableQuic;

    /**
     * @return HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
     * 
     */
    public Output<Boolean> disableQuic() {
        return this.disableQuic;
    }
    /**
     * Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
     * 
     */
    @Export(name="edgeSecurityPolicy", type=String.class, parameters={})
    private Output</* @Nullable */ String> edgeSecurityPolicy;

    /**
     * @return Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
     * 
     */
    public Output<Optional<String>> edgeSecurityPolicy() {
        return Codegen.optional(this.edgeSecurityPolicy);
    }
    /**
     * URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService.
     * Note that only &#34;global&#34; certificates with a &#34;scope&#34; of &#34;EDGE_CACHE&#34; can be attached to an EdgeCacheService.
     * 
     */
    @Export(name="edgeSslCertificates", type=List.class, parameters={String.class})
    private Output</* @Nullable */ List<String>> edgeSslCertificates;

    /**
     * @return URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService.
     * Note that only &#34;global&#34; certificates with a &#34;scope&#34; of &#34;EDGE_CACHE&#34; can be attached to an EdgeCacheService.
     * 
     */
    public Output<Optional<List<String>>> edgeSslCertificates() {
        return Codegen.optional(this.edgeSslCertificates);
    }
    /**
     * The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
     * 
     */
    @Export(name="ipv4Addresses", type=List.class, parameters={String.class})
    private Output<List<String>> ipv4Addresses;

    /**
     * @return The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
     * 
     */
    public Output<List<String>> ipv4Addresses() {
        return this.ipv4Addresses;
    }
    /**
     * The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
     * 
     */
    @Export(name="ipv6Addresses", type=List.class, parameters={String.class})
    private Output<List<String>> ipv6Addresses;

    /**
     * @return The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
     * 
     */
    public Output<List<String>> ipv6Addresses() {
        return this.ipv6Addresses;
    }
    /**
     * Set of label tags associated with the EdgeCache resource.
     * 
     */
    @Export(name="labels", type=Map.class, parameters={String.class, String.class})
    private Output</* @Nullable */ Map<String,String>> labels;

    /**
     * @return Set of label tags associated with the EdgeCache resource.
     * 
     */
    public Output<Optional<Map<String,String>>> labels() {
        return Codegen.optional(this.labels);
    }
    /**
     * Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging.
     * Structure is documented below.
     * 
     */
    @Export(name="logConfig", type=EdgeCacheServiceLogConfig.class, parameters={})
    private Output</* @Nullable */ EdgeCacheServiceLogConfig> logConfig;

    /**
     * @return Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging.
     * Structure is documented below.
     * 
     */
    public Output<Optional<EdgeCacheServiceLogConfig>> logConfig() {
        return Codegen.optional(this.logConfig);
    }
    /**
     * Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * Require TLS (HTTPS) for all clients connecting to this service.
     * Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443).
     * You must have at least one (1) edgeSslCertificate specified to enable this.
     * 
     */
    @Export(name="requireTls", type=Boolean.class, parameters={})
    private Output<Boolean> requireTls;

    /**
     * @return Require TLS (HTTPS) for all clients connecting to this service.
     * Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443).
     * You must have at least one (1) edgeSslCertificate specified to enable this.
     * 
     */
    public Output<Boolean> requireTls() {
        return this.requireTls;
    }
    /**
     * Defines how requests are routed, modified, cached and/or which origin content is filled from.
     * Structure is documented below.
     * 
     */
    @Export(name="routing", type=EdgeCacheServiceRouting.class, parameters={})
    private Output<EdgeCacheServiceRouting> routing;

    /**
     * @return Defines how requests are routed, modified, cached and/or which origin content is filled from.
     * Structure is documented below.
     * 
     */
    public Output<EdgeCacheServiceRouting> routing() {
        return this.routing;
    }
    /**
     * URL of the SslPolicy resource that will be associated with the EdgeCacheService.
     * If not set, the EdgeCacheService has no SSL policy configured, and will default to the &#34;COMPATIBLE&#34; policy.
     * 
     */
    @Export(name="sslPolicy", type=String.class, parameters={})
    private Output</* @Nullable */ String> sslPolicy;

    /**
     * @return URL of the SslPolicy resource that will be associated with the EdgeCacheService.
     * If not set, the EdgeCacheService has no SSL policy configured, and will default to the &#34;COMPATIBLE&#34; policy.
     * 
     */
    public Output<Optional<String>> sslPolicy() {
        return Codegen.optional(this.sslPolicy);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public EdgeCacheService(String name) {
        this(name, EdgeCacheServiceArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public EdgeCacheService(String name, EdgeCacheServiceArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public EdgeCacheService(String name, EdgeCacheServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:networkservices/edgeCacheService:EdgeCacheService", name, args == null ? EdgeCacheServiceArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private EdgeCacheService(String name, Output<String> id, @Nullable EdgeCacheServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:networkservices/edgeCacheService:EdgeCacheService", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static EdgeCacheService get(String name, Output<String> id, @Nullable EdgeCacheServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new EdgeCacheService(name, id, state, options);
    }
}
