{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AlexaBusiness.CreateNetworkProfile
(
CreateNetworkProfile (..),
newCreateNetworkProfile,
createNetworkProfile_certificateAuthorityArn,
createNetworkProfile_currentPassword,
createNetworkProfile_description,
createNetworkProfile_eapMethod,
createNetworkProfile_nextPassword,
createNetworkProfile_tags,
createNetworkProfile_trustAnchors,
createNetworkProfile_networkProfileName,
createNetworkProfile_ssid,
createNetworkProfile_securityType,
createNetworkProfile_clientRequestToken,
CreateNetworkProfileResponse (..),
newCreateNetworkProfileResponse,
createNetworkProfileResponse_networkProfileArn,
createNetworkProfileResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateNetworkProfile = CreateNetworkProfile'
{
CreateNetworkProfile -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
CreateNetworkProfile -> Maybe (Sensitive Text)
currentPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
CreateNetworkProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateNetworkProfile -> Maybe NetworkEapMethod
eapMethod :: Prelude.Maybe NetworkEapMethod,
CreateNetworkProfile -> Maybe (Sensitive Text)
nextPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
CreateNetworkProfile -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateNetworkProfile -> Maybe (NonEmpty Text)
trustAnchors :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateNetworkProfile -> Text
networkProfileName :: Prelude.Text,
CreateNetworkProfile -> Text
ssid :: Prelude.Text,
CreateNetworkProfile -> NetworkSecurityType
securityType :: NetworkSecurityType,
CreateNetworkProfile -> Text
clientRequestToken :: Prelude.Text
}
deriving (CreateNetworkProfile -> CreateNetworkProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
$c/= :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
== :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
$c== :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
Prelude.Eq, Int -> CreateNetworkProfile -> ShowS
[CreateNetworkProfile] -> ShowS
CreateNetworkProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetworkProfile] -> ShowS
$cshowList :: [CreateNetworkProfile] -> ShowS
show :: CreateNetworkProfile -> String
$cshow :: CreateNetworkProfile -> String
showsPrec :: Int -> CreateNetworkProfile -> ShowS
$cshowsPrec :: Int -> CreateNetworkProfile -> ShowS
Prelude.Show, forall x. Rep CreateNetworkProfile x -> CreateNetworkProfile
forall x. CreateNetworkProfile -> Rep CreateNetworkProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNetworkProfile x -> CreateNetworkProfile
$cfrom :: forall x. CreateNetworkProfile -> Rep CreateNetworkProfile x
Prelude.Generic)
newCreateNetworkProfile ::
Prelude.Text ->
Prelude.Text ->
NetworkSecurityType ->
Prelude.Text ->
CreateNetworkProfile
newCreateNetworkProfile :: Text -> Text -> NetworkSecurityType -> Text -> CreateNetworkProfile
newCreateNetworkProfile
Text
pNetworkProfileName_
Text
pSsid_
NetworkSecurityType
pSecurityType_
Text
pClientRequestToken_ =
CreateNetworkProfile'
{ $sel:certificateAuthorityArn:CreateNetworkProfile' :: Maybe Text
certificateAuthorityArn =
forall a. Maybe a
Prelude.Nothing,
$sel:currentPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
currentPassword = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateNetworkProfile' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:eapMethod:CreateNetworkProfile' :: Maybe NetworkEapMethod
eapMethod = forall a. Maybe a
Prelude.Nothing,
$sel:nextPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
nextPassword = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateNetworkProfile' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:trustAnchors:CreateNetworkProfile' :: Maybe (NonEmpty Text)
trustAnchors = forall a. Maybe a
Prelude.Nothing,
$sel:networkProfileName:CreateNetworkProfile' :: Text
networkProfileName = Text
pNetworkProfileName_,
$sel:ssid:CreateNetworkProfile' :: Text
ssid = Text
pSsid_,
$sel:securityType:CreateNetworkProfile' :: NetworkSecurityType
securityType = NetworkSecurityType
pSecurityType_,
$sel:clientRequestToken:CreateNetworkProfile' :: Text
clientRequestToken = Text
pClientRequestToken_
}
createNetworkProfile_certificateAuthorityArn :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_certificateAuthorityArn :: Lens' CreateNetworkProfile (Maybe Text)
createNetworkProfile_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:certificateAuthorityArn:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
certificateAuthorityArn} -> Maybe Text
certificateAuthorityArn) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Text
a -> CreateNetworkProfile
s {$sel:certificateAuthorityArn:CreateNetworkProfile' :: Maybe Text
certificateAuthorityArn = Maybe Text
a} :: CreateNetworkProfile)
createNetworkProfile_currentPassword :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_currentPassword :: Lens' CreateNetworkProfile (Maybe Text)
createNetworkProfile_currentPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe (Sensitive Text)
currentPassword :: Maybe (Sensitive Text)
$sel:currentPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
currentPassword} -> Maybe (Sensitive Text)
currentPassword) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe (Sensitive Text)
a -> CreateNetworkProfile
s {$sel:currentPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
currentPassword = Maybe (Sensitive Text)
a} :: CreateNetworkProfile) 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
createNetworkProfile_description :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_description :: Lens' CreateNetworkProfile (Maybe Text)
createNetworkProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Text
description :: Maybe Text
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Text
a -> CreateNetworkProfile
s {$sel:description:CreateNetworkProfile' :: Maybe Text
description = Maybe Text
a} :: CreateNetworkProfile)
createNetworkProfile_eapMethod :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe NetworkEapMethod)
createNetworkProfile_eapMethod :: Lens' CreateNetworkProfile (Maybe NetworkEapMethod)
createNetworkProfile_eapMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe NetworkEapMethod
eapMethod :: Maybe NetworkEapMethod
$sel:eapMethod:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkEapMethod
eapMethod} -> Maybe NetworkEapMethod
eapMethod) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe NetworkEapMethod
a -> CreateNetworkProfile
s {$sel:eapMethod:CreateNetworkProfile' :: Maybe NetworkEapMethod
eapMethod = Maybe NetworkEapMethod
a} :: CreateNetworkProfile)
createNetworkProfile_nextPassword :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_nextPassword :: Lens' CreateNetworkProfile (Maybe Text)
createNetworkProfile_nextPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe (Sensitive Text)
nextPassword :: Maybe (Sensitive Text)
$sel:nextPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
nextPassword} -> Maybe (Sensitive Text)
nextPassword) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe (Sensitive Text)
a -> CreateNetworkProfile
s {$sel:nextPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
nextPassword = Maybe (Sensitive Text)
a} :: CreateNetworkProfile) 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
createNetworkProfile_tags :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe [Tag])
createNetworkProfile_tags :: Lens' CreateNetworkProfile (Maybe [Tag])
createNetworkProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe [Tag]
a -> CreateNetworkProfile
s {$sel:tags:CreateNetworkProfile' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateNetworkProfile) 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
createNetworkProfile_trustAnchors :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createNetworkProfile_trustAnchors :: Lens' CreateNetworkProfile (Maybe (NonEmpty Text))
createNetworkProfile_trustAnchors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe (NonEmpty Text)
trustAnchors :: Maybe (NonEmpty Text)
$sel:trustAnchors:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (NonEmpty Text)
trustAnchors} -> Maybe (NonEmpty Text)
trustAnchors) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe (NonEmpty Text)
a -> CreateNetworkProfile
s {$sel:trustAnchors:CreateNetworkProfile' :: Maybe (NonEmpty Text)
trustAnchors = Maybe (NonEmpty Text)
a} :: CreateNetworkProfile) 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
createNetworkProfile_networkProfileName :: Lens.Lens' CreateNetworkProfile Prelude.Text
createNetworkProfile_networkProfileName :: Lens' CreateNetworkProfile Text
createNetworkProfile_networkProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Text
networkProfileName :: Text
$sel:networkProfileName:CreateNetworkProfile' :: CreateNetworkProfile -> Text
networkProfileName} -> Text
networkProfileName) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Text
a -> CreateNetworkProfile
s {$sel:networkProfileName:CreateNetworkProfile' :: Text
networkProfileName = Text
a} :: CreateNetworkProfile)
createNetworkProfile_ssid :: Lens.Lens' CreateNetworkProfile Prelude.Text
createNetworkProfile_ssid :: Lens' CreateNetworkProfile Text
createNetworkProfile_ssid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Text
ssid :: Text
$sel:ssid:CreateNetworkProfile' :: CreateNetworkProfile -> Text
ssid} -> Text
ssid) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Text
a -> CreateNetworkProfile
s {$sel:ssid:CreateNetworkProfile' :: Text
ssid = Text
a} :: CreateNetworkProfile)
createNetworkProfile_securityType :: Lens.Lens' CreateNetworkProfile NetworkSecurityType
createNetworkProfile_securityType :: Lens' CreateNetworkProfile NetworkSecurityType
createNetworkProfile_securityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {NetworkSecurityType
securityType :: NetworkSecurityType
$sel:securityType:CreateNetworkProfile' :: CreateNetworkProfile -> NetworkSecurityType
securityType} -> NetworkSecurityType
securityType) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} NetworkSecurityType
a -> CreateNetworkProfile
s {$sel:securityType:CreateNetworkProfile' :: NetworkSecurityType
securityType = NetworkSecurityType
a} :: CreateNetworkProfile)
createNetworkProfile_clientRequestToken :: Lens.Lens' CreateNetworkProfile Prelude.Text
createNetworkProfile_clientRequestToken :: Lens' CreateNetworkProfile Text
createNetworkProfile_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Text
clientRequestToken :: Text
$sel:clientRequestToken:CreateNetworkProfile' :: CreateNetworkProfile -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Text
a -> CreateNetworkProfile
s {$sel:clientRequestToken:CreateNetworkProfile' :: Text
clientRequestToken = Text
a} :: CreateNetworkProfile)
instance Core.AWSRequest CreateNetworkProfile where
type
AWSResponse CreateNetworkProfile =
CreateNetworkProfileResponse
request :: (Service -> Service)
-> CreateNetworkProfile -> Request CreateNetworkProfile
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateNetworkProfile)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateNetworkProfileResponse
CreateNetworkProfileResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NetworkProfileArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateNetworkProfile where
hashWithSalt :: Int -> CreateNetworkProfile -> Int
hashWithSalt Int
_salt CreateNetworkProfile' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe NetworkEapMethod
Text
NetworkSecurityType
clientRequestToken :: Text
securityType :: NetworkSecurityType
ssid :: Text
networkProfileName :: Text
trustAnchors :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
nextPassword :: Maybe (Sensitive Text)
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
currentPassword :: Maybe (Sensitive Text)
certificateAuthorityArn :: Maybe Text
$sel:clientRequestToken:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:securityType:CreateNetworkProfile' :: CreateNetworkProfile -> NetworkSecurityType
$sel:ssid:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:networkProfileName:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:trustAnchors:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (NonEmpty Text)
$sel:tags:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe [Tag]
$sel:nextPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:eapMethod:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkEapMethod
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
$sel:currentPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:certificateAuthorityArn:CreateNetworkProfile' :: CreateNetworkProfile -> 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 (Sensitive Text)
nextPassword
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
trustAnchors
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
networkProfileName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ssid
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NetworkSecurityType
securityType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientRequestToken
instance Prelude.NFData CreateNetworkProfile where
rnf :: CreateNetworkProfile -> ()
rnf CreateNetworkProfile' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe NetworkEapMethod
Text
NetworkSecurityType
clientRequestToken :: Text
securityType :: NetworkSecurityType
ssid :: Text
networkProfileName :: Text
trustAnchors :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
nextPassword :: Maybe (Sensitive Text)
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
currentPassword :: Maybe (Sensitive Text)
certificateAuthorityArn :: Maybe Text
$sel:clientRequestToken:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:securityType:CreateNetworkProfile' :: CreateNetworkProfile -> NetworkSecurityType
$sel:ssid:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:networkProfileName:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:trustAnchors:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (NonEmpty Text)
$sel:tags:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe [Tag]
$sel:nextPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:eapMethod:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkEapMethod
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
$sel:currentPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:certificateAuthorityArn:CreateNetworkProfile' :: CreateNetworkProfile -> 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 (Sensitive Text)
nextPassword
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
trustAnchors
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
networkProfileName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ssid
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NetworkSecurityType
securityType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientRequestToken
instance Data.ToHeaders CreateNetworkProfile where
toHeaders :: CreateNetworkProfile -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AlexaForBusiness.CreateNetworkProfile" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateNetworkProfile where
toJSON :: CreateNetworkProfile -> Value
toJSON CreateNetworkProfile' {Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (Sensitive Text)
Maybe NetworkEapMethod
Text
NetworkSecurityType
clientRequestToken :: Text
securityType :: NetworkSecurityType
ssid :: Text
networkProfileName :: Text
trustAnchors :: Maybe (NonEmpty Text)
tags :: Maybe [Tag]
nextPassword :: Maybe (Sensitive Text)
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
currentPassword :: Maybe (Sensitive Text)
certificateAuthorityArn :: Maybe Text
$sel:clientRequestToken:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:securityType:CreateNetworkProfile' :: CreateNetworkProfile -> NetworkSecurityType
$sel:ssid:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:networkProfileName:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:trustAnchors:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (NonEmpty Text)
$sel:tags:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe [Tag]
$sel:nextPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:eapMethod:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkEapMethod
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
$sel:currentPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:certificateAuthorityArn:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CertificateAuthorityArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateAuthorityArn,
(Key
"CurrentPassword" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
currentPassword,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"EapMethod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkEapMethod
eapMethod,
(Key
"NextPassword" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
nextPassword,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"TrustAnchors" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
trustAnchors,
forall a. a -> Maybe a
Prelude.Just
(Key
"NetworkProfileName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
networkProfileName),
forall a. a -> Maybe a
Prelude.Just (Key
"Ssid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
ssid),
forall a. a -> Maybe a
Prelude.Just (Key
"SecurityType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NetworkSecurityType
securityType),
forall a. a -> Maybe a
Prelude.Just
(Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientRequestToken)
]
)
instance Data.ToPath CreateNetworkProfile where
toPath :: CreateNetworkProfile -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateNetworkProfile where
toQuery :: CreateNetworkProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateNetworkProfileResponse = CreateNetworkProfileResponse'
{
CreateNetworkProfileResponse -> Maybe Text
networkProfileArn :: Prelude.Maybe Prelude.Text,
CreateNetworkProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
$c/= :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
== :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
$c== :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateNetworkProfileResponse]
ReadPrec CreateNetworkProfileResponse
Int -> ReadS CreateNetworkProfileResponse
ReadS [CreateNetworkProfileResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNetworkProfileResponse]
$creadListPrec :: ReadPrec [CreateNetworkProfileResponse]
readPrec :: ReadPrec CreateNetworkProfileResponse
$creadPrec :: ReadPrec CreateNetworkProfileResponse
readList :: ReadS [CreateNetworkProfileResponse]
$creadList :: ReadS [CreateNetworkProfileResponse]
readsPrec :: Int -> ReadS CreateNetworkProfileResponse
$creadsPrec :: Int -> ReadS CreateNetworkProfileResponse
Prelude.Read, Int -> CreateNetworkProfileResponse -> ShowS
[CreateNetworkProfileResponse] -> ShowS
CreateNetworkProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetworkProfileResponse] -> ShowS
$cshowList :: [CreateNetworkProfileResponse] -> ShowS
show :: CreateNetworkProfileResponse -> String
$cshow :: CreateNetworkProfileResponse -> String
showsPrec :: Int -> CreateNetworkProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateNetworkProfileResponse -> ShowS
Prelude.Show, forall x.
Rep CreateNetworkProfileResponse x -> CreateNetworkProfileResponse
forall x.
CreateNetworkProfileResponse -> Rep CreateNetworkProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateNetworkProfileResponse x -> CreateNetworkProfileResponse
$cfrom :: forall x.
CreateNetworkProfileResponse -> Rep CreateNetworkProfileResponse x
Prelude.Generic)
newCreateNetworkProfileResponse ::
Prelude.Int ->
CreateNetworkProfileResponse
newCreateNetworkProfileResponse :: Int -> CreateNetworkProfileResponse
newCreateNetworkProfileResponse Int
pHttpStatus_ =
CreateNetworkProfileResponse'
{ $sel:networkProfileArn:CreateNetworkProfileResponse' :: Maybe Text
networkProfileArn =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateNetworkProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createNetworkProfileResponse_networkProfileArn :: Lens.Lens' CreateNetworkProfileResponse (Prelude.Maybe Prelude.Text)
createNetworkProfileResponse_networkProfileArn :: Lens' CreateNetworkProfileResponse (Maybe Text)
createNetworkProfileResponse_networkProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfileResponse' {Maybe Text
networkProfileArn :: Maybe Text
$sel:networkProfileArn:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Maybe Text
networkProfileArn} -> Maybe Text
networkProfileArn) (\s :: CreateNetworkProfileResponse
s@CreateNetworkProfileResponse' {} Maybe Text
a -> CreateNetworkProfileResponse
s {$sel:networkProfileArn:CreateNetworkProfileResponse' :: Maybe Text
networkProfileArn = Maybe Text
a} :: CreateNetworkProfileResponse)
createNetworkProfileResponse_httpStatus :: Lens.Lens' CreateNetworkProfileResponse Prelude.Int
createNetworkProfileResponse_httpStatus :: Lens' CreateNetworkProfileResponse Int
createNetworkProfileResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateNetworkProfileResponse
s@CreateNetworkProfileResponse' {} Int
a -> CreateNetworkProfileResponse
s {$sel:httpStatus:CreateNetworkProfileResponse' :: Int
httpStatus = Int
a} :: CreateNetworkProfileResponse)
instance Prelude.NFData CreateNetworkProfileResponse where
rnf :: CreateNetworkProfileResponse -> ()
rnf CreateNetworkProfileResponse' {Int
Maybe Text
httpStatus :: Int
networkProfileArn :: Maybe Text
$sel:httpStatus:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Int
$sel:networkProfileArn:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Maybe Text
..} =
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 Int
httpStatus