{-# 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.CloudWatchLogs.GetLogEvents
(
GetLogEvents (..),
newGetLogEvents,
getLogEvents_startTime,
getLogEvents_startFromHead,
getLogEvents_nextToken,
getLogEvents_endTime,
getLogEvents_limit,
getLogEvents_logGroupName,
getLogEvents_logStreamName,
GetLogEventsResponse (..),
newGetLogEventsResponse,
getLogEventsResponse_nextBackwardToken,
getLogEventsResponse_nextForwardToken,
getLogEventsResponse_events,
getLogEventsResponse_httpStatus,
)
where
import Amazonka.CloudWatchLogs.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 GetLogEvents = GetLogEvents'
{
GetLogEvents -> Maybe Natural
startTime :: Prelude.Maybe Prelude.Natural,
GetLogEvents -> Maybe Bool
startFromHead :: Prelude.Maybe Prelude.Bool,
GetLogEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetLogEvents -> Maybe Natural
endTime :: Prelude.Maybe Prelude.Natural,
GetLogEvents -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
GetLogEvents -> Text
logGroupName :: Prelude.Text,
GetLogEvents -> Text
logStreamName :: Prelude.Text
}
deriving (GetLogEvents -> GetLogEvents -> Bool
(GetLogEvents -> GetLogEvents -> Bool)
-> (GetLogEvents -> GetLogEvents -> Bool) -> Eq GetLogEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLogEvents -> GetLogEvents -> Bool
$c/= :: GetLogEvents -> GetLogEvents -> Bool
== :: GetLogEvents -> GetLogEvents -> Bool
$c== :: GetLogEvents -> GetLogEvents -> Bool
Prelude.Eq, ReadPrec [GetLogEvents]
ReadPrec GetLogEvents
Int -> ReadS GetLogEvents
ReadS [GetLogEvents]
(Int -> ReadS GetLogEvents)
-> ReadS [GetLogEvents]
-> ReadPrec GetLogEvents
-> ReadPrec [GetLogEvents]
-> Read GetLogEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLogEvents]
$creadListPrec :: ReadPrec [GetLogEvents]
readPrec :: ReadPrec GetLogEvents
$creadPrec :: ReadPrec GetLogEvents
readList :: ReadS [GetLogEvents]
$creadList :: ReadS [GetLogEvents]
readsPrec :: Int -> ReadS GetLogEvents
$creadsPrec :: Int -> ReadS GetLogEvents
Prelude.Read, Int -> GetLogEvents -> ShowS
[GetLogEvents] -> ShowS
GetLogEvents -> String
(Int -> GetLogEvents -> ShowS)
-> (GetLogEvents -> String)
-> ([GetLogEvents] -> ShowS)
-> Show GetLogEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLogEvents] -> ShowS
$cshowList :: [GetLogEvents] -> ShowS
show :: GetLogEvents -> String
$cshow :: GetLogEvents -> String
showsPrec :: Int -> GetLogEvents -> ShowS
$cshowsPrec :: Int -> GetLogEvents -> ShowS
Prelude.Show, (forall x. GetLogEvents -> Rep GetLogEvents x)
-> (forall x. Rep GetLogEvents x -> GetLogEvents)
-> Generic GetLogEvents
forall x. Rep GetLogEvents x -> GetLogEvents
forall x. GetLogEvents -> Rep GetLogEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLogEvents x -> GetLogEvents
$cfrom :: forall x. GetLogEvents -> Rep GetLogEvents x
Prelude.Generic)
newGetLogEvents ::
Prelude.Text ->
Prelude.Text ->
GetLogEvents
newGetLogEvents :: Text -> Text -> GetLogEvents
newGetLogEvents Text
pLogGroupName_ Text
pLogStreamName_ =
GetLogEvents' :: Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Text
-> Text
-> GetLogEvents
GetLogEvents'
{ $sel:startTime:GetLogEvents' :: Maybe Natural
startTime = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:startFromHead:GetLogEvents' :: Maybe Bool
startFromHead = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetLogEvents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:GetLogEvents' :: Maybe Natural
endTime = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:limit:GetLogEvents' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:logGroupName:GetLogEvents' :: Text
logGroupName = Text
pLogGroupName_,
$sel:logStreamName:GetLogEvents' :: Text
logStreamName = Text
pLogStreamName_
}
getLogEvents_startTime :: Lens.Lens' GetLogEvents (Prelude.Maybe Prelude.Natural)
getLogEvents_startTime :: (Maybe Natural -> f (Maybe Natural))
-> GetLogEvents -> f GetLogEvents
getLogEvents_startTime = (GetLogEvents -> Maybe Natural)
-> (GetLogEvents -> Maybe Natural -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Maybe Natural
startTime :: Maybe Natural
$sel:startTime:GetLogEvents' :: GetLogEvents -> Maybe Natural
startTime} -> Maybe Natural
startTime) (\s :: GetLogEvents
s@GetLogEvents' {} Maybe Natural
a -> GetLogEvents
s {$sel:startTime:GetLogEvents' :: Maybe Natural
startTime = Maybe Natural
a} :: GetLogEvents)
getLogEvents_startFromHead :: Lens.Lens' GetLogEvents (Prelude.Maybe Prelude.Bool)
getLogEvents_startFromHead :: (Maybe Bool -> f (Maybe Bool)) -> GetLogEvents -> f GetLogEvents
getLogEvents_startFromHead = (GetLogEvents -> Maybe Bool)
-> (GetLogEvents -> Maybe Bool -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Maybe Bool
startFromHead :: Maybe Bool
$sel:startFromHead:GetLogEvents' :: GetLogEvents -> Maybe Bool
startFromHead} -> Maybe Bool
startFromHead) (\s :: GetLogEvents
s@GetLogEvents' {} Maybe Bool
a -> GetLogEvents
s {$sel:startFromHead:GetLogEvents' :: Maybe Bool
startFromHead = Maybe Bool
a} :: GetLogEvents)
getLogEvents_nextToken :: Lens.Lens' GetLogEvents (Prelude.Maybe Prelude.Text)
getLogEvents_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetLogEvents -> f GetLogEvents
getLogEvents_nextToken = (GetLogEvents -> Maybe Text)
-> (GetLogEvents -> Maybe Text -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetLogEvents' :: GetLogEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetLogEvents
s@GetLogEvents' {} Maybe Text
a -> GetLogEvents
s {$sel:nextToken:GetLogEvents' :: Maybe Text
nextToken = Maybe Text
a} :: GetLogEvents)
getLogEvents_endTime :: Lens.Lens' GetLogEvents (Prelude.Maybe Prelude.Natural)
getLogEvents_endTime :: (Maybe Natural -> f (Maybe Natural))
-> GetLogEvents -> f GetLogEvents
getLogEvents_endTime = (GetLogEvents -> Maybe Natural)
-> (GetLogEvents -> Maybe Natural -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Maybe Natural
endTime :: Maybe Natural
$sel:endTime:GetLogEvents' :: GetLogEvents -> Maybe Natural
endTime} -> Maybe Natural
endTime) (\s :: GetLogEvents
s@GetLogEvents' {} Maybe Natural
a -> GetLogEvents
s {$sel:endTime:GetLogEvents' :: Maybe Natural
endTime = Maybe Natural
a} :: GetLogEvents)
getLogEvents_limit :: Lens.Lens' GetLogEvents (Prelude.Maybe Prelude.Natural)
getLogEvents_limit :: (Maybe Natural -> f (Maybe Natural))
-> GetLogEvents -> f GetLogEvents
getLogEvents_limit = (GetLogEvents -> Maybe Natural)
-> (GetLogEvents -> Maybe Natural -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Maybe Natural
limit :: Maybe Natural
$sel:limit:GetLogEvents' :: GetLogEvents -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: GetLogEvents
s@GetLogEvents' {} Maybe Natural
a -> GetLogEvents
s {$sel:limit:GetLogEvents' :: Maybe Natural
limit = Maybe Natural
a} :: GetLogEvents)
getLogEvents_logGroupName :: Lens.Lens' GetLogEvents Prelude.Text
getLogEvents_logGroupName :: (Text -> f Text) -> GetLogEvents -> f GetLogEvents
getLogEvents_logGroupName = (GetLogEvents -> Text)
-> (GetLogEvents -> Text -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Text
logGroupName :: Text
$sel:logGroupName:GetLogEvents' :: GetLogEvents -> Text
logGroupName} -> Text
logGroupName) (\s :: GetLogEvents
s@GetLogEvents' {} Text
a -> GetLogEvents
s {$sel:logGroupName:GetLogEvents' :: Text
logGroupName = Text
a} :: GetLogEvents)
getLogEvents_logStreamName :: Lens.Lens' GetLogEvents Prelude.Text
getLogEvents_logStreamName :: (Text -> f Text) -> GetLogEvents -> f GetLogEvents
getLogEvents_logStreamName = (GetLogEvents -> Text)
-> (GetLogEvents -> Text -> GetLogEvents)
-> Lens GetLogEvents GetLogEvents Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEvents' {Text
logStreamName :: Text
$sel:logStreamName:GetLogEvents' :: GetLogEvents -> Text
logStreamName} -> Text
logStreamName) (\s :: GetLogEvents
s@GetLogEvents' {} Text
a -> GetLogEvents
s {$sel:logStreamName:GetLogEvents' :: Text
logStreamName = Text
a} :: GetLogEvents)
instance Core.AWSRequest GetLogEvents where
type AWSResponse GetLogEvents = GetLogEventsResponse
request :: GetLogEvents -> Request GetLogEvents
request = Service -> GetLogEvents -> Request GetLogEvents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetLogEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetLogEvents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetLogEvents))
-> Logger
-> Service
-> Proxy GetLogEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetLogEvents)))
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 Text
-> Maybe [OutputLogEvent]
-> Int
-> GetLogEventsResponse
GetLogEventsResponse'
(Maybe Text
-> Maybe Text
-> Maybe [OutputLogEvent]
-> Int
-> GetLogEventsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [OutputLogEvent] -> Int -> GetLogEventsResponse)
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
"nextBackwardToken")
Either
String
(Maybe Text
-> Maybe [OutputLogEvent] -> Int -> GetLogEventsResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [OutputLogEvent] -> Int -> GetLogEventsResponse)
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
"nextForwardToken")
Either
String (Maybe [OutputLogEvent] -> Int -> GetLogEventsResponse)
-> Either String (Maybe [OutputLogEvent])
-> Either String (Int -> GetLogEventsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [OutputLogEvent]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"events" Either String (Maybe (Maybe [OutputLogEvent]))
-> Maybe [OutputLogEvent] -> Either String (Maybe [OutputLogEvent])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [OutputLogEvent]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> GetLogEventsResponse)
-> Either String Int -> Either String GetLogEventsResponse
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 GetLogEvents
instance Prelude.NFData GetLogEvents
instance Core.ToHeaders GetLogEvents where
toHeaders :: GetLogEvents -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetLogEvents -> 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
"Logs_20140328.GetLogEvents" :: 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 GetLogEvents where
toJSON :: GetLogEvents -> Value
toJSON GetLogEvents' {Maybe Bool
Maybe Natural
Maybe Text
Text
logStreamName :: Text
logGroupName :: Text
limit :: Maybe Natural
endTime :: Maybe Natural
nextToken :: Maybe Text
startFromHead :: Maybe Bool
startTime :: Maybe Natural
$sel:logStreamName:GetLogEvents' :: GetLogEvents -> Text
$sel:logGroupName:GetLogEvents' :: GetLogEvents -> Text
$sel:limit:GetLogEvents' :: GetLogEvents -> Maybe Natural
$sel:endTime:GetLogEvents' :: GetLogEvents -> Maybe Natural
$sel:nextToken:GetLogEvents' :: GetLogEvents -> Maybe Text
$sel:startFromHead:GetLogEvents' :: GetLogEvents -> Maybe Bool
$sel:startTime:GetLogEvents' :: GetLogEvents -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"startTime" 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
startTime,
(Text
"startFromHead" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
startFromHead,
(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
"endTime" 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
endTime,
(Text
"limit" 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
limit,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"logGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
logGroupName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"logStreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
logStreamName)
]
)
instance Core.ToPath GetLogEvents where
toPath :: GetLogEvents -> ByteString
toPath = ByteString -> GetLogEvents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetLogEvents where
toQuery :: GetLogEvents -> QueryString
toQuery = QueryString -> GetLogEvents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetLogEventsResponse = GetLogEventsResponse'
{
GetLogEventsResponse -> Maybe Text
nextBackwardToken :: Prelude.Maybe Prelude.Text,
GetLogEventsResponse -> Maybe Text
nextForwardToken :: Prelude.Maybe Prelude.Text,
GetLogEventsResponse -> Maybe [OutputLogEvent]
events :: Prelude.Maybe [OutputLogEvent],
GetLogEventsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLogEventsResponse -> GetLogEventsResponse -> Bool
(GetLogEventsResponse -> GetLogEventsResponse -> Bool)
-> (GetLogEventsResponse -> GetLogEventsResponse -> Bool)
-> Eq GetLogEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLogEventsResponse -> GetLogEventsResponse -> Bool
$c/= :: GetLogEventsResponse -> GetLogEventsResponse -> Bool
== :: GetLogEventsResponse -> GetLogEventsResponse -> Bool
$c== :: GetLogEventsResponse -> GetLogEventsResponse -> Bool
Prelude.Eq, ReadPrec [GetLogEventsResponse]
ReadPrec GetLogEventsResponse
Int -> ReadS GetLogEventsResponse
ReadS [GetLogEventsResponse]
(Int -> ReadS GetLogEventsResponse)
-> ReadS [GetLogEventsResponse]
-> ReadPrec GetLogEventsResponse
-> ReadPrec [GetLogEventsResponse]
-> Read GetLogEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLogEventsResponse]
$creadListPrec :: ReadPrec [GetLogEventsResponse]
readPrec :: ReadPrec GetLogEventsResponse
$creadPrec :: ReadPrec GetLogEventsResponse
readList :: ReadS [GetLogEventsResponse]
$creadList :: ReadS [GetLogEventsResponse]
readsPrec :: Int -> ReadS GetLogEventsResponse
$creadsPrec :: Int -> ReadS GetLogEventsResponse
Prelude.Read, Int -> GetLogEventsResponse -> ShowS
[GetLogEventsResponse] -> ShowS
GetLogEventsResponse -> String
(Int -> GetLogEventsResponse -> ShowS)
-> (GetLogEventsResponse -> String)
-> ([GetLogEventsResponse] -> ShowS)
-> Show GetLogEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLogEventsResponse] -> ShowS
$cshowList :: [GetLogEventsResponse] -> ShowS
show :: GetLogEventsResponse -> String
$cshow :: GetLogEventsResponse -> String
showsPrec :: Int -> GetLogEventsResponse -> ShowS
$cshowsPrec :: Int -> GetLogEventsResponse -> ShowS
Prelude.Show, (forall x. GetLogEventsResponse -> Rep GetLogEventsResponse x)
-> (forall x. Rep GetLogEventsResponse x -> GetLogEventsResponse)
-> Generic GetLogEventsResponse
forall x. Rep GetLogEventsResponse x -> GetLogEventsResponse
forall x. GetLogEventsResponse -> Rep GetLogEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLogEventsResponse x -> GetLogEventsResponse
$cfrom :: forall x. GetLogEventsResponse -> Rep GetLogEventsResponse x
Prelude.Generic)
newGetLogEventsResponse ::
Prelude.Int ->
GetLogEventsResponse
newGetLogEventsResponse :: Int -> GetLogEventsResponse
newGetLogEventsResponse Int
pHttpStatus_ =
GetLogEventsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [OutputLogEvent]
-> Int
-> GetLogEventsResponse
GetLogEventsResponse'
{ $sel:nextBackwardToken:GetLogEventsResponse' :: Maybe Text
nextBackwardToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextForwardToken:GetLogEventsResponse' :: Maybe Text
nextForwardToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:events:GetLogEventsResponse' :: Maybe [OutputLogEvent]
events = Maybe [OutputLogEvent]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLogEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLogEventsResponse_nextBackwardToken :: Lens.Lens' GetLogEventsResponse (Prelude.Maybe Prelude.Text)
getLogEventsResponse_nextBackwardToken :: (Maybe Text -> f (Maybe Text))
-> GetLogEventsResponse -> f GetLogEventsResponse
getLogEventsResponse_nextBackwardToken = (GetLogEventsResponse -> Maybe Text)
-> (GetLogEventsResponse -> Maybe Text -> GetLogEventsResponse)
-> Lens
GetLogEventsResponse GetLogEventsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEventsResponse' {Maybe Text
nextBackwardToken :: Maybe Text
$sel:nextBackwardToken:GetLogEventsResponse' :: GetLogEventsResponse -> Maybe Text
nextBackwardToken} -> Maybe Text
nextBackwardToken) (\s :: GetLogEventsResponse
s@GetLogEventsResponse' {} Maybe Text
a -> GetLogEventsResponse
s {$sel:nextBackwardToken:GetLogEventsResponse' :: Maybe Text
nextBackwardToken = Maybe Text
a} :: GetLogEventsResponse)
getLogEventsResponse_nextForwardToken :: Lens.Lens' GetLogEventsResponse (Prelude.Maybe Prelude.Text)
getLogEventsResponse_nextForwardToken :: (Maybe Text -> f (Maybe Text))
-> GetLogEventsResponse -> f GetLogEventsResponse
getLogEventsResponse_nextForwardToken = (GetLogEventsResponse -> Maybe Text)
-> (GetLogEventsResponse -> Maybe Text -> GetLogEventsResponse)
-> Lens
GetLogEventsResponse GetLogEventsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEventsResponse' {Maybe Text
nextForwardToken :: Maybe Text
$sel:nextForwardToken:GetLogEventsResponse' :: GetLogEventsResponse -> Maybe Text
nextForwardToken} -> Maybe Text
nextForwardToken) (\s :: GetLogEventsResponse
s@GetLogEventsResponse' {} Maybe Text
a -> GetLogEventsResponse
s {$sel:nextForwardToken:GetLogEventsResponse' :: Maybe Text
nextForwardToken = Maybe Text
a} :: GetLogEventsResponse)
getLogEventsResponse_events :: Lens.Lens' GetLogEventsResponse (Prelude.Maybe [OutputLogEvent])
getLogEventsResponse_events :: (Maybe [OutputLogEvent] -> f (Maybe [OutputLogEvent]))
-> GetLogEventsResponse -> f GetLogEventsResponse
getLogEventsResponse_events = (GetLogEventsResponse -> Maybe [OutputLogEvent])
-> (GetLogEventsResponse
-> Maybe [OutputLogEvent] -> GetLogEventsResponse)
-> Lens
GetLogEventsResponse
GetLogEventsResponse
(Maybe [OutputLogEvent])
(Maybe [OutputLogEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEventsResponse' {Maybe [OutputLogEvent]
events :: Maybe [OutputLogEvent]
$sel:events:GetLogEventsResponse' :: GetLogEventsResponse -> Maybe [OutputLogEvent]
events} -> Maybe [OutputLogEvent]
events) (\s :: GetLogEventsResponse
s@GetLogEventsResponse' {} Maybe [OutputLogEvent]
a -> GetLogEventsResponse
s {$sel:events:GetLogEventsResponse' :: Maybe [OutputLogEvent]
events = Maybe [OutputLogEvent]
a} :: GetLogEventsResponse) ((Maybe [OutputLogEvent] -> f (Maybe [OutputLogEvent]))
-> GetLogEventsResponse -> f GetLogEventsResponse)
-> ((Maybe [OutputLogEvent] -> f (Maybe [OutputLogEvent]))
-> Maybe [OutputLogEvent] -> f (Maybe [OutputLogEvent]))
-> (Maybe [OutputLogEvent] -> f (Maybe [OutputLogEvent]))
-> GetLogEventsResponse
-> f GetLogEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OutputLogEvent] [OutputLogEvent] [OutputLogEvent] [OutputLogEvent]
-> Iso
(Maybe [OutputLogEvent])
(Maybe [OutputLogEvent])
(Maybe [OutputLogEvent])
(Maybe [OutputLogEvent])
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
[OutputLogEvent] [OutputLogEvent] [OutputLogEvent] [OutputLogEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLogEventsResponse_httpStatus :: Lens.Lens' GetLogEventsResponse Prelude.Int
getLogEventsResponse_httpStatus :: (Int -> f Int) -> GetLogEventsResponse -> f GetLogEventsResponse
getLogEventsResponse_httpStatus = (GetLogEventsResponse -> Int)
-> (GetLogEventsResponse -> Int -> GetLogEventsResponse)
-> Lens GetLogEventsResponse GetLogEventsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLogEventsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLogEventsResponse' :: GetLogEventsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLogEventsResponse
s@GetLogEventsResponse' {} Int
a -> GetLogEventsResponse
s {$sel:httpStatus:GetLogEventsResponse' :: Int
httpStatus = Int
a} :: GetLogEventsResponse)
instance Prelude.NFData GetLogEventsResponse