{-# 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.QuickSight.CreateAccountSubscription
(
CreateAccountSubscription (..),
newCreateAccountSubscription,
createAccountSubscription_activeDirectoryName,
createAccountSubscription_adminGroup,
createAccountSubscription_authorGroup,
createAccountSubscription_contactNumber,
createAccountSubscription_directoryId,
createAccountSubscription_emailAddress,
createAccountSubscription_firstName,
createAccountSubscription_lastName,
createAccountSubscription_readerGroup,
createAccountSubscription_realm,
createAccountSubscription_edition,
createAccountSubscription_authenticationMethod,
createAccountSubscription_awsAccountId,
createAccountSubscription_accountName,
createAccountSubscription_notificationEmail,
CreateAccountSubscriptionResponse (..),
newCreateAccountSubscriptionResponse,
createAccountSubscriptionResponse_requestId,
createAccountSubscriptionResponse_signupResponse,
createAccountSubscriptionResponse_status,
)
where
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 Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateAccountSubscription = CreateAccountSubscription'
{
CreateAccountSubscription -> Maybe Text
activeDirectoryName :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe [Text]
adminGroup :: Prelude.Maybe [Prelude.Text],
CreateAccountSubscription -> Maybe [Text]
authorGroup :: Prelude.Maybe [Prelude.Text],
CreateAccountSubscription -> Maybe Text
contactNumber :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe Text
emailAddress :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Maybe [Text]
readerGroup :: Prelude.Maybe [Prelude.Text],
CreateAccountSubscription -> Maybe Text
realm :: Prelude.Maybe Prelude.Text,
CreateAccountSubscription -> Edition
edition :: Edition,
CreateAccountSubscription -> AuthenticationMethodOption
authenticationMethod :: AuthenticationMethodOption,
CreateAccountSubscription -> Text
awsAccountId :: Prelude.Text,
CreateAccountSubscription -> Text
accountName :: Prelude.Text,
CreateAccountSubscription -> Text
notificationEmail :: Prelude.Text
}
deriving (CreateAccountSubscription -> CreateAccountSubscription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccountSubscription -> CreateAccountSubscription -> Bool
$c/= :: CreateAccountSubscription -> CreateAccountSubscription -> Bool
== :: CreateAccountSubscription -> CreateAccountSubscription -> Bool
$c== :: CreateAccountSubscription -> CreateAccountSubscription -> Bool
Prelude.Eq, ReadPrec [CreateAccountSubscription]
ReadPrec CreateAccountSubscription
Int -> ReadS CreateAccountSubscription
ReadS [CreateAccountSubscription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccountSubscription]
$creadListPrec :: ReadPrec [CreateAccountSubscription]
readPrec :: ReadPrec CreateAccountSubscription
$creadPrec :: ReadPrec CreateAccountSubscription
readList :: ReadS [CreateAccountSubscription]
$creadList :: ReadS [CreateAccountSubscription]
readsPrec :: Int -> ReadS CreateAccountSubscription
$creadsPrec :: Int -> ReadS CreateAccountSubscription
Prelude.Read, Int -> CreateAccountSubscription -> ShowS
[CreateAccountSubscription] -> ShowS
CreateAccountSubscription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccountSubscription] -> ShowS
$cshowList :: [CreateAccountSubscription] -> ShowS
show :: CreateAccountSubscription -> String
$cshow :: CreateAccountSubscription -> String
showsPrec :: Int -> CreateAccountSubscription -> ShowS
$cshowsPrec :: Int -> CreateAccountSubscription -> ShowS
Prelude.Show, forall x.
Rep CreateAccountSubscription x -> CreateAccountSubscription
forall x.
CreateAccountSubscription -> Rep CreateAccountSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAccountSubscription x -> CreateAccountSubscription
$cfrom :: forall x.
CreateAccountSubscription -> Rep CreateAccountSubscription x
Prelude.Generic)
newCreateAccountSubscription ::
Edition ->
AuthenticationMethodOption ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateAccountSubscription
newCreateAccountSubscription :: Edition
-> AuthenticationMethodOption
-> Text
-> Text
-> Text
-> CreateAccountSubscription
newCreateAccountSubscription
Edition
pEdition_
AuthenticationMethodOption
pAuthenticationMethod_
Text
pAwsAccountId_
Text
pAccountName_
Text
pNotificationEmail_ =
CreateAccountSubscription'
{ $sel:activeDirectoryName:CreateAccountSubscription' :: Maybe Text
activeDirectoryName =
forall a. Maybe a
Prelude.Nothing,
$sel:adminGroup:CreateAccountSubscription' :: Maybe [Text]
adminGroup = forall a. Maybe a
Prelude.Nothing,
$sel:authorGroup:CreateAccountSubscription' :: Maybe [Text]
authorGroup = forall a. Maybe a
Prelude.Nothing,
$sel:contactNumber:CreateAccountSubscription' :: Maybe Text
contactNumber = forall a. Maybe a
Prelude.Nothing,
$sel:directoryId:CreateAccountSubscription' :: Maybe Text
directoryId = forall a. Maybe a
Prelude.Nothing,
$sel:emailAddress:CreateAccountSubscription' :: Maybe Text
emailAddress = forall a. Maybe a
Prelude.Nothing,
$sel:firstName:CreateAccountSubscription' :: Maybe Text
firstName = forall a. Maybe a
Prelude.Nothing,
$sel:lastName:CreateAccountSubscription' :: Maybe Text
lastName = forall a. Maybe a
Prelude.Nothing,
$sel:readerGroup:CreateAccountSubscription' :: Maybe [Text]
readerGroup = forall a. Maybe a
Prelude.Nothing,
$sel:realm:CreateAccountSubscription' :: Maybe Text
realm = forall a. Maybe a
Prelude.Nothing,
$sel:edition:CreateAccountSubscription' :: Edition
edition = Edition
pEdition_,
$sel:authenticationMethod:CreateAccountSubscription' :: AuthenticationMethodOption
authenticationMethod = AuthenticationMethodOption
pAuthenticationMethod_,
$sel:awsAccountId:CreateAccountSubscription' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:accountName:CreateAccountSubscription' :: Text
accountName = Text
pAccountName_,
$sel:notificationEmail:CreateAccountSubscription' :: Text
notificationEmail = Text
pNotificationEmail_
}
createAccountSubscription_activeDirectoryName :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_activeDirectoryName :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_activeDirectoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
activeDirectoryName :: Maybe Text
$sel:activeDirectoryName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
activeDirectoryName} -> Maybe Text
activeDirectoryName) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:activeDirectoryName:CreateAccountSubscription' :: Maybe Text
activeDirectoryName = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_adminGroup :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe [Prelude.Text])
createAccountSubscription_adminGroup :: Lens' CreateAccountSubscription (Maybe [Text])
createAccountSubscription_adminGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe [Text]
adminGroup :: Maybe [Text]
$sel:adminGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
adminGroup} -> Maybe [Text]
adminGroup) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe [Text]
a -> CreateAccountSubscription
s {$sel:adminGroup:CreateAccountSubscription' :: Maybe [Text]
adminGroup = Maybe [Text]
a} :: CreateAccountSubscription) 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
createAccountSubscription_authorGroup :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe [Prelude.Text])
createAccountSubscription_authorGroup :: Lens' CreateAccountSubscription (Maybe [Text])
createAccountSubscription_authorGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe [Text]
authorGroup :: Maybe [Text]
$sel:authorGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
authorGroup} -> Maybe [Text]
authorGroup) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe [Text]
a -> CreateAccountSubscription
s {$sel:authorGroup:CreateAccountSubscription' :: Maybe [Text]
authorGroup = Maybe [Text]
a} :: CreateAccountSubscription) 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
createAccountSubscription_contactNumber :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_contactNumber :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_contactNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
contactNumber :: Maybe Text
$sel:contactNumber:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
contactNumber} -> Maybe Text
contactNumber) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:contactNumber:CreateAccountSubscription' :: Maybe Text
contactNumber = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_directoryId :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_directoryId :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_directoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:directoryId:CreateAccountSubscription' :: Maybe Text
directoryId = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_emailAddress :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_emailAddress :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
emailAddress :: Maybe Text
$sel:emailAddress:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
emailAddress} -> Maybe Text
emailAddress) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:emailAddress:CreateAccountSubscription' :: Maybe Text
emailAddress = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_firstName :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_firstName :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_firstName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
firstName :: Maybe Text
$sel:firstName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:firstName:CreateAccountSubscription' :: Maybe Text
firstName = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_lastName :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_lastName :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_lastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
lastName :: Maybe Text
$sel:lastName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:lastName:CreateAccountSubscription' :: Maybe Text
lastName = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_readerGroup :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe [Prelude.Text])
createAccountSubscription_readerGroup :: Lens' CreateAccountSubscription (Maybe [Text])
createAccountSubscription_readerGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe [Text]
readerGroup :: Maybe [Text]
$sel:readerGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
readerGroup} -> Maybe [Text]
readerGroup) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe [Text]
a -> CreateAccountSubscription
s {$sel:readerGroup:CreateAccountSubscription' :: Maybe [Text]
readerGroup = Maybe [Text]
a} :: CreateAccountSubscription) 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
createAccountSubscription_realm :: Lens.Lens' CreateAccountSubscription (Prelude.Maybe Prelude.Text)
createAccountSubscription_realm :: Lens' CreateAccountSubscription (Maybe Text)
createAccountSubscription_realm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Maybe Text
realm :: Maybe Text
$sel:realm:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
realm} -> Maybe Text
realm) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Maybe Text
a -> CreateAccountSubscription
s {$sel:realm:CreateAccountSubscription' :: Maybe Text
realm = Maybe Text
a} :: CreateAccountSubscription)
createAccountSubscription_edition :: Lens.Lens' CreateAccountSubscription Edition
createAccountSubscription_edition :: Lens' CreateAccountSubscription Edition
createAccountSubscription_edition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Edition
edition :: Edition
$sel:edition:CreateAccountSubscription' :: CreateAccountSubscription -> Edition
edition} -> Edition
edition) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Edition
a -> CreateAccountSubscription
s {$sel:edition:CreateAccountSubscription' :: Edition
edition = Edition
a} :: CreateAccountSubscription)
createAccountSubscription_authenticationMethod :: Lens.Lens' CreateAccountSubscription AuthenticationMethodOption
createAccountSubscription_authenticationMethod :: Lens' CreateAccountSubscription AuthenticationMethodOption
createAccountSubscription_authenticationMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {AuthenticationMethodOption
authenticationMethod :: AuthenticationMethodOption
$sel:authenticationMethod:CreateAccountSubscription' :: CreateAccountSubscription -> AuthenticationMethodOption
authenticationMethod} -> AuthenticationMethodOption
authenticationMethod) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} AuthenticationMethodOption
a -> CreateAccountSubscription
s {$sel:authenticationMethod:CreateAccountSubscription' :: AuthenticationMethodOption
authenticationMethod = AuthenticationMethodOption
a} :: CreateAccountSubscription)
createAccountSubscription_awsAccountId :: Lens.Lens' CreateAccountSubscription Prelude.Text
createAccountSubscription_awsAccountId :: Lens' CreateAccountSubscription Text
createAccountSubscription_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateAccountSubscription' :: CreateAccountSubscription -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Text
a -> CreateAccountSubscription
s {$sel:awsAccountId:CreateAccountSubscription' :: Text
awsAccountId = Text
a} :: CreateAccountSubscription)
createAccountSubscription_accountName :: Lens.Lens' CreateAccountSubscription Prelude.Text
createAccountSubscription_accountName :: Lens' CreateAccountSubscription Text
createAccountSubscription_accountName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Text
accountName :: Text
$sel:accountName:CreateAccountSubscription' :: CreateAccountSubscription -> Text
accountName} -> Text
accountName) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Text
a -> CreateAccountSubscription
s {$sel:accountName:CreateAccountSubscription' :: Text
accountName = Text
a} :: CreateAccountSubscription)
createAccountSubscription_notificationEmail :: Lens.Lens' CreateAccountSubscription Prelude.Text
createAccountSubscription_notificationEmail :: Lens' CreateAccountSubscription Text
createAccountSubscription_notificationEmail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscription' {Text
notificationEmail :: Text
$sel:notificationEmail:CreateAccountSubscription' :: CreateAccountSubscription -> Text
notificationEmail} -> Text
notificationEmail) (\s :: CreateAccountSubscription
s@CreateAccountSubscription' {} Text
a -> CreateAccountSubscription
s {$sel:notificationEmail:CreateAccountSubscription' :: Text
notificationEmail = Text
a} :: CreateAccountSubscription)
instance Core.AWSRequest CreateAccountSubscription where
type
AWSResponse CreateAccountSubscription =
CreateAccountSubscriptionResponse
request :: (Service -> Service)
-> CreateAccountSubscription -> Request CreateAccountSubscription
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 CreateAccountSubscription
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAccountSubscription)))
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
-> Maybe SignupResponse -> Int -> CreateAccountSubscriptionResponse
CreateAccountSubscriptionResponse'
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
"RequestId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SignupResponse")
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 CreateAccountSubscription where
hashWithSalt :: Int -> CreateAccountSubscription -> Int
hashWithSalt Int
_salt CreateAccountSubscription' {Maybe [Text]
Maybe Text
Text
AuthenticationMethodOption
Edition
notificationEmail :: Text
accountName :: Text
awsAccountId :: Text
authenticationMethod :: AuthenticationMethodOption
edition :: Edition
realm :: Maybe Text
readerGroup :: Maybe [Text]
lastName :: Maybe Text
firstName :: Maybe Text
emailAddress :: Maybe Text
directoryId :: Maybe Text
contactNumber :: Maybe Text
authorGroup :: Maybe [Text]
adminGroup :: Maybe [Text]
activeDirectoryName :: Maybe Text
$sel:notificationEmail:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:accountName:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:awsAccountId:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:authenticationMethod:CreateAccountSubscription' :: CreateAccountSubscription -> AuthenticationMethodOption
$sel:edition:CreateAccountSubscription' :: CreateAccountSubscription -> Edition
$sel:realm:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:readerGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:lastName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:firstName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:emailAddress:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:directoryId:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:contactNumber:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:authorGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:adminGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:activeDirectoryName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeDirectoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
adminGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
authorGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contactNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
directoryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
emailAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firstName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
readerGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
realm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Edition
edition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AuthenticationMethodOption
authenticationMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accountName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
notificationEmail
instance Prelude.NFData CreateAccountSubscription where
rnf :: CreateAccountSubscription -> ()
rnf CreateAccountSubscription' {Maybe [Text]
Maybe Text
Text
AuthenticationMethodOption
Edition
notificationEmail :: Text
accountName :: Text
awsAccountId :: Text
authenticationMethod :: AuthenticationMethodOption
edition :: Edition
realm :: Maybe Text
readerGroup :: Maybe [Text]
lastName :: Maybe Text
firstName :: Maybe Text
emailAddress :: Maybe Text
directoryId :: Maybe Text
contactNumber :: Maybe Text
authorGroup :: Maybe [Text]
adminGroup :: Maybe [Text]
activeDirectoryName :: Maybe Text
$sel:notificationEmail:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:accountName:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:awsAccountId:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:authenticationMethod:CreateAccountSubscription' :: CreateAccountSubscription -> AuthenticationMethodOption
$sel:edition:CreateAccountSubscription' :: CreateAccountSubscription -> Edition
$sel:realm:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:readerGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:lastName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:firstName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:emailAddress:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:directoryId:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:contactNumber:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:authorGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:adminGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:activeDirectoryName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeDirectoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
adminGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
authorGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contactNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
directoryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
emailAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firstName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
readerGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
realm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Edition
edition
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AuthenticationMethodOption
authenticationMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
accountName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
notificationEmail
instance Data.ToHeaders CreateAccountSubscription where
toHeaders :: CreateAccountSubscription -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateAccountSubscription where
toJSON :: CreateAccountSubscription -> Value
toJSON CreateAccountSubscription' {Maybe [Text]
Maybe Text
Text
AuthenticationMethodOption
Edition
notificationEmail :: Text
accountName :: Text
awsAccountId :: Text
authenticationMethod :: AuthenticationMethodOption
edition :: Edition
realm :: Maybe Text
readerGroup :: Maybe [Text]
lastName :: Maybe Text
firstName :: Maybe Text
emailAddress :: Maybe Text
directoryId :: Maybe Text
contactNumber :: Maybe Text
authorGroup :: Maybe [Text]
adminGroup :: Maybe [Text]
activeDirectoryName :: Maybe Text
$sel:notificationEmail:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:accountName:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:awsAccountId:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:authenticationMethod:CreateAccountSubscription' :: CreateAccountSubscription -> AuthenticationMethodOption
$sel:edition:CreateAccountSubscription' :: CreateAccountSubscription -> Edition
$sel:realm:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:readerGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:lastName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:firstName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:emailAddress:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:directoryId:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:contactNumber:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:authorGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:adminGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:activeDirectoryName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ActiveDirectoryName" 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
activeDirectoryName,
(Key
"AdminGroup" 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]
adminGroup,
(Key
"AuthorGroup" 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]
authorGroup,
(Key
"ContactNumber" 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
contactNumber,
(Key
"DirectoryId" 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
directoryId,
(Key
"EmailAddress" 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
emailAddress,
(Key
"FirstName" 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
firstName,
(Key
"LastName" 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
lastName,
(Key
"ReaderGroup" 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]
readerGroup,
(Key
"Realm" 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
realm,
forall a. a -> Maybe a
Prelude.Just (Key
"Edition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Edition
edition),
forall a. a -> Maybe a
Prelude.Just
( Key
"AuthenticationMethod"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= AuthenticationMethodOption
authenticationMethod
),
forall a. a -> Maybe a
Prelude.Just (Key
"AccountName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
accountName),
forall a. a -> Maybe a
Prelude.Just
(Key
"NotificationEmail" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
notificationEmail)
]
)
instance Data.ToPath CreateAccountSubscription where
toPath :: CreateAccountSubscription -> ByteString
toPath CreateAccountSubscription' {Maybe [Text]
Maybe Text
Text
AuthenticationMethodOption
Edition
notificationEmail :: Text
accountName :: Text
awsAccountId :: Text
authenticationMethod :: AuthenticationMethodOption
edition :: Edition
realm :: Maybe Text
readerGroup :: Maybe [Text]
lastName :: Maybe Text
firstName :: Maybe Text
emailAddress :: Maybe Text
directoryId :: Maybe Text
contactNumber :: Maybe Text
authorGroup :: Maybe [Text]
adminGroup :: Maybe [Text]
activeDirectoryName :: Maybe Text
$sel:notificationEmail:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:accountName:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:awsAccountId:CreateAccountSubscription' :: CreateAccountSubscription -> Text
$sel:authenticationMethod:CreateAccountSubscription' :: CreateAccountSubscription -> AuthenticationMethodOption
$sel:edition:CreateAccountSubscription' :: CreateAccountSubscription -> Edition
$sel:realm:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:readerGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:lastName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:firstName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:emailAddress:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:directoryId:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:contactNumber:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
$sel:authorGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:adminGroup:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe [Text]
$sel:activeDirectoryName:CreateAccountSubscription' :: CreateAccountSubscription -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/account/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId]
instance Data.ToQuery CreateAccountSubscription where
toQuery :: CreateAccountSubscription -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateAccountSubscriptionResponse = CreateAccountSubscriptionResponse'
{
CreateAccountSubscriptionResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
CreateAccountSubscriptionResponse -> Maybe SignupResponse
signupResponse :: Prelude.Maybe SignupResponse,
CreateAccountSubscriptionResponse -> Int
status :: Prelude.Int
}
deriving (CreateAccountSubscriptionResponse
-> CreateAccountSubscriptionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccountSubscriptionResponse
-> CreateAccountSubscriptionResponse -> Bool
$c/= :: CreateAccountSubscriptionResponse
-> CreateAccountSubscriptionResponse -> Bool
== :: CreateAccountSubscriptionResponse
-> CreateAccountSubscriptionResponse -> Bool
$c== :: CreateAccountSubscriptionResponse
-> CreateAccountSubscriptionResponse -> Bool
Prelude.Eq, ReadPrec [CreateAccountSubscriptionResponse]
ReadPrec CreateAccountSubscriptionResponse
Int -> ReadS CreateAccountSubscriptionResponse
ReadS [CreateAccountSubscriptionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccountSubscriptionResponse]
$creadListPrec :: ReadPrec [CreateAccountSubscriptionResponse]
readPrec :: ReadPrec CreateAccountSubscriptionResponse
$creadPrec :: ReadPrec CreateAccountSubscriptionResponse
readList :: ReadS [CreateAccountSubscriptionResponse]
$creadList :: ReadS [CreateAccountSubscriptionResponse]
readsPrec :: Int -> ReadS CreateAccountSubscriptionResponse
$creadsPrec :: Int -> ReadS CreateAccountSubscriptionResponse
Prelude.Read, Int -> CreateAccountSubscriptionResponse -> ShowS
[CreateAccountSubscriptionResponse] -> ShowS
CreateAccountSubscriptionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccountSubscriptionResponse] -> ShowS
$cshowList :: [CreateAccountSubscriptionResponse] -> ShowS
show :: CreateAccountSubscriptionResponse -> String
$cshow :: CreateAccountSubscriptionResponse -> String
showsPrec :: Int -> CreateAccountSubscriptionResponse -> ShowS
$cshowsPrec :: Int -> CreateAccountSubscriptionResponse -> ShowS
Prelude.Show, forall x.
Rep CreateAccountSubscriptionResponse x
-> CreateAccountSubscriptionResponse
forall x.
CreateAccountSubscriptionResponse
-> Rep CreateAccountSubscriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAccountSubscriptionResponse x
-> CreateAccountSubscriptionResponse
$cfrom :: forall x.
CreateAccountSubscriptionResponse
-> Rep CreateAccountSubscriptionResponse x
Prelude.Generic)
newCreateAccountSubscriptionResponse ::
Prelude.Int ->
CreateAccountSubscriptionResponse
newCreateAccountSubscriptionResponse :: Int -> CreateAccountSubscriptionResponse
newCreateAccountSubscriptionResponse Int
pStatus_ =
CreateAccountSubscriptionResponse'
{ $sel:requestId:CreateAccountSubscriptionResponse' :: Maybe Text
requestId =
forall a. Maybe a
Prelude.Nothing,
$sel:signupResponse:CreateAccountSubscriptionResponse' :: Maybe SignupResponse
signupResponse = forall a. Maybe a
Prelude.Nothing,
$sel:status:CreateAccountSubscriptionResponse' :: Int
status = Int
pStatus_
}
createAccountSubscriptionResponse_requestId :: Lens.Lens' CreateAccountSubscriptionResponse (Prelude.Maybe Prelude.Text)
createAccountSubscriptionResponse_requestId :: Lens' CreateAccountSubscriptionResponse (Maybe Text)
createAccountSubscriptionResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscriptionResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateAccountSubscriptionResponse
s@CreateAccountSubscriptionResponse' {} Maybe Text
a -> CreateAccountSubscriptionResponse
s {$sel:requestId:CreateAccountSubscriptionResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateAccountSubscriptionResponse)
createAccountSubscriptionResponse_signupResponse :: Lens.Lens' CreateAccountSubscriptionResponse (Prelude.Maybe SignupResponse)
createAccountSubscriptionResponse_signupResponse :: Lens' CreateAccountSubscriptionResponse (Maybe SignupResponse)
createAccountSubscriptionResponse_signupResponse = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscriptionResponse' {Maybe SignupResponse
signupResponse :: Maybe SignupResponse
$sel:signupResponse:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Maybe SignupResponse
signupResponse} -> Maybe SignupResponse
signupResponse) (\s :: CreateAccountSubscriptionResponse
s@CreateAccountSubscriptionResponse' {} Maybe SignupResponse
a -> CreateAccountSubscriptionResponse
s {$sel:signupResponse:CreateAccountSubscriptionResponse' :: Maybe SignupResponse
signupResponse = Maybe SignupResponse
a} :: CreateAccountSubscriptionResponse)
createAccountSubscriptionResponse_status :: Lens.Lens' CreateAccountSubscriptionResponse Prelude.Int
createAccountSubscriptionResponse_status :: Lens' CreateAccountSubscriptionResponse Int
createAccountSubscriptionResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountSubscriptionResponse' {Int
status :: Int
$sel:status:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Int
status} -> Int
status) (\s :: CreateAccountSubscriptionResponse
s@CreateAccountSubscriptionResponse' {} Int
a -> CreateAccountSubscriptionResponse
s {$sel:status:CreateAccountSubscriptionResponse' :: Int
status = Int
a} :: CreateAccountSubscriptionResponse)
instance
Prelude.NFData
CreateAccountSubscriptionResponse
where
rnf :: CreateAccountSubscriptionResponse -> ()
rnf CreateAccountSubscriptionResponse' {Int
Maybe Text
Maybe SignupResponse
status :: Int
signupResponse :: Maybe SignupResponse
requestId :: Maybe Text
$sel:status:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Int
$sel:signupResponse:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Maybe SignupResponse
$sel:requestId:CreateAccountSubscriptionResponse' :: CreateAccountSubscriptionResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SignupResponse
signupResponse
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status