All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.burkard.cdk.services.cloudfront.AddBehaviorOptions.scala Maven / Gradle / Ivy

The newest version!
package io.burkard.cdk.services.cloudfront

import scala.collection.JavaConverters._

@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object AddBehaviorOptions {

  def apply(
    originRequestPolicy: Option[software.amazon.awscdk.services.cloudfront.IOriginRequestPolicy] = None,
    edgeLambdas: Option[List[_ <: software.amazon.awscdk.services.cloudfront.EdgeLambda]] = None,
    cachePolicy: Option[software.amazon.awscdk.services.cloudfront.ICachePolicy] = None,
    trustedKeyGroups: Option[List[_ <: software.amazon.awscdk.services.cloudfront.IKeyGroup]] = None,
    responseHeadersPolicy: Option[software.amazon.awscdk.services.cloudfront.IResponseHeadersPolicy] = None,
    functionAssociations: Option[List[_ <: software.amazon.awscdk.services.cloudfront.FunctionAssociation]] = None,
    allowedMethods: Option[software.amazon.awscdk.services.cloudfront.AllowedMethods] = None,
    viewerProtocolPolicy: Option[software.amazon.awscdk.services.cloudfront.ViewerProtocolPolicy] = None,
    compress: Option[Boolean] = None,
    smoothStreaming: Option[Boolean] = None,
    cachedMethods: Option[software.amazon.awscdk.services.cloudfront.CachedMethods] = None
  ): software.amazon.awscdk.services.cloudfront.AddBehaviorOptions =
    (new software.amazon.awscdk.services.cloudfront.AddBehaviorOptions.Builder)
      .originRequestPolicy(originRequestPolicy.orNull)
      .edgeLambdas(edgeLambdas.map(_.asJava).orNull)
      .cachePolicy(cachePolicy.orNull)
      .trustedKeyGroups(trustedKeyGroups.map(_.asJava).orNull)
      .responseHeadersPolicy(responseHeadersPolicy.orNull)
      .functionAssociations(functionAssociations.map(_.asJava).orNull)
      .allowedMethods(allowedMethods.orNull)
      .viewerProtocolPolicy(viewerProtocolPolicy.orNull)
      .compress(compress.map(Boolean.box).orNull)
      .smoothStreaming(smoothStreaming.map(Boolean.box).orNull)
      .cachedMethods(cachedMethods.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy