{-# 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.GetResourceShares
(
GetResourceShares (..),
newGetResourceShares,
getResourceShares_maxResults,
getResourceShares_name,
getResourceShares_nextToken,
getResourceShares_permissionArn,
getResourceShares_resourceShareArns,
getResourceShares_resourceShareStatus,
getResourceShares_tagFilters,
getResourceShares_resourceOwner,
GetResourceSharesResponse (..),
newGetResourceSharesResponse,
getResourceSharesResponse_nextToken,
getResourceSharesResponse_resourceShares,
getResourceSharesResponse_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 GetResourceShares = GetResourceShares'
{
GetResourceShares -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetResourceShares -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GetResourceShares -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourceShares -> Maybe Text
permissionArn :: Prelude.Maybe Prelude.Text,
GetResourceShares -> Maybe [Text]
resourceShareArns :: Prelude.Maybe [Prelude.Text],
GetResourceShares -> Maybe ResourceShareStatus
resourceShareStatus :: Prelude.Maybe ResourceShareStatus,
GetResourceShares -> Maybe [TagFilter]
tagFilters :: Prelude.Maybe [TagFilter],
GetResourceShares -> ResourceOwner
resourceOwner :: ResourceOwner
}
deriving (GetResourceShares -> GetResourceShares -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceShares -> GetResourceShares -> Bool
$c/= :: GetResourceShares -> GetResourceShares -> Bool
== :: GetResourceShares -> GetResourceShares -> Bool
$c== :: GetResourceShares -> GetResourceShares -> Bool
Prelude.Eq, ReadPrec [GetResourceShares]
ReadPrec GetResourceShares
Int -> ReadS GetResourceShares
ReadS [GetResourceShares]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceShares]
$creadListPrec :: ReadPrec [GetResourceShares]
readPrec :: ReadPrec GetResourceShares
$creadPrec :: ReadPrec GetResourceShares
readList :: ReadS [GetResourceShares]
$creadList :: ReadS [GetResourceShares]
readsPrec :: Int -> ReadS GetResourceShares
$creadsPrec :: Int -> ReadS GetResourceShares
Prelude.Read, Int -> GetResourceShares -> ShowS
[GetResourceShares] -> ShowS
GetResourceShares -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceShares] -> ShowS
$cshowList :: [GetResourceShares] -> ShowS
show :: GetResourceShares -> String
$cshow :: GetResourceShares -> String
showsPrec :: Int -> GetResourceShares -> ShowS
$cshowsPrec :: Int -> GetResourceShares -> ShowS
Prelude.Show, forall x. Rep GetResourceShares x -> GetResourceShares
forall x. GetResourceShares -> Rep GetResourceShares x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResourceShares x -> GetResourceShares
$cfrom :: forall x. GetResourceShares -> Rep GetResourceShares x
Prelude.Generic)
newGetResourceShares ::
ResourceOwner ->
GetResourceShares
newGetResourceShares :: ResourceOwner -> GetResourceShares
newGetResourceShares ResourceOwner
pResourceOwner_ =
GetResourceShares'
{ $sel:maxResults:GetResourceShares' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:name:GetResourceShares' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetResourceShares' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:permissionArn:GetResourceShares' :: Maybe Text
permissionArn = forall a. Maybe a
Prelude.Nothing,
$sel:resourceShareArns:GetResourceShares' :: Maybe [Text]
resourceShareArns = forall a. Maybe a
Prelude.Nothing,
$sel:resourceShareStatus:GetResourceShares' :: Maybe ResourceShareStatus
resourceShareStatus = forall a. Maybe a
Prelude.Nothing,
$sel:tagFilters:GetResourceShares' :: Maybe [TagFilter]
tagFilters = forall a. Maybe a
Prelude.Nothing,
$sel:resourceOwner:GetResourceShares' :: ResourceOwner
resourceOwner = ResourceOwner
pResourceOwner_
}
getResourceShares_maxResults :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Natural)
getResourceShares_maxResults :: Lens' GetResourceShares (Maybe Natural)
getResourceShares_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetResourceShares' :: GetResourceShares -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe Natural
a -> GetResourceShares
s {$sel:maxResults:GetResourceShares' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetResourceShares)
getResourceShares_name :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)
getResourceShares_name :: Lens' GetResourceShares (Maybe Text)
getResourceShares_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe Text
name :: Maybe Text
$sel:name:GetResourceShares' :: GetResourceShares -> Maybe Text
name} -> Maybe Text
name) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe Text
a -> GetResourceShares
s {$sel:name:GetResourceShares' :: Maybe Text
name = Maybe Text
a} :: GetResourceShares)
getResourceShares_nextToken :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)
getResourceShares_nextToken :: Lens' GetResourceShares (Maybe Text)
getResourceShares_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceShares' :: GetResourceShares -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe Text
a -> GetResourceShares
s {$sel:nextToken:GetResourceShares' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceShares)
getResourceShares_permissionArn :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)
getResourceShares_permissionArn :: Lens' GetResourceShares (Maybe Text)
getResourceShares_permissionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe Text
permissionArn :: Maybe Text
$sel:permissionArn:GetResourceShares' :: GetResourceShares -> Maybe Text
permissionArn} -> Maybe Text
permissionArn) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe Text
a -> GetResourceShares
s {$sel:permissionArn:GetResourceShares' :: Maybe Text
permissionArn = Maybe Text
a} :: GetResourceShares)
getResourceShares_resourceShareArns :: Lens.Lens' GetResourceShares (Prelude.Maybe [Prelude.Text])
getResourceShares_resourceShareArns :: Lens' GetResourceShares (Maybe [Text])
getResourceShares_resourceShareArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe [Text]
resourceShareArns :: Maybe [Text]
$sel:resourceShareArns:GetResourceShares' :: GetResourceShares -> Maybe [Text]
resourceShareArns} -> Maybe [Text]
resourceShareArns) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe [Text]
a -> GetResourceShares
s {$sel:resourceShareArns:GetResourceShares' :: Maybe [Text]
resourceShareArns = Maybe [Text]
a} :: GetResourceShares) 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
getResourceShares_resourceShareStatus :: Lens.Lens' GetResourceShares (Prelude.Maybe ResourceShareStatus)
getResourceShares_resourceShareStatus :: Lens' GetResourceShares (Maybe ResourceShareStatus)
getResourceShares_resourceShareStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe ResourceShareStatus
resourceShareStatus :: Maybe ResourceShareStatus
$sel:resourceShareStatus:GetResourceShares' :: GetResourceShares -> Maybe ResourceShareStatus
resourceShareStatus} -> Maybe ResourceShareStatus
resourceShareStatus) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe ResourceShareStatus
a -> GetResourceShares
s {$sel:resourceShareStatus:GetResourceShares' :: Maybe ResourceShareStatus
resourceShareStatus = Maybe ResourceShareStatus
a} :: GetResourceShares)
getResourceShares_tagFilters :: Lens.Lens' GetResourceShares (Prelude.Maybe [TagFilter])
getResourceShares_tagFilters :: Lens' GetResourceShares (Maybe [TagFilter])
getResourceShares_tagFilters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {Maybe [TagFilter]
tagFilters :: Maybe [TagFilter]
$sel:tagFilters:GetResourceShares' :: GetResourceShares -> Maybe [TagFilter]
tagFilters} -> Maybe [TagFilter]
tagFilters) (\s :: GetResourceShares
s@GetResourceShares' {} Maybe [TagFilter]
a -> GetResourceShares
s {$sel:tagFilters:GetResourceShares' :: Maybe [TagFilter]
tagFilters = Maybe [TagFilter]
a} :: GetResourceShares) 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
getResourceShares_resourceOwner :: Lens.Lens' GetResourceShares ResourceOwner
getResourceShares_resourceOwner :: Lens' GetResourceShares ResourceOwner
getResourceShares_resourceOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceShares' {ResourceOwner
resourceOwner :: ResourceOwner
$sel:resourceOwner:GetResourceShares' :: GetResourceShares -> ResourceOwner
resourceOwner} -> ResourceOwner
resourceOwner) (\s :: GetResourceShares
s@GetResourceShares' {} ResourceOwner
a -> GetResourceShares
s {$sel:resourceOwner:GetResourceShares' :: ResourceOwner
resourceOwner = ResourceOwner
a} :: GetResourceShares)
instance Core.AWSPager GetResourceShares where
page :: GetResourceShares
-> AWSResponse GetResourceShares -> Maybe GetResourceShares
page GetResourceShares
rq AWSResponse GetResourceShares
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetResourceShares
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetResourceSharesResponse (Maybe Text)
getResourceSharesResponse_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 GetResourceShares
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetResourceSharesResponse (Maybe [ResourceShare])
getResourceSharesResponse_resourceShares
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.$ GetResourceShares
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetResourceShares (Maybe Text)
getResourceShares_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetResourceShares
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetResourceSharesResponse (Maybe Text)
getResourceSharesResponse_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 GetResourceShares where
type
AWSResponse GetResourceShares =
GetResourceSharesResponse
request :: (Service -> Service)
-> GetResourceShares -> Request GetResourceShares
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 GetResourceShares
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetResourceShares)))
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 [ResourceShare] -> Int -> GetResourceSharesResponse
GetResourceSharesResponse'
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
"resourceShares" 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 GetResourceShares where
hashWithSalt :: Int -> GetResourceShares -> Int
hashWithSalt Int
_salt GetResourceShares' {Maybe Natural
Maybe [Text]
Maybe [TagFilter]
Maybe Text
Maybe ResourceShareStatus
ResourceOwner
resourceOwner :: ResourceOwner
tagFilters :: Maybe [TagFilter]
resourceShareStatus :: Maybe ResourceShareStatus
resourceShareArns :: Maybe [Text]
permissionArn :: Maybe Text
nextToken :: Maybe Text
name :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceOwner:GetResourceShares' :: GetResourceShares -> ResourceOwner
$sel:tagFilters:GetResourceShares' :: GetResourceShares -> Maybe [TagFilter]
$sel:resourceShareStatus:GetResourceShares' :: GetResourceShares -> Maybe ResourceShareStatus
$sel:resourceShareArns:GetResourceShares' :: GetResourceShares -> Maybe [Text]
$sel:permissionArn:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:nextToken:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:name:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:maxResults:GetResourceShares' :: GetResourceShares -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
permissionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourceShareArns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceShareStatus
resourceShareStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagFilter]
tagFilters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceOwner
resourceOwner
instance Prelude.NFData GetResourceShares where
rnf :: GetResourceShares -> ()
rnf GetResourceShares' {Maybe Natural
Maybe [Text]
Maybe [TagFilter]
Maybe Text
Maybe ResourceShareStatus
ResourceOwner
resourceOwner :: ResourceOwner
tagFilters :: Maybe [TagFilter]
resourceShareStatus :: Maybe ResourceShareStatus
resourceShareArns :: Maybe [Text]
permissionArn :: Maybe Text
nextToken :: Maybe Text
name :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceOwner:GetResourceShares' :: GetResourceShares -> ResourceOwner
$sel:tagFilters:GetResourceShares' :: GetResourceShares -> Maybe [TagFilter]
$sel:resourceShareStatus:GetResourceShares' :: GetResourceShares -> Maybe ResourceShareStatus
$sel:resourceShareArns:GetResourceShares' :: GetResourceShares -> Maybe [Text]
$sel:permissionArn:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:nextToken:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:name:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:maxResults:GetResourceShares' :: GetResourceShares -> Maybe Natural
..} =
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
name
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
permissionArn
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 Maybe ResourceShareStatus
resourceShareStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagFilter]
tagFilters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceOwner
resourceOwner
instance Data.ToHeaders GetResourceShares where
toHeaders :: GetResourceShares -> 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 GetResourceShares where
toJSON :: GetResourceShares -> Value
toJSON GetResourceShares' {Maybe Natural
Maybe [Text]
Maybe [TagFilter]
Maybe Text
Maybe ResourceShareStatus
ResourceOwner
resourceOwner :: ResourceOwner
tagFilters :: Maybe [TagFilter]
resourceShareStatus :: Maybe ResourceShareStatus
resourceShareArns :: Maybe [Text]
permissionArn :: Maybe Text
nextToken :: Maybe Text
name :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceOwner:GetResourceShares' :: GetResourceShares -> ResourceOwner
$sel:tagFilters:GetResourceShares' :: GetResourceShares -> Maybe [TagFilter]
$sel:resourceShareStatus:GetResourceShares' :: GetResourceShares -> Maybe ResourceShareStatus
$sel:resourceShareArns:GetResourceShares' :: GetResourceShares -> Maybe [Text]
$sel:permissionArn:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:nextToken:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:name:GetResourceShares' :: GetResourceShares -> Maybe Text
$sel:maxResults:GetResourceShares' :: GetResourceShares -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"name" 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
name,
(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
"permissionArn" 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
permissionArn,
(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,
(Key
"resourceShareStatus" 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 ResourceShareStatus
resourceShareStatus,
(Key
"tagFilters" 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 [TagFilter]
tagFilters,
forall a. a -> Maybe a
Prelude.Just
(Key
"resourceOwner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ResourceOwner
resourceOwner)
]
)
instance Data.ToPath GetResourceShares where
toPath :: GetResourceShares -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/getresourceshares"
instance Data.ToQuery GetResourceShares where
toQuery :: GetResourceShares -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetResourceSharesResponse = GetResourceSharesResponse'
{
GetResourceSharesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetResourceSharesResponse -> Maybe [ResourceShare]
resourceShares :: Prelude.Maybe [ResourceShare],
GetResourceSharesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetResourceSharesResponse -> GetResourceSharesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceSharesResponse -> GetResourceSharesResponse -> Bool
$c/= :: GetResourceSharesResponse -> GetResourceSharesResponse -> Bool
== :: GetResourceSharesResponse -> GetResourceSharesResponse -> Bool
$c== :: GetResourceSharesResponse -> GetResourceSharesResponse -> Bool
Prelude.Eq, ReadPrec [GetResourceSharesResponse]
ReadPrec GetResourceSharesResponse
Int -> ReadS GetResourceSharesResponse
ReadS [GetResourceSharesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceSharesResponse]
$creadListPrec :: ReadPrec [GetResourceSharesResponse]
readPrec :: ReadPrec GetResourceSharesResponse
$creadPrec :: ReadPrec GetResourceSharesResponse
readList :: ReadS [GetResourceSharesResponse]
$creadList :: ReadS [GetResourceSharesResponse]
readsPrec :: Int -> ReadS GetResourceSharesResponse
$creadsPrec :: Int -> ReadS GetResourceSharesResponse
Prelude.Read, Int -> GetResourceSharesResponse -> ShowS
[GetResourceSharesResponse] -> ShowS
GetResourceSharesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceSharesResponse] -> ShowS
$cshowList :: [GetResourceSharesResponse] -> ShowS
show :: GetResourceSharesResponse -> String
$cshow :: GetResourceSharesResponse -> String
showsPrec :: Int -> GetResourceSharesResponse -> ShowS
$cshowsPrec :: Int -> GetResourceSharesResponse -> ShowS
Prelude.Show, forall x.
Rep GetResourceSharesResponse x -> GetResourceSharesResponse
forall x.
GetResourceSharesResponse -> Rep GetResourceSharesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResourceSharesResponse x -> GetResourceSharesResponse
$cfrom :: forall x.
GetResourceSharesResponse -> Rep GetResourceSharesResponse x
Prelude.Generic)
newGetResourceSharesResponse ::
Prelude.Int ->
GetResourceSharesResponse
newGetResourceSharesResponse :: Int -> GetResourceSharesResponse
newGetResourceSharesResponse Int
pHttpStatus_ =
GetResourceSharesResponse'
{ $sel:nextToken:GetResourceSharesResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:resourceShares:GetResourceSharesResponse' :: Maybe [ResourceShare]
resourceShares = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetResourceSharesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getResourceSharesResponse_nextToken :: Lens.Lens' GetResourceSharesResponse (Prelude.Maybe Prelude.Text)
getResourceSharesResponse_nextToken :: Lens' GetResourceSharesResponse (Maybe Text)
getResourceSharesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceSharesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceSharesResponse' :: GetResourceSharesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceSharesResponse
s@GetResourceSharesResponse' {} Maybe Text
a -> GetResourceSharesResponse
s {$sel:nextToken:GetResourceSharesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceSharesResponse)
getResourceSharesResponse_resourceShares :: Lens.Lens' GetResourceSharesResponse (Prelude.Maybe [ResourceShare])
getResourceSharesResponse_resourceShares :: Lens' GetResourceSharesResponse (Maybe [ResourceShare])
getResourceSharesResponse_resourceShares = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceSharesResponse' {Maybe [ResourceShare]
resourceShares :: Maybe [ResourceShare]
$sel:resourceShares:GetResourceSharesResponse' :: GetResourceSharesResponse -> Maybe [ResourceShare]
resourceShares} -> Maybe [ResourceShare]
resourceShares) (\s :: GetResourceSharesResponse
s@GetResourceSharesResponse' {} Maybe [ResourceShare]
a -> GetResourceSharesResponse
s {$sel:resourceShares:GetResourceSharesResponse' :: Maybe [ResourceShare]
resourceShares = Maybe [ResourceShare]
a} :: GetResourceSharesResponse) 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
getResourceSharesResponse_httpStatus :: Lens.Lens' GetResourceSharesResponse Prelude.Int
getResourceSharesResponse_httpStatus :: Lens' GetResourceSharesResponse Int
getResourceSharesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceSharesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResourceSharesResponse' :: GetResourceSharesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResourceSharesResponse
s@GetResourceSharesResponse' {} Int
a -> GetResourceSharesResponse
s {$sel:httpStatus:GetResourceSharesResponse' :: Int
httpStatus = Int
a} :: GetResourceSharesResponse)
instance Prelude.NFData GetResourceSharesResponse where
rnf :: GetResourceSharesResponse -> ()
rnf GetResourceSharesResponse' {Int
Maybe [ResourceShare]
Maybe Text
httpStatus :: Int
resourceShares :: Maybe [ResourceShare]
nextToken :: Maybe Text
$sel:httpStatus:GetResourceSharesResponse' :: GetResourceSharesResponse -> Int
$sel:resourceShares:GetResourceSharesResponse' :: GetResourceSharesResponse -> Maybe [ResourceShare]
$sel:nextToken:GetResourceSharesResponse' :: GetResourceSharesResponse -> 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 [ResourceShare]
resourceShares
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus