{-# 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.KinesisVideoArchivedMedia.ListFragments
(
ListFragments (..),
newListFragments,
listFragments_fragmentSelector,
listFragments_streamARN,
listFragments_nextToken,
listFragments_streamName,
listFragments_maxResults,
ListFragmentsResponse (..),
newListFragmentsResponse,
listFragmentsResponse_nextToken,
listFragmentsResponse_fragments,
listFragmentsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.KinesisVideoArchivedMedia.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 ListFragments = ListFragments'
{
ListFragments -> Maybe FragmentSelector
fragmentSelector :: Prelude.Maybe FragmentSelector,
ListFragments -> Maybe Text
streamARN :: Prelude.Maybe Prelude.Text,
ListFragments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListFragments -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text,
ListFragments -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListFragments -> ListFragments -> Bool
(ListFragments -> ListFragments -> Bool)
-> (ListFragments -> ListFragments -> Bool) -> Eq ListFragments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFragments -> ListFragments -> Bool
$c/= :: ListFragments -> ListFragments -> Bool
== :: ListFragments -> ListFragments -> Bool
$c== :: ListFragments -> ListFragments -> Bool
Prelude.Eq, ReadPrec [ListFragments]
ReadPrec ListFragments
Int -> ReadS ListFragments
ReadS [ListFragments]
(Int -> ReadS ListFragments)
-> ReadS [ListFragments]
-> ReadPrec ListFragments
-> ReadPrec [ListFragments]
-> Read ListFragments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFragments]
$creadListPrec :: ReadPrec [ListFragments]
readPrec :: ReadPrec ListFragments
$creadPrec :: ReadPrec ListFragments
readList :: ReadS [ListFragments]
$creadList :: ReadS [ListFragments]
readsPrec :: Int -> ReadS ListFragments
$creadsPrec :: Int -> ReadS ListFragments
Prelude.Read, Int -> ListFragments -> ShowS
[ListFragments] -> ShowS
ListFragments -> String
(Int -> ListFragments -> ShowS)
-> (ListFragments -> String)
-> ([ListFragments] -> ShowS)
-> Show ListFragments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFragments] -> ShowS
$cshowList :: [ListFragments] -> ShowS
show :: ListFragments -> String
$cshow :: ListFragments -> String
showsPrec :: Int -> ListFragments -> ShowS
$cshowsPrec :: Int -> ListFragments -> ShowS
Prelude.Show, (forall x. ListFragments -> Rep ListFragments x)
-> (forall x. Rep ListFragments x -> ListFragments)
-> Generic ListFragments
forall x. Rep ListFragments x -> ListFragments
forall x. ListFragments -> Rep ListFragments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFragments x -> ListFragments
$cfrom :: forall x. ListFragments -> Rep ListFragments x
Prelude.Generic)
newListFragments ::
ListFragments
newListFragments :: ListFragments
newListFragments =
ListFragments' :: Maybe FragmentSelector
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListFragments
ListFragments'
{ $sel:fragmentSelector:ListFragments' :: Maybe FragmentSelector
fragmentSelector = Maybe FragmentSelector
forall a. Maybe a
Prelude.Nothing,
$sel:streamARN:ListFragments' :: Maybe Text
streamARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListFragments' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamName:ListFragments' :: Maybe Text
streamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListFragments' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listFragments_fragmentSelector :: Lens.Lens' ListFragments (Prelude.Maybe FragmentSelector)
listFragments_fragmentSelector :: (Maybe FragmentSelector -> f (Maybe FragmentSelector))
-> ListFragments -> f ListFragments
listFragments_fragmentSelector = (ListFragments -> Maybe FragmentSelector)
-> (ListFragments -> Maybe FragmentSelector -> ListFragments)
-> Lens
ListFragments
ListFragments
(Maybe FragmentSelector)
(Maybe FragmentSelector)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragments' {Maybe FragmentSelector
fragmentSelector :: Maybe FragmentSelector
$sel:fragmentSelector:ListFragments' :: ListFragments -> Maybe FragmentSelector
fragmentSelector} -> Maybe FragmentSelector
fragmentSelector) (\s :: ListFragments
s@ListFragments' {} Maybe FragmentSelector
a -> ListFragments
s {$sel:fragmentSelector:ListFragments' :: Maybe FragmentSelector
fragmentSelector = Maybe FragmentSelector
a} :: ListFragments)
listFragments_streamARN :: Lens.Lens' ListFragments (Prelude.Maybe Prelude.Text)
listFragments_streamARN :: (Maybe Text -> f (Maybe Text)) -> ListFragments -> f ListFragments
listFragments_streamARN = (ListFragments -> Maybe Text)
-> (ListFragments -> Maybe Text -> ListFragments)
-> Lens ListFragments ListFragments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragments' {Maybe Text
streamARN :: Maybe Text
$sel:streamARN:ListFragments' :: ListFragments -> Maybe Text
streamARN} -> Maybe Text
streamARN) (\s :: ListFragments
s@ListFragments' {} Maybe Text
a -> ListFragments
s {$sel:streamARN:ListFragments' :: Maybe Text
streamARN = Maybe Text
a} :: ListFragments)
listFragments_nextToken :: Lens.Lens' ListFragments (Prelude.Maybe Prelude.Text)
listFragments_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListFragments -> f ListFragments
listFragments_nextToken = (ListFragments -> Maybe Text)
-> (ListFragments -> Maybe Text -> ListFragments)
-> Lens ListFragments ListFragments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFragments' :: ListFragments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFragments
s@ListFragments' {} Maybe Text
a -> ListFragments
s {$sel:nextToken:ListFragments' :: Maybe Text
nextToken = Maybe Text
a} :: ListFragments)
listFragments_streamName :: Lens.Lens' ListFragments (Prelude.Maybe Prelude.Text)
listFragments_streamName :: (Maybe Text -> f (Maybe Text)) -> ListFragments -> f ListFragments
listFragments_streamName = (ListFragments -> Maybe Text)
-> (ListFragments -> Maybe Text -> ListFragments)
-> Lens ListFragments ListFragments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragments' {Maybe Text
streamName :: Maybe Text
$sel:streamName:ListFragments' :: ListFragments -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: ListFragments
s@ListFragments' {} Maybe Text
a -> ListFragments
s {$sel:streamName:ListFragments' :: Maybe Text
streamName = Maybe Text
a} :: ListFragments)
listFragments_maxResults :: Lens.Lens' ListFragments (Prelude.Maybe Prelude.Natural)
listFragments_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListFragments -> f ListFragments
listFragments_maxResults = (ListFragments -> Maybe Natural)
-> (ListFragments -> Maybe Natural -> ListFragments)
-> Lens ListFragments ListFragments (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragments' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListFragments' :: ListFragments -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListFragments
s@ListFragments' {} Maybe Natural
a -> ListFragments
s {$sel:maxResults:ListFragments' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListFragments)
instance Core.AWSPager ListFragments where
page :: ListFragments -> AWSResponse ListFragments -> Maybe ListFragments
page ListFragments
rq AWSResponse ListFragments
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListFragments
ListFragmentsResponse
rs
ListFragmentsResponse
-> Getting (First Text) ListFragmentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFragmentsResponse
-> Const (First Text) ListFragmentsResponse
Lens' ListFragmentsResponse (Maybe Text)
listFragmentsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListFragmentsResponse
-> Const (First Text) ListFragmentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFragmentsResponse 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 ListFragments
forall a. Maybe a
Prelude.Nothing
| Maybe [Fragment] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListFragments
ListFragmentsResponse
rs
ListFragmentsResponse
-> Getting (First [Fragment]) ListFragmentsResponse [Fragment]
-> Maybe [Fragment]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Fragment] -> Const (First [Fragment]) (Maybe [Fragment]))
-> ListFragmentsResponse
-> Const (First [Fragment]) ListFragmentsResponse
Lens' ListFragmentsResponse (Maybe [Fragment])
listFragmentsResponse_fragments ((Maybe [Fragment] -> Const (First [Fragment]) (Maybe [Fragment]))
-> ListFragmentsResponse
-> Const (First [Fragment]) ListFragmentsResponse)
-> (([Fragment] -> Const (First [Fragment]) [Fragment])
-> Maybe [Fragment] -> Const (First [Fragment]) (Maybe [Fragment]))
-> Getting (First [Fragment]) ListFragmentsResponse [Fragment]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Fragment] -> Const (First [Fragment]) [Fragment])
-> Maybe [Fragment] -> Const (First [Fragment]) (Maybe [Fragment])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListFragments
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListFragments -> Maybe ListFragments
forall a. a -> Maybe a
Prelude.Just (ListFragments -> Maybe ListFragments)
-> ListFragments -> Maybe ListFragments
forall a b. (a -> b) -> a -> b
Prelude.$
ListFragments
rq
ListFragments -> (ListFragments -> ListFragments) -> ListFragments
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListFragments -> Identity ListFragments
Lens ListFragments ListFragments (Maybe Text) (Maybe Text)
listFragments_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListFragments -> Identity ListFragments)
-> Maybe Text -> ListFragments -> ListFragments
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFragments
ListFragmentsResponse
rs
ListFragmentsResponse
-> Getting (First Text) ListFragmentsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFragmentsResponse
-> Const (First Text) ListFragmentsResponse
Lens' ListFragmentsResponse (Maybe Text)
listFragmentsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListFragmentsResponse
-> Const (First Text) ListFragmentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFragmentsResponse 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 ListFragments where
type
AWSResponse ListFragments =
ListFragmentsResponse
request :: ListFragments -> Request ListFragments
request = Service -> ListFragments -> Request ListFragments
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListFragments
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFragments)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListFragments))
-> Logger
-> Service
-> Proxy ListFragments
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFragments)))
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 [Fragment] -> Int -> ListFragmentsResponse
ListFragmentsResponse'
(Maybe Text -> Maybe [Fragment] -> Int -> ListFragmentsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Fragment] -> Int -> ListFragmentsResponse)
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 [Fragment] -> Int -> ListFragmentsResponse)
-> Either String (Maybe [Fragment])
-> Either String (Int -> ListFragmentsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Fragment]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Fragments" Either String (Maybe (Maybe [Fragment]))
-> Maybe [Fragment] -> Either String (Maybe [Fragment])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Fragment]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListFragmentsResponse)
-> Either String Int -> Either String ListFragmentsResponse
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 ListFragments
instance Prelude.NFData ListFragments
instance Core.ToHeaders ListFragments where
toHeaders :: ListFragments -> ResponseHeaders
toHeaders = ResponseHeaders -> ListFragments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON ListFragments where
toJSON :: ListFragments -> Value
toJSON ListFragments' {Maybe Natural
Maybe Text
Maybe FragmentSelector
maxResults :: Maybe Natural
streamName :: Maybe Text
nextToken :: Maybe Text
streamARN :: Maybe Text
fragmentSelector :: Maybe FragmentSelector
$sel:maxResults:ListFragments' :: ListFragments -> Maybe Natural
$sel:streamName:ListFragments' :: ListFragments -> Maybe Text
$sel:nextToken:ListFragments' :: ListFragments -> Maybe Text
$sel:streamARN:ListFragments' :: ListFragments -> Maybe Text
$sel:fragmentSelector:ListFragments' :: ListFragments -> Maybe FragmentSelector
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FragmentSelector" Text -> FragmentSelector -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FragmentSelector -> Pair) -> Maybe FragmentSelector -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FragmentSelector
fragmentSelector,
(Text
"StreamARN" 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
streamARN,
(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
"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 ListFragments where
toPath :: ListFragments -> ByteString
toPath = ByteString -> ListFragments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/listFragments"
instance Core.ToQuery ListFragments where
toQuery :: ListFragments -> QueryString
toQuery = QueryString -> ListFragments -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListFragmentsResponse = ListFragmentsResponse'
{
ListFragmentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListFragmentsResponse -> Maybe [Fragment]
fragments :: Prelude.Maybe [Fragment],
ListFragmentsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListFragmentsResponse -> ListFragmentsResponse -> Bool
(ListFragmentsResponse -> ListFragmentsResponse -> Bool)
-> (ListFragmentsResponse -> ListFragmentsResponse -> Bool)
-> Eq ListFragmentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFragmentsResponse -> ListFragmentsResponse -> Bool
$c/= :: ListFragmentsResponse -> ListFragmentsResponse -> Bool
== :: ListFragmentsResponse -> ListFragmentsResponse -> Bool
$c== :: ListFragmentsResponse -> ListFragmentsResponse -> Bool
Prelude.Eq, ReadPrec [ListFragmentsResponse]
ReadPrec ListFragmentsResponse
Int -> ReadS ListFragmentsResponse
ReadS [ListFragmentsResponse]
(Int -> ReadS ListFragmentsResponse)
-> ReadS [ListFragmentsResponse]
-> ReadPrec ListFragmentsResponse
-> ReadPrec [ListFragmentsResponse]
-> Read ListFragmentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFragmentsResponse]
$creadListPrec :: ReadPrec [ListFragmentsResponse]
readPrec :: ReadPrec ListFragmentsResponse
$creadPrec :: ReadPrec ListFragmentsResponse
readList :: ReadS [ListFragmentsResponse]
$creadList :: ReadS [ListFragmentsResponse]
readsPrec :: Int -> ReadS ListFragmentsResponse
$creadsPrec :: Int -> ReadS ListFragmentsResponse
Prelude.Read, Int -> ListFragmentsResponse -> ShowS
[ListFragmentsResponse] -> ShowS
ListFragmentsResponse -> String
(Int -> ListFragmentsResponse -> ShowS)
-> (ListFragmentsResponse -> String)
-> ([ListFragmentsResponse] -> ShowS)
-> Show ListFragmentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFragmentsResponse] -> ShowS
$cshowList :: [ListFragmentsResponse] -> ShowS
show :: ListFragmentsResponse -> String
$cshow :: ListFragmentsResponse -> String
showsPrec :: Int -> ListFragmentsResponse -> ShowS
$cshowsPrec :: Int -> ListFragmentsResponse -> ShowS
Prelude.Show, (forall x. ListFragmentsResponse -> Rep ListFragmentsResponse x)
-> (forall x. Rep ListFragmentsResponse x -> ListFragmentsResponse)
-> Generic ListFragmentsResponse
forall x. Rep ListFragmentsResponse x -> ListFragmentsResponse
forall x. ListFragmentsResponse -> Rep ListFragmentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFragmentsResponse x -> ListFragmentsResponse
$cfrom :: forall x. ListFragmentsResponse -> Rep ListFragmentsResponse x
Prelude.Generic)
newListFragmentsResponse ::
Prelude.Int ->
ListFragmentsResponse
newListFragmentsResponse :: Int -> ListFragmentsResponse
newListFragmentsResponse Int
pHttpStatus_ =
ListFragmentsResponse' :: Maybe Text -> Maybe [Fragment] -> Int -> ListFragmentsResponse
ListFragmentsResponse'
{ $sel:nextToken:ListFragmentsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fragments:ListFragmentsResponse' :: Maybe [Fragment]
fragments = Maybe [Fragment]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListFragmentsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listFragmentsResponse_nextToken :: Lens.Lens' ListFragmentsResponse (Prelude.Maybe Prelude.Text)
listFragmentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFragmentsResponse -> f ListFragmentsResponse
listFragmentsResponse_nextToken = (ListFragmentsResponse -> Maybe Text)
-> (ListFragmentsResponse -> Maybe Text -> ListFragmentsResponse)
-> Lens' ListFragmentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragmentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFragmentsResponse' :: ListFragmentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFragmentsResponse
s@ListFragmentsResponse' {} Maybe Text
a -> ListFragmentsResponse
s {$sel:nextToken:ListFragmentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFragmentsResponse)
listFragmentsResponse_fragments :: Lens.Lens' ListFragmentsResponse (Prelude.Maybe [Fragment])
listFragmentsResponse_fragments :: (Maybe [Fragment] -> f (Maybe [Fragment]))
-> ListFragmentsResponse -> f ListFragmentsResponse
listFragmentsResponse_fragments = (ListFragmentsResponse -> Maybe [Fragment])
-> (ListFragmentsResponse
-> Maybe [Fragment] -> ListFragmentsResponse)
-> Lens' ListFragmentsResponse (Maybe [Fragment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragmentsResponse' {Maybe [Fragment]
fragments :: Maybe [Fragment]
$sel:fragments:ListFragmentsResponse' :: ListFragmentsResponse -> Maybe [Fragment]
fragments} -> Maybe [Fragment]
fragments) (\s :: ListFragmentsResponse
s@ListFragmentsResponse' {} Maybe [Fragment]
a -> ListFragmentsResponse
s {$sel:fragments:ListFragmentsResponse' :: Maybe [Fragment]
fragments = Maybe [Fragment]
a} :: ListFragmentsResponse) ((Maybe [Fragment] -> f (Maybe [Fragment]))
-> ListFragmentsResponse -> f ListFragmentsResponse)
-> ((Maybe [Fragment] -> f (Maybe [Fragment]))
-> Maybe [Fragment] -> f (Maybe [Fragment]))
-> (Maybe [Fragment] -> f (Maybe [Fragment]))
-> ListFragmentsResponse
-> f ListFragmentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Fragment] [Fragment] [Fragment] [Fragment]
-> Iso
(Maybe [Fragment])
(Maybe [Fragment])
(Maybe [Fragment])
(Maybe [Fragment])
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 [Fragment] [Fragment] [Fragment] [Fragment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listFragmentsResponse_httpStatus :: Lens.Lens' ListFragmentsResponse Prelude.Int
listFragmentsResponse_httpStatus :: (Int -> f Int) -> ListFragmentsResponse -> f ListFragmentsResponse
listFragmentsResponse_httpStatus = (ListFragmentsResponse -> Int)
-> (ListFragmentsResponse -> Int -> ListFragmentsResponse)
-> Lens ListFragmentsResponse ListFragmentsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFragmentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListFragmentsResponse' :: ListFragmentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListFragmentsResponse
s@ListFragmentsResponse' {} Int
a -> ListFragmentsResponse
s {$sel:httpStatus:ListFragmentsResponse' :: Int
httpStatus = Int
a} :: ListFragmentsResponse)
instance Prelude.NFData ListFragmentsResponse