{-# 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.NetworkManager.GetLinks
(
GetLinks (..),
newGetLinks,
getLinks_linkIds,
getLinks_nextToken,
getLinks_type,
getLinks_siteId,
getLinks_maxResults,
getLinks_provider,
getLinks_globalNetworkId,
GetLinksResponse (..),
newGetLinksResponse,
getLinksResponse_nextToken,
getLinksResponse_links,
getLinksResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.NetworkManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetLinks = GetLinks'
{
GetLinks -> Maybe [Text]
linkIds :: Prelude.Maybe [Prelude.Text],
GetLinks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetLinks -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
GetLinks -> Maybe Text
siteId :: Prelude.Maybe Prelude.Text,
GetLinks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetLinks -> Maybe Text
provider :: Prelude.Maybe Prelude.Text,
GetLinks -> Text
globalNetworkId :: Prelude.Text
}
deriving (GetLinks -> GetLinks -> Bool
(GetLinks -> GetLinks -> Bool)
-> (GetLinks -> GetLinks -> Bool) -> Eq GetLinks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLinks -> GetLinks -> Bool
$c/= :: GetLinks -> GetLinks -> Bool
== :: GetLinks -> GetLinks -> Bool
$c== :: GetLinks -> GetLinks -> Bool
Prelude.Eq, ReadPrec [GetLinks]
ReadPrec GetLinks
Int -> ReadS GetLinks
ReadS [GetLinks]
(Int -> ReadS GetLinks)
-> ReadS [GetLinks]
-> ReadPrec GetLinks
-> ReadPrec [GetLinks]
-> Read GetLinks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLinks]
$creadListPrec :: ReadPrec [GetLinks]
readPrec :: ReadPrec GetLinks
$creadPrec :: ReadPrec GetLinks
readList :: ReadS [GetLinks]
$creadList :: ReadS [GetLinks]
readsPrec :: Int -> ReadS GetLinks
$creadsPrec :: Int -> ReadS GetLinks
Prelude.Read, Int -> GetLinks -> ShowS
[GetLinks] -> ShowS
GetLinks -> String
(Int -> GetLinks -> ShowS)
-> (GetLinks -> String) -> ([GetLinks] -> ShowS) -> Show GetLinks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLinks] -> ShowS
$cshowList :: [GetLinks] -> ShowS
show :: GetLinks -> String
$cshow :: GetLinks -> String
showsPrec :: Int -> GetLinks -> ShowS
$cshowsPrec :: Int -> GetLinks -> ShowS
Prelude.Show, (forall x. GetLinks -> Rep GetLinks x)
-> (forall x. Rep GetLinks x -> GetLinks) -> Generic GetLinks
forall x. Rep GetLinks x -> GetLinks
forall x. GetLinks -> Rep GetLinks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLinks x -> GetLinks
$cfrom :: forall x. GetLinks -> Rep GetLinks x
Prelude.Generic)
newGetLinks ::
Prelude.Text ->
GetLinks
newGetLinks :: Text -> GetLinks
newGetLinks Text
pGlobalNetworkId_ =
GetLinks' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Text
-> GetLinks
GetLinks'
{ $sel:linkIds:GetLinks' :: Maybe [Text]
linkIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetLinks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':GetLinks' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:siteId:GetLinks' :: Maybe Text
siteId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetLinks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:provider:GetLinks' :: Maybe Text
provider = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:globalNetworkId:GetLinks' :: Text
globalNetworkId = Text
pGlobalNetworkId_
}
getLinks_linkIds :: Lens.Lens' GetLinks (Prelude.Maybe [Prelude.Text])
getLinks_linkIds :: (Maybe [Text] -> f (Maybe [Text])) -> GetLinks -> f GetLinks
getLinks_linkIds = (GetLinks -> Maybe [Text])
-> (GetLinks -> Maybe [Text] -> GetLinks)
-> Lens GetLinks GetLinks (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe [Text]
linkIds :: Maybe [Text]
$sel:linkIds:GetLinks' :: GetLinks -> Maybe [Text]
linkIds} -> Maybe [Text]
linkIds) (\s :: GetLinks
s@GetLinks' {} Maybe [Text]
a -> GetLinks
s {$sel:linkIds:GetLinks' :: Maybe [Text]
linkIds = Maybe [Text]
a} :: GetLinks) ((Maybe [Text] -> f (Maybe [Text])) -> GetLinks -> f GetLinks)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetLinks
-> f GetLinks
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
getLinks_nextToken :: Lens.Lens' GetLinks (Prelude.Maybe Prelude.Text)
getLinks_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetLinks -> f GetLinks
getLinks_nextToken = (GetLinks -> Maybe Text)
-> (GetLinks -> Maybe Text -> GetLinks)
-> Lens GetLinks GetLinks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetLinks' :: GetLinks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetLinks
s@GetLinks' {} Maybe Text
a -> GetLinks
s {$sel:nextToken:GetLinks' :: Maybe Text
nextToken = Maybe Text
a} :: GetLinks)
getLinks_type :: Lens.Lens' GetLinks (Prelude.Maybe Prelude.Text)
getLinks_type :: (Maybe Text -> f (Maybe Text)) -> GetLinks -> f GetLinks
getLinks_type = (GetLinks -> Maybe Text)
-> (GetLinks -> Maybe Text -> GetLinks)
-> Lens GetLinks GetLinks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe Text
type' :: Maybe Text
$sel:type':GetLinks' :: GetLinks -> Maybe Text
type'} -> Maybe Text
type') (\s :: GetLinks
s@GetLinks' {} Maybe Text
a -> GetLinks
s {$sel:type':GetLinks' :: Maybe Text
type' = Maybe Text
a} :: GetLinks)
getLinks_siteId :: Lens.Lens' GetLinks (Prelude.Maybe Prelude.Text)
getLinks_siteId :: (Maybe Text -> f (Maybe Text)) -> GetLinks -> f GetLinks
getLinks_siteId = (GetLinks -> Maybe Text)
-> (GetLinks -> Maybe Text -> GetLinks)
-> Lens GetLinks GetLinks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe Text
siteId :: Maybe Text
$sel:siteId:GetLinks' :: GetLinks -> Maybe Text
siteId} -> Maybe Text
siteId) (\s :: GetLinks
s@GetLinks' {} Maybe Text
a -> GetLinks
s {$sel:siteId:GetLinks' :: Maybe Text
siteId = Maybe Text
a} :: GetLinks)
getLinks_maxResults :: Lens.Lens' GetLinks (Prelude.Maybe Prelude.Natural)
getLinks_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> GetLinks -> f GetLinks
getLinks_maxResults = (GetLinks -> Maybe Natural)
-> (GetLinks -> Maybe Natural -> GetLinks)
-> Lens GetLinks GetLinks (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetLinks' :: GetLinks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetLinks
s@GetLinks' {} Maybe Natural
a -> GetLinks
s {$sel:maxResults:GetLinks' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetLinks)
getLinks_provider :: Lens.Lens' GetLinks (Prelude.Maybe Prelude.Text)
getLinks_provider :: (Maybe Text -> f (Maybe Text)) -> GetLinks -> f GetLinks
getLinks_provider = (GetLinks -> Maybe Text)
-> (GetLinks -> Maybe Text -> GetLinks)
-> Lens GetLinks GetLinks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Maybe Text
provider :: Maybe Text
$sel:provider:GetLinks' :: GetLinks -> Maybe Text
provider} -> Maybe Text
provider) (\s :: GetLinks
s@GetLinks' {} Maybe Text
a -> GetLinks
s {$sel:provider:GetLinks' :: Maybe Text
provider = Maybe Text
a} :: GetLinks)
getLinks_globalNetworkId :: Lens.Lens' GetLinks Prelude.Text
getLinks_globalNetworkId :: (Text -> f Text) -> GetLinks -> f GetLinks
getLinks_globalNetworkId = (GetLinks -> Text)
-> (GetLinks -> Text -> GetLinks)
-> Lens GetLinks GetLinks Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinks' {Text
globalNetworkId :: Text
$sel:globalNetworkId:GetLinks' :: GetLinks -> Text
globalNetworkId} -> Text
globalNetworkId) (\s :: GetLinks
s@GetLinks' {} Text
a -> GetLinks
s {$sel:globalNetworkId:GetLinks' :: Text
globalNetworkId = Text
a} :: GetLinks)
instance Core.AWSPager GetLinks where
page :: GetLinks -> AWSResponse GetLinks -> Maybe GetLinks
page GetLinks
rq AWSResponse GetLinks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetLinks
GetLinksResponse
rs
GetLinksResponse
-> Getting (First Text) GetLinksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetLinksResponse -> Const (First Text) GetLinksResponse
Lens' GetLinksResponse (Maybe Text)
getLinksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetLinksResponse -> Const (First Text) GetLinksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetLinksResponse 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 GetLinks
forall a. Maybe a
Prelude.Nothing
| Maybe [Link] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetLinks
GetLinksResponse
rs
GetLinksResponse
-> Getting (First [Link]) GetLinksResponse [Link] -> Maybe [Link]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Link] -> Const (First [Link]) (Maybe [Link]))
-> GetLinksResponse -> Const (First [Link]) GetLinksResponse
Lens' GetLinksResponse (Maybe [Link])
getLinksResponse_links ((Maybe [Link] -> Const (First [Link]) (Maybe [Link]))
-> GetLinksResponse -> Const (First [Link]) GetLinksResponse)
-> (([Link] -> Const (First [Link]) [Link])
-> Maybe [Link] -> Const (First [Link]) (Maybe [Link]))
-> Getting (First [Link]) GetLinksResponse [Link]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Link] -> Const (First [Link]) [Link])
-> Maybe [Link] -> Const (First [Link]) (Maybe [Link])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetLinks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetLinks -> Maybe GetLinks
forall a. a -> Maybe a
Prelude.Just (GetLinks -> Maybe GetLinks) -> GetLinks -> Maybe GetLinks
forall a b. (a -> b) -> a -> b
Prelude.$
GetLinks
rq
GetLinks -> (GetLinks -> GetLinks) -> GetLinks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetLinks -> Identity GetLinks
Lens GetLinks GetLinks (Maybe Text) (Maybe Text)
getLinks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetLinks -> Identity GetLinks)
-> Maybe Text -> GetLinks -> GetLinks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetLinks
GetLinksResponse
rs
GetLinksResponse
-> Getting (First Text) GetLinksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetLinksResponse -> Const (First Text) GetLinksResponse
Lens' GetLinksResponse (Maybe Text)
getLinksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetLinksResponse -> Const (First Text) GetLinksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetLinksResponse 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 GetLinks where
type AWSResponse GetLinks = GetLinksResponse
request :: GetLinks -> Request GetLinks
request = Service -> GetLinks -> Request GetLinks
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetLinks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetLinks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetLinks))
-> Logger
-> Service
-> Proxy GetLinks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetLinks)))
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 [Link] -> Int -> GetLinksResponse
GetLinksResponse'
(Maybe Text -> Maybe [Link] -> Int -> GetLinksResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Link] -> Int -> GetLinksResponse)
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 [Link] -> Int -> GetLinksResponse)
-> Either String (Maybe [Link])
-> Either String (Int -> GetLinksResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Link]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Links" Either String (Maybe (Maybe [Link]))
-> Maybe [Link] -> Either String (Maybe [Link])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Link]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> GetLinksResponse)
-> Either String Int -> Either String GetLinksResponse
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 GetLinks
instance Prelude.NFData GetLinks
instance Core.ToHeaders GetLinks where
toHeaders :: GetLinks -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetLinks -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath GetLinks where
toPath :: GetLinks -> ByteString
toPath GetLinks' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
provider :: Maybe Text
maxResults :: Maybe Natural
siteId :: Maybe Text
type' :: Maybe Text
nextToken :: Maybe Text
linkIds :: Maybe [Text]
$sel:globalNetworkId:GetLinks' :: GetLinks -> Text
$sel:provider:GetLinks' :: GetLinks -> Maybe Text
$sel:maxResults:GetLinks' :: GetLinks -> Maybe Natural
$sel:siteId:GetLinks' :: GetLinks -> Maybe Text
$sel:type':GetLinks' :: GetLinks -> Maybe Text
$sel:nextToken:GetLinks' :: GetLinks -> Maybe Text
$sel:linkIds:GetLinks' :: GetLinks -> Maybe [Text]
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/global-networks/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
globalNetworkId,
ByteString
"/links"
]
instance Core.ToQuery GetLinks where
toQuery :: GetLinks -> QueryString
toQuery GetLinks' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
provider :: Maybe Text
maxResults :: Maybe Natural
siteId :: Maybe Text
type' :: Maybe Text
nextToken :: Maybe Text
linkIds :: Maybe [Text]
$sel:globalNetworkId:GetLinks' :: GetLinks -> Text
$sel:provider:GetLinks' :: GetLinks -> Maybe Text
$sel:maxResults:GetLinks' :: GetLinks -> Maybe Natural
$sel:siteId:GetLinks' :: GetLinks -> Maybe Text
$sel:type':GetLinks' :: GetLinks -> Maybe Text
$sel:nextToken:GetLinks' :: GetLinks -> Maybe Text
$sel:linkIds:GetLinks' :: GetLinks -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"linkIds"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
linkIds),
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"type" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
type',
ByteString
"siteId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
siteId,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
ByteString
"provider" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
provider
]
data GetLinksResponse = GetLinksResponse'
{
GetLinksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetLinksResponse -> Maybe [Link]
links :: Prelude.Maybe [Link],
GetLinksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLinksResponse -> GetLinksResponse -> Bool
(GetLinksResponse -> GetLinksResponse -> Bool)
-> (GetLinksResponse -> GetLinksResponse -> Bool)
-> Eq GetLinksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLinksResponse -> GetLinksResponse -> Bool
$c/= :: GetLinksResponse -> GetLinksResponse -> Bool
== :: GetLinksResponse -> GetLinksResponse -> Bool
$c== :: GetLinksResponse -> GetLinksResponse -> Bool
Prelude.Eq, ReadPrec [GetLinksResponse]
ReadPrec GetLinksResponse
Int -> ReadS GetLinksResponse
ReadS [GetLinksResponse]
(Int -> ReadS GetLinksResponse)
-> ReadS [GetLinksResponse]
-> ReadPrec GetLinksResponse
-> ReadPrec [GetLinksResponse]
-> Read GetLinksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLinksResponse]
$creadListPrec :: ReadPrec [GetLinksResponse]
readPrec :: ReadPrec GetLinksResponse
$creadPrec :: ReadPrec GetLinksResponse
readList :: ReadS [GetLinksResponse]
$creadList :: ReadS [GetLinksResponse]
readsPrec :: Int -> ReadS GetLinksResponse
$creadsPrec :: Int -> ReadS GetLinksResponse
Prelude.Read, Int -> GetLinksResponse -> ShowS
[GetLinksResponse] -> ShowS
GetLinksResponse -> String
(Int -> GetLinksResponse -> ShowS)
-> (GetLinksResponse -> String)
-> ([GetLinksResponse] -> ShowS)
-> Show GetLinksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLinksResponse] -> ShowS
$cshowList :: [GetLinksResponse] -> ShowS
show :: GetLinksResponse -> String
$cshow :: GetLinksResponse -> String
showsPrec :: Int -> GetLinksResponse -> ShowS
$cshowsPrec :: Int -> GetLinksResponse -> ShowS
Prelude.Show, (forall x. GetLinksResponse -> Rep GetLinksResponse x)
-> (forall x. Rep GetLinksResponse x -> GetLinksResponse)
-> Generic GetLinksResponse
forall x. Rep GetLinksResponse x -> GetLinksResponse
forall x. GetLinksResponse -> Rep GetLinksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLinksResponse x -> GetLinksResponse
$cfrom :: forall x. GetLinksResponse -> Rep GetLinksResponse x
Prelude.Generic)
newGetLinksResponse ::
Prelude.Int ->
GetLinksResponse
newGetLinksResponse :: Int -> GetLinksResponse
newGetLinksResponse Int
pHttpStatus_ =
GetLinksResponse' :: Maybe Text -> Maybe [Link] -> Int -> GetLinksResponse
GetLinksResponse'
{ $sel:nextToken:GetLinksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:links:GetLinksResponse' :: Maybe [Link]
links = Maybe [Link]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLinksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLinksResponse_nextToken :: Lens.Lens' GetLinksResponse (Prelude.Maybe Prelude.Text)
getLinksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetLinksResponse -> f GetLinksResponse
getLinksResponse_nextToken = (GetLinksResponse -> Maybe Text)
-> (GetLinksResponse -> Maybe Text -> GetLinksResponse)
-> Lens' GetLinksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetLinksResponse' :: GetLinksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetLinksResponse
s@GetLinksResponse' {} Maybe Text
a -> GetLinksResponse
s {$sel:nextToken:GetLinksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetLinksResponse)
getLinksResponse_links :: Lens.Lens' GetLinksResponse (Prelude.Maybe [Link])
getLinksResponse_links :: (Maybe [Link] -> f (Maybe [Link]))
-> GetLinksResponse -> f GetLinksResponse
getLinksResponse_links = (GetLinksResponse -> Maybe [Link])
-> (GetLinksResponse -> Maybe [Link] -> GetLinksResponse)
-> Lens' GetLinksResponse (Maybe [Link])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinksResponse' {Maybe [Link]
links :: Maybe [Link]
$sel:links:GetLinksResponse' :: GetLinksResponse -> Maybe [Link]
links} -> Maybe [Link]
links) (\s :: GetLinksResponse
s@GetLinksResponse' {} Maybe [Link]
a -> GetLinksResponse
s {$sel:links:GetLinksResponse' :: Maybe [Link]
links = Maybe [Link]
a} :: GetLinksResponse) ((Maybe [Link] -> f (Maybe [Link]))
-> GetLinksResponse -> f GetLinksResponse)
-> ((Maybe [Link] -> f (Maybe [Link]))
-> Maybe [Link] -> f (Maybe [Link]))
-> (Maybe [Link] -> f (Maybe [Link]))
-> GetLinksResponse
-> f GetLinksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Link] [Link] [Link] [Link]
-> Iso (Maybe [Link]) (Maybe [Link]) (Maybe [Link]) (Maybe [Link])
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 [Link] [Link] [Link] [Link]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLinksResponse_httpStatus :: Lens.Lens' GetLinksResponse Prelude.Int
getLinksResponse_httpStatus :: (Int -> f Int) -> GetLinksResponse -> f GetLinksResponse
getLinksResponse_httpStatus = (GetLinksResponse -> Int)
-> (GetLinksResponse -> Int -> GetLinksResponse)
-> Lens GetLinksResponse GetLinksResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLinksResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLinksResponse' :: GetLinksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLinksResponse
s@GetLinksResponse' {} Int
a -> GetLinksResponse
s {$sel:httpStatus:GetLinksResponse' :: Int
httpStatus = Int
a} :: GetLinksResponse)
instance Prelude.NFData GetLinksResponse