module Stratosphere.ElasticLoadBalancingV2.Listener.CertificateProperty (
        CertificateProperty(..), mkCertificateProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CertificateProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html>
    CertificateProperty {CertificateProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn>
                         CertificateProperty -> Maybe (Value Text)
certificateArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CertificateProperty -> CertificateProperty -> Bool
(CertificateProperty -> CertificateProperty -> Bool)
-> (CertificateProperty -> CertificateProperty -> Bool)
-> Eq CertificateProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CertificateProperty -> CertificateProperty -> Bool
== :: CertificateProperty -> CertificateProperty -> Bool
$c/= :: CertificateProperty -> CertificateProperty -> Bool
/= :: CertificateProperty -> CertificateProperty -> Bool
Prelude.Eq, Int -> CertificateProperty -> ShowS
[CertificateProperty] -> ShowS
CertificateProperty -> String
(Int -> CertificateProperty -> ShowS)
-> (CertificateProperty -> String)
-> ([CertificateProperty] -> ShowS)
-> Show CertificateProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CertificateProperty -> ShowS
showsPrec :: Int -> CertificateProperty -> ShowS
$cshow :: CertificateProperty -> String
show :: CertificateProperty -> String
$cshowList :: [CertificateProperty] -> ShowS
showList :: [CertificateProperty] -> ShowS
Prelude.Show)
mkCertificateProperty :: CertificateProperty
mkCertificateProperty :: CertificateProperty
mkCertificateProperty
  = CertificateProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateArn :: Maybe (Value Text)
certificateArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CertificateProperty where
  toResourceProperties :: CertificateProperty -> ResourceProperties
toResourceProperties CertificateProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateProperty -> ()
certificateArn :: CertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::Listener.Certificate",
         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
"CertificateArn" (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)
certificateArn])}
instance JSON.ToJSON CertificateProperty where
  toJSON :: CertificateProperty -> Value
toJSON CertificateProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateProperty -> ()
certificateArn :: CertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: 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
"CertificateArn" (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)
certificateArn]))
instance Property "CertificateArn" CertificateProperty where
  type PropertyType "CertificateArn" CertificateProperty = Value Prelude.Text
  set :: PropertyType "CertificateArn" CertificateProperty
-> CertificateProperty -> CertificateProperty
set PropertyType "CertificateArn" CertificateProperty
newValue CertificateProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateProperty -> ()
certificateArn :: CertificateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
..}
    = CertificateProperty {certificateArn :: Maybe (Value Text)
certificateArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateArn" CertificateProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}