module Stratosphere.OpsWorks.App.SslConfigurationProperty (
        SslConfigurationProperty(..), mkSslConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SslConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-sslconfiguration.html>
    SslConfigurationProperty {SslConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-sslconfiguration.html#cfn-opsworks-app-sslconfig-certificate>
                              SslConfigurationProperty -> Maybe (Value Text)
certificate :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-sslconfiguration.html#cfn-opsworks-app-sslconfig-chain>
                              SslConfigurationProperty -> Maybe (Value Text)
chain :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-sslconfiguration.html#cfn-opsworks-app-sslconfig-privatekey>
                              SslConfigurationProperty -> Maybe (Value Text)
privateKey :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SslConfigurationProperty -> SslConfigurationProperty -> Bool
(SslConfigurationProperty -> SslConfigurationProperty -> Bool)
-> (SslConfigurationProperty -> SslConfigurationProperty -> Bool)
-> Eq SslConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SslConfigurationProperty -> SslConfigurationProperty -> Bool
== :: SslConfigurationProperty -> SslConfigurationProperty -> Bool
$c/= :: SslConfigurationProperty -> SslConfigurationProperty -> Bool
/= :: SslConfigurationProperty -> SslConfigurationProperty -> Bool
Prelude.Eq, Int -> SslConfigurationProperty -> ShowS
[SslConfigurationProperty] -> ShowS
SslConfigurationProperty -> String
(Int -> SslConfigurationProperty -> ShowS)
-> (SslConfigurationProperty -> String)
-> ([SslConfigurationProperty] -> ShowS)
-> Show SslConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SslConfigurationProperty -> ShowS
showsPrec :: Int -> SslConfigurationProperty -> ShowS
$cshow :: SslConfigurationProperty -> String
show :: SslConfigurationProperty -> String
$cshowList :: [SslConfigurationProperty] -> ShowS
showList :: [SslConfigurationProperty] -> ShowS
Prelude.Show)
mkSslConfigurationProperty :: SslConfigurationProperty
mkSslConfigurationProperty :: SslConfigurationProperty
mkSslConfigurationProperty
  = SslConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificate :: Maybe (Value Text)
certificate = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       chain :: Maybe (Value Text)
chain = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, privateKey :: Maybe (Value Text)
privateKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SslConfigurationProperty where
  toResourceProperties :: SslConfigurationProperty -> ResourceProperties
toResourceProperties SslConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SslConfigurationProperty -> ()
certificate :: SslConfigurationProperty -> Maybe (Value Text)
chain :: SslConfigurationProperty -> Maybe (Value Text)
privateKey :: SslConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpsWorks::App.SslConfiguration",
         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
"Certificate" (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)
certificate,
                            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
"Chain" (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)
chain,
                            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
"PrivateKey" (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)
privateKey])}
instance JSON.ToJSON SslConfigurationProperty where
  toJSON :: SslConfigurationProperty -> Value
toJSON SslConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SslConfigurationProperty -> ()
certificate :: SslConfigurationProperty -> Maybe (Value Text)
chain :: SslConfigurationProperty -> Maybe (Value Text)
privateKey :: SslConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
privateKey :: 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
"Certificate" (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)
certificate,
               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
"Chain" (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)
chain,
               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
"PrivateKey" (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)
privateKey]))
instance Property "Certificate" SslConfigurationProperty where
  type PropertyType "Certificate" SslConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Certificate" SslConfigurationProperty
-> SslConfigurationProperty -> SslConfigurationProperty
set PropertyType "Certificate" SslConfigurationProperty
newValue SslConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SslConfigurationProperty -> ()
certificate :: SslConfigurationProperty -> Maybe (Value Text)
chain :: SslConfigurationProperty -> Maybe (Value Text)
privateKey :: SslConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
    = SslConfigurationProperty
        {certificate :: Maybe (Value Text)
certificate = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Certificate" SslConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
haddock_workaround_ :: ()
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
instance Property "Chain" SslConfigurationProperty where
  type PropertyType "Chain" SslConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Chain" SslConfigurationProperty
-> SslConfigurationProperty -> SslConfigurationProperty
set PropertyType "Chain" SslConfigurationProperty
newValue SslConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SslConfigurationProperty -> ()
certificate :: SslConfigurationProperty -> Maybe (Value Text)
chain :: SslConfigurationProperty -> Maybe (Value Text)
privateKey :: SslConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
    = SslConfigurationProperty {chain :: Maybe (Value Text)
chain = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Chain" SslConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
instance Property "PrivateKey" SslConfigurationProperty where
  type PropertyType "PrivateKey" SslConfigurationProperty = Value Prelude.Text
  set :: PropertyType "PrivateKey" SslConfigurationProperty
-> SslConfigurationProperty -> SslConfigurationProperty
set PropertyType "PrivateKey" SslConfigurationProperty
newValue SslConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SslConfigurationProperty -> ()
certificate :: SslConfigurationProperty -> Maybe (Value Text)
chain :: SslConfigurationProperty -> Maybe (Value Text)
privateKey :: SslConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
privateKey :: Maybe (Value Text)
..}
    = SslConfigurationProperty {privateKey :: Maybe (Value Text)
privateKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrivateKey" SslConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
haddock_workaround_ :: ()
certificate :: Maybe (Value Text)
chain :: Maybe (Value Text)
..}