{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transfer.Types.DescribedSecurityPolicy where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DescribedSecurityPolicy = DescribedSecurityPolicy'
{
DescribedSecurityPolicy -> Maybe Bool
fips :: Prelude.Maybe Prelude.Bool,
DescribedSecurityPolicy -> Maybe [Text]
sshMacs :: Prelude.Maybe [Prelude.Text],
DescribedSecurityPolicy -> Maybe [Text]
sshKexs :: Prelude.Maybe [Prelude.Text],
DescribedSecurityPolicy -> Maybe [Text]
tlsCiphers :: Prelude.Maybe [Prelude.Text],
DescribedSecurityPolicy -> Maybe [Text]
sshCiphers :: Prelude.Maybe [Prelude.Text],
DescribedSecurityPolicy -> Text
securityPolicyName :: Prelude.Text
}
deriving (DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool
(DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool)
-> (DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool)
-> Eq DescribedSecurityPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool
$c/= :: DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool
== :: DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool
$c== :: DescribedSecurityPolicy -> DescribedSecurityPolicy -> Bool
Prelude.Eq, ReadPrec [DescribedSecurityPolicy]
ReadPrec DescribedSecurityPolicy
Int -> ReadS DescribedSecurityPolicy
ReadS [DescribedSecurityPolicy]
(Int -> ReadS DescribedSecurityPolicy)
-> ReadS [DescribedSecurityPolicy]
-> ReadPrec DescribedSecurityPolicy
-> ReadPrec [DescribedSecurityPolicy]
-> Read DescribedSecurityPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribedSecurityPolicy]
$creadListPrec :: ReadPrec [DescribedSecurityPolicy]
readPrec :: ReadPrec DescribedSecurityPolicy
$creadPrec :: ReadPrec DescribedSecurityPolicy
readList :: ReadS [DescribedSecurityPolicy]
$creadList :: ReadS [DescribedSecurityPolicy]
readsPrec :: Int -> ReadS DescribedSecurityPolicy
$creadsPrec :: Int -> ReadS DescribedSecurityPolicy
Prelude.Read, Int -> DescribedSecurityPolicy -> ShowS
[DescribedSecurityPolicy] -> ShowS
DescribedSecurityPolicy -> String
(Int -> DescribedSecurityPolicy -> ShowS)
-> (DescribedSecurityPolicy -> String)
-> ([DescribedSecurityPolicy] -> ShowS)
-> Show DescribedSecurityPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribedSecurityPolicy] -> ShowS
$cshowList :: [DescribedSecurityPolicy] -> ShowS
show :: DescribedSecurityPolicy -> String
$cshow :: DescribedSecurityPolicy -> String
showsPrec :: Int -> DescribedSecurityPolicy -> ShowS
$cshowsPrec :: Int -> DescribedSecurityPolicy -> ShowS
Prelude.Show, (forall x.
DescribedSecurityPolicy -> Rep DescribedSecurityPolicy x)
-> (forall x.
Rep DescribedSecurityPolicy x -> DescribedSecurityPolicy)
-> Generic DescribedSecurityPolicy
forall x. Rep DescribedSecurityPolicy x -> DescribedSecurityPolicy
forall x. DescribedSecurityPolicy -> Rep DescribedSecurityPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribedSecurityPolicy x -> DescribedSecurityPolicy
$cfrom :: forall x. DescribedSecurityPolicy -> Rep DescribedSecurityPolicy x
Prelude.Generic)
newDescribedSecurityPolicy ::
Prelude.Text ->
DescribedSecurityPolicy
newDescribedSecurityPolicy :: Text -> DescribedSecurityPolicy
newDescribedSecurityPolicy Text
pSecurityPolicyName_ =
DescribedSecurityPolicy' :: Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> DescribedSecurityPolicy
DescribedSecurityPolicy'
{ $sel:fips:DescribedSecurityPolicy' :: Maybe Bool
fips = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:sshMacs:DescribedSecurityPolicy' :: Maybe [Text]
sshMacs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sshKexs:DescribedSecurityPolicy' :: Maybe [Text]
sshKexs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tlsCiphers:DescribedSecurityPolicy' :: Maybe [Text]
tlsCiphers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sshCiphers:DescribedSecurityPolicy' :: Maybe [Text]
sshCiphers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:securityPolicyName:DescribedSecurityPolicy' :: Text
securityPolicyName = Text
pSecurityPolicyName_
}
describedSecurityPolicy_fips :: Lens.Lens' DescribedSecurityPolicy (Prelude.Maybe Prelude.Bool)
describedSecurityPolicy_fips :: (Maybe Bool -> f (Maybe Bool))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_fips = (DescribedSecurityPolicy -> Maybe Bool)
-> (DescribedSecurityPolicy
-> Maybe Bool -> DescribedSecurityPolicy)
-> Lens
DescribedSecurityPolicy
DescribedSecurityPolicy
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Maybe Bool
fips :: Maybe Bool
$sel:fips:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Maybe Bool
fips} -> Maybe Bool
fips) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Maybe Bool
a -> DescribedSecurityPolicy
s {$sel:fips:DescribedSecurityPolicy' :: Maybe Bool
fips = Maybe Bool
a} :: DescribedSecurityPolicy)
describedSecurityPolicy_sshMacs :: Lens.Lens' DescribedSecurityPolicy (Prelude.Maybe [Prelude.Text])
describedSecurityPolicy_sshMacs :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_sshMacs = (DescribedSecurityPolicy -> Maybe [Text])
-> (DescribedSecurityPolicy
-> Maybe [Text] -> DescribedSecurityPolicy)
-> Lens
DescribedSecurityPolicy
DescribedSecurityPolicy
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Maybe [Text]
sshMacs :: Maybe [Text]
$sel:sshMacs:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Maybe [Text]
sshMacs} -> Maybe [Text]
sshMacs) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Maybe [Text]
a -> DescribedSecurityPolicy
s {$sel:sshMacs:DescribedSecurityPolicy' :: Maybe [Text]
sshMacs = Maybe [Text]
a} :: DescribedSecurityPolicy) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy
-> f DescribedSecurityPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedSecurityPolicy_sshKexs :: Lens.Lens' DescribedSecurityPolicy (Prelude.Maybe [Prelude.Text])
describedSecurityPolicy_sshKexs :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_sshKexs = (DescribedSecurityPolicy -> Maybe [Text])
-> (DescribedSecurityPolicy
-> Maybe [Text] -> DescribedSecurityPolicy)
-> Lens
DescribedSecurityPolicy
DescribedSecurityPolicy
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Maybe [Text]
sshKexs :: Maybe [Text]
$sel:sshKexs:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Maybe [Text]
sshKexs} -> Maybe [Text]
sshKexs) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Maybe [Text]
a -> DescribedSecurityPolicy
s {$sel:sshKexs:DescribedSecurityPolicy' :: Maybe [Text]
sshKexs = Maybe [Text]
a} :: DescribedSecurityPolicy) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy
-> f DescribedSecurityPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedSecurityPolicy_tlsCiphers :: Lens.Lens' DescribedSecurityPolicy (Prelude.Maybe [Prelude.Text])
describedSecurityPolicy_tlsCiphers :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_tlsCiphers = (DescribedSecurityPolicy -> Maybe [Text])
-> (DescribedSecurityPolicy
-> Maybe [Text] -> DescribedSecurityPolicy)
-> Lens
DescribedSecurityPolicy
DescribedSecurityPolicy
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Maybe [Text]
tlsCiphers :: Maybe [Text]
$sel:tlsCiphers:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Maybe [Text]
tlsCiphers} -> Maybe [Text]
tlsCiphers) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Maybe [Text]
a -> DescribedSecurityPolicy
s {$sel:tlsCiphers:DescribedSecurityPolicy' :: Maybe [Text]
tlsCiphers = Maybe [Text]
a} :: DescribedSecurityPolicy) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy
-> f DescribedSecurityPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedSecurityPolicy_sshCiphers :: Lens.Lens' DescribedSecurityPolicy (Prelude.Maybe [Prelude.Text])
describedSecurityPolicy_sshCiphers :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_sshCiphers = (DescribedSecurityPolicy -> Maybe [Text])
-> (DescribedSecurityPolicy
-> Maybe [Text] -> DescribedSecurityPolicy)
-> Lens
DescribedSecurityPolicy
DescribedSecurityPolicy
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Maybe [Text]
sshCiphers :: Maybe [Text]
$sel:sshCiphers:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Maybe [Text]
sshCiphers} -> Maybe [Text]
sshCiphers) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Maybe [Text]
a -> DescribedSecurityPolicy
s {$sel:sshCiphers:DescribedSecurityPolicy' :: Maybe [Text]
sshCiphers = Maybe [Text]
a} :: DescribedSecurityPolicy) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribedSecurityPolicy
-> f DescribedSecurityPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedSecurityPolicy_securityPolicyName :: Lens.Lens' DescribedSecurityPolicy Prelude.Text
describedSecurityPolicy_securityPolicyName :: (Text -> f Text)
-> DescribedSecurityPolicy -> f DescribedSecurityPolicy
describedSecurityPolicy_securityPolicyName = (DescribedSecurityPolicy -> Text)
-> (DescribedSecurityPolicy -> Text -> DescribedSecurityPolicy)
-> Lens DescribedSecurityPolicy DescribedSecurityPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedSecurityPolicy' {Text
securityPolicyName :: Text
$sel:securityPolicyName:DescribedSecurityPolicy' :: DescribedSecurityPolicy -> Text
securityPolicyName} -> Text
securityPolicyName) (\s :: DescribedSecurityPolicy
s@DescribedSecurityPolicy' {} Text
a -> DescribedSecurityPolicy
s {$sel:securityPolicyName:DescribedSecurityPolicy' :: Text
securityPolicyName = Text
a} :: DescribedSecurityPolicy)
instance Core.FromJSON DescribedSecurityPolicy where
parseJSON :: Value -> Parser DescribedSecurityPolicy
parseJSON =
String
-> (Object -> Parser DescribedSecurityPolicy)
-> Value
-> Parser DescribedSecurityPolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DescribedSecurityPolicy"
( \Object
x ->
Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> DescribedSecurityPolicy
DescribedSecurityPolicy'
(Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> DescribedSecurityPolicy)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> DescribedSecurityPolicy)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Fips")
Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> DescribedSecurityPolicy)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe [Text] -> Maybe [Text] -> Text -> DescribedSecurityPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SshMacs" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [Text]
-> Maybe [Text] -> Maybe [Text] -> Text -> DescribedSecurityPolicy)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text] -> Maybe [Text] -> Text -> DescribedSecurityPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SshKexs" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [Text] -> Maybe [Text] -> Text -> DescribedSecurityPolicy)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> Text -> DescribedSecurityPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TlsCiphers" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe [Text] -> Text -> DescribedSecurityPolicy)
-> Parser (Maybe [Text])
-> Parser (Text -> DescribedSecurityPolicy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SshCiphers" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> DescribedSecurityPolicy)
-> Parser Text -> Parser DescribedSecurityPolicy
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SecurityPolicyName")
)
instance Prelude.Hashable DescribedSecurityPolicy
instance Prelude.NFData DescribedSecurityPolicy