{-# 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.Shield.ListAttacks
(
ListAttacks (..),
newListAttacks,
listAttacks_startTime,
listAttacks_resourceArns,
listAttacks_nextToken,
listAttacks_endTime,
listAttacks_maxResults,
ListAttacksResponse (..),
newListAttacksResponse,
listAttacksResponse_attackSummaries,
listAttacksResponse_nextToken,
listAttacksResponse_httpStatus,
)
where
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
import Amazonka.Shield.Types
data ListAttacks = ListAttacks'
{
ListAttacks -> Maybe TimeRange
startTime :: Prelude.Maybe TimeRange,
ListAttacks -> Maybe [Text]
resourceArns :: Prelude.Maybe [Prelude.Text],
ListAttacks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAttacks -> Maybe TimeRange
endTime :: Prelude.Maybe TimeRange,
ListAttacks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListAttacks -> ListAttacks -> Bool
(ListAttacks -> ListAttacks -> Bool)
-> (ListAttacks -> ListAttacks -> Bool) -> Eq ListAttacks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttacks -> ListAttacks -> Bool
$c/= :: ListAttacks -> ListAttacks -> Bool
== :: ListAttacks -> ListAttacks -> Bool
$c== :: ListAttacks -> ListAttacks -> Bool
Prelude.Eq, ReadPrec [ListAttacks]
ReadPrec ListAttacks
Int -> ReadS ListAttacks
ReadS [ListAttacks]
(Int -> ReadS ListAttacks)
-> ReadS [ListAttacks]
-> ReadPrec ListAttacks
-> ReadPrec [ListAttacks]
-> Read ListAttacks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAttacks]
$creadListPrec :: ReadPrec [ListAttacks]
readPrec :: ReadPrec ListAttacks
$creadPrec :: ReadPrec ListAttacks
readList :: ReadS [ListAttacks]
$creadList :: ReadS [ListAttacks]
readsPrec :: Int -> ReadS ListAttacks
$creadsPrec :: Int -> ReadS ListAttacks
Prelude.Read, Int -> ListAttacks -> ShowS
[ListAttacks] -> ShowS
ListAttacks -> String
(Int -> ListAttacks -> ShowS)
-> (ListAttacks -> String)
-> ([ListAttacks] -> ShowS)
-> Show ListAttacks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttacks] -> ShowS
$cshowList :: [ListAttacks] -> ShowS
show :: ListAttacks -> String
$cshow :: ListAttacks -> String
showsPrec :: Int -> ListAttacks -> ShowS
$cshowsPrec :: Int -> ListAttacks -> ShowS
Prelude.Show, (forall x. ListAttacks -> Rep ListAttacks x)
-> (forall x. Rep ListAttacks x -> ListAttacks)
-> Generic ListAttacks
forall x. Rep ListAttacks x -> ListAttacks
forall x. ListAttacks -> Rep ListAttacks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAttacks x -> ListAttacks
$cfrom :: forall x. ListAttacks -> Rep ListAttacks x
Prelude.Generic)
newListAttacks ::
ListAttacks
newListAttacks :: ListAttacks
newListAttacks =
ListAttacks' :: Maybe TimeRange
-> Maybe [Text]
-> Maybe Text
-> Maybe TimeRange
-> Maybe Natural
-> ListAttacks
ListAttacks'
{ $sel:startTime:ListAttacks' :: Maybe TimeRange
startTime = Maybe TimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArns:ListAttacks' :: Maybe [Text]
resourceArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAttacks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:ListAttacks' :: Maybe TimeRange
endTime = Maybe TimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListAttacks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listAttacks_startTime :: Lens.Lens' ListAttacks (Prelude.Maybe TimeRange)
listAttacks_startTime :: (Maybe TimeRange -> f (Maybe TimeRange))
-> ListAttacks -> f ListAttacks
listAttacks_startTime = (ListAttacks -> Maybe TimeRange)
-> (ListAttacks -> Maybe TimeRange -> ListAttacks)
-> Lens ListAttacks ListAttacks (Maybe TimeRange) (Maybe TimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacks' {Maybe TimeRange
startTime :: Maybe TimeRange
$sel:startTime:ListAttacks' :: ListAttacks -> Maybe TimeRange
startTime} -> Maybe TimeRange
startTime) (\s :: ListAttacks
s@ListAttacks' {} Maybe TimeRange
a -> ListAttacks
s {$sel:startTime:ListAttacks' :: Maybe TimeRange
startTime = Maybe TimeRange
a} :: ListAttacks)
listAttacks_resourceArns :: Lens.Lens' ListAttacks (Prelude.Maybe [Prelude.Text])
listAttacks_resourceArns :: (Maybe [Text] -> f (Maybe [Text])) -> ListAttacks -> f ListAttacks
listAttacks_resourceArns = (ListAttacks -> Maybe [Text])
-> (ListAttacks -> Maybe [Text] -> ListAttacks)
-> Lens ListAttacks ListAttacks (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacks' {Maybe [Text]
resourceArns :: Maybe [Text]
$sel:resourceArns:ListAttacks' :: ListAttacks -> Maybe [Text]
resourceArns} -> Maybe [Text]
resourceArns) (\s :: ListAttacks
s@ListAttacks' {} Maybe [Text]
a -> ListAttacks
s {$sel:resourceArns:ListAttacks' :: Maybe [Text]
resourceArns = Maybe [Text]
a} :: ListAttacks) ((Maybe [Text] -> f (Maybe [Text]))
-> ListAttacks -> f ListAttacks)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListAttacks
-> f ListAttacks
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
listAttacks_nextToken :: Lens.Lens' ListAttacks (Prelude.Maybe Prelude.Text)
listAttacks_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListAttacks -> f ListAttacks
listAttacks_nextToken = (ListAttacks -> Maybe Text)
-> (ListAttacks -> Maybe Text -> ListAttacks)
-> Lens ListAttacks ListAttacks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAttacks' :: ListAttacks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAttacks
s@ListAttacks' {} Maybe Text
a -> ListAttacks
s {$sel:nextToken:ListAttacks' :: Maybe Text
nextToken = Maybe Text
a} :: ListAttacks)
listAttacks_endTime :: Lens.Lens' ListAttacks (Prelude.Maybe TimeRange)
listAttacks_endTime :: (Maybe TimeRange -> f (Maybe TimeRange))
-> ListAttacks -> f ListAttacks
listAttacks_endTime = (ListAttacks -> Maybe TimeRange)
-> (ListAttacks -> Maybe TimeRange -> ListAttacks)
-> Lens ListAttacks ListAttacks (Maybe TimeRange) (Maybe TimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacks' {Maybe TimeRange
endTime :: Maybe TimeRange
$sel:endTime:ListAttacks' :: ListAttacks -> Maybe TimeRange
endTime} -> Maybe TimeRange
endTime) (\s :: ListAttacks
s@ListAttacks' {} Maybe TimeRange
a -> ListAttacks
s {$sel:endTime:ListAttacks' :: Maybe TimeRange
endTime = Maybe TimeRange
a} :: ListAttacks)
listAttacks_maxResults :: Lens.Lens' ListAttacks (Prelude.Maybe Prelude.Natural)
listAttacks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListAttacks -> f ListAttacks
listAttacks_maxResults = (ListAttacks -> Maybe Natural)
-> (ListAttacks -> Maybe Natural -> ListAttacks)
-> Lens ListAttacks ListAttacks (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAttacks' :: ListAttacks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAttacks
s@ListAttacks' {} Maybe Natural
a -> ListAttacks
s {$sel:maxResults:ListAttacks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAttacks)
instance Core.AWSPager ListAttacks where
page :: ListAttacks -> AWSResponse ListAttacks -> Maybe ListAttacks
page ListAttacks
rq AWSResponse ListAttacks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAttacks
ListAttacksResponse
rs
ListAttacksResponse
-> Getting (First Text) ListAttacksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttacksResponse -> Const (First Text) ListAttacksResponse
Lens' ListAttacksResponse (Maybe Text)
listAttacksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttacksResponse -> Const (First Text) ListAttacksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAttacksResponse 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 ListAttacks
forall a. Maybe a
Prelude.Nothing
| Maybe [AttackSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAttacks
ListAttacksResponse
rs
ListAttacksResponse
-> Getting
(First [AttackSummary]) ListAttacksResponse [AttackSummary]
-> Maybe [AttackSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AttackSummary]
-> Const (First [AttackSummary]) (Maybe [AttackSummary]))
-> ListAttacksResponse
-> Const (First [AttackSummary]) ListAttacksResponse
Lens' ListAttacksResponse (Maybe [AttackSummary])
listAttacksResponse_attackSummaries
((Maybe [AttackSummary]
-> Const (First [AttackSummary]) (Maybe [AttackSummary]))
-> ListAttacksResponse
-> Const (First [AttackSummary]) ListAttacksResponse)
-> (([AttackSummary]
-> Const (First [AttackSummary]) [AttackSummary])
-> Maybe [AttackSummary]
-> Const (First [AttackSummary]) (Maybe [AttackSummary]))
-> Getting
(First [AttackSummary]) ListAttacksResponse [AttackSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AttackSummary] -> Const (First [AttackSummary]) [AttackSummary])
-> Maybe [AttackSummary]
-> Const (First [AttackSummary]) (Maybe [AttackSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAttacks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListAttacks -> Maybe ListAttacks
forall a. a -> Maybe a
Prelude.Just (ListAttacks -> Maybe ListAttacks)
-> ListAttacks -> Maybe ListAttacks
forall a b. (a -> b) -> a -> b
Prelude.$
ListAttacks
rq
ListAttacks -> (ListAttacks -> ListAttacks) -> ListAttacks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAttacks -> Identity ListAttacks
Lens ListAttacks ListAttacks (Maybe Text) (Maybe Text)
listAttacks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListAttacks -> Identity ListAttacks)
-> Maybe Text -> ListAttacks -> ListAttacks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAttacks
ListAttacksResponse
rs
ListAttacksResponse
-> Getting (First Text) ListAttacksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttacksResponse -> Const (First Text) ListAttacksResponse
Lens' ListAttacksResponse (Maybe Text)
listAttacksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAttacksResponse -> Const (First Text) ListAttacksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAttacksResponse 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 ListAttacks where
type AWSResponse ListAttacks = ListAttacksResponse
request :: ListAttacks -> Request ListAttacks
request = Service -> ListAttacks -> Request ListAttacks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListAttacks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAttacks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListAttacks))
-> Logger
-> Service
-> Proxy ListAttacks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAttacks)))
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 [AttackSummary] -> Maybe Text -> Int -> ListAttacksResponse
ListAttacksResponse'
(Maybe [AttackSummary] -> Maybe Text -> Int -> ListAttacksResponse)
-> Either String (Maybe [AttackSummary])
-> Either String (Maybe Text -> Int -> ListAttacksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [AttackSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AttackSummaries"
Either String (Maybe (Maybe [AttackSummary]))
-> Maybe [AttackSummary] -> Either String (Maybe [AttackSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AttackSummary]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Maybe Text -> Int -> ListAttacksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListAttacksResponse)
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 -> ListAttacksResponse)
-> Either String Int -> Either String ListAttacksResponse
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 ListAttacks
instance Prelude.NFData ListAttacks
instance Core.ToHeaders ListAttacks where
toHeaders :: ListAttacks -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListAttacks -> 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
"AWSShield_20160616.ListAttacks" ::
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 ListAttacks where
toJSON :: ListAttacks -> Value
toJSON ListAttacks' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe TimeRange
maxResults :: Maybe Natural
endTime :: Maybe TimeRange
nextToken :: Maybe Text
resourceArns :: Maybe [Text]
startTime :: Maybe TimeRange
$sel:maxResults:ListAttacks' :: ListAttacks -> Maybe Natural
$sel:endTime:ListAttacks' :: ListAttacks -> Maybe TimeRange
$sel:nextToken:ListAttacks' :: ListAttacks -> Maybe Text
$sel:resourceArns:ListAttacks' :: ListAttacks -> Maybe [Text]
$sel:startTime:ListAttacks' :: ListAttacks -> Maybe TimeRange
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"StartTime" Text -> TimeRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimeRange -> Pair) -> Maybe TimeRange -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeRange
startTime,
(Text
"ResourceArns" 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]
resourceArns,
(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 -> TimeRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimeRange -> Pair) -> Maybe TimeRange -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeRange
endTime,
(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 ListAttacks where
toPath :: ListAttacks -> ByteString
toPath = ByteString -> ListAttacks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListAttacks where
toQuery :: ListAttacks -> QueryString
toQuery = QueryString -> ListAttacks -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListAttacksResponse = ListAttacksResponse'
{
ListAttacksResponse -> Maybe [AttackSummary]
attackSummaries :: Prelude.Maybe [AttackSummary],
ListAttacksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAttacksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAttacksResponse -> ListAttacksResponse -> Bool
(ListAttacksResponse -> ListAttacksResponse -> Bool)
-> (ListAttacksResponse -> ListAttacksResponse -> Bool)
-> Eq ListAttacksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttacksResponse -> ListAttacksResponse -> Bool
$c/= :: ListAttacksResponse -> ListAttacksResponse -> Bool
== :: ListAttacksResponse -> ListAttacksResponse -> Bool
$c== :: ListAttacksResponse -> ListAttacksResponse -> Bool
Prelude.Eq, ReadPrec [ListAttacksResponse]
ReadPrec ListAttacksResponse
Int -> ReadS ListAttacksResponse
ReadS [ListAttacksResponse]
(Int -> ReadS ListAttacksResponse)
-> ReadS [ListAttacksResponse]
-> ReadPrec ListAttacksResponse
-> ReadPrec [ListAttacksResponse]
-> Read ListAttacksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAttacksResponse]
$creadListPrec :: ReadPrec [ListAttacksResponse]
readPrec :: ReadPrec ListAttacksResponse
$creadPrec :: ReadPrec ListAttacksResponse
readList :: ReadS [ListAttacksResponse]
$creadList :: ReadS [ListAttacksResponse]
readsPrec :: Int -> ReadS ListAttacksResponse
$creadsPrec :: Int -> ReadS ListAttacksResponse
Prelude.Read, Int -> ListAttacksResponse -> ShowS
[ListAttacksResponse] -> ShowS
ListAttacksResponse -> String
(Int -> ListAttacksResponse -> ShowS)
-> (ListAttacksResponse -> String)
-> ([ListAttacksResponse] -> ShowS)
-> Show ListAttacksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttacksResponse] -> ShowS
$cshowList :: [ListAttacksResponse] -> ShowS
show :: ListAttacksResponse -> String
$cshow :: ListAttacksResponse -> String
showsPrec :: Int -> ListAttacksResponse -> ShowS
$cshowsPrec :: Int -> ListAttacksResponse -> ShowS
Prelude.Show, (forall x. ListAttacksResponse -> Rep ListAttacksResponse x)
-> (forall x. Rep ListAttacksResponse x -> ListAttacksResponse)
-> Generic ListAttacksResponse
forall x. Rep ListAttacksResponse x -> ListAttacksResponse
forall x. ListAttacksResponse -> Rep ListAttacksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAttacksResponse x -> ListAttacksResponse
$cfrom :: forall x. ListAttacksResponse -> Rep ListAttacksResponse x
Prelude.Generic)
newListAttacksResponse ::
Prelude.Int ->
ListAttacksResponse
newListAttacksResponse :: Int -> ListAttacksResponse
newListAttacksResponse Int
pHttpStatus_ =
ListAttacksResponse' :: Maybe [AttackSummary] -> Maybe Text -> Int -> ListAttacksResponse
ListAttacksResponse'
{ $sel:attackSummaries:ListAttacksResponse' :: Maybe [AttackSummary]
attackSummaries =
Maybe [AttackSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAttacksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAttacksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAttacksResponse_attackSummaries :: Lens.Lens' ListAttacksResponse (Prelude.Maybe [AttackSummary])
listAttacksResponse_attackSummaries :: (Maybe [AttackSummary] -> f (Maybe [AttackSummary]))
-> ListAttacksResponse -> f ListAttacksResponse
listAttacksResponse_attackSummaries = (ListAttacksResponse -> Maybe [AttackSummary])
-> (ListAttacksResponse
-> Maybe [AttackSummary] -> ListAttacksResponse)
-> Lens' ListAttacksResponse (Maybe [AttackSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacksResponse' {Maybe [AttackSummary]
attackSummaries :: Maybe [AttackSummary]
$sel:attackSummaries:ListAttacksResponse' :: ListAttacksResponse -> Maybe [AttackSummary]
attackSummaries} -> Maybe [AttackSummary]
attackSummaries) (\s :: ListAttacksResponse
s@ListAttacksResponse' {} Maybe [AttackSummary]
a -> ListAttacksResponse
s {$sel:attackSummaries:ListAttacksResponse' :: Maybe [AttackSummary]
attackSummaries = Maybe [AttackSummary]
a} :: ListAttacksResponse) ((Maybe [AttackSummary] -> f (Maybe [AttackSummary]))
-> ListAttacksResponse -> f ListAttacksResponse)
-> ((Maybe [AttackSummary] -> f (Maybe [AttackSummary]))
-> Maybe [AttackSummary] -> f (Maybe [AttackSummary]))
-> (Maybe [AttackSummary] -> f (Maybe [AttackSummary]))
-> ListAttacksResponse
-> f ListAttacksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AttackSummary] [AttackSummary] [AttackSummary] [AttackSummary]
-> Iso
(Maybe [AttackSummary])
(Maybe [AttackSummary])
(Maybe [AttackSummary])
(Maybe [AttackSummary])
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
[AttackSummary] [AttackSummary] [AttackSummary] [AttackSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAttacksResponse_nextToken :: Lens.Lens' ListAttacksResponse (Prelude.Maybe Prelude.Text)
listAttacksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAttacksResponse -> f ListAttacksResponse
listAttacksResponse_nextToken = (ListAttacksResponse -> Maybe Text)
-> (ListAttacksResponse -> Maybe Text -> ListAttacksResponse)
-> Lens' ListAttacksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAttacksResponse' :: ListAttacksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAttacksResponse
s@ListAttacksResponse' {} Maybe Text
a -> ListAttacksResponse
s {$sel:nextToken:ListAttacksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAttacksResponse)
listAttacksResponse_httpStatus :: Lens.Lens' ListAttacksResponse Prelude.Int
listAttacksResponse_httpStatus :: (Int -> f Int) -> ListAttacksResponse -> f ListAttacksResponse
listAttacksResponse_httpStatus = (ListAttacksResponse -> Int)
-> (ListAttacksResponse -> Int -> ListAttacksResponse)
-> Lens ListAttacksResponse ListAttacksResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttacksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAttacksResponse' :: ListAttacksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAttacksResponse
s@ListAttacksResponse' {} Int
a -> ListAttacksResponse
s {$sel:httpStatus:ListAttacksResponse' :: Int
httpStatus = Int
a} :: ListAttacksResponse)
instance Prelude.NFData ListAttacksResponse