{-# 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.RAM.GetResourceShareAssociations
(
GetResourceShareAssociations (..),
newGetResourceShareAssociations,
getResourceShareAssociations_associationStatus,
getResourceShareAssociations_maxResults,
getResourceShareAssociations_nextToken,
getResourceShareAssociations_principal,
getResourceShareAssociations_resourceArn,
getResourceShareAssociations_resourceShareArns,
getResourceShareAssociations_associationType,
GetResourceShareAssociationsResponse (..),
newGetResourceShareAssociationsResponse,
getResourceShareAssociationsResponse_nextToken,
getResourceShareAssociationsResponse_resourceShareAssociations,
getResourceShareAssociationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RAM.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetResourceShareAssociations = GetResourceShareAssociations'
{
GetResourceShareAssociations
-> Maybe ResourceShareAssociationStatus
associationStatus :: Prelude.Maybe ResourceShareAssociationStatus,
GetResourceShareAssociations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetResourceShareAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourceShareAssociations -> Maybe Text
principal :: Prelude.Maybe Prelude.Text,
GetResourceShareAssociations -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
GetResourceShareAssociations -> Maybe [Text]
resourceShareArns :: Prelude.Maybe [Prelude.Text],
GetResourceShareAssociations -> ResourceShareAssociationType
associationType :: ResourceShareAssociationType
}
deriving (GetResourceShareAssociations
-> GetResourceShareAssociations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceShareAssociations
-> GetResourceShareAssociations -> Bool
$c/= :: GetResourceShareAssociations
-> GetResourceShareAssociations -> Bool
== :: GetResourceShareAssociations
-> GetResourceShareAssociations -> Bool
$c== :: GetResourceShareAssociations
-> GetResourceShareAssociations -> Bool
Prelude.Eq, ReadPrec [GetResourceShareAssociations]
ReadPrec GetResourceShareAssociations
Int -> ReadS GetResourceShareAssociations
ReadS [GetResourceShareAssociations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceShareAssociations]
$creadListPrec :: ReadPrec [GetResourceShareAssociations]
readPrec :: ReadPrec GetResourceShareAssociations
$creadPrec :: ReadPrec GetResourceShareAssociations
readList :: ReadS [GetResourceShareAssociations]
$creadList :: ReadS [GetResourceShareAssociations]
readsPrec :: Int -> ReadS GetResourceShareAssociations
$creadsPrec :: Int -> ReadS GetResourceShareAssociations
Prelude.Read, Int -> GetResourceShareAssociations -> ShowS
[GetResourceShareAssociations] -> ShowS
GetResourceShareAssociations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceShareAssociations] -> ShowS
$cshowList :: [GetResourceShareAssociations] -> ShowS
show :: GetResourceShareAssociations -> String
$cshow :: GetResourceShareAssociations -> String
showsPrec :: Int -> GetResourceShareAssociations -> ShowS
$cshowsPrec :: Int -> GetResourceShareAssociations -> ShowS
Prelude.Show, forall x.
Rep GetResourceShareAssociations x -> GetResourceShareAssociations
forall x.
GetResourceShareAssociations -> Rep GetResourceShareAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResourceShareAssociations x -> GetResourceShareAssociations
$cfrom :: forall x.
GetResourceShareAssociations -> Rep GetResourceShareAssociations x
Prelude.Generic)
newGetResourceShareAssociations ::
ResourceShareAssociationType ->
GetResourceShareAssociations
newGetResourceShareAssociations :: ResourceShareAssociationType -> GetResourceShareAssociations
newGetResourceShareAssociations ResourceShareAssociationType
pAssociationType_ =
GetResourceShareAssociations'
{ $sel:associationStatus:GetResourceShareAssociations' :: Maybe ResourceShareAssociationStatus
associationStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetResourceShareAssociations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetResourceShareAssociations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:principal:GetResourceShareAssociations' :: Maybe Text
principal = forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:GetResourceShareAssociations' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
$sel:resourceShareArns:GetResourceShareAssociations' :: Maybe [Text]
resourceShareArns = forall a. Maybe a
Prelude.Nothing,
$sel:associationType:GetResourceShareAssociations' :: ResourceShareAssociationType
associationType = ResourceShareAssociationType
pAssociationType_
}
getResourceShareAssociations_associationStatus :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe ResourceShareAssociationStatus)
getResourceShareAssociations_associationStatus :: Lens'
GetResourceShareAssociations (Maybe ResourceShareAssociationStatus)
getResourceShareAssociations_associationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe ResourceShareAssociationStatus
associationStatus :: Maybe ResourceShareAssociationStatus
$sel:associationStatus:GetResourceShareAssociations' :: GetResourceShareAssociations
-> Maybe ResourceShareAssociationStatus
associationStatus} -> Maybe ResourceShareAssociationStatus
associationStatus) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe ResourceShareAssociationStatus
a -> GetResourceShareAssociations
s {$sel:associationStatus:GetResourceShareAssociations' :: Maybe ResourceShareAssociationStatus
associationStatus = Maybe ResourceShareAssociationStatus
a} :: GetResourceShareAssociations)
getResourceShareAssociations_maxResults :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Natural)
getResourceShareAssociations_maxResults :: Lens' GetResourceShareAssociations (Maybe Natural)
getResourceShareAssociations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe Natural
a -> GetResourceShareAssociations
s {$sel:maxResults:GetResourceShareAssociations' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetResourceShareAssociations)
getResourceShareAssociations_nextToken :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)
getResourceShareAssociations_nextToken :: Lens' GetResourceShareAssociations (Maybe Text)
getResourceShareAssociations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe Text
a -> GetResourceShareAssociations
s {$sel:nextToken:GetResourceShareAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceShareAssociations)
getResourceShareAssociations_principal :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)
getResourceShareAssociations_principal :: Lens' GetResourceShareAssociations (Maybe Text)
getResourceShareAssociations_principal = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe Text
principal :: Maybe Text
$sel:principal:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
principal} -> Maybe Text
principal) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe Text
a -> GetResourceShareAssociations
s {$sel:principal:GetResourceShareAssociations' :: Maybe Text
principal = Maybe Text
a} :: GetResourceShareAssociations)
getResourceShareAssociations_resourceArn :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)
getResourceShareAssociations_resourceArn :: Lens' GetResourceShareAssociations (Maybe Text)
getResourceShareAssociations_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe Text
a -> GetResourceShareAssociations
s {$sel:resourceArn:GetResourceShareAssociations' :: Maybe Text
resourceArn = Maybe Text
a} :: GetResourceShareAssociations)
getResourceShareAssociations_resourceShareArns :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe [Prelude.Text])
getResourceShareAssociations_resourceShareArns :: Lens' GetResourceShareAssociations (Maybe [Text])
getResourceShareAssociations_resourceShareArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {Maybe [Text]
resourceShareArns :: Maybe [Text]
$sel:resourceShareArns:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe [Text]
resourceShareArns} -> Maybe [Text]
resourceShareArns) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} Maybe [Text]
a -> GetResourceShareAssociations
s {$sel:resourceShareArns:GetResourceShareAssociations' :: Maybe [Text]
resourceShareArns = Maybe [Text]
a} :: GetResourceShareAssociations) 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
getResourceShareAssociations_associationType :: Lens.Lens' GetResourceShareAssociations ResourceShareAssociationType
getResourceShareAssociations_associationType :: Lens' GetResourceShareAssociations ResourceShareAssociationType
getResourceShareAssociations_associationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociations' {ResourceShareAssociationType
associationType :: ResourceShareAssociationType
$sel:associationType:GetResourceShareAssociations' :: GetResourceShareAssociations -> ResourceShareAssociationType
associationType} -> ResourceShareAssociationType
associationType) (\s :: GetResourceShareAssociations
s@GetResourceShareAssociations' {} ResourceShareAssociationType
a -> GetResourceShareAssociations
s {$sel:associationType:GetResourceShareAssociations' :: ResourceShareAssociationType
associationType = ResourceShareAssociationType
a} :: GetResourceShareAssociations)
instance Core.AWSPager GetResourceShareAssociations where
page :: GetResourceShareAssociations
-> AWSResponse GetResourceShareAssociations
-> Maybe GetResourceShareAssociations
page GetResourceShareAssociations
rq AWSResponse GetResourceShareAssociations
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetResourceShareAssociations
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetResourceShareAssociationsResponse (Maybe Text)
getResourceShareAssociationsResponse_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 GetResourceShareAssociations
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
GetResourceShareAssociationsResponse
(Maybe [ResourceShareAssociation])
getResourceShareAssociationsResponse_resourceShareAssociations
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.$ GetResourceShareAssociations
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetResourceShareAssociations (Maybe Text)
getResourceShareAssociations_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetResourceShareAssociations
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetResourceShareAssociationsResponse (Maybe Text)
getResourceShareAssociationsResponse_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 GetResourceShareAssociations where
type
AWSResponse GetResourceShareAssociations =
GetResourceShareAssociationsResponse
request :: (Service -> Service)
-> GetResourceShareAssociations
-> Request GetResourceShareAssociations
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetResourceShareAssociations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetResourceShareAssociations)))
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 [ResourceShareAssociation]
-> Int
-> GetResourceShareAssociationsResponse
GetResourceShareAssociationsResponse'
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
"resourceShareAssociations"
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
GetResourceShareAssociations
where
hashWithSalt :: Int -> GetResourceShareAssociations -> Int
hashWithSalt Int
_salt GetResourceShareAssociations' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ResourceShareAssociationStatus
ResourceShareAssociationType
associationType :: ResourceShareAssociationType
resourceShareArns :: Maybe [Text]
resourceArn :: Maybe Text
principal :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
associationStatus :: Maybe ResourceShareAssociationStatus
$sel:associationType:GetResourceShareAssociations' :: GetResourceShareAssociations -> ResourceShareAssociationType
$sel:resourceShareArns:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe [Text]
$sel:resourceArn:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:principal:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:nextToken:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:maxResults:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Natural
$sel:associationStatus:GetResourceShareAssociations' :: GetResourceShareAssociations
-> Maybe ResourceShareAssociationStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceShareAssociationStatus
associationStatus
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
principal
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourceShareArns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceShareAssociationType
associationType
instance Prelude.NFData GetResourceShareAssociations where
rnf :: GetResourceShareAssociations -> ()
rnf GetResourceShareAssociations' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ResourceShareAssociationStatus
ResourceShareAssociationType
associationType :: ResourceShareAssociationType
resourceShareArns :: Maybe [Text]
resourceArn :: Maybe Text
principal :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
associationStatus :: Maybe ResourceShareAssociationStatus
$sel:associationType:GetResourceShareAssociations' :: GetResourceShareAssociations -> ResourceShareAssociationType
$sel:resourceShareArns:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe [Text]
$sel:resourceArn:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:principal:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:nextToken:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:maxResults:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Natural
$sel:associationStatus:GetResourceShareAssociations' :: GetResourceShareAssociations
-> Maybe ResourceShareAssociationStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceShareAssociationStatus
associationStatus
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
principal
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]
resourceShareArns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceShareAssociationType
associationType
instance Data.ToHeaders GetResourceShareAssociations where
toHeaders :: GetResourceShareAssociations -> 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.ToJSON GetResourceShareAssociations where
toJSON :: GetResourceShareAssociations -> Value
toJSON GetResourceShareAssociations' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe ResourceShareAssociationStatus
ResourceShareAssociationType
associationType :: ResourceShareAssociationType
resourceShareArns :: Maybe [Text]
resourceArn :: Maybe Text
principal :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
associationStatus :: Maybe ResourceShareAssociationStatus
$sel:associationType:GetResourceShareAssociations' :: GetResourceShareAssociations -> ResourceShareAssociationType
$sel:resourceShareArns:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe [Text]
$sel:resourceArn:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:principal:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:nextToken:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Text
$sel:maxResults:GetResourceShareAssociations' :: GetResourceShareAssociations -> Maybe Natural
$sel:associationStatus:GetResourceShareAssociations' :: GetResourceShareAssociations
-> Maybe ResourceShareAssociationStatus
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"associationStatus" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceShareAssociationStatus
associationStatus,
(Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Key
"principal" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
principal,
(Key
"resourceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceArn,
(Key
"resourceShareArns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceShareArns,
forall a. a -> Maybe a
Prelude.Just
(Key
"associationType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ResourceShareAssociationType
associationType)
]
)
instance Data.ToPath GetResourceShareAssociations where
toPath :: GetResourceShareAssociations -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/getresourceshareassociations"
instance Data.ToQuery GetResourceShareAssociations where
toQuery :: GetResourceShareAssociations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetResourceShareAssociationsResponse = GetResourceShareAssociationsResponse'
{
GetResourceShareAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourceShareAssociationsResponse
-> Maybe [ResourceShareAssociation]
resourceShareAssociations :: Prelude.Maybe [ResourceShareAssociation],
GetResourceShareAssociationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetResourceShareAssociationsResponse
-> GetResourceShareAssociationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceShareAssociationsResponse
-> GetResourceShareAssociationsResponse -> Bool
$c/= :: GetResourceShareAssociationsResponse
-> GetResourceShareAssociationsResponse -> Bool
== :: GetResourceShareAssociationsResponse
-> GetResourceShareAssociationsResponse -> Bool
$c== :: GetResourceShareAssociationsResponse
-> GetResourceShareAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [GetResourceShareAssociationsResponse]
ReadPrec GetResourceShareAssociationsResponse
Int -> ReadS GetResourceShareAssociationsResponse
ReadS [GetResourceShareAssociationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceShareAssociationsResponse]
$creadListPrec :: ReadPrec [GetResourceShareAssociationsResponse]
readPrec :: ReadPrec GetResourceShareAssociationsResponse
$creadPrec :: ReadPrec GetResourceShareAssociationsResponse
readList :: ReadS [GetResourceShareAssociationsResponse]
$creadList :: ReadS [GetResourceShareAssociationsResponse]
readsPrec :: Int -> ReadS GetResourceShareAssociationsResponse
$creadsPrec :: Int -> ReadS GetResourceShareAssociationsResponse
Prelude.Read, Int -> GetResourceShareAssociationsResponse -> ShowS
[GetResourceShareAssociationsResponse] -> ShowS
GetResourceShareAssociationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceShareAssociationsResponse] -> ShowS
$cshowList :: [GetResourceShareAssociationsResponse] -> ShowS
show :: GetResourceShareAssociationsResponse -> String
$cshow :: GetResourceShareAssociationsResponse -> String
showsPrec :: Int -> GetResourceShareAssociationsResponse -> ShowS
$cshowsPrec :: Int -> GetResourceShareAssociationsResponse -> ShowS
Prelude.Show, forall x.
Rep GetResourceShareAssociationsResponse x
-> GetResourceShareAssociationsResponse
forall x.
GetResourceShareAssociationsResponse
-> Rep GetResourceShareAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResourceShareAssociationsResponse x
-> GetResourceShareAssociationsResponse
$cfrom :: forall x.
GetResourceShareAssociationsResponse
-> Rep GetResourceShareAssociationsResponse x
Prelude.Generic)
newGetResourceShareAssociationsResponse ::
Prelude.Int ->
GetResourceShareAssociationsResponse
newGetResourceShareAssociationsResponse :: Int -> GetResourceShareAssociationsResponse
newGetResourceShareAssociationsResponse Int
pHttpStatus_ =
GetResourceShareAssociationsResponse'
{ $sel:nextToken:GetResourceShareAssociationsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:resourceShareAssociations:GetResourceShareAssociationsResponse' :: Maybe [ResourceShareAssociation]
resourceShareAssociations =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetResourceShareAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getResourceShareAssociationsResponse_nextToken :: Lens.Lens' GetResourceShareAssociationsResponse (Prelude.Maybe Prelude.Text)
getResourceShareAssociationsResponse_nextToken :: Lens' GetResourceShareAssociationsResponse (Maybe Text)
getResourceShareAssociationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceShareAssociationsResponse
s@GetResourceShareAssociationsResponse' {} Maybe Text
a -> GetResourceShareAssociationsResponse
s {$sel:nextToken:GetResourceShareAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceShareAssociationsResponse)
getResourceShareAssociationsResponse_resourceShareAssociations :: Lens.Lens' GetResourceShareAssociationsResponse (Prelude.Maybe [ResourceShareAssociation])
getResourceShareAssociationsResponse_resourceShareAssociations :: Lens'
GetResourceShareAssociationsResponse
(Maybe [ResourceShareAssociation])
getResourceShareAssociationsResponse_resourceShareAssociations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociationsResponse' {Maybe [ResourceShareAssociation]
resourceShareAssociations :: Maybe [ResourceShareAssociation]
$sel:resourceShareAssociations:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse
-> Maybe [ResourceShareAssociation]
resourceShareAssociations} -> Maybe [ResourceShareAssociation]
resourceShareAssociations) (\s :: GetResourceShareAssociationsResponse
s@GetResourceShareAssociationsResponse' {} Maybe [ResourceShareAssociation]
a -> GetResourceShareAssociationsResponse
s {$sel:resourceShareAssociations:GetResourceShareAssociationsResponse' :: Maybe [ResourceShareAssociation]
resourceShareAssociations = Maybe [ResourceShareAssociation]
a} :: GetResourceShareAssociationsResponse) 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
getResourceShareAssociationsResponse_httpStatus :: Lens.Lens' GetResourceShareAssociationsResponse Prelude.Int
getResourceShareAssociationsResponse_httpStatus :: Lens' GetResourceShareAssociationsResponse Int
getResourceShareAssociationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShareAssociationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResourceShareAssociationsResponse
s@GetResourceShareAssociationsResponse' {} Int
a -> GetResourceShareAssociationsResponse
s {$sel:httpStatus:GetResourceShareAssociationsResponse' :: Int
httpStatus = Int
a} :: GetResourceShareAssociationsResponse)
instance
Prelude.NFData
GetResourceShareAssociationsResponse
where
rnf :: GetResourceShareAssociationsResponse -> ()
rnf GetResourceShareAssociationsResponse' {Int
Maybe [ResourceShareAssociation]
Maybe Text
httpStatus :: Int
resourceShareAssociations :: Maybe [ResourceShareAssociation]
nextToken :: Maybe Text
$sel:httpStatus:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse -> Int
$sel:resourceShareAssociations:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse
-> Maybe [ResourceShareAssociation]
$sel:nextToken:GetResourceShareAssociationsResponse' :: GetResourceShareAssociationsResponse -> 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 [ResourceShareAssociation]
resourceShareAssociations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus