diff --git a/src/main/scala/net/exoego/facade/aws_lambda/cloudfront.scala b/src/main/scala/net/exoego/facade/aws_lambda/cloudfront.scala index 0408f7d..2370d99 100644 --- a/src/main/scala/net/exoego/facade/aws_lambda/cloudfront.scala +++ b/src/main/scala/net/exoego/facade/aws_lambda/cloudfront.scala @@ -18,14 +18,18 @@ trait CloudFrontOrigin extends js.Object { } object CloudFrontOrigin { - // mutual exclusive - def apply(s3: CloudFrontS3Origin): CloudFrontOrigin = { + @deprecated("Use CloudFrontOrigin.ofS3 instead", "0.10.0") + def apply(s3: CloudFrontS3Origin): CloudFrontOrigin = ofS3(s3) + @deprecated("Use CloudFrontOrigin.ofCustom instead", "0.10.0") + def apply(custom: CloudFrontCustomOrigin): CloudFrontOrigin = ofCustom(custom) + + def ofS3(s3: CloudFrontS3Origin): CloudFrontOrigin = { val _obj$ = js.Dynamic.literal( "s3" -> s3 ) _obj$.asInstanceOf[CloudFrontOrigin] } - def apply(custom: CloudFrontCustomOrigin): CloudFrontOrigin = { + def ofCustom(custom: CloudFrontCustomOrigin): CloudFrontOrigin = { val _obj$ = js.Dynamic.literal( "custom" -> custom )