{-# 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.Redshift.DescribeTags
(
DescribeTags (..),
newDescribeTags,
describeTags_tagValues,
describeTags_resourceType,
describeTags_resourceName,
describeTags_tagKeys,
describeTags_marker,
describeTags_maxRecords,
DescribeTagsResponse (..),
newDescribeTagsResponse,
describeTagsResponse_marker,
describeTagsResponse_taggedResources,
describeTagsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeTags = DescribeTags'
{
DescribeTags -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
DescribeTags -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
DescribeTags -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
DescribeTags -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
DescribeTags -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeTags -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
}
deriving (DescribeTags -> DescribeTags -> Bool
(DescribeTags -> DescribeTags -> Bool)
-> (DescribeTags -> DescribeTags -> Bool) -> Eq DescribeTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTags -> DescribeTags -> Bool
$c/= :: DescribeTags -> DescribeTags -> Bool
== :: DescribeTags -> DescribeTags -> Bool
$c== :: DescribeTags -> DescribeTags -> Bool
Prelude.Eq, ReadPrec [DescribeTags]
ReadPrec DescribeTags
Int -> ReadS DescribeTags
ReadS [DescribeTags]
(Int -> ReadS DescribeTags)
-> ReadS [DescribeTags]
-> ReadPrec DescribeTags
-> ReadPrec [DescribeTags]
-> Read DescribeTags
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTags]
$creadListPrec :: ReadPrec [DescribeTags]
readPrec :: ReadPrec DescribeTags
$creadPrec :: ReadPrec DescribeTags
readList :: ReadS [DescribeTags]
$creadList :: ReadS [DescribeTags]
readsPrec :: Int -> ReadS DescribeTags
$creadsPrec :: Int -> ReadS DescribeTags
Prelude.Read, Int -> DescribeTags -> ShowS
[DescribeTags] -> ShowS
DescribeTags -> String
(Int -> DescribeTags -> ShowS)
-> (DescribeTags -> String)
-> ([DescribeTags] -> ShowS)
-> Show DescribeTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTags] -> ShowS
$cshowList :: [DescribeTags] -> ShowS
show :: DescribeTags -> String
$cshow :: DescribeTags -> String
showsPrec :: Int -> DescribeTags -> ShowS
$cshowsPrec :: Int -> DescribeTags -> ShowS
Prelude.Show, (forall x. DescribeTags -> Rep DescribeTags x)
-> (forall x. Rep DescribeTags x -> DescribeTags)
-> Generic DescribeTags
forall x. Rep DescribeTags x -> DescribeTags
forall x. DescribeTags -> Rep DescribeTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTags x -> DescribeTags
$cfrom :: forall x. DescribeTags -> Rep DescribeTags x
Prelude.Generic)
newDescribeTags ::
DescribeTags
newDescribeTags :: DescribeTags
newDescribeTags =
DescribeTags' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> DescribeTags
DescribeTags'
{ $sel:tagValues:DescribeTags' :: Maybe [Text]
tagValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:DescribeTags' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceName:DescribeTags' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeys:DescribeTags' :: Maybe [Text]
tagKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeTags' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeTags' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
describeTags_tagValues :: Lens.Lens' DescribeTags (Prelude.Maybe [Prelude.Text])
describeTags_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags -> f DescribeTags
describeTags_tagValues = (DescribeTags -> Maybe [Text])
-> (DescribeTags -> Maybe [Text] -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeTags' :: DescribeTags -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeTags
s@DescribeTags' {} Maybe [Text]
a -> DescribeTags
s {$sel:tagValues:DescribeTags' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeTags) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags -> f DescribeTags)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags
-> f DescribeTags
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
describeTags_resourceType :: Lens.Lens' DescribeTags (Prelude.Maybe Prelude.Text)
describeTags_resourceType :: (Maybe Text -> f (Maybe Text)) -> DescribeTags -> f DescribeTags
describeTags_resourceType = (DescribeTags -> Maybe Text)
-> (DescribeTags -> Maybe Text -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:DescribeTags' :: DescribeTags -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: DescribeTags
s@DescribeTags' {} Maybe Text
a -> DescribeTags
s {$sel:resourceType:DescribeTags' :: Maybe Text
resourceType = Maybe Text
a} :: DescribeTags)
describeTags_resourceName :: Lens.Lens' DescribeTags (Prelude.Maybe Prelude.Text)
describeTags_resourceName :: (Maybe Text -> f (Maybe Text)) -> DescribeTags -> f DescribeTags
describeTags_resourceName = (DescribeTags -> Maybe Text)
-> (DescribeTags -> Maybe Text -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:DescribeTags' :: DescribeTags -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: DescribeTags
s@DescribeTags' {} Maybe Text
a -> DescribeTags
s {$sel:resourceName:DescribeTags' :: Maybe Text
resourceName = Maybe Text
a} :: DescribeTags)
describeTags_tagKeys :: Lens.Lens' DescribeTags (Prelude.Maybe [Prelude.Text])
describeTags_tagKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags -> f DescribeTags
describeTags_tagKeys = (DescribeTags -> Maybe [Text])
-> (DescribeTags -> Maybe [Text] -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeTags' :: DescribeTags -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeTags
s@DescribeTags' {} Maybe [Text]
a -> DescribeTags
s {$sel:tagKeys:DescribeTags' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeTags) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags -> f DescribeTags)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTags
-> f DescribeTags
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
describeTags_marker :: Lens.Lens' DescribeTags (Prelude.Maybe Prelude.Text)
describeTags_marker :: (Maybe Text -> f (Maybe Text)) -> DescribeTags -> f DescribeTags
describeTags_marker = (DescribeTags -> Maybe Text)
-> (DescribeTags -> Maybe Text -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTags' :: DescribeTags -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTags
s@DescribeTags' {} Maybe Text
a -> DescribeTags
s {$sel:marker:DescribeTags' :: Maybe Text
marker = Maybe Text
a} :: DescribeTags)
describeTags_maxRecords :: Lens.Lens' DescribeTags (Prelude.Maybe Prelude.Int)
describeTags_maxRecords :: (Maybe Int -> f (Maybe Int)) -> DescribeTags -> f DescribeTags
describeTags_maxRecords = (DescribeTags -> Maybe Int)
-> (DescribeTags -> Maybe Int -> DescribeTags)
-> Lens DescribeTags DescribeTags (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTags' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeTags' :: DescribeTags -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeTags
s@DescribeTags' {} Maybe Int
a -> DescribeTags
s {$sel:maxRecords:DescribeTags' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeTags)
instance Core.AWSPager DescribeTags where
page :: DescribeTags -> AWSResponse DescribeTags -> Maybe DescribeTags
page DescribeTags
rq AWSResponse DescribeTags
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeTags
DescribeTagsResponse
rs
DescribeTagsResponse
-> Getting (First Text) DescribeTagsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTagsResponse -> Const (First Text) DescribeTagsResponse
Lens' DescribeTagsResponse (Maybe Text)
describeTagsResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTagsResponse -> Const (First Text) DescribeTagsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeTagsResponse 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 DescribeTags
forall a. Maybe a
Prelude.Nothing
| Maybe [TaggedResource] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeTags
DescribeTagsResponse
rs
DescribeTagsResponse
-> Getting
(First [TaggedResource]) DescribeTagsResponse [TaggedResource]
-> Maybe [TaggedResource]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [TaggedResource]
-> Const (First [TaggedResource]) (Maybe [TaggedResource]))
-> DescribeTagsResponse
-> Const (First [TaggedResource]) DescribeTagsResponse
Lens' DescribeTagsResponse (Maybe [TaggedResource])
describeTagsResponse_taggedResources
((Maybe [TaggedResource]
-> Const (First [TaggedResource]) (Maybe [TaggedResource]))
-> DescribeTagsResponse
-> Const (First [TaggedResource]) DescribeTagsResponse)
-> (([TaggedResource]
-> Const (First [TaggedResource]) [TaggedResource])
-> Maybe [TaggedResource]
-> Const (First [TaggedResource]) (Maybe [TaggedResource]))
-> Getting
(First [TaggedResource]) DescribeTagsResponse [TaggedResource]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TaggedResource]
-> Const (First [TaggedResource]) [TaggedResource])
-> Maybe [TaggedResource]
-> Const (First [TaggedResource]) (Maybe [TaggedResource])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeTags
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeTags -> Maybe DescribeTags
forall a. a -> Maybe a
Prelude.Just (DescribeTags -> Maybe DescribeTags)
-> DescribeTags -> Maybe DescribeTags
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeTags
rq
DescribeTags -> (DescribeTags -> DescribeTags) -> DescribeTags
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeTags -> Identity DescribeTags
Lens DescribeTags DescribeTags (Maybe Text) (Maybe Text)
describeTags_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeTags -> Identity DescribeTags)
-> Maybe Text -> DescribeTags -> DescribeTags
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeTags
DescribeTagsResponse
rs
DescribeTagsResponse
-> Getting (First Text) DescribeTagsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTagsResponse -> Const (First Text) DescribeTagsResponse
Lens' DescribeTagsResponse (Maybe Text)
describeTagsResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTagsResponse -> Const (First Text) DescribeTagsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeTagsResponse 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 DescribeTags where
type AWSResponse DescribeTags = DescribeTagsResponse
request :: DescribeTags -> Request DescribeTags
request = Service -> DescribeTags -> Request DescribeTags
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTags)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeTags))
-> Logger
-> Service
-> Proxy DescribeTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTags)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeTagsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Maybe [TaggedResource] -> Int -> DescribeTagsResponse
DescribeTagsResponse'
(Maybe Text
-> Maybe [TaggedResource] -> Int -> DescribeTagsResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [TaggedResource] -> Int -> DescribeTagsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
Either
String (Maybe [TaggedResource] -> Int -> DescribeTagsResponse)
-> Either String (Maybe [TaggedResource])
-> Either String (Int -> DescribeTagsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TaggedResources" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [TaggedResource]))
-> Either String (Maybe [TaggedResource])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [TaggedResource])
-> [Node] -> Either String (Maybe [TaggedResource])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [TaggedResource]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"TaggedResource")
)
Either String (Int -> DescribeTagsResponse)
-> Either String Int -> Either String DescribeTagsResponse
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 DescribeTags
instance Prelude.NFData DescribeTags
instance Core.ToHeaders DescribeTags where
toHeaders :: DescribeTags -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeTags -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeTags where
toPath :: DescribeTags -> ByteString
toPath = ByteString -> DescribeTags -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeTags where
toQuery :: DescribeTags -> QueryString
toQuery DescribeTags' {Maybe Int
Maybe [Text]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
tagKeys :: Maybe [Text]
resourceName :: Maybe Text
resourceType :: Maybe Text
tagValues :: Maybe [Text]
$sel:maxRecords:DescribeTags' :: DescribeTags -> Maybe Int
$sel:marker:DescribeTags' :: DescribeTags -> Maybe Text
$sel:tagKeys:DescribeTags' :: DescribeTags -> Maybe [Text]
$sel:resourceName:DescribeTags' :: DescribeTags -> Maybe Text
$sel:resourceType:DescribeTags' :: DescribeTags -> Maybe Text
$sel:tagValues:DescribeTags' :: DescribeTags -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeTags" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"TagValues"
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
"TagValue" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues),
ByteString
"ResourceType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
resourceType,
ByteString
"ResourceName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
resourceName,
ByteString
"TagKeys"
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
"TagKey" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords
]
data DescribeTagsResponse = DescribeTagsResponse'
{
DescribeTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeTagsResponse -> Maybe [TaggedResource]
taggedResources :: Prelude.Maybe [TaggedResource],
DescribeTagsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeTagsResponse -> DescribeTagsResponse -> Bool
(DescribeTagsResponse -> DescribeTagsResponse -> Bool)
-> (DescribeTagsResponse -> DescribeTagsResponse -> Bool)
-> Eq DescribeTagsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTagsResponse -> DescribeTagsResponse -> Bool
$c/= :: DescribeTagsResponse -> DescribeTagsResponse -> Bool
== :: DescribeTagsResponse -> DescribeTagsResponse -> Bool
$c== :: DescribeTagsResponse -> DescribeTagsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTagsResponse]
ReadPrec DescribeTagsResponse
Int -> ReadS DescribeTagsResponse
ReadS [DescribeTagsResponse]
(Int -> ReadS DescribeTagsResponse)
-> ReadS [DescribeTagsResponse]
-> ReadPrec DescribeTagsResponse
-> ReadPrec [DescribeTagsResponse]
-> Read DescribeTagsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTagsResponse]
$creadListPrec :: ReadPrec [DescribeTagsResponse]
readPrec :: ReadPrec DescribeTagsResponse
$creadPrec :: ReadPrec DescribeTagsResponse
readList :: ReadS [DescribeTagsResponse]
$creadList :: ReadS [DescribeTagsResponse]
readsPrec :: Int -> ReadS DescribeTagsResponse
$creadsPrec :: Int -> ReadS DescribeTagsResponse
Prelude.Read, Int -> DescribeTagsResponse -> ShowS
[DescribeTagsResponse] -> ShowS
DescribeTagsResponse -> String
(Int -> DescribeTagsResponse -> ShowS)
-> (DescribeTagsResponse -> String)
-> ([DescribeTagsResponse] -> ShowS)
-> Show DescribeTagsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTagsResponse] -> ShowS
$cshowList :: [DescribeTagsResponse] -> ShowS
show :: DescribeTagsResponse -> String
$cshow :: DescribeTagsResponse -> String
showsPrec :: Int -> DescribeTagsResponse -> ShowS
$cshowsPrec :: Int -> DescribeTagsResponse -> ShowS
Prelude.Show, (forall x. DescribeTagsResponse -> Rep DescribeTagsResponse x)
-> (forall x. Rep DescribeTagsResponse x -> DescribeTagsResponse)
-> Generic DescribeTagsResponse
forall x. Rep DescribeTagsResponse x -> DescribeTagsResponse
forall x. DescribeTagsResponse -> Rep DescribeTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTagsResponse x -> DescribeTagsResponse
$cfrom :: forall x. DescribeTagsResponse -> Rep DescribeTagsResponse x
Prelude.Generic)
newDescribeTagsResponse ::
Prelude.Int ->
DescribeTagsResponse
newDescribeTagsResponse :: Int -> DescribeTagsResponse
newDescribeTagsResponse Int
pHttpStatus_ =
DescribeTagsResponse' :: Maybe Text -> Maybe [TaggedResource] -> Int -> DescribeTagsResponse
DescribeTagsResponse'
{ $sel:marker:DescribeTagsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taggedResources:DescribeTagsResponse' :: Maybe [TaggedResource]
taggedResources = Maybe [TaggedResource]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeTagsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeTagsResponse_marker :: Lens.Lens' DescribeTagsResponse (Prelude.Maybe Prelude.Text)
describeTagsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeTagsResponse -> f DescribeTagsResponse
describeTagsResponse_marker = (DescribeTagsResponse -> Maybe Text)
-> (DescribeTagsResponse -> Maybe Text -> DescribeTagsResponse)
-> Lens' DescribeTagsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTagsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTagsResponse' :: DescribeTagsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTagsResponse
s@DescribeTagsResponse' {} Maybe Text
a -> DescribeTagsResponse
s {$sel:marker:DescribeTagsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeTagsResponse)
describeTagsResponse_taggedResources :: Lens.Lens' DescribeTagsResponse (Prelude.Maybe [TaggedResource])
describeTagsResponse_taggedResources :: (Maybe [TaggedResource] -> f (Maybe [TaggedResource]))
-> DescribeTagsResponse -> f DescribeTagsResponse
describeTagsResponse_taggedResources = (DescribeTagsResponse -> Maybe [TaggedResource])
-> (DescribeTagsResponse
-> Maybe [TaggedResource] -> DescribeTagsResponse)
-> Lens' DescribeTagsResponse (Maybe [TaggedResource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTagsResponse' {Maybe [TaggedResource]
taggedResources :: Maybe [TaggedResource]
$sel:taggedResources:DescribeTagsResponse' :: DescribeTagsResponse -> Maybe [TaggedResource]
taggedResources} -> Maybe [TaggedResource]
taggedResources) (\s :: DescribeTagsResponse
s@DescribeTagsResponse' {} Maybe [TaggedResource]
a -> DescribeTagsResponse
s {$sel:taggedResources:DescribeTagsResponse' :: Maybe [TaggedResource]
taggedResources = Maybe [TaggedResource]
a} :: DescribeTagsResponse) ((Maybe [TaggedResource] -> f (Maybe [TaggedResource]))
-> DescribeTagsResponse -> f DescribeTagsResponse)
-> ((Maybe [TaggedResource] -> f (Maybe [TaggedResource]))
-> Maybe [TaggedResource] -> f (Maybe [TaggedResource]))
-> (Maybe [TaggedResource] -> f (Maybe [TaggedResource]))
-> DescribeTagsResponse
-> f DescribeTagsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TaggedResource] [TaggedResource] [TaggedResource] [TaggedResource]
-> Iso
(Maybe [TaggedResource])
(Maybe [TaggedResource])
(Maybe [TaggedResource])
(Maybe [TaggedResource])
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
[TaggedResource] [TaggedResource] [TaggedResource] [TaggedResource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeTagsResponse_httpStatus :: Lens.Lens' DescribeTagsResponse Prelude.Int
describeTagsResponse_httpStatus :: (Int -> f Int) -> DescribeTagsResponse -> f DescribeTagsResponse
describeTagsResponse_httpStatus = (DescribeTagsResponse -> Int)
-> (DescribeTagsResponse -> Int -> DescribeTagsResponse)
-> Lens DescribeTagsResponse DescribeTagsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTagsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeTagsResponse' :: DescribeTagsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeTagsResponse
s@DescribeTagsResponse' {} Int
a -> DescribeTagsResponse
s {$sel:httpStatus:DescribeTagsResponse' :: Int
httpStatus = Int
a} :: DescribeTagsResponse)
instance Prelude.NFData DescribeTagsResponse