{-# 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.SageMaker.Search
(
Search (..),
newSearch,
search_nextToken,
search_searchExpression,
search_sortOrder,
search_maxResults,
search_sortBy,
search_resource,
SearchResponse (..),
newSearchResponse,
searchResponse_results,
searchResponse_nextToken,
searchResponse_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.SageMaker.Types
data Search = Search'
{
Search -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
Search -> Maybe SearchExpression
searchExpression :: Prelude.Maybe SearchExpression,
Search -> Maybe SearchSortOrder
sortOrder :: Prelude.Maybe SearchSortOrder,
Search -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
Search -> Maybe Text
sortBy :: Prelude.Maybe Prelude.Text,
Search -> ResourceType
resource :: ResourceType
}
deriving (Search -> Search -> Bool
(Search -> Search -> Bool)
-> (Search -> Search -> Bool) -> Eq Search
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Search -> Search -> Bool
$c/= :: Search -> Search -> Bool
== :: Search -> Search -> Bool
$c== :: Search -> Search -> Bool
Prelude.Eq, ReadPrec [Search]
ReadPrec Search
Int -> ReadS Search
ReadS [Search]
(Int -> ReadS Search)
-> ReadS [Search]
-> ReadPrec Search
-> ReadPrec [Search]
-> Read Search
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Search]
$creadListPrec :: ReadPrec [Search]
readPrec :: ReadPrec Search
$creadPrec :: ReadPrec Search
readList :: ReadS [Search]
$creadList :: ReadS [Search]
readsPrec :: Int -> ReadS Search
$creadsPrec :: Int -> ReadS Search
Prelude.Read, Int -> Search -> ShowS
[Search] -> ShowS
Search -> String
(Int -> Search -> ShowS)
-> (Search -> String) -> ([Search] -> ShowS) -> Show Search
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Search] -> ShowS
$cshowList :: [Search] -> ShowS
show :: Search -> String
$cshow :: Search -> String
showsPrec :: Int -> Search -> ShowS
$cshowsPrec :: Int -> Search -> ShowS
Prelude.Show, (forall x. Search -> Rep Search x)
-> (forall x. Rep Search x -> Search) -> Generic Search
forall x. Rep Search x -> Search
forall x. Search -> Rep Search x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Search x -> Search
$cfrom :: forall x. Search -> Rep Search x
Prelude.Generic)
newSearch ::
ResourceType ->
Search
newSearch :: ResourceType -> Search
newSearch ResourceType
pResource_ =
Search' :: Maybe Text
-> Maybe SearchExpression
-> Maybe SearchSortOrder
-> Maybe Natural
-> Maybe Text
-> ResourceType
-> Search
Search'
{ $sel:nextToken:Search' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:searchExpression:Search' :: Maybe SearchExpression
searchExpression = Maybe SearchExpression
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:Search' :: Maybe SearchSortOrder
sortOrder = Maybe SearchSortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:Search' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:Search' :: Maybe Text
sortBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resource:Search' :: ResourceType
resource = ResourceType
pResource_
}
search_nextToken :: Lens.Lens' Search (Prelude.Maybe Prelude.Text)
search_nextToken :: (Maybe Text -> f (Maybe Text)) -> Search -> f Search
search_nextToken = (Search -> Maybe Text)
-> (Search -> Maybe Text -> Search)
-> Lens Search Search (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:Search' :: Search -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: Search
s@Search' {} Maybe Text
a -> Search
s {$sel:nextToken:Search' :: Maybe Text
nextToken = Maybe Text
a} :: Search)
search_searchExpression :: Lens.Lens' Search (Prelude.Maybe SearchExpression)
search_searchExpression :: (Maybe SearchExpression -> f (Maybe SearchExpression))
-> Search -> f Search
search_searchExpression = (Search -> Maybe SearchExpression)
-> (Search -> Maybe SearchExpression -> Search)
-> Lens
Search Search (Maybe SearchExpression) (Maybe SearchExpression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {Maybe SearchExpression
searchExpression :: Maybe SearchExpression
$sel:searchExpression:Search' :: Search -> Maybe SearchExpression
searchExpression} -> Maybe SearchExpression
searchExpression) (\s :: Search
s@Search' {} Maybe SearchExpression
a -> Search
s {$sel:searchExpression:Search' :: Maybe SearchExpression
searchExpression = Maybe SearchExpression
a} :: Search)
search_sortOrder :: Lens.Lens' Search (Prelude.Maybe SearchSortOrder)
search_sortOrder :: (Maybe SearchSortOrder -> f (Maybe SearchSortOrder))
-> Search -> f Search
search_sortOrder = (Search -> Maybe SearchSortOrder)
-> (Search -> Maybe SearchSortOrder -> Search)
-> Lens
Search Search (Maybe SearchSortOrder) (Maybe SearchSortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {Maybe SearchSortOrder
sortOrder :: Maybe SearchSortOrder
$sel:sortOrder:Search' :: Search -> Maybe SearchSortOrder
sortOrder} -> Maybe SearchSortOrder
sortOrder) (\s :: Search
s@Search' {} Maybe SearchSortOrder
a -> Search
s {$sel:sortOrder:Search' :: Maybe SearchSortOrder
sortOrder = Maybe SearchSortOrder
a} :: Search)
search_maxResults :: Lens.Lens' Search (Prelude.Maybe Prelude.Natural)
search_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> Search -> f Search
search_maxResults = (Search -> Maybe Natural)
-> (Search -> Maybe Natural -> Search)
-> Lens Search Search (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:Search' :: Search -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: Search
s@Search' {} Maybe Natural
a -> Search
s {$sel:maxResults:Search' :: Maybe Natural
maxResults = Maybe Natural
a} :: Search)
search_sortBy :: Lens.Lens' Search (Prelude.Maybe Prelude.Text)
search_sortBy :: (Maybe Text -> f (Maybe Text)) -> Search -> f Search
search_sortBy = (Search -> Maybe Text)
-> (Search -> Maybe Text -> Search)
-> Lens Search Search (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {Maybe Text
sortBy :: Maybe Text
$sel:sortBy:Search' :: Search -> Maybe Text
sortBy} -> Maybe Text
sortBy) (\s :: Search
s@Search' {} Maybe Text
a -> Search
s {$sel:sortBy:Search' :: Maybe Text
sortBy = Maybe Text
a} :: Search)
search_resource :: Lens.Lens' Search ResourceType
search_resource :: (ResourceType -> f ResourceType) -> Search -> f Search
search_resource = (Search -> ResourceType)
-> (Search -> ResourceType -> Search)
-> Lens Search Search ResourceType ResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Search' {ResourceType
resource :: ResourceType
$sel:resource:Search' :: Search -> ResourceType
resource} -> ResourceType
resource) (\s :: Search
s@Search' {} ResourceType
a -> Search
s {$sel:resource:Search' :: ResourceType
resource = ResourceType
a} :: Search)
instance Core.AWSPager Search where
page :: Search -> AWSResponse Search -> Maybe Search
page Search
rq AWSResponse Search
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse Search
SearchResponse
rs
SearchResponse
-> Getting (First Text) SearchResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> SearchResponse -> Const (First Text) SearchResponse
Lens' SearchResponse (Maybe Text)
searchResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> SearchResponse -> Const (First Text) SearchResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) SearchResponse 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 Search
forall a. Maybe a
Prelude.Nothing
| Maybe [SearchRecord] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse Search
SearchResponse
rs
SearchResponse
-> Getting (First [SearchRecord]) SearchResponse [SearchRecord]
-> Maybe [SearchRecord]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SearchRecord]
-> Const (First [SearchRecord]) (Maybe [SearchRecord]))
-> SearchResponse -> Const (First [SearchRecord]) SearchResponse
Lens' SearchResponse (Maybe [SearchRecord])
searchResponse_results ((Maybe [SearchRecord]
-> Const (First [SearchRecord]) (Maybe [SearchRecord]))
-> SearchResponse -> Const (First [SearchRecord]) SearchResponse)
-> (([SearchRecord] -> Const (First [SearchRecord]) [SearchRecord])
-> Maybe [SearchRecord]
-> Const (First [SearchRecord]) (Maybe [SearchRecord]))
-> Getting (First [SearchRecord]) SearchResponse [SearchRecord]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SearchRecord] -> Const (First [SearchRecord]) [SearchRecord])
-> Maybe [SearchRecord]
-> Const (First [SearchRecord]) (Maybe [SearchRecord])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe Search
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
Search -> Maybe Search
forall a. a -> Maybe a
Prelude.Just (Search -> Maybe Search) -> Search -> Maybe Search
forall a b. (a -> b) -> a -> b
Prelude.$
Search
rq
Search -> (Search -> Search) -> Search
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text)) -> Search -> Identity Search
Lens Search Search (Maybe Text) (Maybe Text)
search_nextToken
((Maybe Text -> Identity (Maybe Text))
-> Search -> Identity Search)
-> Maybe Text -> Search -> Search
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse Search
SearchResponse
rs
SearchResponse
-> Getting (First Text) SearchResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> SearchResponse -> Const (First Text) SearchResponse
Lens' SearchResponse (Maybe Text)
searchResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> SearchResponse -> Const (First Text) SearchResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) SearchResponse 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 Search where
type AWSResponse Search = SearchResponse
request :: Search -> Request Search
request = Service -> Search -> Request Search
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy Search
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse Search)))
response =
(Int
-> ResponseHeaders -> Object -> Either String (AWSResponse Search))
-> Logger
-> Service
-> Proxy Search
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse Search)))
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 [SearchRecord] -> Maybe Text -> Int -> SearchResponse
SearchResponse'
(Maybe [SearchRecord] -> Maybe Text -> Int -> SearchResponse)
-> Either String (Maybe [SearchRecord])
-> Either String (Maybe Text -> Int -> SearchResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [SearchRecord]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Results" Either String (Maybe (Maybe [SearchRecord]))
-> Maybe [SearchRecord] -> Either String (Maybe [SearchRecord])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SearchRecord]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> SearchResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SearchResponse)
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 -> SearchResponse)
-> Either String Int -> Either String SearchResponse
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 Search
instance Prelude.NFData Search
instance Core.ToHeaders Search where
toHeaders :: Search -> ResponseHeaders
toHeaders =
ResponseHeaders -> Search -> 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
"SageMaker.Search" :: 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 Search where
toJSON :: Search -> Value
toJSON Search' {Maybe Natural
Maybe Text
Maybe SearchExpression
Maybe SearchSortOrder
ResourceType
resource :: ResourceType
sortBy :: Maybe Text
maxResults :: Maybe Natural
sortOrder :: Maybe SearchSortOrder
searchExpression :: Maybe SearchExpression
nextToken :: Maybe Text
$sel:resource:Search' :: Search -> ResourceType
$sel:sortBy:Search' :: Search -> Maybe Text
$sel:maxResults:Search' :: Search -> Maybe Natural
$sel:sortOrder:Search' :: Search -> Maybe SearchSortOrder
$sel:searchExpression:Search' :: Search -> Maybe SearchExpression
$sel:nextToken:Search' :: Search -> 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
"SearchExpression" Text -> SearchExpression -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SearchExpression -> Pair) -> Maybe SearchExpression -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchExpression
searchExpression,
(Text
"SortOrder" Text -> SearchSortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SearchSortOrder -> Pair) -> Maybe SearchSortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchSortOrder
sortOrder,
(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,
(Text
"SortBy" 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
sortBy,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Resource" Text -> ResourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ResourceType
resource)
]
)
instance Core.ToPath Search where
toPath :: Search -> ByteString
toPath = ByteString -> Search -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery Search where
toQuery :: Search -> QueryString
toQuery = QueryString -> Search -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SearchResponse = SearchResponse'
{
SearchResponse -> Maybe [SearchRecord]
results :: Prelude.Maybe [SearchRecord],
SearchResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
SearchResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SearchResponse -> SearchResponse -> Bool
(SearchResponse -> SearchResponse -> Bool)
-> (SearchResponse -> SearchResponse -> Bool) -> Eq SearchResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchResponse -> SearchResponse -> Bool
$c/= :: SearchResponse -> SearchResponse -> Bool
== :: SearchResponse -> SearchResponse -> Bool
$c== :: SearchResponse -> SearchResponse -> Bool
Prelude.Eq, ReadPrec [SearchResponse]
ReadPrec SearchResponse
Int -> ReadS SearchResponse
ReadS [SearchResponse]
(Int -> ReadS SearchResponse)
-> ReadS [SearchResponse]
-> ReadPrec SearchResponse
-> ReadPrec [SearchResponse]
-> Read SearchResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchResponse]
$creadListPrec :: ReadPrec [SearchResponse]
readPrec :: ReadPrec SearchResponse
$creadPrec :: ReadPrec SearchResponse
readList :: ReadS [SearchResponse]
$creadList :: ReadS [SearchResponse]
readsPrec :: Int -> ReadS SearchResponse
$creadsPrec :: Int -> ReadS SearchResponse
Prelude.Read, Int -> SearchResponse -> ShowS
[SearchResponse] -> ShowS
SearchResponse -> String
(Int -> SearchResponse -> ShowS)
-> (SearchResponse -> String)
-> ([SearchResponse] -> ShowS)
-> Show SearchResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchResponse] -> ShowS
$cshowList :: [SearchResponse] -> ShowS
show :: SearchResponse -> String
$cshow :: SearchResponse -> String
showsPrec :: Int -> SearchResponse -> ShowS
$cshowsPrec :: Int -> SearchResponse -> ShowS
Prelude.Show, (forall x. SearchResponse -> Rep SearchResponse x)
-> (forall x. Rep SearchResponse x -> SearchResponse)
-> Generic SearchResponse
forall x. Rep SearchResponse x -> SearchResponse
forall x. SearchResponse -> Rep SearchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchResponse x -> SearchResponse
$cfrom :: forall x. SearchResponse -> Rep SearchResponse x
Prelude.Generic)
newSearchResponse ::
Prelude.Int ->
SearchResponse
newSearchResponse :: Int -> SearchResponse
newSearchResponse Int
pHttpStatus_ =
SearchResponse' :: Maybe [SearchRecord] -> Maybe Text -> Int -> SearchResponse
SearchResponse'
{ $sel:results:SearchResponse' :: Maybe [SearchRecord]
results = Maybe [SearchRecord]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:SearchResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SearchResponse' :: Int
httpStatus = Int
pHttpStatus_
}
searchResponse_results :: Lens.Lens' SearchResponse (Prelude.Maybe [SearchRecord])
searchResponse_results :: (Maybe [SearchRecord] -> f (Maybe [SearchRecord]))
-> SearchResponse -> f SearchResponse
searchResponse_results = (SearchResponse -> Maybe [SearchRecord])
-> (SearchResponse -> Maybe [SearchRecord] -> SearchResponse)
-> Lens' SearchResponse (Maybe [SearchRecord])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchResponse' {Maybe [SearchRecord]
results :: Maybe [SearchRecord]
$sel:results:SearchResponse' :: SearchResponse -> Maybe [SearchRecord]
results} -> Maybe [SearchRecord]
results) (\s :: SearchResponse
s@SearchResponse' {} Maybe [SearchRecord]
a -> SearchResponse
s {$sel:results:SearchResponse' :: Maybe [SearchRecord]
results = Maybe [SearchRecord]
a} :: SearchResponse) ((Maybe [SearchRecord] -> f (Maybe [SearchRecord]))
-> SearchResponse -> f SearchResponse)
-> ((Maybe [SearchRecord] -> f (Maybe [SearchRecord]))
-> Maybe [SearchRecord] -> f (Maybe [SearchRecord]))
-> (Maybe [SearchRecord] -> f (Maybe [SearchRecord]))
-> SearchResponse
-> f SearchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [SearchRecord] [SearchRecord] [SearchRecord] [SearchRecord]
-> Iso
(Maybe [SearchRecord])
(Maybe [SearchRecord])
(Maybe [SearchRecord])
(Maybe [SearchRecord])
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 [SearchRecord] [SearchRecord] [SearchRecord] [SearchRecord]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchResponse_nextToken :: Lens.Lens' SearchResponse (Prelude.Maybe Prelude.Text)
searchResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchResponse -> f SearchResponse
searchResponse_nextToken = (SearchResponse -> Maybe Text)
-> (SearchResponse -> Maybe Text -> SearchResponse)
-> Lens' SearchResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchResponse' :: SearchResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchResponse
s@SearchResponse' {} Maybe Text
a -> SearchResponse
s {$sel:nextToken:SearchResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchResponse)
searchResponse_httpStatus :: Lens.Lens' SearchResponse Prelude.Int
searchResponse_httpStatus :: (Int -> f Int) -> SearchResponse -> f SearchResponse
searchResponse_httpStatus = (SearchResponse -> Int)
-> (SearchResponse -> Int -> SearchResponse)
-> Lens SearchResponse SearchResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchResponse' {Int
httpStatus :: Int
$sel:httpStatus:SearchResponse' :: SearchResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SearchResponse
s@SearchResponse' {} Int
a -> SearchResponse
s {$sel:httpStatus:SearchResponse' :: Int
httpStatus = Int
a} :: SearchResponse)
instance Prelude.NFData SearchResponse