{-# 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.AlexaBusiness.Types.NetworkProfile where
import Amazonka.AlexaBusiness.Types.NetworkEapMethod
import Amazonka.AlexaBusiness.Types.NetworkSecurityType
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data NetworkProfile = NetworkProfile'
{
NetworkProfile -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
NetworkProfile -> Maybe (Sensitive Text)
currentPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
NetworkProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
NetworkProfile -> Maybe NetworkEapMethod
eapMethod :: Prelude.Maybe NetworkEapMethod,
NetworkProfile -> Maybe Text
networkProfileArn :: Prelude.Maybe Prelude.Text,
NetworkProfile -> Maybe Text
networkProfileName :: Prelude.Maybe Prelude.Text,
NetworkProfile -> Maybe (Sensitive Text)
nextPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
NetworkProfile -> Maybe NetworkSecurityType
securityType :: Prelude.Maybe NetworkSecurityType,
NetworkProfile -> Maybe Text
ssid :: Prelude.Maybe Prelude.Text,
NetworkProfile -> Maybe (NonEmpty Text)
trustAnchors :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text)
}
deriving (NetworkProfile -> NetworkProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkProfile -> NetworkProfile -> Bool
$c/= :: NetworkProfile -> NetworkProfile -> Bool
== :: NetworkProfile -> NetworkProfile -> Bool
$c== :: NetworkProfile -> NetworkProfile -> Bool
Prelude.Eq, Int -> NetworkProfile -> ShowS
[NetworkProfile] -> ShowS
NetworkProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkProfile] -> ShowS
$cshowList :: [NetworkProfile] -> ShowS
show :: NetworkProfile -> String
$cshow :: NetworkProfile -> String
showsPrec :: Int -> NetworkProfile -> ShowS
$cshowsPrec :: Int -> NetworkProfile -> ShowS
Prelude.Show, forall x. Rep NetworkProfile x -> NetworkProfile
forall x. NetworkProfile -> Rep NetworkProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkProfile x -> NetworkProfile
$cfrom :: forall x. NetworkProfile -> Rep NetworkProfile x
Prelude.Generic)
newNetworkProfile ::
NetworkProfile
newNetworkProfile :: NetworkProfile
newNetworkProfile =
NetworkProfile'
{ $sel:certificateAuthorityArn:NetworkProfile' :: Maybe Text
certificateAuthorityArn =
forall a. Maybe a
Prelude.Nothing,
$sel:currentPassword:NetworkProfile' :: Maybe (Sensitive Text)
currentPassword = forall a. Maybe a
Prelude.Nothing,
$sel:description:NetworkProfile' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:eapMethod:NetworkProfile' :: Maybe NetworkEapMethod
eapMethod = forall a. Maybe a
Prelude.Nothing,
$sel:networkProfileArn:NetworkProfile' :: Maybe Text
networkProfileArn = forall a. Maybe a
Prelude.Nothing,
$sel:networkProfileName:NetworkProfile' :: Maybe Text
networkProfileName = forall a. Maybe a
Prelude.Nothing,
$sel:nextPassword:NetworkProfile' :: Maybe (Sensitive Text)
nextPassword = forall a. Maybe a
Prelude.Nothing,
$sel:securityType:NetworkProfile' :: Maybe NetworkSecurityType
securityType = forall a. Maybe a
Prelude.Nothing,
$sel:ssid:NetworkProfile' :: Maybe Text
ssid = forall a. Maybe a
Prelude.Nothing,
$sel:trustAnchors:NetworkProfile' :: Maybe (NonEmpty Text)
trustAnchors = forall a. Maybe a
Prelude.Nothing
}
networkProfile_certificateAuthorityArn :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_certificateAuthorityArn :: Lens' NetworkProfile (Maybe Text)
networkProfile_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:certificateAuthorityArn:NetworkProfile' :: NetworkProfile -> Maybe Text
certificateAuthorityArn} -> Maybe Text
certificateAuthorityArn) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe Text
a -> NetworkProfile
s {$sel:certificateAuthorityArn:NetworkProfile' :: Maybe Text
certificateAuthorityArn = Maybe Text
a} :: NetworkProfile)
networkProfile_currentPassword :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_currentPassword :: Lens' NetworkProfile (Maybe Text)
networkProfile_currentPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe (Sensitive Text)
currentPassword :: Maybe (Sensitive Text)
$sel:currentPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
currentPassword} -> Maybe (Sensitive Text)
currentPassword) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe (Sensitive Text)
a -> NetworkProfile
s {$sel:currentPassword:NetworkProfile' :: Maybe (Sensitive Text)
currentPassword = Maybe (Sensitive Text)
a} :: NetworkProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
networkProfile_description :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_description :: Lens' NetworkProfile (Maybe Text)
networkProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe Text
description :: Maybe Text
$sel:description:NetworkProfile' :: NetworkProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe Text
a -> NetworkProfile
s {$sel:description:NetworkProfile' :: Maybe Text
description = Maybe Text
a} :: NetworkProfile)
networkProfile_eapMethod :: Lens.Lens' NetworkProfile (Prelude.Maybe NetworkEapMethod)
networkProfile_eapMethod :: Lens' NetworkProfile (Maybe NetworkEapMethod)
networkProfile_eapMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe NetworkEapMethod
eapMethod :: Maybe NetworkEapMethod
$sel:eapMethod:NetworkProfile' :: NetworkProfile -> Maybe NetworkEapMethod
eapMethod} -> Maybe NetworkEapMethod
eapMethod) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe NetworkEapMethod
a -> NetworkProfile
s {$sel:eapMethod:NetworkProfile' :: Maybe NetworkEapMethod
eapMethod = Maybe NetworkEapMethod
a} :: NetworkProfile)
networkProfile_networkProfileArn :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_networkProfileArn :: Lens' NetworkProfile (Maybe Text)
networkProfile_networkProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe Text
networkProfileArn :: Maybe Text
$sel:networkProfileArn:NetworkProfile' :: NetworkProfile -> Maybe Text
networkProfileArn} -> Maybe Text
networkProfileArn) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe Text
a -> NetworkProfile
s {$sel:networkProfileArn:NetworkProfile' :: Maybe Text
networkProfileArn = Maybe Text
a} :: NetworkProfile)
networkProfile_networkProfileName :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_networkProfileName :: Lens' NetworkProfile (Maybe Text)
networkProfile_networkProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe Text
networkProfileName :: Maybe Text
$sel:networkProfileName:NetworkProfile' :: NetworkProfile -> Maybe Text
networkProfileName} -> Maybe Text
networkProfileName) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe Text
a -> NetworkProfile
s {$sel:networkProfileName:NetworkProfile' :: Maybe Text
networkProfileName = Maybe Text
a} :: NetworkProfile)
networkProfile_nextPassword :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_nextPassword :: Lens' NetworkProfile (Maybe Text)
networkProfile_nextPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe (Sensitive Text)
nextPassword :: Maybe (Sensitive Text)
$sel:nextPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
nextPassword} -> Maybe (Sensitive Text)
nextPassword) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe (Sensitive Text)
a -> NetworkProfile
s {$sel:nextPassword:NetworkProfile' :: Maybe (Sensitive Text)
nextPassword = Maybe (Sensitive Text)
a} :: NetworkProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
networkProfile_securityType :: Lens.Lens' NetworkProfile (Prelude.Maybe NetworkSecurityType)
networkProfile_securityType :: Lens' NetworkProfile (Maybe NetworkSecurityType)
networkProfile_securityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe NetworkSecurityType
securityType :: Maybe NetworkSecurityType
$sel:securityType:NetworkProfile' :: NetworkProfile -> Maybe NetworkSecurityType
securityType} -> Maybe NetworkSecurityType
securityType) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe NetworkSecurityType
a -> NetworkProfile
s {$sel:securityType:NetworkProfile' :: Maybe NetworkSecurityType
securityType = Maybe NetworkSecurityType
a} :: NetworkProfile)
networkProfile_ssid :: Lens.Lens' NetworkProfile (Prelude.Maybe Prelude.Text)
networkProfile_ssid :: Lens' NetworkProfile (Maybe Text)
networkProfile_ssid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe Text
ssid :: Maybe Text
$sel:ssid:NetworkProfile' :: NetworkProfile -> Maybe Text
ssid} -> Maybe Text
ssid) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe Text
a -> NetworkProfile
s {$sel:ssid:NetworkProfile' :: Maybe Text
ssid = Maybe Text
a} :: NetworkProfile)
networkProfile_trustAnchors :: Lens.Lens' NetworkProfile (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
networkProfile_trustAnchors :: Lens' NetworkProfile (Maybe (NonEmpty Text))
networkProfile_trustAnchors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfile' {Maybe (NonEmpty Text)
trustAnchors :: Maybe (NonEmpty Text)
$sel:trustAnchors:NetworkProfile' :: NetworkProfile -> Maybe (NonEmpty Text)
trustAnchors} -> Maybe (NonEmpty Text)
trustAnchors) (\s :: NetworkProfile
s@NetworkProfile' {} Maybe (NonEmpty Text)
a -> NetworkProfile
s {$sel:trustAnchors:NetworkProfile' :: Maybe (NonEmpty Text)
trustAnchors = Maybe (NonEmpty Text)
a} :: NetworkProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON NetworkProfile where
parseJSON :: Value -> Parser NetworkProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NetworkProfile"
( \Object
x ->
Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe NetworkEapMethod
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NetworkSecurityType
-> Maybe Text
-> Maybe (NonEmpty Text)
-> NetworkProfile
NetworkProfile'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateAuthorityArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CurrentPassword")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EapMethod")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkProfileArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkProfileName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NextPassword")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecurityType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Ssid")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TrustAnchors")
)
instance Prelude.Hashable NetworkProfile where
hashWithSalt :: Int -> NetworkProfile -> Int
hashWithSalt Int
_salt NetworkProfile' {Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe NetworkEapMethod
Maybe NetworkSecurityType
trustAnchors :: Maybe (NonEmpty Text)
ssid :: Maybe Text
securityType :: Maybe NetworkSecurityType
nextPassword :: Maybe (Sensitive Text)
networkProfileName :: Maybe Text
networkProfileArn :: Maybe Text
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
currentPassword :: Maybe (Sensitive Text)
certificateAuthorityArn :: Maybe Text
$sel:trustAnchors:NetworkProfile' :: NetworkProfile -> Maybe (NonEmpty Text)
$sel:ssid:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:securityType:NetworkProfile' :: NetworkProfile -> Maybe NetworkSecurityType
$sel:nextPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
$sel:networkProfileName:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:networkProfileArn:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:eapMethod:NetworkProfile' :: NetworkProfile -> Maybe NetworkEapMethod
$sel:description:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:currentPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
$sel:certificateAuthorityArn:NetworkProfile' :: NetworkProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateAuthorityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
currentPassword
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkEapMethod
eapMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkProfileArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkProfileName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
nextPassword
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkSecurityType
securityType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ssid
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
trustAnchors
instance Prelude.NFData NetworkProfile where
rnf :: NetworkProfile -> ()
rnf NetworkProfile' {Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe NetworkEapMethod
Maybe NetworkSecurityType
trustAnchors :: Maybe (NonEmpty Text)
ssid :: Maybe Text
securityType :: Maybe NetworkSecurityType
nextPassword :: Maybe (Sensitive Text)
networkProfileName :: Maybe Text
networkProfileArn :: Maybe Text
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
currentPassword :: Maybe (Sensitive Text)
certificateAuthorityArn :: Maybe Text
$sel:trustAnchors:NetworkProfile' :: NetworkProfile -> Maybe (NonEmpty Text)
$sel:ssid:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:securityType:NetworkProfile' :: NetworkProfile -> Maybe NetworkSecurityType
$sel:nextPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
$sel:networkProfileName:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:networkProfileArn:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:eapMethod:NetworkProfile' :: NetworkProfile -> Maybe NetworkEapMethod
$sel:description:NetworkProfile' :: NetworkProfile -> Maybe Text
$sel:currentPassword:NetworkProfile' :: NetworkProfile -> Maybe (Sensitive Text)
$sel:certificateAuthorityArn:NetworkProfile' :: NetworkProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateAuthorityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
currentPassword
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkEapMethod
eapMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkProfileArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkProfileName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
nextPassword
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkSecurityType
securityType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ssid
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
trustAnchors