{-# 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.GetNetworkResourceRelationships
(
GetNetworkResourceRelationships (..),
newGetNetworkResourceRelationships,
getNetworkResourceRelationships_accountId,
getNetworkResourceRelationships_awsRegion,
getNetworkResourceRelationships_coreNetworkId,
getNetworkResourceRelationships_maxResults,
getNetworkResourceRelationships_nextToken,
getNetworkResourceRelationships_registeredGatewayArn,
getNetworkResourceRelationships_resourceArn,
getNetworkResourceRelationships_resourceType,
getNetworkResourceRelationships_globalNetworkId,
GetNetworkResourceRelationshipsResponse (..),
newGetNetworkResourceRelationshipsResponse,
getNetworkResourceRelationshipsResponse_nextToken,
getNetworkResourceRelationshipsResponse_relationships,
getNetworkResourceRelationshipsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetNetworkResourceRelationships = GetNetworkResourceRelationships'
{
GetNetworkResourceRelationships -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Text
awsRegion :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Text
coreNetworkId :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetNetworkResourceRelationships -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Text
registeredGatewayArn :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationships -> Text
globalNetworkId :: Prelude.Text
}
deriving (GetNetworkResourceRelationships
-> GetNetworkResourceRelationships -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetNetworkResourceRelationships
-> GetNetworkResourceRelationships -> Bool
$c/= :: GetNetworkResourceRelationships
-> GetNetworkResourceRelationships -> Bool
== :: GetNetworkResourceRelationships
-> GetNetworkResourceRelationships -> Bool
$c== :: GetNetworkResourceRelationships
-> GetNetworkResourceRelationships -> Bool
Prelude.Eq, ReadPrec [GetNetworkResourceRelationships]
ReadPrec GetNetworkResourceRelationships
Int -> ReadS GetNetworkResourceRelationships
ReadS [GetNetworkResourceRelationships]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetNetworkResourceRelationships]
$creadListPrec :: ReadPrec [GetNetworkResourceRelationships]
readPrec :: ReadPrec GetNetworkResourceRelationships
$creadPrec :: ReadPrec GetNetworkResourceRelationships
readList :: ReadS [GetNetworkResourceRelationships]
$creadList :: ReadS [GetNetworkResourceRelationships]
readsPrec :: Int -> ReadS GetNetworkResourceRelationships
$creadsPrec :: Int -> ReadS GetNetworkResourceRelationships
Prelude.Read, Int -> GetNetworkResourceRelationships -> ShowS
[GetNetworkResourceRelationships] -> ShowS
GetNetworkResourceRelationships -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetNetworkResourceRelationships] -> ShowS
$cshowList :: [GetNetworkResourceRelationships] -> ShowS
show :: GetNetworkResourceRelationships -> String
$cshow :: GetNetworkResourceRelationships -> String
showsPrec :: Int -> GetNetworkResourceRelationships -> ShowS
$cshowsPrec :: Int -> GetNetworkResourceRelationships -> ShowS
Prelude.Show, forall x.
Rep GetNetworkResourceRelationships x
-> GetNetworkResourceRelationships
forall x.
GetNetworkResourceRelationships
-> Rep GetNetworkResourceRelationships x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetNetworkResourceRelationships x
-> GetNetworkResourceRelationships
$cfrom :: forall x.
GetNetworkResourceRelationships
-> Rep GetNetworkResourceRelationships x
Prelude.Generic)
newGetNetworkResourceRelationships ::
Prelude.Text ->
GetNetworkResourceRelationships
newGetNetworkResourceRelationships :: Text -> GetNetworkResourceRelationships
newGetNetworkResourceRelationships Text
pGlobalNetworkId_ =
GetNetworkResourceRelationships'
{ $sel:accountId:GetNetworkResourceRelationships' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:awsRegion:GetNetworkResourceRelationships' :: Maybe Text
awsRegion = forall a. Maybe a
Prelude.Nothing,
$sel:coreNetworkId:GetNetworkResourceRelationships' :: Maybe Text
coreNetworkId = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetNetworkResourceRelationships' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetNetworkResourceRelationships' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: Maybe Text
registeredGatewayArn = forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:GetNetworkResourceRelationships' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:GetNetworkResourceRelationships' :: Maybe Text
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:globalNetworkId:GetNetworkResourceRelationships' :: Text
globalNetworkId = Text
pGlobalNetworkId_
}
getNetworkResourceRelationships_accountId :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_accountId :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
accountId :: Maybe Text
$sel:accountId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:accountId:GetNetworkResourceRelationships' :: Maybe Text
accountId = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_awsRegion :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_awsRegion :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_awsRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
awsRegion :: Maybe Text
$sel:awsRegion:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
awsRegion} -> Maybe Text
awsRegion) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:awsRegion:GetNetworkResourceRelationships' :: Maybe Text
awsRegion = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_coreNetworkId :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_coreNetworkId :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_coreNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
coreNetworkId :: Maybe Text
$sel:coreNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
coreNetworkId} -> Maybe Text
coreNetworkId) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:coreNetworkId:GetNetworkResourceRelationships' :: Maybe Text
coreNetworkId = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_maxResults :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Natural)
getNetworkResourceRelationships_maxResults :: Lens' GetNetworkResourceRelationships (Maybe Natural)
getNetworkResourceRelationships_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Natural
a -> GetNetworkResourceRelationships
s {$sel:maxResults:GetNetworkResourceRelationships' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_nextToken :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_nextToken :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:nextToken:GetNetworkResourceRelationships' :: Maybe Text
nextToken = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_registeredGatewayArn :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_registeredGatewayArn :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_registeredGatewayArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
registeredGatewayArn :: Maybe Text
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
registeredGatewayArn} -> Maybe Text
registeredGatewayArn) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: Maybe Text
registeredGatewayArn = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_resourceArn :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_resourceArn :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:resourceArn:GetNetworkResourceRelationships' :: Maybe Text
resourceArn = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_resourceType :: Lens.Lens' GetNetworkResourceRelationships (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationships_resourceType :: Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Maybe Text
a -> GetNetworkResourceRelationships
s {$sel:resourceType:GetNetworkResourceRelationships' :: Maybe Text
resourceType = Maybe Text
a} :: GetNetworkResourceRelationships)
getNetworkResourceRelationships_globalNetworkId :: Lens.Lens' GetNetworkResourceRelationships Prelude.Text
getNetworkResourceRelationships_globalNetworkId :: Lens' GetNetworkResourceRelationships Text
getNetworkResourceRelationships_globalNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationships' {Text
globalNetworkId :: Text
$sel:globalNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Text
globalNetworkId} -> Text
globalNetworkId) (\s :: GetNetworkResourceRelationships
s@GetNetworkResourceRelationships' {} Text
a -> GetNetworkResourceRelationships
s {$sel:globalNetworkId:GetNetworkResourceRelationships' :: Text
globalNetworkId = Text
a} :: GetNetworkResourceRelationships)
instance
Core.AWSPager
GetNetworkResourceRelationships
where
page :: GetNetworkResourceRelationships
-> AWSResponse GetNetworkResourceRelationships
-> Maybe GetNetworkResourceRelationships
page GetNetworkResourceRelationships
rq AWSResponse GetNetworkResourceRelationships
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetNetworkResourceRelationships
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetNetworkResourceRelationshipsResponse (Maybe Text)
getNetworkResourceRelationshipsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetNetworkResourceRelationships
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
GetNetworkResourceRelationshipsResponse (Maybe [Relationship])
getNetworkResourceRelationshipsResponse_relationships
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ GetNetworkResourceRelationships
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetNetworkResourceRelationships (Maybe Text)
getNetworkResourceRelationships_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetNetworkResourceRelationships
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetNetworkResourceRelationshipsResponse (Maybe Text)
getNetworkResourceRelationshipsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
GetNetworkResourceRelationships
where
type
AWSResponse GetNetworkResourceRelationships =
GetNetworkResourceRelationshipsResponse
request :: (Service -> Service)
-> GetNetworkResourceRelationships
-> Request GetNetworkResourceRelationships
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetNetworkResourceRelationships
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetNetworkResourceRelationships)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [Relationship]
-> Int
-> GetNetworkResourceRelationshipsResponse
GetNetworkResourceRelationshipsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Relationships" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
GetNetworkResourceRelationships
where
hashWithSalt :: Int -> GetNetworkResourceRelationships -> Int
hashWithSalt
Int
_salt
GetNetworkResourceRelationships' {Maybe Natural
Maybe Text
Text
globalNetworkId :: Text
resourceType :: Maybe Text
resourceArn :: Maybe Text
registeredGatewayArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
coreNetworkId :: Maybe Text
awsRegion :: Maybe Text
accountId :: Maybe Text
$sel:globalNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Text
$sel:resourceType:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:resourceArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:nextToken:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:maxResults:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Natural
$sel:coreNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:awsRegion:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:accountId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsRegion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registeredGatewayArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
globalNetworkId
instance
Prelude.NFData
GetNetworkResourceRelationships
where
rnf :: GetNetworkResourceRelationships -> ()
rnf GetNetworkResourceRelationships' {Maybe Natural
Maybe Text
Text
globalNetworkId :: Text
resourceType :: Maybe Text
resourceArn :: Maybe Text
registeredGatewayArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
coreNetworkId :: Maybe Text
awsRegion :: Maybe Text
accountId :: Maybe Text
$sel:globalNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Text
$sel:resourceType:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:resourceArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:nextToken:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:maxResults:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Natural
$sel:coreNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:awsRegion:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:accountId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsRegion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registeredGatewayArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
globalNetworkId
instance
Data.ToHeaders
GetNetworkResourceRelationships
where
toHeaders :: GetNetworkResourceRelationships -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetNetworkResourceRelationships where
toPath :: GetNetworkResourceRelationships -> ByteString
toPath GetNetworkResourceRelationships' {Maybe Natural
Maybe Text
Text
globalNetworkId :: Text
resourceType :: Maybe Text
resourceArn :: Maybe Text
registeredGatewayArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
coreNetworkId :: Maybe Text
awsRegion :: Maybe Text
accountId :: Maybe Text
$sel:globalNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Text
$sel:resourceType:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:resourceArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:nextToken:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:maxResults:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Natural
$sel:coreNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:awsRegion:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:accountId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/global-networks/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
globalNetworkId,
ByteString
"/network-resource-relationships"
]
instance Data.ToQuery GetNetworkResourceRelationships where
toQuery :: GetNetworkResourceRelationships -> QueryString
toQuery GetNetworkResourceRelationships' {Maybe Natural
Maybe Text
Text
globalNetworkId :: Text
resourceType :: Maybe Text
resourceArn :: Maybe Text
registeredGatewayArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
coreNetworkId :: Maybe Text
awsRegion :: Maybe Text
accountId :: Maybe Text
$sel:globalNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Text
$sel:resourceType:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:resourceArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:registeredGatewayArn:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:nextToken:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:maxResults:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Natural
$sel:coreNetworkId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:awsRegion:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
$sel:accountId:GetNetworkResourceRelationships' :: GetNetworkResourceRelationships -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"accountId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
accountId,
ByteString
"awsRegion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
awsRegion,
ByteString
"coreNetworkId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
coreNetworkId,
ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"registeredGatewayArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
registeredGatewayArn,
ByteString
"resourceArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
resourceArn,
ByteString
"resourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
resourceType
]
data GetNetworkResourceRelationshipsResponse = GetNetworkResourceRelationshipsResponse'
{
GetNetworkResourceRelationshipsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetNetworkResourceRelationshipsResponse -> Maybe [Relationship]
relationships :: Prelude.Maybe [Relationship],
GetNetworkResourceRelationshipsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetNetworkResourceRelationshipsResponse
-> GetNetworkResourceRelationshipsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetNetworkResourceRelationshipsResponse
-> GetNetworkResourceRelationshipsResponse -> Bool
$c/= :: GetNetworkResourceRelationshipsResponse
-> GetNetworkResourceRelationshipsResponse -> Bool
== :: GetNetworkResourceRelationshipsResponse
-> GetNetworkResourceRelationshipsResponse -> Bool
$c== :: GetNetworkResourceRelationshipsResponse
-> GetNetworkResourceRelationshipsResponse -> Bool
Prelude.Eq, ReadPrec [GetNetworkResourceRelationshipsResponse]
ReadPrec GetNetworkResourceRelationshipsResponse
Int -> ReadS GetNetworkResourceRelationshipsResponse
ReadS [GetNetworkResourceRelationshipsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetNetworkResourceRelationshipsResponse]
$creadListPrec :: ReadPrec [GetNetworkResourceRelationshipsResponse]
readPrec :: ReadPrec GetNetworkResourceRelationshipsResponse
$creadPrec :: ReadPrec GetNetworkResourceRelationshipsResponse
readList :: ReadS [GetNetworkResourceRelationshipsResponse]
$creadList :: ReadS [GetNetworkResourceRelationshipsResponse]
readsPrec :: Int -> ReadS GetNetworkResourceRelationshipsResponse
$creadsPrec :: Int -> ReadS GetNetworkResourceRelationshipsResponse
Prelude.Read, Int -> GetNetworkResourceRelationshipsResponse -> ShowS
[GetNetworkResourceRelationshipsResponse] -> ShowS
GetNetworkResourceRelationshipsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetNetworkResourceRelationshipsResponse] -> ShowS
$cshowList :: [GetNetworkResourceRelationshipsResponse] -> ShowS
show :: GetNetworkResourceRelationshipsResponse -> String
$cshow :: GetNetworkResourceRelationshipsResponse -> String
showsPrec :: Int -> GetNetworkResourceRelationshipsResponse -> ShowS
$cshowsPrec :: Int -> GetNetworkResourceRelationshipsResponse -> ShowS
Prelude.Show, forall x.
Rep GetNetworkResourceRelationshipsResponse x
-> GetNetworkResourceRelationshipsResponse
forall x.
GetNetworkResourceRelationshipsResponse
-> Rep GetNetworkResourceRelationshipsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetNetworkResourceRelationshipsResponse x
-> GetNetworkResourceRelationshipsResponse
$cfrom :: forall x.
GetNetworkResourceRelationshipsResponse
-> Rep GetNetworkResourceRelationshipsResponse x
Prelude.Generic)
newGetNetworkResourceRelationshipsResponse ::
Prelude.Int ->
GetNetworkResourceRelationshipsResponse
newGetNetworkResourceRelationshipsResponse :: Int -> GetNetworkResourceRelationshipsResponse
newGetNetworkResourceRelationshipsResponse
Int
pHttpStatus_ =
GetNetworkResourceRelationshipsResponse'
{ $sel:nextToken:GetNetworkResourceRelationshipsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:relationships:GetNetworkResourceRelationshipsResponse' :: Maybe [Relationship]
relationships = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetNetworkResourceRelationshipsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getNetworkResourceRelationshipsResponse_nextToken :: Lens.Lens' GetNetworkResourceRelationshipsResponse (Prelude.Maybe Prelude.Text)
getNetworkResourceRelationshipsResponse_nextToken :: Lens' GetNetworkResourceRelationshipsResponse (Maybe Text)
getNetworkResourceRelationshipsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationshipsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetNetworkResourceRelationshipsResponse
s@GetNetworkResourceRelationshipsResponse' {} Maybe Text
a -> GetNetworkResourceRelationshipsResponse
s {$sel:nextToken:GetNetworkResourceRelationshipsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetNetworkResourceRelationshipsResponse)
getNetworkResourceRelationshipsResponse_relationships :: Lens.Lens' GetNetworkResourceRelationshipsResponse (Prelude.Maybe [Relationship])
getNetworkResourceRelationshipsResponse_relationships :: Lens'
GetNetworkResourceRelationshipsResponse (Maybe [Relationship])
getNetworkResourceRelationshipsResponse_relationships = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationshipsResponse' {Maybe [Relationship]
relationships :: Maybe [Relationship]
$sel:relationships:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Maybe [Relationship]
relationships} -> Maybe [Relationship]
relationships) (\s :: GetNetworkResourceRelationshipsResponse
s@GetNetworkResourceRelationshipsResponse' {} Maybe [Relationship]
a -> GetNetworkResourceRelationshipsResponse
s {$sel:relationships:GetNetworkResourceRelationshipsResponse' :: Maybe [Relationship]
relationships = Maybe [Relationship]
a} :: GetNetworkResourceRelationshipsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getNetworkResourceRelationshipsResponse_httpStatus :: Lens.Lens' GetNetworkResourceRelationshipsResponse Prelude.Int
getNetworkResourceRelationshipsResponse_httpStatus :: Lens' GetNetworkResourceRelationshipsResponse Int
getNetworkResourceRelationshipsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetNetworkResourceRelationshipsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetNetworkResourceRelationshipsResponse
s@GetNetworkResourceRelationshipsResponse' {} Int
a -> GetNetworkResourceRelationshipsResponse
s {$sel:httpStatus:GetNetworkResourceRelationshipsResponse' :: Int
httpStatus = Int
a} :: GetNetworkResourceRelationshipsResponse)
instance
Prelude.NFData
GetNetworkResourceRelationshipsResponse
where
rnf :: GetNetworkResourceRelationshipsResponse -> ()
rnf GetNetworkResourceRelationshipsResponse' {Int
Maybe [Relationship]
Maybe Text
httpStatus :: Int
relationships :: Maybe [Relationship]
nextToken :: Maybe Text
$sel:httpStatus:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Int
$sel:relationships:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Maybe [Relationship]
$sel:nextToken:GetNetworkResourceRelationshipsResponse' :: GetNetworkResourceRelationshipsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Relationship]
relationships
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus