{-# 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.Inspector.PreviewAgents
(
PreviewAgents (..),
newPreviewAgents,
previewAgents_nextToken,
previewAgents_maxResults,
previewAgents_previewAgentsArn,
PreviewAgentsResponse (..),
newPreviewAgentsResponse,
previewAgentsResponse_nextToken,
previewAgentsResponse_httpStatus,
previewAgentsResponse_agentPreviews,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Inspector.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data PreviewAgents = PreviewAgents'
{
PreviewAgents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
PreviewAgents -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
PreviewAgents -> Text
previewAgentsArn :: Prelude.Text
}
deriving (PreviewAgents -> PreviewAgents -> Bool
(PreviewAgents -> PreviewAgents -> Bool)
-> (PreviewAgents -> PreviewAgents -> Bool) -> Eq PreviewAgents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PreviewAgents -> PreviewAgents -> Bool
$c/= :: PreviewAgents -> PreviewAgents -> Bool
== :: PreviewAgents -> PreviewAgents -> Bool
$c== :: PreviewAgents -> PreviewAgents -> Bool
Prelude.Eq, ReadPrec [PreviewAgents]
ReadPrec PreviewAgents
Int -> ReadS PreviewAgents
ReadS [PreviewAgents]
(Int -> ReadS PreviewAgents)
-> ReadS [PreviewAgents]
-> ReadPrec PreviewAgents
-> ReadPrec [PreviewAgents]
-> Read PreviewAgents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PreviewAgents]
$creadListPrec :: ReadPrec [PreviewAgents]
readPrec :: ReadPrec PreviewAgents
$creadPrec :: ReadPrec PreviewAgents
readList :: ReadS [PreviewAgents]
$creadList :: ReadS [PreviewAgents]
readsPrec :: Int -> ReadS PreviewAgents
$creadsPrec :: Int -> ReadS PreviewAgents
Prelude.Read, Int -> PreviewAgents -> ShowS
[PreviewAgents] -> ShowS
PreviewAgents -> String
(Int -> PreviewAgents -> ShowS)
-> (PreviewAgents -> String)
-> ([PreviewAgents] -> ShowS)
-> Show PreviewAgents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PreviewAgents] -> ShowS
$cshowList :: [PreviewAgents] -> ShowS
show :: PreviewAgents -> String
$cshow :: PreviewAgents -> String
showsPrec :: Int -> PreviewAgents -> ShowS
$cshowsPrec :: Int -> PreviewAgents -> ShowS
Prelude.Show, (forall x. PreviewAgents -> Rep PreviewAgents x)
-> (forall x. Rep PreviewAgents x -> PreviewAgents)
-> Generic PreviewAgents
forall x. Rep PreviewAgents x -> PreviewAgents
forall x. PreviewAgents -> Rep PreviewAgents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PreviewAgents x -> PreviewAgents
$cfrom :: forall x. PreviewAgents -> Rep PreviewAgents x
Prelude.Generic)
newPreviewAgents ::
Prelude.Text ->
PreviewAgents
newPreviewAgents :: Text -> PreviewAgents
newPreviewAgents Text
pPreviewAgentsArn_ =
PreviewAgents' :: Maybe Text -> Maybe Int -> Text -> PreviewAgents
PreviewAgents'
{ $sel:nextToken:PreviewAgents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:PreviewAgents' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:previewAgentsArn:PreviewAgents' :: Text
previewAgentsArn = Text
pPreviewAgentsArn_
}
previewAgents_nextToken :: Lens.Lens' PreviewAgents (Prelude.Maybe Prelude.Text)
previewAgents_nextToken :: (Maybe Text -> f (Maybe Text)) -> PreviewAgents -> f PreviewAgents
previewAgents_nextToken = (PreviewAgents -> Maybe Text)
-> (PreviewAgents -> Maybe Text -> PreviewAgents)
-> Lens PreviewAgents PreviewAgents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:PreviewAgents' :: PreviewAgents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: PreviewAgents
s@PreviewAgents' {} Maybe Text
a -> PreviewAgents
s {$sel:nextToken:PreviewAgents' :: Maybe Text
nextToken = Maybe Text
a} :: PreviewAgents)
previewAgents_maxResults :: Lens.Lens' PreviewAgents (Prelude.Maybe Prelude.Int)
previewAgents_maxResults :: (Maybe Int -> f (Maybe Int)) -> PreviewAgents -> f PreviewAgents
previewAgents_maxResults = (PreviewAgents -> Maybe Int)
-> (PreviewAgents -> Maybe Int -> PreviewAgents)
-> Lens PreviewAgents PreviewAgents (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgents' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:PreviewAgents' :: PreviewAgents -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: PreviewAgents
s@PreviewAgents' {} Maybe Int
a -> PreviewAgents
s {$sel:maxResults:PreviewAgents' :: Maybe Int
maxResults = Maybe Int
a} :: PreviewAgents)
previewAgents_previewAgentsArn :: Lens.Lens' PreviewAgents Prelude.Text
previewAgents_previewAgentsArn :: (Text -> f Text) -> PreviewAgents -> f PreviewAgents
previewAgents_previewAgentsArn = (PreviewAgents -> Text)
-> (PreviewAgents -> Text -> PreviewAgents)
-> Lens PreviewAgents PreviewAgents Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgents' {Text
previewAgentsArn :: Text
$sel:previewAgentsArn:PreviewAgents' :: PreviewAgents -> Text
previewAgentsArn} -> Text
previewAgentsArn) (\s :: PreviewAgents
s@PreviewAgents' {} Text
a -> PreviewAgents
s {$sel:previewAgentsArn:PreviewAgents' :: Text
previewAgentsArn = Text
a} :: PreviewAgents)
instance Core.AWSPager PreviewAgents where
page :: PreviewAgents -> AWSResponse PreviewAgents -> Maybe PreviewAgents
page PreviewAgents
rq AWSResponse PreviewAgents
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse PreviewAgents
PreviewAgentsResponse
rs
PreviewAgentsResponse
-> Getting (First Text) PreviewAgentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> PreviewAgentsResponse
-> Const (First Text) PreviewAgentsResponse
Lens' PreviewAgentsResponse (Maybe Text)
previewAgentsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> PreviewAgentsResponse
-> Const (First Text) PreviewAgentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) PreviewAgentsResponse 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 PreviewAgents
forall a. Maybe a
Prelude.Nothing
| [AgentPreview] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
(AWSResponse PreviewAgents
PreviewAgentsResponse
rs PreviewAgentsResponse
-> Getting [AgentPreview] PreviewAgentsResponse [AgentPreview]
-> [AgentPreview]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [AgentPreview] PreviewAgentsResponse [AgentPreview]
Lens' PreviewAgentsResponse [AgentPreview]
previewAgentsResponse_agentPreviews) =
Maybe PreviewAgents
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
PreviewAgents -> Maybe PreviewAgents
forall a. a -> Maybe a
Prelude.Just (PreviewAgents -> Maybe PreviewAgents)
-> PreviewAgents -> Maybe PreviewAgents
forall a b. (a -> b) -> a -> b
Prelude.$
PreviewAgents
rq
PreviewAgents -> (PreviewAgents -> PreviewAgents) -> PreviewAgents
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> PreviewAgents -> Identity PreviewAgents
Lens PreviewAgents PreviewAgents (Maybe Text) (Maybe Text)
previewAgents_nextToken
((Maybe Text -> Identity (Maybe Text))
-> PreviewAgents -> Identity PreviewAgents)
-> Maybe Text -> PreviewAgents -> PreviewAgents
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse PreviewAgents
PreviewAgentsResponse
rs
PreviewAgentsResponse
-> Getting (First Text) PreviewAgentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> PreviewAgentsResponse
-> Const (First Text) PreviewAgentsResponse
Lens' PreviewAgentsResponse (Maybe Text)
previewAgentsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> PreviewAgentsResponse
-> Const (First Text) PreviewAgentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) PreviewAgentsResponse 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 PreviewAgents where
type
AWSResponse PreviewAgents =
PreviewAgentsResponse
request :: PreviewAgents -> Request PreviewAgents
request = Service -> PreviewAgents -> Request PreviewAgents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PreviewAgents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PreviewAgents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PreviewAgents))
-> Logger
-> Service
-> Proxy PreviewAgents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PreviewAgents)))
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 -> Int -> [AgentPreview] -> PreviewAgentsResponse
PreviewAgentsResponse'
(Maybe Text -> Int -> [AgentPreview] -> PreviewAgentsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [AgentPreview] -> PreviewAgentsResponse)
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 (Int -> [AgentPreview] -> PreviewAgentsResponse)
-> Either String Int
-> Either String ([AgentPreview] -> PreviewAgentsResponse)
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))
Either String ([AgentPreview] -> PreviewAgentsResponse)
-> Either String [AgentPreview]
-> Either String PreviewAgentsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [AgentPreview])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"agentPreviews" Either String (Maybe [AgentPreview])
-> [AgentPreview] -> Either String [AgentPreview]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [AgentPreview]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable PreviewAgents
instance Prelude.NFData PreviewAgents
instance Core.ToHeaders PreviewAgents where
toHeaders :: PreviewAgents -> ResponseHeaders
toHeaders =
ResponseHeaders -> PreviewAgents -> 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
"InspectorService.PreviewAgents" ::
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 PreviewAgents where
toJSON :: PreviewAgents -> Value
toJSON PreviewAgents' {Maybe Int
Maybe Text
Text
previewAgentsArn :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:previewAgentsArn:PreviewAgents' :: PreviewAgents -> Text
$sel:maxResults:PreviewAgents' :: PreviewAgents -> Maybe Int
$sel:nextToken:PreviewAgents' :: PreviewAgents -> 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 -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"previewAgentsArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
previewAgentsArn)
]
)
instance Core.ToPath PreviewAgents where
toPath :: PreviewAgents -> ByteString
toPath = ByteString -> PreviewAgents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PreviewAgents where
toQuery :: PreviewAgents -> QueryString
toQuery = QueryString -> PreviewAgents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PreviewAgentsResponse = PreviewAgentsResponse'
{
PreviewAgentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
PreviewAgentsResponse -> Int
httpStatus :: Prelude.Int,
PreviewAgentsResponse -> [AgentPreview]
agentPreviews :: [AgentPreview]
}
deriving (PreviewAgentsResponse -> PreviewAgentsResponse -> Bool
(PreviewAgentsResponse -> PreviewAgentsResponse -> Bool)
-> (PreviewAgentsResponse -> PreviewAgentsResponse -> Bool)
-> Eq PreviewAgentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PreviewAgentsResponse -> PreviewAgentsResponse -> Bool
$c/= :: PreviewAgentsResponse -> PreviewAgentsResponse -> Bool
== :: PreviewAgentsResponse -> PreviewAgentsResponse -> Bool
$c== :: PreviewAgentsResponse -> PreviewAgentsResponse -> Bool
Prelude.Eq, ReadPrec [PreviewAgentsResponse]
ReadPrec PreviewAgentsResponse
Int -> ReadS PreviewAgentsResponse
ReadS [PreviewAgentsResponse]
(Int -> ReadS PreviewAgentsResponse)
-> ReadS [PreviewAgentsResponse]
-> ReadPrec PreviewAgentsResponse
-> ReadPrec [PreviewAgentsResponse]
-> Read PreviewAgentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PreviewAgentsResponse]
$creadListPrec :: ReadPrec [PreviewAgentsResponse]
readPrec :: ReadPrec PreviewAgentsResponse
$creadPrec :: ReadPrec PreviewAgentsResponse
readList :: ReadS [PreviewAgentsResponse]
$creadList :: ReadS [PreviewAgentsResponse]
readsPrec :: Int -> ReadS PreviewAgentsResponse
$creadsPrec :: Int -> ReadS PreviewAgentsResponse
Prelude.Read, Int -> PreviewAgentsResponse -> ShowS
[PreviewAgentsResponse] -> ShowS
PreviewAgentsResponse -> String
(Int -> PreviewAgentsResponse -> ShowS)
-> (PreviewAgentsResponse -> String)
-> ([PreviewAgentsResponse] -> ShowS)
-> Show PreviewAgentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PreviewAgentsResponse] -> ShowS
$cshowList :: [PreviewAgentsResponse] -> ShowS
show :: PreviewAgentsResponse -> String
$cshow :: PreviewAgentsResponse -> String
showsPrec :: Int -> PreviewAgentsResponse -> ShowS
$cshowsPrec :: Int -> PreviewAgentsResponse -> ShowS
Prelude.Show, (forall x. PreviewAgentsResponse -> Rep PreviewAgentsResponse x)
-> (forall x. Rep PreviewAgentsResponse x -> PreviewAgentsResponse)
-> Generic PreviewAgentsResponse
forall x. Rep PreviewAgentsResponse x -> PreviewAgentsResponse
forall x. PreviewAgentsResponse -> Rep PreviewAgentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PreviewAgentsResponse x -> PreviewAgentsResponse
$cfrom :: forall x. PreviewAgentsResponse -> Rep PreviewAgentsResponse x
Prelude.Generic)
newPreviewAgentsResponse ::
Prelude.Int ->
PreviewAgentsResponse
newPreviewAgentsResponse :: Int -> PreviewAgentsResponse
newPreviewAgentsResponse Int
pHttpStatus_ =
PreviewAgentsResponse' :: Maybe Text -> Int -> [AgentPreview] -> PreviewAgentsResponse
PreviewAgentsResponse'
{ $sel:nextToken:PreviewAgentsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PreviewAgentsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:agentPreviews:PreviewAgentsResponse' :: [AgentPreview]
agentPreviews = [AgentPreview]
forall a. Monoid a => a
Prelude.mempty
}
previewAgentsResponse_nextToken :: Lens.Lens' PreviewAgentsResponse (Prelude.Maybe Prelude.Text)
previewAgentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> PreviewAgentsResponse -> f PreviewAgentsResponse
previewAgentsResponse_nextToken = (PreviewAgentsResponse -> Maybe Text)
-> (PreviewAgentsResponse -> Maybe Text -> PreviewAgentsResponse)
-> Lens' PreviewAgentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:PreviewAgentsResponse' :: PreviewAgentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: PreviewAgentsResponse
s@PreviewAgentsResponse' {} Maybe Text
a -> PreviewAgentsResponse
s {$sel:nextToken:PreviewAgentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: PreviewAgentsResponse)
previewAgentsResponse_httpStatus :: Lens.Lens' PreviewAgentsResponse Prelude.Int
previewAgentsResponse_httpStatus :: (Int -> f Int) -> PreviewAgentsResponse -> f PreviewAgentsResponse
previewAgentsResponse_httpStatus = (PreviewAgentsResponse -> Int)
-> (PreviewAgentsResponse -> Int -> PreviewAgentsResponse)
-> Lens PreviewAgentsResponse PreviewAgentsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:PreviewAgentsResponse' :: PreviewAgentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PreviewAgentsResponse
s@PreviewAgentsResponse' {} Int
a -> PreviewAgentsResponse
s {$sel:httpStatus:PreviewAgentsResponse' :: Int
httpStatus = Int
a} :: PreviewAgentsResponse)
previewAgentsResponse_agentPreviews :: Lens.Lens' PreviewAgentsResponse [AgentPreview]
previewAgentsResponse_agentPreviews :: ([AgentPreview] -> f [AgentPreview])
-> PreviewAgentsResponse -> f PreviewAgentsResponse
previewAgentsResponse_agentPreviews = (PreviewAgentsResponse -> [AgentPreview])
-> (PreviewAgentsResponse
-> [AgentPreview] -> PreviewAgentsResponse)
-> Lens' PreviewAgentsResponse [AgentPreview]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PreviewAgentsResponse' {[AgentPreview]
agentPreviews :: [AgentPreview]
$sel:agentPreviews:PreviewAgentsResponse' :: PreviewAgentsResponse -> [AgentPreview]
agentPreviews} -> [AgentPreview]
agentPreviews) (\s :: PreviewAgentsResponse
s@PreviewAgentsResponse' {} [AgentPreview]
a -> PreviewAgentsResponse
s {$sel:agentPreviews:PreviewAgentsResponse' :: [AgentPreview]
agentPreviews = [AgentPreview]
a} :: PreviewAgentsResponse) (([AgentPreview] -> f [AgentPreview])
-> PreviewAgentsResponse -> f PreviewAgentsResponse)
-> (([AgentPreview] -> f [AgentPreview])
-> [AgentPreview] -> f [AgentPreview])
-> ([AgentPreview] -> f [AgentPreview])
-> PreviewAgentsResponse
-> f PreviewAgentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AgentPreview] -> f [AgentPreview])
-> [AgentPreview] -> f [AgentPreview]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData PreviewAgentsResponse