{-# 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.IoT.TestAuthorization
(
TestAuthorization (..),
newTestAuthorization,
testAuthorization_clientId,
testAuthorization_policyNamesToAdd,
testAuthorization_principal,
testAuthorization_cognitoIdentityPoolId,
testAuthorization_policyNamesToSkip,
testAuthorization_authInfos,
TestAuthorizationResponse (..),
newTestAuthorizationResponse,
testAuthorizationResponse_authResults,
testAuthorizationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
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 TestAuthorization = TestAuthorization'
{
TestAuthorization -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
TestAuthorization -> Maybe [Text]
policyNamesToAdd :: Prelude.Maybe [Prelude.Text],
TestAuthorization -> Maybe Text
principal :: Prelude.Maybe Prelude.Text,
TestAuthorization -> Maybe Text
cognitoIdentityPoolId :: Prelude.Maybe Prelude.Text,
TestAuthorization -> Maybe [Text]
policyNamesToSkip :: Prelude.Maybe [Prelude.Text],
TestAuthorization -> NonEmpty AuthInfo
authInfos :: Prelude.NonEmpty AuthInfo
}
deriving (TestAuthorization -> TestAuthorization -> Bool
(TestAuthorization -> TestAuthorization -> Bool)
-> (TestAuthorization -> TestAuthorization -> Bool)
-> Eq TestAuthorization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestAuthorization -> TestAuthorization -> Bool
$c/= :: TestAuthorization -> TestAuthorization -> Bool
== :: TestAuthorization -> TestAuthorization -> Bool
$c== :: TestAuthorization -> TestAuthorization -> Bool
Prelude.Eq, ReadPrec [TestAuthorization]
ReadPrec TestAuthorization
Int -> ReadS TestAuthorization
ReadS [TestAuthorization]
(Int -> ReadS TestAuthorization)
-> ReadS [TestAuthorization]
-> ReadPrec TestAuthorization
-> ReadPrec [TestAuthorization]
-> Read TestAuthorization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestAuthorization]
$creadListPrec :: ReadPrec [TestAuthorization]
readPrec :: ReadPrec TestAuthorization
$creadPrec :: ReadPrec TestAuthorization
readList :: ReadS [TestAuthorization]
$creadList :: ReadS [TestAuthorization]
readsPrec :: Int -> ReadS TestAuthorization
$creadsPrec :: Int -> ReadS TestAuthorization
Prelude.Read, Int -> TestAuthorization -> ShowS
[TestAuthorization] -> ShowS
TestAuthorization -> String
(Int -> TestAuthorization -> ShowS)
-> (TestAuthorization -> String)
-> ([TestAuthorization] -> ShowS)
-> Show TestAuthorization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestAuthorization] -> ShowS
$cshowList :: [TestAuthorization] -> ShowS
show :: TestAuthorization -> String
$cshow :: TestAuthorization -> String
showsPrec :: Int -> TestAuthorization -> ShowS
$cshowsPrec :: Int -> TestAuthorization -> ShowS
Prelude.Show, (forall x. TestAuthorization -> Rep TestAuthorization x)
-> (forall x. Rep TestAuthorization x -> TestAuthorization)
-> Generic TestAuthorization
forall x. Rep TestAuthorization x -> TestAuthorization
forall x. TestAuthorization -> Rep TestAuthorization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestAuthorization x -> TestAuthorization
$cfrom :: forall x. TestAuthorization -> Rep TestAuthorization x
Prelude.Generic)
newTestAuthorization ::
Prelude.NonEmpty AuthInfo ->
TestAuthorization
newTestAuthorization :: NonEmpty AuthInfo -> TestAuthorization
newTestAuthorization NonEmpty AuthInfo
pAuthInfos_ =
TestAuthorization' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NonEmpty AuthInfo
-> TestAuthorization
TestAuthorization'
{ $sel:clientId:TestAuthorization' :: Maybe Text
clientId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyNamesToAdd:TestAuthorization' :: Maybe [Text]
policyNamesToAdd = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:principal:TestAuthorization' :: Maybe Text
principal = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cognitoIdentityPoolId:TestAuthorization' :: Maybe Text
cognitoIdentityPoolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyNamesToSkip:TestAuthorization' :: Maybe [Text]
policyNamesToSkip = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:authInfos:TestAuthorization' :: NonEmpty AuthInfo
authInfos = Tagged (NonEmpty AuthInfo) (Identity (NonEmpty AuthInfo))
-> Tagged (NonEmpty AuthInfo) (Identity (NonEmpty AuthInfo))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty AuthInfo) (Identity (NonEmpty AuthInfo))
-> Tagged (NonEmpty AuthInfo) (Identity (NonEmpty AuthInfo)))
-> NonEmpty AuthInfo -> NonEmpty AuthInfo
forall t b. AReview t b -> b -> t
Lens.# NonEmpty AuthInfo
pAuthInfos_
}
testAuthorization_clientId :: Lens.Lens' TestAuthorization (Prelude.Maybe Prelude.Text)
testAuthorization_clientId :: (Maybe Text -> f (Maybe Text))
-> TestAuthorization -> f TestAuthorization
testAuthorization_clientId = (TestAuthorization -> Maybe Text)
-> (TestAuthorization -> Maybe Text -> TestAuthorization)
-> Lens
TestAuthorization TestAuthorization (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {Maybe Text
clientId :: Maybe Text
$sel:clientId:TestAuthorization' :: TestAuthorization -> Maybe Text
clientId} -> Maybe Text
clientId) (\s :: TestAuthorization
s@TestAuthorization' {} Maybe Text
a -> TestAuthorization
s {$sel:clientId:TestAuthorization' :: Maybe Text
clientId = Maybe Text
a} :: TestAuthorization)
testAuthorization_policyNamesToAdd :: Lens.Lens' TestAuthorization (Prelude.Maybe [Prelude.Text])
testAuthorization_policyNamesToAdd :: (Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization -> f TestAuthorization
testAuthorization_policyNamesToAdd = (TestAuthorization -> Maybe [Text])
-> (TestAuthorization -> Maybe [Text] -> TestAuthorization)
-> Lens
TestAuthorization TestAuthorization (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {Maybe [Text]
policyNamesToAdd :: Maybe [Text]
$sel:policyNamesToAdd:TestAuthorization' :: TestAuthorization -> Maybe [Text]
policyNamesToAdd} -> Maybe [Text]
policyNamesToAdd) (\s :: TestAuthorization
s@TestAuthorization' {} Maybe [Text]
a -> TestAuthorization
s {$sel:policyNamesToAdd:TestAuthorization' :: Maybe [Text]
policyNamesToAdd = Maybe [Text]
a} :: TestAuthorization) ((Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization -> f TestAuthorization)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization
-> f TestAuthorization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
testAuthorization_principal :: Lens.Lens' TestAuthorization (Prelude.Maybe Prelude.Text)
testAuthorization_principal :: (Maybe Text -> f (Maybe Text))
-> TestAuthorization -> f TestAuthorization
testAuthorization_principal = (TestAuthorization -> Maybe Text)
-> (TestAuthorization -> Maybe Text -> TestAuthorization)
-> Lens
TestAuthorization TestAuthorization (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {Maybe Text
principal :: Maybe Text
$sel:principal:TestAuthorization' :: TestAuthorization -> Maybe Text
principal} -> Maybe Text
principal) (\s :: TestAuthorization
s@TestAuthorization' {} Maybe Text
a -> TestAuthorization
s {$sel:principal:TestAuthorization' :: Maybe Text
principal = Maybe Text
a} :: TestAuthorization)
testAuthorization_cognitoIdentityPoolId :: Lens.Lens' TestAuthorization (Prelude.Maybe Prelude.Text)
testAuthorization_cognitoIdentityPoolId :: (Maybe Text -> f (Maybe Text))
-> TestAuthorization -> f TestAuthorization
testAuthorization_cognitoIdentityPoolId = (TestAuthorization -> Maybe Text)
-> (TestAuthorization -> Maybe Text -> TestAuthorization)
-> Lens
TestAuthorization TestAuthorization (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {Maybe Text
cognitoIdentityPoolId :: Maybe Text
$sel:cognitoIdentityPoolId:TestAuthorization' :: TestAuthorization -> Maybe Text
cognitoIdentityPoolId} -> Maybe Text
cognitoIdentityPoolId) (\s :: TestAuthorization
s@TestAuthorization' {} Maybe Text
a -> TestAuthorization
s {$sel:cognitoIdentityPoolId:TestAuthorization' :: Maybe Text
cognitoIdentityPoolId = Maybe Text
a} :: TestAuthorization)
testAuthorization_policyNamesToSkip :: Lens.Lens' TestAuthorization (Prelude.Maybe [Prelude.Text])
testAuthorization_policyNamesToSkip :: (Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization -> f TestAuthorization
testAuthorization_policyNamesToSkip = (TestAuthorization -> Maybe [Text])
-> (TestAuthorization -> Maybe [Text] -> TestAuthorization)
-> Lens
TestAuthorization TestAuthorization (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {Maybe [Text]
policyNamesToSkip :: Maybe [Text]
$sel:policyNamesToSkip:TestAuthorization' :: TestAuthorization -> Maybe [Text]
policyNamesToSkip} -> Maybe [Text]
policyNamesToSkip) (\s :: TestAuthorization
s@TestAuthorization' {} Maybe [Text]
a -> TestAuthorization
s {$sel:policyNamesToSkip:TestAuthorization' :: Maybe [Text]
policyNamesToSkip = Maybe [Text]
a} :: TestAuthorization) ((Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization -> f TestAuthorization)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> TestAuthorization
-> f TestAuthorization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
testAuthorization_authInfos :: Lens.Lens' TestAuthorization (Prelude.NonEmpty AuthInfo)
testAuthorization_authInfos :: (NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> TestAuthorization -> f TestAuthorization
testAuthorization_authInfos = (TestAuthorization -> NonEmpty AuthInfo)
-> (TestAuthorization -> NonEmpty AuthInfo -> TestAuthorization)
-> Lens
TestAuthorization
TestAuthorization
(NonEmpty AuthInfo)
(NonEmpty AuthInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorization' {NonEmpty AuthInfo
authInfos :: NonEmpty AuthInfo
$sel:authInfos:TestAuthorization' :: TestAuthorization -> NonEmpty AuthInfo
authInfos} -> NonEmpty AuthInfo
authInfos) (\s :: TestAuthorization
s@TestAuthorization' {} NonEmpty AuthInfo
a -> TestAuthorization
s {$sel:authInfos:TestAuthorization' :: NonEmpty AuthInfo
authInfos = NonEmpty AuthInfo
a} :: TestAuthorization) ((NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> TestAuthorization -> f TestAuthorization)
-> ((NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> (NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> TestAuthorization
-> f TestAuthorization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty AuthInfo -> f (NonEmpty AuthInfo))
-> NonEmpty AuthInfo -> f (NonEmpty AuthInfo)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest TestAuthorization where
type
AWSResponse TestAuthorization =
TestAuthorizationResponse
request :: TestAuthorization -> Request TestAuthorization
request = Service -> TestAuthorization -> Request TestAuthorization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy TestAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TestAuthorization)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse TestAuthorization))
-> Logger
-> Service
-> Proxy TestAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TestAuthorization)))
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 [AuthResult] -> Int -> TestAuthorizationResponse
TestAuthorizationResponse'
(Maybe [AuthResult] -> Int -> TestAuthorizationResponse)
-> Either String (Maybe [AuthResult])
-> Either String (Int -> TestAuthorizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [AuthResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authResults" Either String (Maybe (Maybe [AuthResult]))
-> Maybe [AuthResult] -> Either String (Maybe [AuthResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AuthResult]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> TestAuthorizationResponse)
-> Either String Int -> Either String TestAuthorizationResponse
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 TestAuthorization
instance Prelude.NFData TestAuthorization
instance Core.ToHeaders TestAuthorization where
toHeaders :: TestAuthorization -> ResponseHeaders
toHeaders = ResponseHeaders -> TestAuthorization -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON TestAuthorization where
toJSON :: TestAuthorization -> Value
toJSON TestAuthorization' {Maybe [Text]
Maybe Text
NonEmpty AuthInfo
authInfos :: NonEmpty AuthInfo
policyNamesToSkip :: Maybe [Text]
cognitoIdentityPoolId :: Maybe Text
principal :: Maybe Text
policyNamesToAdd :: Maybe [Text]
clientId :: Maybe Text
$sel:authInfos:TestAuthorization' :: TestAuthorization -> NonEmpty AuthInfo
$sel:policyNamesToSkip:TestAuthorization' :: TestAuthorization -> Maybe [Text]
$sel:cognitoIdentityPoolId:TestAuthorization' :: TestAuthorization -> Maybe Text
$sel:principal:TestAuthorization' :: TestAuthorization -> Maybe Text
$sel:policyNamesToAdd:TestAuthorization' :: TestAuthorization -> Maybe [Text]
$sel:clientId:TestAuthorization' :: TestAuthorization -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"policyNamesToAdd" 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]
policyNamesToAdd,
(Text
"principal" 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
principal,
(Text
"cognitoIdentityPoolId" 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
cognitoIdentityPoolId,
(Text
"policyNamesToSkip" 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]
policyNamesToSkip,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"authInfos" Text -> NonEmpty AuthInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty AuthInfo
authInfos)
]
)
instance Core.ToPath TestAuthorization where
toPath :: TestAuthorization -> ByteString
toPath = ByteString -> TestAuthorization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/test-authorization"
instance Core.ToQuery TestAuthorization where
toQuery :: TestAuthorization -> QueryString
toQuery TestAuthorization' {Maybe [Text]
Maybe Text
NonEmpty AuthInfo
authInfos :: NonEmpty AuthInfo
policyNamesToSkip :: Maybe [Text]
cognitoIdentityPoolId :: Maybe Text
principal :: Maybe Text
policyNamesToAdd :: Maybe [Text]
clientId :: Maybe Text
$sel:authInfos:TestAuthorization' :: TestAuthorization -> NonEmpty AuthInfo
$sel:policyNamesToSkip:TestAuthorization' :: TestAuthorization -> Maybe [Text]
$sel:cognitoIdentityPoolId:TestAuthorization' :: TestAuthorization -> Maybe Text
$sel:principal:TestAuthorization' :: TestAuthorization -> Maybe Text
$sel:policyNamesToAdd:TestAuthorization' :: TestAuthorization -> Maybe [Text]
$sel:clientId:TestAuthorization' :: TestAuthorization -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"clientId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientId]
data TestAuthorizationResponse = TestAuthorizationResponse'
{
TestAuthorizationResponse -> Maybe [AuthResult]
authResults :: Prelude.Maybe [AuthResult],
TestAuthorizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (TestAuthorizationResponse -> TestAuthorizationResponse -> Bool
(TestAuthorizationResponse -> TestAuthorizationResponse -> Bool)
-> (TestAuthorizationResponse -> TestAuthorizationResponse -> Bool)
-> Eq TestAuthorizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestAuthorizationResponse -> TestAuthorizationResponse -> Bool
$c/= :: TestAuthorizationResponse -> TestAuthorizationResponse -> Bool
== :: TestAuthorizationResponse -> TestAuthorizationResponse -> Bool
$c== :: TestAuthorizationResponse -> TestAuthorizationResponse -> Bool
Prelude.Eq, ReadPrec [TestAuthorizationResponse]
ReadPrec TestAuthorizationResponse
Int -> ReadS TestAuthorizationResponse
ReadS [TestAuthorizationResponse]
(Int -> ReadS TestAuthorizationResponse)
-> ReadS [TestAuthorizationResponse]
-> ReadPrec TestAuthorizationResponse
-> ReadPrec [TestAuthorizationResponse]
-> Read TestAuthorizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestAuthorizationResponse]
$creadListPrec :: ReadPrec [TestAuthorizationResponse]
readPrec :: ReadPrec TestAuthorizationResponse
$creadPrec :: ReadPrec TestAuthorizationResponse
readList :: ReadS [TestAuthorizationResponse]
$creadList :: ReadS [TestAuthorizationResponse]
readsPrec :: Int -> ReadS TestAuthorizationResponse
$creadsPrec :: Int -> ReadS TestAuthorizationResponse
Prelude.Read, Int -> TestAuthorizationResponse -> ShowS
[TestAuthorizationResponse] -> ShowS
TestAuthorizationResponse -> String
(Int -> TestAuthorizationResponse -> ShowS)
-> (TestAuthorizationResponse -> String)
-> ([TestAuthorizationResponse] -> ShowS)
-> Show TestAuthorizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestAuthorizationResponse] -> ShowS
$cshowList :: [TestAuthorizationResponse] -> ShowS
show :: TestAuthorizationResponse -> String
$cshow :: TestAuthorizationResponse -> String
showsPrec :: Int -> TestAuthorizationResponse -> ShowS
$cshowsPrec :: Int -> TestAuthorizationResponse -> ShowS
Prelude.Show, (forall x.
TestAuthorizationResponse -> Rep TestAuthorizationResponse x)
-> (forall x.
Rep TestAuthorizationResponse x -> TestAuthorizationResponse)
-> Generic TestAuthorizationResponse
forall x.
Rep TestAuthorizationResponse x -> TestAuthorizationResponse
forall x.
TestAuthorizationResponse -> Rep TestAuthorizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TestAuthorizationResponse x -> TestAuthorizationResponse
$cfrom :: forall x.
TestAuthorizationResponse -> Rep TestAuthorizationResponse x
Prelude.Generic)
newTestAuthorizationResponse ::
Prelude.Int ->
TestAuthorizationResponse
newTestAuthorizationResponse :: Int -> TestAuthorizationResponse
newTestAuthorizationResponse Int
pHttpStatus_ =
TestAuthorizationResponse' :: Maybe [AuthResult] -> Int -> TestAuthorizationResponse
TestAuthorizationResponse'
{ $sel:authResults:TestAuthorizationResponse' :: Maybe [AuthResult]
authResults =
Maybe [AuthResult]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:TestAuthorizationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
testAuthorizationResponse_authResults :: Lens.Lens' TestAuthorizationResponse (Prelude.Maybe [AuthResult])
testAuthorizationResponse_authResults :: (Maybe [AuthResult] -> f (Maybe [AuthResult]))
-> TestAuthorizationResponse -> f TestAuthorizationResponse
testAuthorizationResponse_authResults = (TestAuthorizationResponse -> Maybe [AuthResult])
-> (TestAuthorizationResponse
-> Maybe [AuthResult] -> TestAuthorizationResponse)
-> Lens
TestAuthorizationResponse
TestAuthorizationResponse
(Maybe [AuthResult])
(Maybe [AuthResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorizationResponse' {Maybe [AuthResult]
authResults :: Maybe [AuthResult]
$sel:authResults:TestAuthorizationResponse' :: TestAuthorizationResponse -> Maybe [AuthResult]
authResults} -> Maybe [AuthResult]
authResults) (\s :: TestAuthorizationResponse
s@TestAuthorizationResponse' {} Maybe [AuthResult]
a -> TestAuthorizationResponse
s {$sel:authResults:TestAuthorizationResponse' :: Maybe [AuthResult]
authResults = Maybe [AuthResult]
a} :: TestAuthorizationResponse) ((Maybe [AuthResult] -> f (Maybe [AuthResult]))
-> TestAuthorizationResponse -> f TestAuthorizationResponse)
-> ((Maybe [AuthResult] -> f (Maybe [AuthResult]))
-> Maybe [AuthResult] -> f (Maybe [AuthResult]))
-> (Maybe [AuthResult] -> f (Maybe [AuthResult]))
-> TestAuthorizationResponse
-> f TestAuthorizationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AuthResult] [AuthResult] [AuthResult] [AuthResult]
-> Iso
(Maybe [AuthResult])
(Maybe [AuthResult])
(Maybe [AuthResult])
(Maybe [AuthResult])
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 [AuthResult] [AuthResult] [AuthResult] [AuthResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
testAuthorizationResponse_httpStatus :: Lens.Lens' TestAuthorizationResponse Prelude.Int
testAuthorizationResponse_httpStatus :: (Int -> f Int)
-> TestAuthorizationResponse -> f TestAuthorizationResponse
testAuthorizationResponse_httpStatus = (TestAuthorizationResponse -> Int)
-> (TestAuthorizationResponse -> Int -> TestAuthorizationResponse)
-> Lens TestAuthorizationResponse TestAuthorizationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestAuthorizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:TestAuthorizationResponse' :: TestAuthorizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: TestAuthorizationResponse
s@TestAuthorizationResponse' {} Int
a -> TestAuthorizationResponse
s {$sel:httpStatus:TestAuthorizationResponse' :: Int
httpStatus = Int
a} :: TestAuthorizationResponse)
instance Prelude.NFData TestAuthorizationResponse