{-# 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_currentPassword,
createNetworkProfile_nextPassword,
createNetworkProfile_eapMethod,
createNetworkProfile_description,
createNetworkProfile_trustAnchors,
createNetworkProfile_certificateAuthorityArn,
createNetworkProfile_tags,
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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateNetworkProfile = CreateNetworkProfile'
{
CreateNetworkProfile -> Maybe (Sensitive Text)
currentPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateNetworkProfile -> Maybe (Sensitive Text)
nextPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateNetworkProfile -> Maybe NetworkEapMethod
eapMethod :: Prelude.Maybe NetworkEapMethod,
CreateNetworkProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateNetworkProfile -> Maybe (NonEmpty Text)
trustAnchors :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateNetworkProfile -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
CreateNetworkProfile -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateNetworkProfile -> Text
networkProfileName :: Prelude.Text,
CreateNetworkProfile -> Text
ssid :: Prelude.Text,
CreateNetworkProfile -> NetworkSecurityType
securityType :: NetworkSecurityType,
CreateNetworkProfile -> Text
clientRequestToken :: Prelude.Text
}
deriving (CreateNetworkProfile -> CreateNetworkProfile -> Bool
(CreateNetworkProfile -> CreateNetworkProfile -> Bool)
-> (CreateNetworkProfile -> CreateNetworkProfile -> Bool)
-> Eq CreateNetworkProfile
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
(Int -> CreateNetworkProfile -> ShowS)
-> (CreateNetworkProfile -> String)
-> ([CreateNetworkProfile] -> ShowS)
-> Show CreateNetworkProfile
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. CreateNetworkProfile -> Rep CreateNetworkProfile x)
-> (forall x. Rep CreateNetworkProfile x -> CreateNetworkProfile)
-> Generic CreateNetworkProfile
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' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe NetworkEapMethod
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> NetworkSecurityType
-> Text
-> CreateNetworkProfile
CreateNetworkProfile'
{ $sel:currentPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
currentPassword =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:nextPassword:CreateNetworkProfile' :: Maybe (Sensitive Text)
nextPassword = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:eapMethod:CreateNetworkProfile' :: Maybe NetworkEapMethod
eapMethod = Maybe NetworkEapMethod
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateNetworkProfile' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:trustAnchors:CreateNetworkProfile' :: Maybe (NonEmpty Text)
trustAnchors = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:certificateAuthorityArn:CreateNetworkProfile' :: Maybe Text
certificateAuthorityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateNetworkProfile' :: Maybe [Tag]
tags = Maybe [Tag]
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_currentPassword :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_currentPassword :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_currentPassword = (CreateNetworkProfile -> Maybe (Sensitive Text))
-> (CreateNetworkProfile
-> Maybe (Sensitive Text) -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateNetworkProfile -> f CreateNetworkProfile)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile
-> f CreateNetworkProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createNetworkProfile_nextPassword :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_nextPassword :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_nextPassword = (CreateNetworkProfile -> Maybe (Sensitive Text))
-> (CreateNetworkProfile
-> Maybe (Sensitive Text) -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateNetworkProfile -> f CreateNetworkProfile)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile
-> f CreateNetworkProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createNetworkProfile_eapMethod :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe NetworkEapMethod)
createNetworkProfile_eapMethod :: (Maybe NetworkEapMethod -> f (Maybe NetworkEapMethod))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_eapMethod = (CreateNetworkProfile -> Maybe NetworkEapMethod)
-> (CreateNetworkProfile
-> Maybe NetworkEapMethod -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
(Maybe NetworkEapMethod)
(Maybe NetworkEapMethod)
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_description :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_description :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_description = (CreateNetworkProfile -> Maybe Text)
-> (CreateNetworkProfile -> Maybe Text -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile CreateNetworkProfile (Maybe Text) (Maybe Text)
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_trustAnchors :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createNetworkProfile_trustAnchors :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_trustAnchors = (CreateNetworkProfile -> Maybe (NonEmpty Text))
-> (CreateNetworkProfile
-> Maybe (NonEmpty Text) -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateNetworkProfile -> f CreateNetworkProfile)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateNetworkProfile
-> f CreateNetworkProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createNetworkProfile_certificateAuthorityArn :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_certificateAuthorityArn :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_certificateAuthorityArn = (CreateNetworkProfile -> Maybe Text)
-> (CreateNetworkProfile -> Maybe Text -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile CreateNetworkProfile (Maybe Text) (Maybe Text)
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_tags :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe [Tag])
createNetworkProfile_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_tags = (CreateNetworkProfile -> Maybe [Tag])
-> (CreateNetworkProfile -> Maybe [Tag] -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
(Maybe [Tag])
(Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateNetworkProfile -> f CreateNetworkProfile)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateNetworkProfile
-> f CreateNetworkProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
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 :: (Text -> f Text) -> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_networkProfileName = (CreateNetworkProfile -> Text)
-> (CreateNetworkProfile -> Text -> CreateNetworkProfile)
-> Lens CreateNetworkProfile CreateNetworkProfile Text Text
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 :: (Text -> f Text) -> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_ssid = (CreateNetworkProfile -> Text)
-> (CreateNetworkProfile -> Text -> CreateNetworkProfile)
-> Lens CreateNetworkProfile CreateNetworkProfile Text Text
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 :: (NetworkSecurityType -> f NetworkSecurityType)
-> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_securityType = (CreateNetworkProfile -> NetworkSecurityType)
-> (CreateNetworkProfile
-> NetworkSecurityType -> CreateNetworkProfile)
-> Lens
CreateNetworkProfile
CreateNetworkProfile
NetworkSecurityType
NetworkSecurityType
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 :: (Text -> f Text) -> CreateNetworkProfile -> f CreateNetworkProfile
createNetworkProfile_clientRequestToken = (CreateNetworkProfile -> Text)
-> (CreateNetworkProfile -> Text -> CreateNetworkProfile)
-> Lens CreateNetworkProfile CreateNetworkProfile Text Text
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 :: CreateNetworkProfile -> Request CreateNetworkProfile
request = Service -> CreateNetworkProfile -> Request CreateNetworkProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateNetworkProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateNetworkProfile))
-> Logger
-> Service
-> Proxy CreateNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateNetworkProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateNetworkProfileResponse
CreateNetworkProfileResponse'
(Maybe Text -> Int -> CreateNetworkProfileResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateNetworkProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NetworkProfileArn")
Either String (Int -> CreateNetworkProfileResponse)
-> Either String Int -> Either String CreateNetworkProfileResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateNetworkProfile
instance Prelude.NFData CreateNetworkProfile
instance Core.ToHeaders CreateNetworkProfile where
toHeaders :: CreateNetworkProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateNetworkProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.CreateNetworkProfile" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.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
tags :: Maybe [Tag]
certificateAuthorityArn :: Maybe Text
trustAnchors :: Maybe (NonEmpty Text)
description :: Maybe Text
eapMethod :: Maybe NetworkEapMethod
nextPassword :: Maybe (Sensitive Text)
currentPassword :: Maybe (Sensitive Text)
$sel:clientRequestToken:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:securityType:CreateNetworkProfile' :: CreateNetworkProfile -> NetworkSecurityType
$sel:ssid:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:networkProfileName:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:tags:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe [Tag]
$sel:certificateAuthorityArn:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
$sel:trustAnchors:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (NonEmpty Text)
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
$sel:eapMethod:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkEapMethod
$sel:nextPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
$sel:currentPassword:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CurrentPassword" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
currentPassword,
(Text
"NextPassword" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
nextPassword,
(Text
"EapMethod" Text -> NetworkEapMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NetworkEapMethod -> Pair) -> Maybe NetworkEapMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkEapMethod
eapMethod,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"TrustAnchors" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
trustAnchors,
(Text
"CertificateAuthorityArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateAuthorityArn,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"NetworkProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
networkProfileName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Ssid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
ssid),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SecurityType" Text -> NetworkSecurityType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NetworkSecurityType
securityType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken)
]
)
instance Core.ToPath CreateNetworkProfile where
toPath :: CreateNetworkProfile -> ByteString
toPath = ByteString -> CreateNetworkProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateNetworkProfile where
toQuery :: CreateNetworkProfile -> QueryString
toQuery = QueryString -> CreateNetworkProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool)
-> (CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool)
-> Eq CreateNetworkProfileResponse
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]
(Int -> ReadS CreateNetworkProfileResponse)
-> ReadS [CreateNetworkProfileResponse]
-> ReadPrec CreateNetworkProfileResponse
-> ReadPrec [CreateNetworkProfileResponse]
-> Read 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
(Int -> CreateNetworkProfileResponse -> ShowS)
-> (CreateNetworkProfileResponse -> String)
-> ([CreateNetworkProfileResponse] -> ShowS)
-> Show CreateNetworkProfileResponse
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.
CreateNetworkProfileResponse -> Rep CreateNetworkProfileResponse x)
-> (forall x.
Rep CreateNetworkProfileResponse x -> CreateNetworkProfileResponse)
-> Generic CreateNetworkProfileResponse
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' :: Maybe Text -> Int -> CreateNetworkProfileResponse
CreateNetworkProfileResponse'
{ $sel:networkProfileArn:CreateNetworkProfileResponse' :: Maybe Text
networkProfileArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateNetworkProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createNetworkProfileResponse_networkProfileArn :: Lens.Lens' CreateNetworkProfileResponse (Prelude.Maybe Prelude.Text)
createNetworkProfileResponse_networkProfileArn :: (Maybe Text -> f (Maybe Text))
-> CreateNetworkProfileResponse -> f CreateNetworkProfileResponse
createNetworkProfileResponse_networkProfileArn = (CreateNetworkProfileResponse -> Maybe Text)
-> (CreateNetworkProfileResponse
-> Maybe Text -> CreateNetworkProfileResponse)
-> Lens
CreateNetworkProfileResponse
CreateNetworkProfileResponse
(Maybe Text)
(Maybe Text)
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 :: (Int -> f Int)
-> CreateNetworkProfileResponse -> f CreateNetworkProfileResponse
createNetworkProfileResponse_httpStatus = (CreateNetworkProfileResponse -> Int)
-> (CreateNetworkProfileResponse
-> Int -> CreateNetworkProfileResponse)
-> Lens
CreateNetworkProfileResponse CreateNetworkProfileResponse Int Int
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