module Stratosphere.NetworkFirewall.TLSInspectionConfiguration.ServerCertificateConfigurationProperty (
        module Exports, ServerCertificateConfigurationProperty(..),
        mkServerCertificateConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.TLSInspectionConfiguration.CheckCertificateRevocationStatusProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.TLSInspectionConfiguration.ServerCertificateProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.TLSInspectionConfiguration.ServerCertificateScopeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServerCertificateConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration.html>
    ServerCertificateConfigurationProperty {ServerCertificateConfigurationProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration.html#cfn-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration-certificateauthorityarn>
                                            ServerCertificateConfigurationProperty -> Maybe (Value Text)
certificateAuthorityArn :: (Prelude.Maybe (Value Prelude.Text)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration.html#cfn-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration-checkcertificaterevocationstatus>
                                            ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
checkCertificateRevocationStatus :: (Prelude.Maybe CheckCertificateRevocationStatusProperty),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration.html#cfn-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration-scopes>
                                            ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
scopes :: (Prelude.Maybe [ServerCertificateScopeProperty]),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration.html#cfn-networkfirewall-tlsinspectionconfiguration-servercertificateconfiguration-servercertificates>
                                            ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
serverCertificates :: (Prelude.Maybe [ServerCertificateProperty])}
  deriving stock (ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty -> Bool
(ServerCertificateConfigurationProperty
 -> ServerCertificateConfigurationProperty -> Bool)
-> (ServerCertificateConfigurationProperty
    -> ServerCertificateConfigurationProperty -> Bool)
-> Eq ServerCertificateConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty -> Bool
== :: ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty -> Bool
$c/= :: ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty -> Bool
/= :: ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty -> Bool
Prelude.Eq, Int -> ServerCertificateConfigurationProperty -> ShowS
[ServerCertificateConfigurationProperty] -> ShowS
ServerCertificateConfigurationProperty -> String
(Int -> ServerCertificateConfigurationProperty -> ShowS)
-> (ServerCertificateConfigurationProperty -> String)
-> ([ServerCertificateConfigurationProperty] -> ShowS)
-> Show ServerCertificateConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServerCertificateConfigurationProperty -> ShowS
showsPrec :: Int -> ServerCertificateConfigurationProperty -> ShowS
$cshow :: ServerCertificateConfigurationProperty -> String
show :: ServerCertificateConfigurationProperty -> String
$cshowList :: [ServerCertificateConfigurationProperty] -> ShowS
showList :: [ServerCertificateConfigurationProperty] -> ShowS
Prelude.Show)
mkServerCertificateConfigurationProperty ::
  ServerCertificateConfigurationProperty
mkServerCertificateConfigurationProperty :: ServerCertificateConfigurationProperty
mkServerCertificateConfigurationProperty
  = ServerCertificateConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       certificateAuthorityArn :: Maybe (Value Text)
certificateAuthorityArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
checkCertificateRevocationStatus = Maybe CheckCertificateRevocationStatusProperty
forall a. Maybe a
Prelude.Nothing,
       scopes :: Maybe [ServerCertificateScopeProperty]
scopes = Maybe [ServerCertificateScopeProperty]
forall a. Maybe a
Prelude.Nothing, serverCertificates :: Maybe [ServerCertificateProperty]
serverCertificates = Maybe [ServerCertificateProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServerCertificateConfigurationProperty where
  toResourceProperties :: ServerCertificateConfigurationProperty -> ResourceProperties
toResourceProperties ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::TLSInspectionConfiguration.ServerCertificateConfiguration",
         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
"CertificateAuthorityArn"
                              (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)
certificateAuthorityArn,
                            Key -> CheckCertificateRevocationStatusProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CheckCertificateRevocationStatus"
                              (CheckCertificateRevocationStatusProperty -> (Key, Value))
-> Maybe CheckCertificateRevocationStatusProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CheckCertificateRevocationStatusProperty
checkCertificateRevocationStatus,
                            Key -> [ServerCertificateScopeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scopes" ([ServerCertificateScopeProperty] -> (Key, Value))
-> Maybe [ServerCertificateScopeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServerCertificateScopeProperty]
scopes,
                            Key -> [ServerCertificateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ServerCertificates" ([ServerCertificateProperty] -> (Key, Value))
-> Maybe [ServerCertificateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServerCertificateProperty]
serverCertificates])}
instance JSON.ToJSON ServerCertificateConfigurationProperty where
  toJSON :: ServerCertificateConfigurationProperty -> Value
toJSON ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = [(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
"CertificateAuthorityArn"
                 (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)
certificateAuthorityArn,
               Key -> CheckCertificateRevocationStatusProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CheckCertificateRevocationStatus"
                 (CheckCertificateRevocationStatusProperty -> (Key, Value))
-> Maybe CheckCertificateRevocationStatusProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CheckCertificateRevocationStatusProperty
checkCertificateRevocationStatus,
               Key -> [ServerCertificateScopeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scopes" ([ServerCertificateScopeProperty] -> (Key, Value))
-> Maybe [ServerCertificateScopeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServerCertificateScopeProperty]
scopes,
               Key -> [ServerCertificateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ServerCertificates" ([ServerCertificateProperty] -> (Key, Value))
-> Maybe [ServerCertificateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServerCertificateProperty]
serverCertificates]))
instance Property "CertificateAuthorityArn" ServerCertificateConfigurationProperty where
  type PropertyType "CertificateAuthorityArn" ServerCertificateConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "CertificateAuthorityArn" ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
set PropertyType
  "CertificateAuthorityArn" ServerCertificateConfigurationProperty
newValue ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = ServerCertificateConfigurationProperty
        {certificateAuthorityArn :: Maybe (Value Text)
certificateAuthorityArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CertificateAuthorityArn" ServerCertificateConfigurationProperty
Value Text
newValue, Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ()
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
instance Property "CheckCertificateRevocationStatus" ServerCertificateConfigurationProperty where
  type PropertyType "CheckCertificateRevocationStatus" ServerCertificateConfigurationProperty = CheckCertificateRevocationStatusProperty
  set :: PropertyType
  "CheckCertificateRevocationStatus"
  ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
set PropertyType
  "CheckCertificateRevocationStatus"
  ServerCertificateConfigurationProperty
newValue ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = ServerCertificateConfigurationProperty
        {checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
checkCertificateRevocationStatus = CheckCertificateRevocationStatusProperty
-> Maybe CheckCertificateRevocationStatusProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CheckCertificateRevocationStatus"
  ServerCertificateConfigurationProperty
CheckCertificateRevocationStatusProperty
newValue, Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
instance Property "Scopes" ServerCertificateConfigurationProperty where
  type PropertyType "Scopes" ServerCertificateConfigurationProperty = [ServerCertificateScopeProperty]
  set :: PropertyType "Scopes" ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
set PropertyType "Scopes" ServerCertificateConfigurationProperty
newValue ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = ServerCertificateConfigurationProperty
        {scopes :: Maybe [ServerCertificateScopeProperty]
scopes = [ServerCertificateScopeProperty]
-> Maybe [ServerCertificateScopeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ServerCertificateScopeProperty]
PropertyType "Scopes" ServerCertificateConfigurationProperty
newValue, Maybe [ServerCertificateProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
serverCertificates :: Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
serverCertificates :: Maybe [ServerCertificateProperty]
..}
instance Property "ServerCertificates" ServerCertificateConfigurationProperty where
  type PropertyType "ServerCertificates" ServerCertificateConfigurationProperty = [ServerCertificateProperty]
  set :: PropertyType
  "ServerCertificates" ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
-> ServerCertificateConfigurationProperty
set PropertyType
  "ServerCertificates" ServerCertificateConfigurationProperty
newValue ServerCertificateConfigurationProperty {Maybe [ServerCertificateProperty]
Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ServerCertificateConfigurationProperty -> ()
certificateAuthorityArn :: ServerCertificateConfigurationProperty -> Maybe (Value Text)
checkCertificateRevocationStatus :: ServerCertificateConfigurationProperty
-> Maybe CheckCertificateRevocationStatusProperty
scopes :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateScopeProperty]
serverCertificates :: ServerCertificateConfigurationProperty
-> Maybe [ServerCertificateProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
serverCertificates :: Maybe [ServerCertificateProperty]
..}
    = ServerCertificateConfigurationProperty
        {serverCertificates :: Maybe [ServerCertificateProperty]
serverCertificates = [ServerCertificateProperty] -> Maybe [ServerCertificateProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ServerCertificateProperty]
PropertyType
  "ServerCertificates" ServerCertificateConfigurationProperty
newValue, Maybe [ServerCertificateScopeProperty]
Maybe (Value Text)
Maybe CheckCertificateRevocationStatusProperty
()
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
haddock_workaround_ :: ()
certificateAuthorityArn :: Maybe (Value Text)
checkCertificateRevocationStatus :: Maybe CheckCertificateRevocationStatusProperty
scopes :: Maybe [ServerCertificateScopeProperty]
..}