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

io.burkard.cdk.services.apigateway.RestApiProps.scala Maven / Gradle / Ivy

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

import scala.collection.JavaConverters._

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

  def apply(
    apiKeySourceType: Option[software.amazon.awscdk.services.apigateway.ApiKeySourceType] = None,
    description: Option[String] = None,
    endpointExportName: Option[String] = None,
    binaryMediaTypes: Option[List[String]] = None,
    cloudWatchRole: Option[Boolean] = None,
    domainName: Option[software.amazon.awscdk.services.apigateway.DomainNameOptions] = None,
    failOnWarnings: Option[Boolean] = None,
    deployOptions: Option[software.amazon.awscdk.services.apigateway.StageOptions] = None,
    cloneFrom: Option[software.amazon.awscdk.services.apigateway.IRestApi] = None,
    defaultCorsPreflightOptions: Option[software.amazon.awscdk.services.apigateway.CorsOptions] = None,
    retainDeployments: Option[Boolean] = None,
    disableExecuteApiEndpoint: Option[Boolean] = None,
    endpointConfiguration: Option[software.amazon.awscdk.services.apigateway.EndpointConfiguration] = None,
    deploy: Option[Boolean] = None,
    defaultMethodOptions: Option[software.amazon.awscdk.services.apigateway.MethodOptions] = None,
    restApiName: Option[String] = None,
    endpointTypes: Option[List[_ <: software.amazon.awscdk.services.apigateway.EndpointType]] = None,
    parameters: Option[Map[String, String]] = None,
    policy: Option[software.amazon.awscdk.services.iam.PolicyDocument] = None,
    defaultIntegration: Option[software.amazon.awscdk.services.apigateway.Integration] = None,
    minimumCompressionSize: Option[Number] = None
  ): software.amazon.awscdk.services.apigateway.RestApiProps =
    (new software.amazon.awscdk.services.apigateway.RestApiProps.Builder)
      .apiKeySourceType(apiKeySourceType.orNull)
      .description(description.orNull)
      .endpointExportName(endpointExportName.orNull)
      .binaryMediaTypes(binaryMediaTypes.map(_.asJava).orNull)
      .cloudWatchRole(cloudWatchRole.map(Boolean.box).orNull)
      .domainName(domainName.orNull)
      .failOnWarnings(failOnWarnings.map(Boolean.box).orNull)
      .deployOptions(deployOptions.orNull)
      .cloneFrom(cloneFrom.orNull)
      .defaultCorsPreflightOptions(defaultCorsPreflightOptions.orNull)
      .retainDeployments(retainDeployments.map(Boolean.box).orNull)
      .disableExecuteApiEndpoint(disableExecuteApiEndpoint.map(Boolean.box).orNull)
      .endpointConfiguration(endpointConfiguration.orNull)
      .deploy(deploy.map(Boolean.box).orNull)
      .defaultMethodOptions(defaultMethodOptions.orNull)
      .restApiName(restApiName.orNull)
      .endpointTypes(endpointTypes.map(_.asJava).orNull)
      .parameters(parameters.map(_.asJava).orNull)
      .policy(policy.orNull)
      .defaultIntegration(defaultIntegration.orNull)
      .minimumCompressionSize(minimumCompressionSize.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy