Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Add more intention-full methods and deprecate intention-less methods
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Jun 24, 2020
1 parent cb66b3c commit 3fece81
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/scala/net/exoego/facade/aws_lambda/cloudfront.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 3fece81

Please sign in to comment.