module Stratosphere.CloudFront.Distribution.ViewerCertificateProperty (
        ViewerCertificateProperty(..), mkViewerCertificateProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ViewerCertificateProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html>
    ViewerCertificateProperty {ViewerCertificateProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-acmcertificatearn>
                               ViewerCertificateProperty -> Maybe (Value Text)
acmCertificateArn :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-cloudfrontdefaultcertificate>
                               ViewerCertificateProperty -> Maybe (Value Bool)
cloudFrontDefaultCertificate :: (Prelude.Maybe (Value Prelude.Bool)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-iamcertificateid>
                               ViewerCertificateProperty -> Maybe (Value Text)
iamCertificateId :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-minimumprotocolversion>
                               ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-sslsupportmethod>
                               ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ViewerCertificateProperty -> ViewerCertificateProperty -> Bool
(ViewerCertificateProperty -> ViewerCertificateProperty -> Bool)
-> (ViewerCertificateProperty -> ViewerCertificateProperty -> Bool)
-> Eq ViewerCertificateProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ViewerCertificateProperty -> ViewerCertificateProperty -> Bool
== :: ViewerCertificateProperty -> ViewerCertificateProperty -> Bool
$c/= :: ViewerCertificateProperty -> ViewerCertificateProperty -> Bool
/= :: ViewerCertificateProperty -> ViewerCertificateProperty -> Bool
Prelude.Eq, Int -> ViewerCertificateProperty -> ShowS
[ViewerCertificateProperty] -> ShowS
ViewerCertificateProperty -> String
(Int -> ViewerCertificateProperty -> ShowS)
-> (ViewerCertificateProperty -> String)
-> ([ViewerCertificateProperty] -> ShowS)
-> Show ViewerCertificateProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ViewerCertificateProperty -> ShowS
showsPrec :: Int -> ViewerCertificateProperty -> ShowS
$cshow :: ViewerCertificateProperty -> String
show :: ViewerCertificateProperty -> String
$cshowList :: [ViewerCertificateProperty] -> ShowS
showList :: [ViewerCertificateProperty] -> ShowS
Prelude.Show)
mkViewerCertificateProperty :: ViewerCertificateProperty
mkViewerCertificateProperty :: ViewerCertificateProperty
mkViewerCertificateProperty
  = ViewerCertificateProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), acmCertificateArn :: Maybe (Value Text)
acmCertificateArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       cloudFrontDefaultCertificate :: Maybe (Value Bool)
cloudFrontDefaultCertificate = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       iamCertificateId :: Maybe (Value Text)
iamCertificateId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       minimumProtocolVersion :: Maybe (Value Text)
minimumProtocolVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       sslSupportMethod :: Maybe (Value Text)
sslSupportMethod = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ViewerCertificateProperty where
  toResourceProperties :: ViewerCertificateProperty -> ResourceProperties
toResourceProperties ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.ViewerCertificate",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcmCertificateArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acmCertificateArn,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudFrontDefaultCertificate"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
cloudFrontDefaultCertificate,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IamCertificateId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
iamCertificateId,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MinimumProtocolVersion"
                              (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
minimumProtocolVersion,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SslSupportMethod" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sslSupportMethod])}
instance JSON.ToJSON ViewerCertificateProperty where
  toJSON :: ViewerCertificateProperty -> Value
toJSON ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcmCertificateArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acmCertificateArn,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudFrontDefaultCertificate"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
cloudFrontDefaultCertificate,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IamCertificateId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
iamCertificateId,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MinimumProtocolVersion"
                 (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
minimumProtocolVersion,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SslSupportMethod" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sslSupportMethod]))
instance Property "AcmCertificateArn" ViewerCertificateProperty where
  type PropertyType "AcmCertificateArn" ViewerCertificateProperty = Value Prelude.Text
  set :: PropertyType "AcmCertificateArn" ViewerCertificateProperty
-> ViewerCertificateProperty -> ViewerCertificateProperty
set PropertyType "AcmCertificateArn" ViewerCertificateProperty
newValue ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ViewerCertificateProperty
        {acmCertificateArn :: Maybe (Value Text)
acmCertificateArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AcmCertificateArn" ViewerCertificateProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
haddock_workaround_ :: ()
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
instance Property "CloudFrontDefaultCertificate" ViewerCertificateProperty where
  type PropertyType "CloudFrontDefaultCertificate" ViewerCertificateProperty = Value Prelude.Bool
  set :: PropertyType
  "CloudFrontDefaultCertificate" ViewerCertificateProperty
-> ViewerCertificateProperty -> ViewerCertificateProperty
set PropertyType
  "CloudFrontDefaultCertificate" ViewerCertificateProperty
newValue ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ViewerCertificateProperty
        {cloudFrontDefaultCertificate :: Maybe (Value Bool)
cloudFrontDefaultCertificate = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CloudFrontDefaultCertificate" ViewerCertificateProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
instance Property "IamCertificateId" ViewerCertificateProperty where
  type PropertyType "IamCertificateId" ViewerCertificateProperty = Value Prelude.Text
  set :: PropertyType "IamCertificateId" ViewerCertificateProperty
-> ViewerCertificateProperty -> ViewerCertificateProperty
set PropertyType "IamCertificateId" ViewerCertificateProperty
newValue ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ViewerCertificateProperty
        {iamCertificateId :: Maybe (Value Text)
iamCertificateId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IamCertificateId" ViewerCertificateProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
instance Property "MinimumProtocolVersion" ViewerCertificateProperty where
  type PropertyType "MinimumProtocolVersion" ViewerCertificateProperty = Value Prelude.Text
  set :: PropertyType "MinimumProtocolVersion" ViewerCertificateProperty
-> ViewerCertificateProperty -> ViewerCertificateProperty
set PropertyType "MinimumProtocolVersion" ViewerCertificateProperty
newValue ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ViewerCertificateProperty
        {minimumProtocolVersion :: Maybe (Value Text)
minimumProtocolVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinimumProtocolVersion" ViewerCertificateProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
instance Property "SslSupportMethod" ViewerCertificateProperty where
  type PropertyType "SslSupportMethod" ViewerCertificateProperty = Value Prelude.Text
  set :: PropertyType "SslSupportMethod" ViewerCertificateProperty
-> ViewerCertificateProperty -> ViewerCertificateProperty
set PropertyType "SslSupportMethod" ViewerCertificateProperty
newValue ViewerCertificateProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ViewerCertificateProperty -> ()
acmCertificateArn :: ViewerCertificateProperty -> Maybe (Value Text)
cloudFrontDefaultCertificate :: ViewerCertificateProperty -> Maybe (Value Bool)
iamCertificateId :: ViewerCertificateProperty -> Maybe (Value Text)
minimumProtocolVersion :: ViewerCertificateProperty -> Maybe (Value Text)
sslSupportMethod :: ViewerCertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
sslSupportMethod :: Maybe (Value Text)
..}
    = ViewerCertificateProperty
        {sslSupportMethod :: Maybe (Value Text)
sslSupportMethod = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SslSupportMethod" ViewerCertificateProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
acmCertificateArn :: Maybe (Value Text)
cloudFrontDefaultCertificate :: Maybe (Value Bool)
iamCertificateId :: Maybe (Value Text)
minimumProtocolVersion :: Maybe (Value Text)
..}