From 3fece81d2dab8399683707c2e4b09a551800d7b4 Mon Sep 17 00:00:00 2001 From: exoego Date: Wed, 24 Jun 2020 09:42:49 +0900 Subject: [PATCH] Add more intention-full methods and deprecate intention-less methods --- .../net/exoego/facade/aws_lambda/cloudfront.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 )