{-# 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.Kinesis.ListShards
(
ListShards (..),
newListShards,
listShards_shardFilter,
listShards_nextToken,
listShards_exclusiveStartShardId,
listShards_streamCreationTimestamp,
listShards_streamName,
listShards_maxResults,
ListShardsResponse (..),
newListShardsResponse,
listShardsResponse_nextToken,
listShardsResponse_shards,
listShardsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Kinesis.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 ListShards = ListShards'
{ ListShards -> Maybe ShardFilter
shardFilter :: Prelude.Maybe ShardFilter,
ListShards -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListShards -> Maybe Text
exclusiveStartShardId :: Prelude.Maybe Prelude.Text,
ListShards -> Maybe POSIX
streamCreationTimestamp :: Prelude.Maybe Core.POSIX,
ListShards -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text,
ListShards -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListShards -> ListShards -> Bool
(ListShards -> ListShards -> Bool)
-> (ListShards -> ListShards -> Bool) -> Eq ListShards
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListShards -> ListShards -> Bool
$c/= :: ListShards -> ListShards -> Bool
== :: ListShards -> ListShards -> Bool
$c== :: ListShards -> ListShards -> Bool
Prelude.Eq, ReadPrec [ListShards]
ReadPrec ListShards
Int -> ReadS ListShards
ReadS [ListShards]
(Int -> ReadS ListShards)
-> ReadS [ListShards]
-> ReadPrec ListShards
-> ReadPrec [ListShards]
-> Read ListShards
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListShards]
$creadListPrec :: ReadPrec [ListShards]
readPrec :: ReadPrec ListShards
$creadPrec :: ReadPrec ListShards
readList :: ReadS [ListShards]
$creadList :: ReadS [ListShards]
readsPrec :: Int -> ReadS ListShards
$creadsPrec :: Int -> ReadS ListShards
Prelude.Read, Int -> ListShards -> ShowS
[ListShards] -> ShowS
ListShards -> String
(Int -> ListShards -> ShowS)
-> (ListShards -> String)
-> ([ListShards] -> ShowS)
-> Show ListShards
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListShards] -> ShowS
$cshowList :: [ListShards] -> ShowS
show :: ListShards -> String
$cshow :: ListShards -> String
showsPrec :: Int -> ListShards -> ShowS
$cshowsPrec :: Int -> ListShards -> ShowS
Prelude.Show, (forall x. ListShards -> Rep ListShards x)
-> (forall x. Rep ListShards x -> ListShards) -> Generic ListShards
forall x. Rep ListShards x -> ListShards
forall x. ListShards -> Rep ListShards x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListShards x -> ListShards
$cfrom :: forall x. ListShards -> Rep ListShards x
Prelude.Generic)
newListShards ::
ListShards
newListShards :: ListShards
newListShards =
ListShards' :: Maybe ShardFilter
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> ListShards
ListShards'
{ $sel:shardFilter:ListShards' :: Maybe ShardFilter
shardFilter = Maybe ShardFilter
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListShards' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:exclusiveStartShardId:ListShards' :: Maybe Text
exclusiveStartShardId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamCreationTimestamp:ListShards' :: Maybe POSIX
streamCreationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:streamName:ListShards' :: Maybe Text
streamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListShards' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listShards_shardFilter :: Lens.Lens' ListShards (Prelude.Maybe ShardFilter)
listShards_shardFilter :: (Maybe ShardFilter -> f (Maybe ShardFilter))
-> ListShards -> f ListShards
listShards_shardFilter = (ListShards -> Maybe ShardFilter)
-> (ListShards -> Maybe ShardFilter -> ListShards)
-> Lens
ListShards ListShards (Maybe ShardFilter) (Maybe ShardFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe ShardFilter
shardFilter :: Maybe ShardFilter
$sel:shardFilter:ListShards' :: ListShards -> Maybe ShardFilter
shardFilter} -> Maybe ShardFilter
shardFilter) (\s :: ListShards
s@ListShards' {} Maybe ShardFilter
a -> ListShards
s {$sel:shardFilter:ListShards' :: Maybe ShardFilter
shardFilter = Maybe ShardFilter
a} :: ListShards)
listShards_nextToken :: Lens.Lens' ListShards (Prelude.Maybe Prelude.Text)
listShards_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListShards -> f ListShards
listShards_nextToken = (ListShards -> Maybe Text)
-> (ListShards -> Maybe Text -> ListShards)
-> Lens ListShards ListShards (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListShards' :: ListShards -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListShards
s@ListShards' {} Maybe Text
a -> ListShards
s {$sel:nextToken:ListShards' :: Maybe Text
nextToken = Maybe Text
a} :: ListShards)
listShards_exclusiveStartShardId :: Lens.Lens' ListShards (Prelude.Maybe Prelude.Text)
listShards_exclusiveStartShardId :: (Maybe Text -> f (Maybe Text)) -> ListShards -> f ListShards
listShards_exclusiveStartShardId = (ListShards -> Maybe Text)
-> (ListShards -> Maybe Text -> ListShards)
-> Lens ListShards ListShards (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe Text
exclusiveStartShardId :: Maybe Text
$sel:exclusiveStartShardId:ListShards' :: ListShards -> Maybe Text
exclusiveStartShardId} -> Maybe Text
exclusiveStartShardId) (\s :: ListShards
s@ListShards' {} Maybe Text
a -> ListShards
s {$sel:exclusiveStartShardId:ListShards' :: Maybe Text
exclusiveStartShardId = Maybe Text
a} :: ListShards)
listShards_streamCreationTimestamp :: Lens.Lens' ListShards (Prelude.Maybe Prelude.UTCTime)
listShards_streamCreationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> ListShards -> f ListShards
listShards_streamCreationTimestamp = (ListShards -> Maybe POSIX)
-> (ListShards -> Maybe POSIX -> ListShards)
-> Lens ListShards ListShards (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe POSIX
streamCreationTimestamp :: Maybe POSIX
$sel:streamCreationTimestamp:ListShards' :: ListShards -> Maybe POSIX
streamCreationTimestamp} -> Maybe POSIX
streamCreationTimestamp) (\s :: ListShards
s@ListShards' {} Maybe POSIX
a -> ListShards
s {$sel:streamCreationTimestamp:ListShards' :: Maybe POSIX
streamCreationTimestamp = Maybe POSIX
a} :: ListShards) ((Maybe POSIX -> f (Maybe POSIX)) -> ListShards -> f ListShards)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListShards
-> f ListShards
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listShards_streamName :: Lens.Lens' ListShards (Prelude.Maybe Prelude.Text)
listShards_streamName :: (Maybe Text -> f (Maybe Text)) -> ListShards -> f ListShards
listShards_streamName = (ListShards -> Maybe Text)
-> (ListShards -> Maybe Text -> ListShards)
-> Lens ListShards ListShards (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe Text
streamName :: Maybe Text
$sel:streamName:ListShards' :: ListShards -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: ListShards
s@ListShards' {} Maybe Text
a -> ListShards
s {$sel:streamName:ListShards' :: Maybe Text
streamName = Maybe Text
a} :: ListShards)
listShards_maxResults :: Lens.Lens' ListShards (Prelude.Maybe Prelude.Natural)
listShards_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListShards -> f ListShards
listShards_maxResults = (ListShards -> Maybe Natural)
-> (ListShards -> Maybe Natural -> ListShards)
-> Lens ListShards ListShards (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShards' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListShards' :: ListShards -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListShards
s@ListShards' {} Maybe Natural
a -> ListShards
s {$sel:maxResults:ListShards' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListShards)
instance Core.AWSPager ListShards where
page :: ListShards -> AWSResponse ListShards -> Maybe ListShards
page ListShards
rq AWSResponse ListShards
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListShards
ListShardsResponse
rs
ListShardsResponse
-> Getting (First Text) ListShardsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListShardsResponse -> Const (First Text) ListShardsResponse
Lens' ListShardsResponse (Maybe Text)
listShardsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListShardsResponse -> Const (First Text) ListShardsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListShardsResponse 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 ListShards
forall a. Maybe a
Prelude.Nothing
| Maybe [Shard] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListShards
ListShardsResponse
rs
ListShardsResponse
-> Getting (First [Shard]) ListShardsResponse [Shard]
-> Maybe [Shard]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Shard] -> Const (First [Shard]) (Maybe [Shard]))
-> ListShardsResponse -> Const (First [Shard]) ListShardsResponse
Lens' ListShardsResponse (Maybe [Shard])
listShardsResponse_shards ((Maybe [Shard] -> Const (First [Shard]) (Maybe [Shard]))
-> ListShardsResponse -> Const (First [Shard]) ListShardsResponse)
-> (([Shard] -> Const (First [Shard]) [Shard])
-> Maybe [Shard] -> Const (First [Shard]) (Maybe [Shard]))
-> Getting (First [Shard]) ListShardsResponse [Shard]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Shard] -> Const (First [Shard]) [Shard])
-> Maybe [Shard] -> Const (First [Shard]) (Maybe [Shard])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListShards
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListShards -> Maybe ListShards
forall a. a -> Maybe a
Prelude.Just (ListShards -> Maybe ListShards) -> ListShards -> Maybe ListShards
forall a b. (a -> b) -> a -> b
Prelude.$
ListShards
rq
ListShards -> (ListShards -> ListShards) -> ListShards
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListShards -> Identity ListShards
Lens ListShards ListShards (Maybe Text) (Maybe Text)
listShards_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListShards -> Identity ListShards)
-> Maybe Text -> ListShards -> ListShards
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListShards
ListShardsResponse
rs
ListShardsResponse
-> Getting (First Text) ListShardsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListShardsResponse -> Const (First Text) ListShardsResponse
Lens' ListShardsResponse (Maybe Text)
listShardsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListShardsResponse -> Const (First Text) ListShardsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListShardsResponse 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 ListShards where
type AWSResponse ListShards = ListShardsResponse
request :: ListShards -> Request ListShards
request = Service -> ListShards -> Request ListShards
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListShards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListShards)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListShards))
-> Logger
-> Service
-> Proxy ListShards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListShards)))
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 [Shard] -> Int -> ListShardsResponse
ListShardsResponse'
(Maybe Text -> Maybe [Shard] -> Int -> ListShardsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Shard] -> Int -> ListShardsResponse)
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 [Shard] -> Int -> ListShardsResponse)
-> Either String (Maybe [Shard])
-> Either String (Int -> ListShardsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Shard]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Shards" Either String (Maybe (Maybe [Shard]))
-> Maybe [Shard] -> Either String (Maybe [Shard])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Shard]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListShardsResponse)
-> Either String Int -> Either String ListShardsResponse
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 ListShards
instance Prelude.NFData ListShards
instance Core.ToHeaders ListShards where
toHeaders :: ListShards -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListShards -> 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
"Kinesis_20131202.ListShards" ::
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 ListShards where
toJSON :: ListShards -> Value
toJSON ListShards' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe ShardFilter
maxResults :: Maybe Natural
streamName :: Maybe Text
streamCreationTimestamp :: Maybe POSIX
exclusiveStartShardId :: Maybe Text
nextToken :: Maybe Text
shardFilter :: Maybe ShardFilter
$sel:maxResults:ListShards' :: ListShards -> Maybe Natural
$sel:streamName:ListShards' :: ListShards -> Maybe Text
$sel:streamCreationTimestamp:ListShards' :: ListShards -> Maybe POSIX
$sel:exclusiveStartShardId:ListShards' :: ListShards -> Maybe Text
$sel:nextToken:ListShards' :: ListShards -> Maybe Text
$sel:shardFilter:ListShards' :: ListShards -> Maybe ShardFilter
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ShardFilter" Text -> ShardFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ShardFilter -> Pair) -> Maybe ShardFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ShardFilter
shardFilter,
(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
"ExclusiveStartShardId" 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
exclusiveStartShardId,
(Text
"StreamCreationTimestamp" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
streamCreationTimestamp,
(Text
"StreamName" 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
streamName,
(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 ListShards where
toPath :: ListShards -> ByteString
toPath = ByteString -> ListShards -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListShards where
toQuery :: ListShards -> QueryString
toQuery = QueryString -> ListShards -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListShardsResponse = ListShardsResponse'
{
ListShardsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListShardsResponse -> Maybe [Shard]
shards :: Prelude.Maybe [Shard],
ListShardsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListShardsResponse -> ListShardsResponse -> Bool
(ListShardsResponse -> ListShardsResponse -> Bool)
-> (ListShardsResponse -> ListShardsResponse -> Bool)
-> Eq ListShardsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListShardsResponse -> ListShardsResponse -> Bool
$c/= :: ListShardsResponse -> ListShardsResponse -> Bool
== :: ListShardsResponse -> ListShardsResponse -> Bool
$c== :: ListShardsResponse -> ListShardsResponse -> Bool
Prelude.Eq, ReadPrec [ListShardsResponse]
ReadPrec ListShardsResponse
Int -> ReadS ListShardsResponse
ReadS [ListShardsResponse]
(Int -> ReadS ListShardsResponse)
-> ReadS [ListShardsResponse]
-> ReadPrec ListShardsResponse
-> ReadPrec [ListShardsResponse]
-> Read ListShardsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListShardsResponse]
$creadListPrec :: ReadPrec [ListShardsResponse]
readPrec :: ReadPrec ListShardsResponse
$creadPrec :: ReadPrec ListShardsResponse
readList :: ReadS [ListShardsResponse]
$creadList :: ReadS [ListShardsResponse]
readsPrec :: Int -> ReadS ListShardsResponse
$creadsPrec :: Int -> ReadS ListShardsResponse
Prelude.Read, Int -> ListShardsResponse -> ShowS
[ListShardsResponse] -> ShowS
ListShardsResponse -> String
(Int -> ListShardsResponse -> ShowS)
-> (ListShardsResponse -> String)
-> ([ListShardsResponse] -> ShowS)
-> Show ListShardsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListShardsResponse] -> ShowS
$cshowList :: [ListShardsResponse] -> ShowS
show :: ListShardsResponse -> String
$cshow :: ListShardsResponse -> String
showsPrec :: Int -> ListShardsResponse -> ShowS
$cshowsPrec :: Int -> ListShardsResponse -> ShowS
Prelude.Show, (forall x. ListShardsResponse -> Rep ListShardsResponse x)
-> (forall x. Rep ListShardsResponse x -> ListShardsResponse)
-> Generic ListShardsResponse
forall x. Rep ListShardsResponse x -> ListShardsResponse
forall x. ListShardsResponse -> Rep ListShardsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListShardsResponse x -> ListShardsResponse
$cfrom :: forall x. ListShardsResponse -> Rep ListShardsResponse x
Prelude.Generic)
newListShardsResponse ::
Prelude.Int ->
ListShardsResponse
newListShardsResponse :: Int -> ListShardsResponse
newListShardsResponse Int
pHttpStatus_ =
ListShardsResponse' :: Maybe Text -> Maybe [Shard] -> Int -> ListShardsResponse
ListShardsResponse'
{ $sel:nextToken:ListShardsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shards:ListShardsResponse' :: Maybe [Shard]
shards = Maybe [Shard]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListShardsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listShardsResponse_nextToken :: Lens.Lens' ListShardsResponse (Prelude.Maybe Prelude.Text)
listShardsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListShardsResponse -> f ListShardsResponse
listShardsResponse_nextToken = (ListShardsResponse -> Maybe Text)
-> (ListShardsResponse -> Maybe Text -> ListShardsResponse)
-> Lens' ListShardsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShardsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListShardsResponse' :: ListShardsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListShardsResponse
s@ListShardsResponse' {} Maybe Text
a -> ListShardsResponse
s {$sel:nextToken:ListShardsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListShardsResponse)
listShardsResponse_shards :: Lens.Lens' ListShardsResponse (Prelude.Maybe [Shard])
listShardsResponse_shards :: (Maybe [Shard] -> f (Maybe [Shard]))
-> ListShardsResponse -> f ListShardsResponse
listShardsResponse_shards = (ListShardsResponse -> Maybe [Shard])
-> (ListShardsResponse -> Maybe [Shard] -> ListShardsResponse)
-> Lens' ListShardsResponse (Maybe [Shard])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShardsResponse' {Maybe [Shard]
shards :: Maybe [Shard]
$sel:shards:ListShardsResponse' :: ListShardsResponse -> Maybe [Shard]
shards} -> Maybe [Shard]
shards) (\s :: ListShardsResponse
s@ListShardsResponse' {} Maybe [Shard]
a -> ListShardsResponse
s {$sel:shards:ListShardsResponse' :: Maybe [Shard]
shards = Maybe [Shard]
a} :: ListShardsResponse) ((Maybe [Shard] -> f (Maybe [Shard]))
-> ListShardsResponse -> f ListShardsResponse)
-> ((Maybe [Shard] -> f (Maybe [Shard]))
-> Maybe [Shard] -> f (Maybe [Shard]))
-> (Maybe [Shard] -> f (Maybe [Shard]))
-> ListShardsResponse
-> f ListShardsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Shard] [Shard] [Shard] [Shard]
-> Iso
(Maybe [Shard]) (Maybe [Shard]) (Maybe [Shard]) (Maybe [Shard])
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 [Shard] [Shard] [Shard] [Shard]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listShardsResponse_httpStatus :: Lens.Lens' ListShardsResponse Prelude.Int
listShardsResponse_httpStatus :: (Int -> f Int) -> ListShardsResponse -> f ListShardsResponse
listShardsResponse_httpStatus = (ListShardsResponse -> Int)
-> (ListShardsResponse -> Int -> ListShardsResponse)
-> Lens ListShardsResponse ListShardsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListShardsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListShardsResponse' :: ListShardsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListShardsResponse
s@ListShardsResponse' {} Int
a -> ListShardsResponse
s {$sel:httpStatus:ListShardsResponse' :: Int
httpStatus = Int
a} :: ListShardsResponse)
instance Prelude.NFData ListShardsResponse