{-# 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.DescribeEventsForOrganization
(
DescribeEventsForOrganization (..),
newDescribeEventsForOrganization,
describeEventsForOrganization_locale,
describeEventsForOrganization_nextToken,
describeEventsForOrganization_filter,
describeEventsForOrganization_maxResults,
DescribeEventsForOrganizationResponse (..),
newDescribeEventsForOrganizationResponse,
describeEventsForOrganizationResponse_nextToken,
describeEventsForOrganizationResponse_events,
describeEventsForOrganizationResponse_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 DescribeEventsForOrganization = DescribeEventsForOrganization'
{
DescribeEventsForOrganization -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
DescribeEventsForOrganization -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeEventsForOrganization -> Maybe OrganizationEventFilter
filter' :: Prelude.Maybe OrganizationEventFilter,
DescribeEventsForOrganization -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool
(DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool)
-> (DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool)
-> Eq DescribeEventsForOrganization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool
$c/= :: DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool
== :: DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool
$c== :: DescribeEventsForOrganization
-> DescribeEventsForOrganization -> Bool
Prelude.Eq, ReadPrec [DescribeEventsForOrganization]
ReadPrec DescribeEventsForOrganization
Int -> ReadS DescribeEventsForOrganization
ReadS [DescribeEventsForOrganization]
(Int -> ReadS DescribeEventsForOrganization)
-> ReadS [DescribeEventsForOrganization]
-> ReadPrec DescribeEventsForOrganization
-> ReadPrec [DescribeEventsForOrganization]
-> Read DescribeEventsForOrganization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEventsForOrganization]
$creadListPrec :: ReadPrec [DescribeEventsForOrganization]
readPrec :: ReadPrec DescribeEventsForOrganization
$creadPrec :: ReadPrec DescribeEventsForOrganization
readList :: ReadS [DescribeEventsForOrganization]
$creadList :: ReadS [DescribeEventsForOrganization]
readsPrec :: Int -> ReadS DescribeEventsForOrganization
$creadsPrec :: Int -> ReadS DescribeEventsForOrganization
Prelude.Read, Int -> DescribeEventsForOrganization -> ShowS
[DescribeEventsForOrganization] -> ShowS
DescribeEventsForOrganization -> String
(Int -> DescribeEventsForOrganization -> ShowS)
-> (DescribeEventsForOrganization -> String)
-> ([DescribeEventsForOrganization] -> ShowS)
-> Show DescribeEventsForOrganization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEventsForOrganization] -> ShowS
$cshowList :: [DescribeEventsForOrganization] -> ShowS
show :: DescribeEventsForOrganization -> String
$cshow :: DescribeEventsForOrganization -> String
showsPrec :: Int -> DescribeEventsForOrganization -> ShowS
$cshowsPrec :: Int -> DescribeEventsForOrganization -> ShowS
Prelude.Show, (forall x.
DescribeEventsForOrganization
-> Rep DescribeEventsForOrganization x)
-> (forall x.
Rep DescribeEventsForOrganization x
-> DescribeEventsForOrganization)
-> Generic DescribeEventsForOrganization
forall x.
Rep DescribeEventsForOrganization x
-> DescribeEventsForOrganization
forall x.
DescribeEventsForOrganization
-> Rep DescribeEventsForOrganization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEventsForOrganization x
-> DescribeEventsForOrganization
$cfrom :: forall x.
DescribeEventsForOrganization
-> Rep DescribeEventsForOrganization x
Prelude.Generic)
newDescribeEventsForOrganization ::
DescribeEventsForOrganization
newDescribeEventsForOrganization :: DescribeEventsForOrganization
newDescribeEventsForOrganization =
DescribeEventsForOrganization' :: Maybe Text
-> Maybe Text
-> Maybe OrganizationEventFilter
-> Maybe Natural
-> DescribeEventsForOrganization
DescribeEventsForOrganization'
{ $sel:locale:DescribeEventsForOrganization' :: Maybe Text
locale =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeEventsForOrganization' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filter':DescribeEventsForOrganization' :: Maybe OrganizationEventFilter
filter' = Maybe OrganizationEventFilter
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeEventsForOrganization' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeEventsForOrganization_locale :: Lens.Lens' DescribeEventsForOrganization (Prelude.Maybe Prelude.Text)
describeEventsForOrganization_locale :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsForOrganization -> f DescribeEventsForOrganization
describeEventsForOrganization_locale = (DescribeEventsForOrganization -> Maybe Text)
-> (DescribeEventsForOrganization
-> Maybe Text -> DescribeEventsForOrganization)
-> Lens
DescribeEventsForOrganization
DescribeEventsForOrganization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganization' {Maybe Text
locale :: Maybe Text
$sel:locale:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Text
locale} -> Maybe Text
locale) (\s :: DescribeEventsForOrganization
s@DescribeEventsForOrganization' {} Maybe Text
a -> DescribeEventsForOrganization
s {$sel:locale:DescribeEventsForOrganization' :: Maybe Text
locale = Maybe Text
a} :: DescribeEventsForOrganization)
describeEventsForOrganization_nextToken :: Lens.Lens' DescribeEventsForOrganization (Prelude.Maybe Prelude.Text)
describeEventsForOrganization_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsForOrganization -> f DescribeEventsForOrganization
describeEventsForOrganization_nextToken = (DescribeEventsForOrganization -> Maybe Text)
-> (DescribeEventsForOrganization
-> Maybe Text -> DescribeEventsForOrganization)
-> Lens
DescribeEventsForOrganization
DescribeEventsForOrganization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganization' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEventsForOrganization
s@DescribeEventsForOrganization' {} Maybe Text
a -> DescribeEventsForOrganization
s {$sel:nextToken:DescribeEventsForOrganization' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEventsForOrganization)
describeEventsForOrganization_filter :: Lens.Lens' DescribeEventsForOrganization (Prelude.Maybe OrganizationEventFilter)
describeEventsForOrganization_filter :: (Maybe OrganizationEventFilter
-> f (Maybe OrganizationEventFilter))
-> DescribeEventsForOrganization -> f DescribeEventsForOrganization
describeEventsForOrganization_filter = (DescribeEventsForOrganization -> Maybe OrganizationEventFilter)
-> (DescribeEventsForOrganization
-> Maybe OrganizationEventFilter -> DescribeEventsForOrganization)
-> Lens
DescribeEventsForOrganization
DescribeEventsForOrganization
(Maybe OrganizationEventFilter)
(Maybe OrganizationEventFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganization' {Maybe OrganizationEventFilter
filter' :: Maybe OrganizationEventFilter
$sel:filter':DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe OrganizationEventFilter
filter'} -> Maybe OrganizationEventFilter
filter') (\s :: DescribeEventsForOrganization
s@DescribeEventsForOrganization' {} Maybe OrganizationEventFilter
a -> DescribeEventsForOrganization
s {$sel:filter':DescribeEventsForOrganization' :: Maybe OrganizationEventFilter
filter' = Maybe OrganizationEventFilter
a} :: DescribeEventsForOrganization)
describeEventsForOrganization_maxResults :: Lens.Lens' DescribeEventsForOrganization (Prelude.Maybe Prelude.Natural)
describeEventsForOrganization_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeEventsForOrganization -> f DescribeEventsForOrganization
describeEventsForOrganization_maxResults = (DescribeEventsForOrganization -> Maybe Natural)
-> (DescribeEventsForOrganization
-> Maybe Natural -> DescribeEventsForOrganization)
-> Lens
DescribeEventsForOrganization
DescribeEventsForOrganization
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganization' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeEventsForOrganization
s@DescribeEventsForOrganization' {} Maybe Natural
a -> DescribeEventsForOrganization
s {$sel:maxResults:DescribeEventsForOrganization' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeEventsForOrganization)
instance Core.AWSPager DescribeEventsForOrganization where
page :: DescribeEventsForOrganization
-> AWSResponse DescribeEventsForOrganization
-> Maybe DescribeEventsForOrganization
page DescribeEventsForOrganization
rq AWSResponse DescribeEventsForOrganization
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeEventsForOrganization
DescribeEventsForOrganizationResponse
rs
DescribeEventsForOrganizationResponse
-> Getting (First Text) DescribeEventsForOrganizationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsForOrganizationResponse
-> Const (First Text) DescribeEventsForOrganizationResponse
Lens' DescribeEventsForOrganizationResponse (Maybe Text)
describeEventsForOrganizationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsForOrganizationResponse
-> Const (First Text) DescribeEventsForOrganizationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeEventsForOrganizationResponse 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 DescribeEventsForOrganization
forall a. Maybe a
Prelude.Nothing
| Maybe [OrganizationEvent] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeEventsForOrganization
DescribeEventsForOrganizationResponse
rs
DescribeEventsForOrganizationResponse
-> Getting
(First [OrganizationEvent])
DescribeEventsForOrganizationResponse
[OrganizationEvent]
-> Maybe [OrganizationEvent]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [OrganizationEvent]
-> Const (First [OrganizationEvent]) (Maybe [OrganizationEvent]))
-> DescribeEventsForOrganizationResponse
-> Const
(First [OrganizationEvent]) DescribeEventsForOrganizationResponse
Lens'
DescribeEventsForOrganizationResponse (Maybe [OrganizationEvent])
describeEventsForOrganizationResponse_events
((Maybe [OrganizationEvent]
-> Const (First [OrganizationEvent]) (Maybe [OrganizationEvent]))
-> DescribeEventsForOrganizationResponse
-> Const
(First [OrganizationEvent]) DescribeEventsForOrganizationResponse)
-> (([OrganizationEvent]
-> Const (First [OrganizationEvent]) [OrganizationEvent])
-> Maybe [OrganizationEvent]
-> Const (First [OrganizationEvent]) (Maybe [OrganizationEvent]))
-> Getting
(First [OrganizationEvent])
DescribeEventsForOrganizationResponse
[OrganizationEvent]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([OrganizationEvent]
-> Const (First [OrganizationEvent]) [OrganizationEvent])
-> Maybe [OrganizationEvent]
-> Const (First [OrganizationEvent]) (Maybe [OrganizationEvent])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeEventsForOrganization
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeEventsForOrganization
-> Maybe DescribeEventsForOrganization
forall a. a -> Maybe a
Prelude.Just (DescribeEventsForOrganization
-> Maybe DescribeEventsForOrganization)
-> DescribeEventsForOrganization
-> Maybe DescribeEventsForOrganization
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeEventsForOrganization
rq
DescribeEventsForOrganization
-> (DescribeEventsForOrganization -> DescribeEventsForOrganization)
-> DescribeEventsForOrganization
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeEventsForOrganization
-> Identity DescribeEventsForOrganization
Lens
DescribeEventsForOrganization
DescribeEventsForOrganization
(Maybe Text)
(Maybe Text)
describeEventsForOrganization_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeEventsForOrganization
-> Identity DescribeEventsForOrganization)
-> Maybe Text
-> DescribeEventsForOrganization
-> DescribeEventsForOrganization
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeEventsForOrganization
DescribeEventsForOrganizationResponse
rs
DescribeEventsForOrganizationResponse
-> Getting (First Text) DescribeEventsForOrganizationResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsForOrganizationResponse
-> Const (First Text) DescribeEventsForOrganizationResponse
Lens' DescribeEventsForOrganizationResponse (Maybe Text)
describeEventsForOrganizationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsForOrganizationResponse
-> Const (First Text) DescribeEventsForOrganizationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeEventsForOrganizationResponse 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
DescribeEventsForOrganization
where
type
AWSResponse DescribeEventsForOrganization =
DescribeEventsForOrganizationResponse
request :: DescribeEventsForOrganization
-> Request DescribeEventsForOrganization
request = Service
-> DescribeEventsForOrganization
-> Request DescribeEventsForOrganization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeEventsForOrganization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEventsForOrganization)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeEventsForOrganization))
-> Logger
-> Service
-> Proxy DescribeEventsForOrganization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeEventsForOrganization)))
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 [OrganizationEvent]
-> Int
-> DescribeEventsForOrganizationResponse
DescribeEventsForOrganizationResponse'
(Maybe Text
-> Maybe [OrganizationEvent]
-> Int
-> DescribeEventsForOrganizationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [OrganizationEvent]
-> Int -> DescribeEventsForOrganizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
Either
String
(Maybe [OrganizationEvent]
-> Int -> DescribeEventsForOrganizationResponse)
-> Either String (Maybe [OrganizationEvent])
-> Either String (Int -> DescribeEventsForOrganizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [OrganizationEvent]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"events" Either String (Maybe (Maybe [OrganizationEvent]))
-> Maybe [OrganizationEvent]
-> Either String (Maybe [OrganizationEvent])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [OrganizationEvent]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeEventsForOrganizationResponse)
-> Either String Int
-> Either String DescribeEventsForOrganizationResponse
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
DescribeEventsForOrganization
instance Prelude.NFData DescribeEventsForOrganization
instance Core.ToHeaders DescribeEventsForOrganization where
toHeaders :: DescribeEventsForOrganization -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeEventsForOrganization -> 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.DescribeEventsForOrganization" ::
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 DescribeEventsForOrganization where
toJSON :: DescribeEventsForOrganization -> Value
toJSON DescribeEventsForOrganization' {Maybe Natural
Maybe Text
Maybe OrganizationEventFilter
maxResults :: Maybe Natural
filter' :: Maybe OrganizationEventFilter
nextToken :: Maybe Text
locale :: Maybe Text
$sel:maxResults:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Natural
$sel:filter':DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe OrganizationEventFilter
$sel:nextToken:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Text
$sel:locale:DescribeEventsForOrganization' :: DescribeEventsForOrganization -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"locale" 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
locale,
(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
"filter" Text -> OrganizationEventFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OrganizationEventFilter -> Pair)
-> Maybe OrganizationEventFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrganizationEventFilter
filter',
(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
]
)
instance Core.ToPath DescribeEventsForOrganization where
toPath :: DescribeEventsForOrganization -> ByteString
toPath = ByteString -> DescribeEventsForOrganization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeEventsForOrganization where
toQuery :: DescribeEventsForOrganization -> QueryString
toQuery = QueryString -> DescribeEventsForOrganization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeEventsForOrganizationResponse = DescribeEventsForOrganizationResponse'
{
DescribeEventsForOrganizationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeEventsForOrganizationResponse -> Maybe [OrganizationEvent]
events :: Prelude.Maybe [OrganizationEvent],
DescribeEventsForOrganizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool
(DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool)
-> (DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool)
-> Eq DescribeEventsForOrganizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool
$c/= :: DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool
== :: DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool
$c== :: DescribeEventsForOrganizationResponse
-> DescribeEventsForOrganizationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEventsForOrganizationResponse]
ReadPrec DescribeEventsForOrganizationResponse
Int -> ReadS DescribeEventsForOrganizationResponse
ReadS [DescribeEventsForOrganizationResponse]
(Int -> ReadS DescribeEventsForOrganizationResponse)
-> ReadS [DescribeEventsForOrganizationResponse]
-> ReadPrec DescribeEventsForOrganizationResponse
-> ReadPrec [DescribeEventsForOrganizationResponse]
-> Read DescribeEventsForOrganizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEventsForOrganizationResponse]
$creadListPrec :: ReadPrec [DescribeEventsForOrganizationResponse]
readPrec :: ReadPrec DescribeEventsForOrganizationResponse
$creadPrec :: ReadPrec DescribeEventsForOrganizationResponse
readList :: ReadS [DescribeEventsForOrganizationResponse]
$creadList :: ReadS [DescribeEventsForOrganizationResponse]
readsPrec :: Int -> ReadS DescribeEventsForOrganizationResponse
$creadsPrec :: Int -> ReadS DescribeEventsForOrganizationResponse
Prelude.Read, Int -> DescribeEventsForOrganizationResponse -> ShowS
[DescribeEventsForOrganizationResponse] -> ShowS
DescribeEventsForOrganizationResponse -> String
(Int -> DescribeEventsForOrganizationResponse -> ShowS)
-> (DescribeEventsForOrganizationResponse -> String)
-> ([DescribeEventsForOrganizationResponse] -> ShowS)
-> Show DescribeEventsForOrganizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEventsForOrganizationResponse] -> ShowS
$cshowList :: [DescribeEventsForOrganizationResponse] -> ShowS
show :: DescribeEventsForOrganizationResponse -> String
$cshow :: DescribeEventsForOrganizationResponse -> String
showsPrec :: Int -> DescribeEventsForOrganizationResponse -> ShowS
$cshowsPrec :: Int -> DescribeEventsForOrganizationResponse -> ShowS
Prelude.Show, (forall x.
DescribeEventsForOrganizationResponse
-> Rep DescribeEventsForOrganizationResponse x)
-> (forall x.
Rep DescribeEventsForOrganizationResponse x
-> DescribeEventsForOrganizationResponse)
-> Generic DescribeEventsForOrganizationResponse
forall x.
Rep DescribeEventsForOrganizationResponse x
-> DescribeEventsForOrganizationResponse
forall x.
DescribeEventsForOrganizationResponse
-> Rep DescribeEventsForOrganizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEventsForOrganizationResponse x
-> DescribeEventsForOrganizationResponse
$cfrom :: forall x.
DescribeEventsForOrganizationResponse
-> Rep DescribeEventsForOrganizationResponse x
Prelude.Generic)
newDescribeEventsForOrganizationResponse ::
Prelude.Int ->
DescribeEventsForOrganizationResponse
newDescribeEventsForOrganizationResponse :: Int -> DescribeEventsForOrganizationResponse
newDescribeEventsForOrganizationResponse Int
pHttpStatus_ =
DescribeEventsForOrganizationResponse' :: Maybe Text
-> Maybe [OrganizationEvent]
-> Int
-> DescribeEventsForOrganizationResponse
DescribeEventsForOrganizationResponse'
{ $sel:nextToken:DescribeEventsForOrganizationResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:events:DescribeEventsForOrganizationResponse' :: Maybe [OrganizationEvent]
events = Maybe [OrganizationEvent]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeEventsForOrganizationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeEventsForOrganizationResponse_nextToken :: Lens.Lens' DescribeEventsForOrganizationResponse (Prelude.Maybe Prelude.Text)
describeEventsForOrganizationResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsForOrganizationResponse
-> f DescribeEventsForOrganizationResponse
describeEventsForOrganizationResponse_nextToken = (DescribeEventsForOrganizationResponse -> Maybe Text)
-> (DescribeEventsForOrganizationResponse
-> Maybe Text -> DescribeEventsForOrganizationResponse)
-> Lens' DescribeEventsForOrganizationResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganizationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEventsForOrganizationResponse' :: DescribeEventsForOrganizationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEventsForOrganizationResponse
s@DescribeEventsForOrganizationResponse' {} Maybe Text
a -> DescribeEventsForOrganizationResponse
s {$sel:nextToken:DescribeEventsForOrganizationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEventsForOrganizationResponse)
describeEventsForOrganizationResponse_events :: Lens.Lens' DescribeEventsForOrganizationResponse (Prelude.Maybe [OrganizationEvent])
describeEventsForOrganizationResponse_events :: (Maybe [OrganizationEvent] -> f (Maybe [OrganizationEvent]))
-> DescribeEventsForOrganizationResponse
-> f DescribeEventsForOrganizationResponse
describeEventsForOrganizationResponse_events = (DescribeEventsForOrganizationResponse
-> Maybe [OrganizationEvent])
-> (DescribeEventsForOrganizationResponse
-> Maybe [OrganizationEvent]
-> DescribeEventsForOrganizationResponse)
-> Lens'
DescribeEventsForOrganizationResponse (Maybe [OrganizationEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganizationResponse' {Maybe [OrganizationEvent]
events :: Maybe [OrganizationEvent]
$sel:events:DescribeEventsForOrganizationResponse' :: DescribeEventsForOrganizationResponse -> Maybe [OrganizationEvent]
events} -> Maybe [OrganizationEvent]
events) (\s :: DescribeEventsForOrganizationResponse
s@DescribeEventsForOrganizationResponse' {} Maybe [OrganizationEvent]
a -> DescribeEventsForOrganizationResponse
s {$sel:events:DescribeEventsForOrganizationResponse' :: Maybe [OrganizationEvent]
events = Maybe [OrganizationEvent]
a} :: DescribeEventsForOrganizationResponse) ((Maybe [OrganizationEvent] -> f (Maybe [OrganizationEvent]))
-> DescribeEventsForOrganizationResponse
-> f DescribeEventsForOrganizationResponse)
-> ((Maybe [OrganizationEvent] -> f (Maybe [OrganizationEvent]))
-> Maybe [OrganizationEvent] -> f (Maybe [OrganizationEvent]))
-> (Maybe [OrganizationEvent] -> f (Maybe [OrganizationEvent]))
-> DescribeEventsForOrganizationResponse
-> f DescribeEventsForOrganizationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OrganizationEvent]
[OrganizationEvent]
[OrganizationEvent]
[OrganizationEvent]
-> Iso
(Maybe [OrganizationEvent])
(Maybe [OrganizationEvent])
(Maybe [OrganizationEvent])
(Maybe [OrganizationEvent])
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
[OrganizationEvent]
[OrganizationEvent]
[OrganizationEvent]
[OrganizationEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeEventsForOrganizationResponse_httpStatus :: Lens.Lens' DescribeEventsForOrganizationResponse Prelude.Int
describeEventsForOrganizationResponse_httpStatus :: (Int -> f Int)
-> DescribeEventsForOrganizationResponse
-> f DescribeEventsForOrganizationResponse
describeEventsForOrganizationResponse_httpStatus = (DescribeEventsForOrganizationResponse -> Int)
-> (DescribeEventsForOrganizationResponse
-> Int -> DescribeEventsForOrganizationResponse)
-> Lens
DescribeEventsForOrganizationResponse
DescribeEventsForOrganizationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsForOrganizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeEventsForOrganizationResponse' :: DescribeEventsForOrganizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeEventsForOrganizationResponse
s@DescribeEventsForOrganizationResponse' {} Int
a -> DescribeEventsForOrganizationResponse
s {$sel:httpStatus:DescribeEventsForOrganizationResponse' :: Int
httpStatus = Int
a} :: DescribeEventsForOrganizationResponse)
instance
Prelude.NFData
DescribeEventsForOrganizationResponse