{-# 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.AWSHealth.DescribeAffectedAccountsForOrganization
(
DescribeAffectedAccountsForOrganization (..),
newDescribeAffectedAccountsForOrganization,
describeAffectedAccountsForOrganization_nextToken,
describeAffectedAccountsForOrganization_maxResults,
describeAffectedAccountsForOrganization_eventArn,
DescribeAffectedAccountsForOrganizationResponse (..),
newDescribeAffectedAccountsForOrganizationResponse,
describeAffectedAccountsForOrganizationResponse_affectedAccounts,
describeAffectedAccountsForOrganizationResponse_eventScopeCode,
describeAffectedAccountsForOrganizationResponse_nextToken,
describeAffectedAccountsForOrganizationResponse_httpStatus,
)
where
import Amazonka.AWSHealth.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 DescribeAffectedAccountsForOrganization = DescribeAffectedAccountsForOrganization'
{
DescribeAffectedAccountsForOrganization -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAffectedAccountsForOrganization -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeAffectedAccountsForOrganization -> Text
eventArn :: Prelude.Text
}
deriving (DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool
(DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool)
-> (DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool)
-> Eq DescribeAffectedAccountsForOrganization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool
$c/= :: DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool
== :: DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool
$c== :: DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization -> Bool
Prelude.Eq, ReadPrec [DescribeAffectedAccountsForOrganization]
ReadPrec DescribeAffectedAccountsForOrganization
Int -> ReadS DescribeAffectedAccountsForOrganization
ReadS [DescribeAffectedAccountsForOrganization]
(Int -> ReadS DescribeAffectedAccountsForOrganization)
-> ReadS [DescribeAffectedAccountsForOrganization]
-> ReadPrec DescribeAffectedAccountsForOrganization
-> ReadPrec [DescribeAffectedAccountsForOrganization]
-> Read DescribeAffectedAccountsForOrganization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAffectedAccountsForOrganization]
$creadListPrec :: ReadPrec [DescribeAffectedAccountsForOrganization]
readPrec :: ReadPrec DescribeAffectedAccountsForOrganization
$creadPrec :: ReadPrec DescribeAffectedAccountsForOrganization
readList :: ReadS [DescribeAffectedAccountsForOrganization]
$creadList :: ReadS [DescribeAffectedAccountsForOrganization]
readsPrec :: Int -> ReadS DescribeAffectedAccountsForOrganization
$creadsPrec :: Int -> ReadS DescribeAffectedAccountsForOrganization
Prelude.Read, Int -> DescribeAffectedAccountsForOrganization -> ShowS
[DescribeAffectedAccountsForOrganization] -> ShowS
DescribeAffectedAccountsForOrganization -> String
(Int -> DescribeAffectedAccountsForOrganization -> ShowS)
-> (DescribeAffectedAccountsForOrganization -> String)
-> ([DescribeAffectedAccountsForOrganization] -> ShowS)
-> Show DescribeAffectedAccountsForOrganization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAffectedAccountsForOrganization] -> ShowS
$cshowList :: [DescribeAffectedAccountsForOrganization] -> ShowS
show :: DescribeAffectedAccountsForOrganization -> String
$cshow :: DescribeAffectedAccountsForOrganization -> String
showsPrec :: Int -> DescribeAffectedAccountsForOrganization -> ShowS
$cshowsPrec :: Int -> DescribeAffectedAccountsForOrganization -> ShowS
Prelude.Show, (forall x.
DescribeAffectedAccountsForOrganization
-> Rep DescribeAffectedAccountsForOrganization x)
-> (forall x.
Rep DescribeAffectedAccountsForOrganization x
-> DescribeAffectedAccountsForOrganization)
-> Generic DescribeAffectedAccountsForOrganization
forall x.
Rep DescribeAffectedAccountsForOrganization x
-> DescribeAffectedAccountsForOrganization
forall x.
DescribeAffectedAccountsForOrganization
-> Rep DescribeAffectedAccountsForOrganization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAffectedAccountsForOrganization x
-> DescribeAffectedAccountsForOrganization
$cfrom :: forall x.
DescribeAffectedAccountsForOrganization
-> Rep DescribeAffectedAccountsForOrganization x
Prelude.Generic)
newDescribeAffectedAccountsForOrganization ::
Prelude.Text ->
DescribeAffectedAccountsForOrganization
newDescribeAffectedAccountsForOrganization :: Text -> DescribeAffectedAccountsForOrganization
newDescribeAffectedAccountsForOrganization Text
pEventArn_ =
DescribeAffectedAccountsForOrganization' :: Maybe Text
-> Maybe Natural -> Text -> DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganization'
{ $sel:nextToken:DescribeAffectedAccountsForOrganization' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeAffectedAccountsForOrganization' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:eventArn:DescribeAffectedAccountsForOrganization' :: Text
eventArn = Text
pEventArn_
}
describeAffectedAccountsForOrganization_nextToken :: Lens.Lens' DescribeAffectedAccountsForOrganization (Prelude.Maybe Prelude.Text)
describeAffectedAccountsForOrganization_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAffectedAccountsForOrganization
-> f DescribeAffectedAccountsForOrganization
describeAffectedAccountsForOrganization_nextToken = (DescribeAffectedAccountsForOrganization -> Maybe Text)
-> (DescribeAffectedAccountsForOrganization
-> Maybe Text -> DescribeAffectedAccountsForOrganization)
-> Lens
DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganization' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAffectedAccountsForOrganization
s@DescribeAffectedAccountsForOrganization' {} Maybe Text
a -> DescribeAffectedAccountsForOrganization
s {$sel:nextToken:DescribeAffectedAccountsForOrganization' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAffectedAccountsForOrganization)
describeAffectedAccountsForOrganization_maxResults :: Lens.Lens' DescribeAffectedAccountsForOrganization (Prelude.Maybe Prelude.Natural)
describeAffectedAccountsForOrganization_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAffectedAccountsForOrganization
-> f DescribeAffectedAccountsForOrganization
describeAffectedAccountsForOrganization_maxResults = (DescribeAffectedAccountsForOrganization -> Maybe Natural)
-> (DescribeAffectedAccountsForOrganization
-> Maybe Natural -> DescribeAffectedAccountsForOrganization)
-> Lens
DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganization
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganization' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAffectedAccountsForOrganization
s@DescribeAffectedAccountsForOrganization' {} Maybe Natural
a -> DescribeAffectedAccountsForOrganization
s {$sel:maxResults:DescribeAffectedAccountsForOrganization' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAffectedAccountsForOrganization)
describeAffectedAccountsForOrganization_eventArn :: Lens.Lens' DescribeAffectedAccountsForOrganization Prelude.Text
describeAffectedAccountsForOrganization_eventArn :: (Text -> f Text)
-> DescribeAffectedAccountsForOrganization
-> f DescribeAffectedAccountsForOrganization
describeAffectedAccountsForOrganization_eventArn = (DescribeAffectedAccountsForOrganization -> Text)
-> (DescribeAffectedAccountsForOrganization
-> Text -> DescribeAffectedAccountsForOrganization)
-> Lens
DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganization
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganization' {Text
eventArn :: Text
$sel:eventArn:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Text
eventArn} -> Text
eventArn) (\s :: DescribeAffectedAccountsForOrganization
s@DescribeAffectedAccountsForOrganization' {} Text
a -> DescribeAffectedAccountsForOrganization
s {$sel:eventArn:DescribeAffectedAccountsForOrganization' :: Text
eventArn = Text
a} :: DescribeAffectedAccountsForOrganization)
instance
Core.AWSPager
DescribeAffectedAccountsForOrganization
where
page :: DescribeAffectedAccountsForOrganization
-> AWSResponse DescribeAffectedAccountsForOrganization
-> Maybe DescribeAffectedAccountsForOrganization
page DescribeAffectedAccountsForOrganization
rq AWSResponse DescribeAffectedAccountsForOrganization
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganizationResponse
rs
DescribeAffectedAccountsForOrganizationResponse
-> Getting
(First Text) DescribeAffectedAccountsForOrganizationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First Text) DescribeAffectedAccountsForOrganizationResponse
Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe Text)
describeAffectedAccountsForOrganizationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First Text) DescribeAffectedAccountsForOrganizationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeAffectedAccountsForOrganizationResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeAffectedAccountsForOrganization
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganizationResponse
rs
DescribeAffectedAccountsForOrganizationResponse
-> Getting
(First [Text])
DescribeAffectedAccountsForOrganizationResponse
[Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First [Text]) DescribeAffectedAccountsForOrganizationResponse
Lens'
DescribeAffectedAccountsForOrganizationResponse (Maybe [Text])
describeAffectedAccountsForOrganizationResponse_affectedAccounts
((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First [Text]) DescribeAffectedAccountsForOrganizationResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting
(First [Text])
DescribeAffectedAccountsForOrganizationResponse
[Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeAffectedAccountsForOrganization
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeAffectedAccountsForOrganization
-> Maybe DescribeAffectedAccountsForOrganization
forall a. a -> Maybe a
Prelude.Just (DescribeAffectedAccountsForOrganization
-> Maybe DescribeAffectedAccountsForOrganization)
-> DescribeAffectedAccountsForOrganization
-> Maybe DescribeAffectedAccountsForOrganization
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeAffectedAccountsForOrganization
rq
DescribeAffectedAccountsForOrganization
-> (DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization)
-> DescribeAffectedAccountsForOrganization
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeAffectedAccountsForOrganization
-> Identity DescribeAffectedAccountsForOrganization
Lens
DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganization
(Maybe Text)
(Maybe Text)
describeAffectedAccountsForOrganization_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeAffectedAccountsForOrganization
-> Identity DescribeAffectedAccountsForOrganization)
-> Maybe Text
-> DescribeAffectedAccountsForOrganization
-> DescribeAffectedAccountsForOrganization
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAffectedAccountsForOrganization
DescribeAffectedAccountsForOrganizationResponse
rs
DescribeAffectedAccountsForOrganizationResponse
-> Getting
(First Text) DescribeAffectedAccountsForOrganizationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First Text) DescribeAffectedAccountsForOrganizationResponse
Lens' DescribeAffectedAccountsForOrganizationResponse (Maybe Text)
describeAffectedAccountsForOrganizationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAffectedAccountsForOrganizationResponse
-> Const
(First Text) DescribeAffectedAccountsForOrganizationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeAffectedAccountsForOrganizationResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
DescribeAffectedAccountsForOrganization
where
type
AWSResponse
DescribeAffectedAccountsForOrganization =
DescribeAffectedAccountsForOrganizationResponse
request :: DescribeAffectedAccountsForOrganization
-> Request DescribeAffectedAccountsForOrganization
request = Service
-> DescribeAffectedAccountsForOrganization
-> Request DescribeAffectedAccountsForOrganization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAffectedAccountsForOrganization
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeAffectedAccountsForOrganization)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse DescribeAffectedAccountsForOrganization))
-> Logger
-> Service
-> Proxy DescribeAffectedAccountsForOrganization
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeAffectedAccountsForOrganization)))
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]
-> Maybe EventScopeCode
-> Maybe Text
-> Int
-> DescribeAffectedAccountsForOrganizationResponse
DescribeAffectedAccountsForOrganizationResponse'
(Maybe [Text]
-> Maybe EventScopeCode
-> Maybe Text
-> Int
-> DescribeAffectedAccountsForOrganizationResponse)
-> Either String (Maybe [Text])
-> Either
String
(Maybe EventScopeCode
-> Maybe Text
-> Int
-> DescribeAffectedAccountsForOrganizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"affectedAccounts"
Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe EventScopeCode
-> Maybe Text
-> Int
-> DescribeAffectedAccountsForOrganizationResponse)
-> Either String (Maybe EventScopeCode)
-> Either
String
(Maybe Text
-> Int -> DescribeAffectedAccountsForOrganizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe EventScopeCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"eventScopeCode")
Either
String
(Maybe Text
-> Int -> DescribeAffectedAccountsForOrganizationResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> DescribeAffectedAccountsForOrganizationResponse)
forall (f :: * -> *) a b. Applicative f => 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
"nextToken")
Either
String (Int -> DescribeAffectedAccountsForOrganizationResponse)
-> Either String Int
-> Either String DescribeAffectedAccountsForOrganizationResponse
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
DescribeAffectedAccountsForOrganization
instance
Prelude.NFData
DescribeAffectedAccountsForOrganization
instance
Core.ToHeaders
DescribeAffectedAccountsForOrganization
where
toHeaders :: DescribeAffectedAccountsForOrganization -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeAffectedAccountsForOrganization -> 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
"AWSHealth_20160804.DescribeAffectedAccountsForOrganization" ::
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
DescribeAffectedAccountsForOrganization
where
toJSON :: DescribeAffectedAccountsForOrganization -> Value
toJSON DescribeAffectedAccountsForOrganization' {Maybe Natural
Maybe Text
Text
eventArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:eventArn:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Text
$sel:maxResults:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Maybe Natural
$sel:nextToken:DescribeAffectedAccountsForOrganization' :: DescribeAffectedAccountsForOrganization -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nextToken" 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
nextToken,
(Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"eventArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
eventArn)
]
)
instance
Core.ToPath
DescribeAffectedAccountsForOrganization
where
toPath :: DescribeAffectedAccountsForOrganization -> ByteString
toPath = ByteString -> DescribeAffectedAccountsForOrganization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeAffectedAccountsForOrganization
where
toQuery :: DescribeAffectedAccountsForOrganization -> QueryString
toQuery = QueryString
-> DescribeAffectedAccountsForOrganization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAffectedAccountsForOrganizationResponse = DescribeAffectedAccountsForOrganizationResponse'
{
DescribeAffectedAccountsForOrganizationResponse -> Maybe [Text]
affectedAccounts :: Prelude.Maybe [Prelude.Text],
DescribeAffectedAccountsForOrganizationResponse
-> Maybe EventScopeCode
eventScopeCode :: Prelude.Maybe EventScopeCode,
DescribeAffectedAccountsForOrganizationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAffectedAccountsForOrganizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool
(DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool)
-> (DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool)
-> Eq DescribeAffectedAccountsForOrganizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool
$c/= :: DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool
== :: DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool
$c== :: DescribeAffectedAccountsForOrganizationResponse
-> DescribeAffectedAccountsForOrganizationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAffectedAccountsForOrganizationResponse]
ReadPrec DescribeAffectedAccountsForOrganizationResponse
Int -> ReadS DescribeAffectedAccountsForOrganizationResponse
ReadS [DescribeAffectedAccountsForOrganizationResponse]
(Int -> ReadS DescribeAffectedAccountsForOrganizationResponse)
-> ReadS [DescribeAffectedAccountsForOrganizationResponse]
-> ReadPrec DescribeAffectedAccountsForOrganizationResponse
-> ReadPrec [DescribeAffectedAccountsForOrganizationResponse]
-> Read DescribeAffectedAccountsForOrganizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAffectedAccountsForOrganizationResponse]
$creadListPrec :: ReadPrec [DescribeAffectedAccountsForOrganizationResponse]
readPrec :: ReadPrec DescribeAffectedAccountsForOrganizationResponse
$creadPrec :: ReadPrec DescribeAffectedAccountsForOrganizationResponse
readList :: ReadS [DescribeAffectedAccountsForOrganizationResponse]
$creadList :: ReadS [DescribeAffectedAccountsForOrganizationResponse]
readsPrec :: Int -> ReadS DescribeAffectedAccountsForOrganizationResponse
$creadsPrec :: Int -> ReadS DescribeAffectedAccountsForOrganizationResponse
Prelude.Read, Int -> DescribeAffectedAccountsForOrganizationResponse -> ShowS
[DescribeAffectedAccountsForOrganizationResponse] -> ShowS
DescribeAffectedAccountsForOrganizationResponse -> String
(Int -> DescribeAffectedAccountsForOrganizationResponse -> ShowS)
-> (DescribeAffectedAccountsForOrganizationResponse -> String)
-> ([DescribeAffectedAccountsForOrganizationResponse] -> ShowS)
-> Show DescribeAffectedAccountsForOrganizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAffectedAccountsForOrganizationResponse] -> ShowS
$cshowList :: [DescribeAffectedAccountsForOrganizationResponse] -> ShowS
show :: DescribeAffectedAccountsForOrganizationResponse -> String
$cshow :: DescribeAffectedAccountsForOrganizationResponse -> String
showsPrec :: Int -> DescribeAffectedAccountsForOrganizationResponse -> ShowS
$cshowsPrec :: Int -> DescribeAffectedAccountsForOrganizationResponse -> ShowS
Prelude.Show, (forall x.
DescribeAffectedAccountsForOrganizationResponse
-> Rep DescribeAffectedAccountsForOrganizationResponse x)
-> (forall x.
Rep DescribeAffectedAccountsForOrganizationResponse x
-> DescribeAffectedAccountsForOrganizationResponse)
-> Generic DescribeAffectedAccountsForOrganizationResponse
forall x.
Rep DescribeAffectedAccountsForOrganizationResponse x
-> DescribeAffectedAccountsForOrganizationResponse
forall x.
DescribeAffectedAccountsForOrganizationResponse
-> Rep DescribeAffectedAccountsForOrganizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAffectedAccountsForOrganizationResponse x
-> DescribeAffectedAccountsForOrganizationResponse
$cfrom :: forall x.
DescribeAffectedAccountsForOrganizationResponse
-> Rep DescribeAffectedAccountsForOrganizationResponse x
Prelude.Generic)
newDescribeAffectedAccountsForOrganizationResponse ::
Prelude.Int ->
DescribeAffectedAccountsForOrganizationResponse
newDescribeAffectedAccountsForOrganizationResponse :: Int -> DescribeAffectedAccountsForOrganizationResponse
newDescribeAffectedAccountsForOrganizationResponse
Int
pHttpStatus_ =
DescribeAffectedAccountsForOrganizationResponse' :: Maybe [Text]
-> Maybe EventScopeCode
-> Maybe Text
-> Int
-> DescribeAffectedAccountsForOrganizationResponse
DescribeAffectedAccountsForOrganizationResponse'
{ $sel:affectedAccounts:DescribeAffectedAccountsForOrganizationResponse' :: Maybe [Text]
affectedAccounts =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:eventScopeCode:DescribeAffectedAccountsForOrganizationResponse' :: Maybe EventScopeCode
eventScopeCode =
Maybe EventScopeCode
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAffectedAccountsForOrganizationResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAffectedAccountsForOrganizationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAffectedAccountsForOrganizationResponse_affectedAccounts :: Lens.Lens' DescribeAffectedAccountsForOrganizationResponse (Prelude.Maybe [Prelude.Text])
describeAffectedAccountsForOrganizationResponse_affectedAccounts :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse
describeAffectedAccountsForOrganizationResponse_affectedAccounts = (DescribeAffectedAccountsForOrganizationResponse -> Maybe [Text])
-> (DescribeAffectedAccountsForOrganizationResponse
-> Maybe [Text] -> DescribeAffectedAccountsForOrganizationResponse)
-> Lens'
DescribeAffectedAccountsForOrganizationResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganizationResponse' {Maybe [Text]
affectedAccounts :: Maybe [Text]
$sel:affectedAccounts:DescribeAffectedAccountsForOrganizationResponse' :: DescribeAffectedAccountsForOrganizationResponse -> Maybe [Text]
affectedAccounts} -> Maybe [Text]
affectedAccounts) (\s :: DescribeAffectedAccountsForOrganizationResponse
s@DescribeAffectedAccountsForOrganizationResponse' {} Maybe [Text]
a -> DescribeAffectedAccountsForOrganizationResponse
s {$sel:affectedAccounts:DescribeAffectedAccountsForOrganizationResponse' :: Maybe [Text]
affectedAccounts = Maybe [Text]
a} :: DescribeAffectedAccountsForOrganizationResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse
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
describeAffectedAccountsForOrganizationResponse_eventScopeCode :: Lens.Lens' DescribeAffectedAccountsForOrganizationResponse (Prelude.Maybe EventScopeCode)
describeAffectedAccountsForOrganizationResponse_eventScopeCode :: (Maybe EventScopeCode -> f (Maybe EventScopeCode))
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse
describeAffectedAccountsForOrganizationResponse_eventScopeCode = (DescribeAffectedAccountsForOrganizationResponse
-> Maybe EventScopeCode)
-> (DescribeAffectedAccountsForOrganizationResponse
-> Maybe EventScopeCode
-> DescribeAffectedAccountsForOrganizationResponse)
-> Lens
DescribeAffectedAccountsForOrganizationResponse
DescribeAffectedAccountsForOrganizationResponse
(Maybe EventScopeCode)
(Maybe EventScopeCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganizationResponse' {Maybe EventScopeCode
eventScopeCode :: Maybe EventScopeCode
$sel:eventScopeCode:DescribeAffectedAccountsForOrganizationResponse' :: DescribeAffectedAccountsForOrganizationResponse
-> Maybe EventScopeCode
eventScopeCode} -> Maybe EventScopeCode
eventScopeCode) (\s :: DescribeAffectedAccountsForOrganizationResponse
s@DescribeAffectedAccountsForOrganizationResponse' {} Maybe EventScopeCode
a -> DescribeAffectedAccountsForOrganizationResponse
s {$sel:eventScopeCode:DescribeAffectedAccountsForOrganizationResponse' :: Maybe EventScopeCode
eventScopeCode = Maybe EventScopeCode
a} :: DescribeAffectedAccountsForOrganizationResponse)
describeAffectedAccountsForOrganizationResponse_nextToken :: Lens.Lens' DescribeAffectedAccountsForOrganizationResponse (Prelude.Maybe Prelude.Text)
describeAffectedAccountsForOrganizationResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse
describeAffectedAccountsForOrganizationResponse_nextToken = (DescribeAffectedAccountsForOrganizationResponse -> Maybe Text)
-> (DescribeAffectedAccountsForOrganizationResponse
-> Maybe Text -> DescribeAffectedAccountsForOrganizationResponse)
-> Lens'
DescribeAffectedAccountsForOrganizationResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganizationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAffectedAccountsForOrganizationResponse' :: DescribeAffectedAccountsForOrganizationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAffectedAccountsForOrganizationResponse
s@DescribeAffectedAccountsForOrganizationResponse' {} Maybe Text
a -> DescribeAffectedAccountsForOrganizationResponse
s {$sel:nextToken:DescribeAffectedAccountsForOrganizationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAffectedAccountsForOrganizationResponse)
describeAffectedAccountsForOrganizationResponse_httpStatus :: Lens.Lens' DescribeAffectedAccountsForOrganizationResponse Prelude.Int
describeAffectedAccountsForOrganizationResponse_httpStatus :: (Int -> f Int)
-> DescribeAffectedAccountsForOrganizationResponse
-> f DescribeAffectedAccountsForOrganizationResponse
describeAffectedAccountsForOrganizationResponse_httpStatus = (DescribeAffectedAccountsForOrganizationResponse -> Int)
-> (DescribeAffectedAccountsForOrganizationResponse
-> Int -> DescribeAffectedAccountsForOrganizationResponse)
-> Lens
DescribeAffectedAccountsForOrganizationResponse
DescribeAffectedAccountsForOrganizationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAffectedAccountsForOrganizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAffectedAccountsForOrganizationResponse' :: DescribeAffectedAccountsForOrganizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAffectedAccountsForOrganizationResponse
s@DescribeAffectedAccountsForOrganizationResponse' {} Int
a -> DescribeAffectedAccountsForOrganizationResponse
s {$sel:httpStatus:DescribeAffectedAccountsForOrganizationResponse' :: Int
httpStatus = Int
a} :: DescribeAffectedAccountsForOrganizationResponse)
instance
Prelude.NFData
DescribeAffectedAccountsForOrganizationResponse