{-# 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.CloudWatchLogs.DescribeDestinations
(
DescribeDestinations (..),
newDescribeDestinations,
describeDestinations_nextToken,
describeDestinations_limit,
describeDestinations_destinationNamePrefix,
DescribeDestinationsResponse (..),
newDescribeDestinationsResponse,
describeDestinationsResponse_nextToken,
describeDestinationsResponse_destinations,
describeDestinationsResponse_httpStatus,
)
where
import Amazonka.CloudWatchLogs.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeDestinations = DescribeDestinations'
{
DescribeDestinations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeDestinations -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeDestinations -> Maybe Text
destinationNamePrefix :: Prelude.Maybe Prelude.Text
}
deriving (DescribeDestinations -> DescribeDestinations -> Bool
(DescribeDestinations -> DescribeDestinations -> Bool)
-> (DescribeDestinations -> DescribeDestinations -> Bool)
-> Eq DescribeDestinations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDestinations -> DescribeDestinations -> Bool
$c/= :: DescribeDestinations -> DescribeDestinations -> Bool
== :: DescribeDestinations -> DescribeDestinations -> Bool
$c== :: DescribeDestinations -> DescribeDestinations -> Bool
Prelude.Eq, ReadPrec [DescribeDestinations]
ReadPrec DescribeDestinations
Int -> ReadS DescribeDestinations
ReadS [DescribeDestinations]
(Int -> ReadS DescribeDestinations)
-> ReadS [DescribeDestinations]
-> ReadPrec DescribeDestinations
-> ReadPrec [DescribeDestinations]
-> Read DescribeDestinations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDestinations]
$creadListPrec :: ReadPrec [DescribeDestinations]
readPrec :: ReadPrec DescribeDestinations
$creadPrec :: ReadPrec DescribeDestinations
readList :: ReadS [DescribeDestinations]
$creadList :: ReadS [DescribeDestinations]
readsPrec :: Int -> ReadS DescribeDestinations
$creadsPrec :: Int -> ReadS DescribeDestinations
Prelude.Read, Int -> DescribeDestinations -> ShowS
[DescribeDestinations] -> ShowS
DescribeDestinations -> String
(Int -> DescribeDestinations -> ShowS)
-> (DescribeDestinations -> String)
-> ([DescribeDestinations] -> ShowS)
-> Show DescribeDestinations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDestinations] -> ShowS
$cshowList :: [DescribeDestinations] -> ShowS
show :: DescribeDestinations -> String
$cshow :: DescribeDestinations -> String
showsPrec :: Int -> DescribeDestinations -> ShowS
$cshowsPrec :: Int -> DescribeDestinations -> ShowS
Prelude.Show, (forall x. DescribeDestinations -> Rep DescribeDestinations x)
-> (forall x. Rep DescribeDestinations x -> DescribeDestinations)
-> Generic DescribeDestinations
forall x. Rep DescribeDestinations x -> DescribeDestinations
forall x. DescribeDestinations -> Rep DescribeDestinations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDestinations x -> DescribeDestinations
$cfrom :: forall x. DescribeDestinations -> Rep DescribeDestinations x
Prelude.Generic)
newDescribeDestinations ::
DescribeDestinations
newDescribeDestinations :: DescribeDestinations
newDescribeDestinations =
DescribeDestinations' :: Maybe Text -> Maybe Natural -> Maybe Text -> DescribeDestinations
DescribeDestinations'
{ $sel:nextToken:DescribeDestinations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeDestinations' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:destinationNamePrefix:DescribeDestinations' :: Maybe Text
destinationNamePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeDestinations_nextToken :: Lens.Lens' DescribeDestinations (Prelude.Maybe Prelude.Text)
describeDestinations_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDestinations -> f DescribeDestinations
describeDestinations_nextToken = (DescribeDestinations -> Maybe Text)
-> (DescribeDestinations -> Maybe Text -> DescribeDestinations)
-> Lens
DescribeDestinations DescribeDestinations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDestinations' :: DescribeDestinations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDestinations
s@DescribeDestinations' {} Maybe Text
a -> DescribeDestinations
s {$sel:nextToken:DescribeDestinations' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDestinations)
describeDestinations_limit :: Lens.Lens' DescribeDestinations (Prelude.Maybe Prelude.Natural)
describeDestinations_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeDestinations -> f DescribeDestinations
describeDestinations_limit = (DescribeDestinations -> Maybe Natural)
-> (DescribeDestinations -> Maybe Natural -> DescribeDestinations)
-> Lens
DescribeDestinations
DescribeDestinations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinations' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeDestinations' :: DescribeDestinations -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeDestinations
s@DescribeDestinations' {} Maybe Natural
a -> DescribeDestinations
s {$sel:limit:DescribeDestinations' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeDestinations)
describeDestinations_destinationNamePrefix :: Lens.Lens' DescribeDestinations (Prelude.Maybe Prelude.Text)
describeDestinations_destinationNamePrefix :: (Maybe Text -> f (Maybe Text))
-> DescribeDestinations -> f DescribeDestinations
describeDestinations_destinationNamePrefix = (DescribeDestinations -> Maybe Text)
-> (DescribeDestinations -> Maybe Text -> DescribeDestinations)
-> Lens
DescribeDestinations DescribeDestinations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinations' {Maybe Text
destinationNamePrefix :: Maybe Text
$sel:destinationNamePrefix:DescribeDestinations' :: DescribeDestinations -> Maybe Text
destinationNamePrefix} -> Maybe Text
destinationNamePrefix) (\s :: DescribeDestinations
s@DescribeDestinations' {} Maybe Text
a -> DescribeDestinations
s {$sel:destinationNamePrefix:DescribeDestinations' :: Maybe Text
destinationNamePrefix = Maybe Text
a} :: DescribeDestinations)
instance Core.AWSPager DescribeDestinations where
page :: DescribeDestinations
-> AWSResponse DescribeDestinations -> Maybe DescribeDestinations
page DescribeDestinations
rq AWSResponse DescribeDestinations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeDestinations
DescribeDestinationsResponse
rs
DescribeDestinationsResponse
-> Getting (First Text) DescribeDestinationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDestinationsResponse
-> Const (First Text) DescribeDestinationsResponse
Lens' DescribeDestinationsResponse (Maybe Text)
describeDestinationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDestinationsResponse
-> Const (First Text) DescribeDestinationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDestinationsResponse 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 DescribeDestinations
forall a. Maybe a
Prelude.Nothing
| Maybe [Destination] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeDestinations
DescribeDestinationsResponse
rs
DescribeDestinationsResponse
-> Getting
(First [Destination]) DescribeDestinationsResponse [Destination]
-> Maybe [Destination]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Destination]
-> Const (First [Destination]) (Maybe [Destination]))
-> DescribeDestinationsResponse
-> Const (First [Destination]) DescribeDestinationsResponse
Lens' DescribeDestinationsResponse (Maybe [Destination])
describeDestinationsResponse_destinations
((Maybe [Destination]
-> Const (First [Destination]) (Maybe [Destination]))
-> DescribeDestinationsResponse
-> Const (First [Destination]) DescribeDestinationsResponse)
-> (([Destination] -> Const (First [Destination]) [Destination])
-> Maybe [Destination]
-> Const (First [Destination]) (Maybe [Destination]))
-> Getting
(First [Destination]) DescribeDestinationsResponse [Destination]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Destination] -> Const (First [Destination]) [Destination])
-> Maybe [Destination]
-> Const (First [Destination]) (Maybe [Destination])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeDestinations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeDestinations -> Maybe DescribeDestinations
forall a. a -> Maybe a
Prelude.Just (DescribeDestinations -> Maybe DescribeDestinations)
-> DescribeDestinations -> Maybe DescribeDestinations
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeDestinations
rq
DescribeDestinations
-> (DescribeDestinations -> DescribeDestinations)
-> DescribeDestinations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDestinations -> Identity DescribeDestinations
Lens
DescribeDestinations DescribeDestinations (Maybe Text) (Maybe Text)
describeDestinations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeDestinations -> Identity DescribeDestinations)
-> Maybe Text -> DescribeDestinations -> DescribeDestinations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDestinations
DescribeDestinationsResponse
rs
DescribeDestinationsResponse
-> Getting (First Text) DescribeDestinationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDestinationsResponse
-> Const (First Text) DescribeDestinationsResponse
Lens' DescribeDestinationsResponse (Maybe Text)
describeDestinationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDestinationsResponse
-> Const (First Text) DescribeDestinationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDestinationsResponse 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 DescribeDestinations where
type
AWSResponse DescribeDestinations =
DescribeDestinationsResponse
request :: DescribeDestinations -> Request DescribeDestinations
request = Service -> DescribeDestinations -> Request DescribeDestinations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeDestinations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDestinations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeDestinations))
-> Logger
-> Service
-> Proxy DescribeDestinations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDestinations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [Destination] -> Int -> DescribeDestinationsResponse
DescribeDestinationsResponse'
(Maybe Text
-> Maybe [Destination] -> Int -> DescribeDestinationsResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [Destination] -> Int -> DescribeDestinationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
Either
String (Maybe [Destination] -> Int -> DescribeDestinationsResponse)
-> Either String (Maybe [Destination])
-> Either String (Int -> DescribeDestinationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Destination]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinations" Either String (Maybe (Maybe [Destination]))
-> Maybe [Destination] -> Either String (Maybe [Destination])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Destination]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeDestinationsResponse)
-> Either String Int -> Either String DescribeDestinationsResponse
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 DescribeDestinations
instance Prelude.NFData DescribeDestinations
instance Core.ToHeaders DescribeDestinations where
toHeaders :: DescribeDestinations -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeDestinations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Logs_20140328.DescribeDestinations" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeDestinations where
toJSON :: DescribeDestinations -> Value
toJSON DescribeDestinations' {Maybe Natural
Maybe Text
destinationNamePrefix :: Maybe Text
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:destinationNamePrefix:DescribeDestinations' :: DescribeDestinations -> Maybe Text
$sel:limit:DescribeDestinations' :: DescribeDestinations -> Maybe Natural
$sel:nextToken:DescribeDestinations' :: DescribeDestinations -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
(Text
"DestinationNamePrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationNamePrefix
]
)
instance Core.ToPath DescribeDestinations where
toPath :: DescribeDestinations -> ByteString
toPath = ByteString -> DescribeDestinations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeDestinations where
toQuery :: DescribeDestinations -> QueryString
toQuery = QueryString -> DescribeDestinations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeDestinationsResponse = DescribeDestinationsResponse'
{ DescribeDestinationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeDestinationsResponse -> Maybe [Destination]
destinations :: Prelude.Maybe [Destination],
DescribeDestinationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool
(DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool)
-> (DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool)
-> Eq DescribeDestinationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool
$c/= :: DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool
== :: DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool
$c== :: DescribeDestinationsResponse
-> DescribeDestinationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDestinationsResponse]
ReadPrec DescribeDestinationsResponse
Int -> ReadS DescribeDestinationsResponse
ReadS [DescribeDestinationsResponse]
(Int -> ReadS DescribeDestinationsResponse)
-> ReadS [DescribeDestinationsResponse]
-> ReadPrec DescribeDestinationsResponse
-> ReadPrec [DescribeDestinationsResponse]
-> Read DescribeDestinationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDestinationsResponse]
$creadListPrec :: ReadPrec [DescribeDestinationsResponse]
readPrec :: ReadPrec DescribeDestinationsResponse
$creadPrec :: ReadPrec DescribeDestinationsResponse
readList :: ReadS [DescribeDestinationsResponse]
$creadList :: ReadS [DescribeDestinationsResponse]
readsPrec :: Int -> ReadS DescribeDestinationsResponse
$creadsPrec :: Int -> ReadS DescribeDestinationsResponse
Prelude.Read, Int -> DescribeDestinationsResponse -> ShowS
[DescribeDestinationsResponse] -> ShowS
DescribeDestinationsResponse -> String
(Int -> DescribeDestinationsResponse -> ShowS)
-> (DescribeDestinationsResponse -> String)
-> ([DescribeDestinationsResponse] -> ShowS)
-> Show DescribeDestinationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDestinationsResponse] -> ShowS
$cshowList :: [DescribeDestinationsResponse] -> ShowS
show :: DescribeDestinationsResponse -> String
$cshow :: DescribeDestinationsResponse -> String
showsPrec :: Int -> DescribeDestinationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDestinationsResponse -> ShowS
Prelude.Show, (forall x.
DescribeDestinationsResponse -> Rep DescribeDestinationsResponse x)
-> (forall x.
Rep DescribeDestinationsResponse x -> DescribeDestinationsResponse)
-> Generic DescribeDestinationsResponse
forall x.
Rep DescribeDestinationsResponse x -> DescribeDestinationsResponse
forall x.
DescribeDestinationsResponse -> Rep DescribeDestinationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDestinationsResponse x -> DescribeDestinationsResponse
$cfrom :: forall x.
DescribeDestinationsResponse -> Rep DescribeDestinationsResponse x
Prelude.Generic)
newDescribeDestinationsResponse ::
Prelude.Int ->
DescribeDestinationsResponse
newDescribeDestinationsResponse :: Int -> DescribeDestinationsResponse
newDescribeDestinationsResponse Int
pHttpStatus_ =
DescribeDestinationsResponse' :: Maybe Text
-> Maybe [Destination] -> Int -> DescribeDestinationsResponse
DescribeDestinationsResponse'
{ $sel:nextToken:DescribeDestinationsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinations:DescribeDestinationsResponse' :: Maybe [Destination]
destinations = Maybe [Destination]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeDestinationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeDestinationsResponse_nextToken :: Lens.Lens' DescribeDestinationsResponse (Prelude.Maybe Prelude.Text)
describeDestinationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDestinationsResponse -> f DescribeDestinationsResponse
describeDestinationsResponse_nextToken = (DescribeDestinationsResponse -> Maybe Text)
-> (DescribeDestinationsResponse
-> Maybe Text -> DescribeDestinationsResponse)
-> Lens' DescribeDestinationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDestinationsResponse' :: DescribeDestinationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDestinationsResponse
s@DescribeDestinationsResponse' {} Maybe Text
a -> DescribeDestinationsResponse
s {$sel:nextToken:DescribeDestinationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDestinationsResponse)
describeDestinationsResponse_destinations :: Lens.Lens' DescribeDestinationsResponse (Prelude.Maybe [Destination])
describeDestinationsResponse_destinations :: (Maybe [Destination] -> f (Maybe [Destination]))
-> DescribeDestinationsResponse -> f DescribeDestinationsResponse
describeDestinationsResponse_destinations = (DescribeDestinationsResponse -> Maybe [Destination])
-> (DescribeDestinationsResponse
-> Maybe [Destination] -> DescribeDestinationsResponse)
-> Lens' DescribeDestinationsResponse (Maybe [Destination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinationsResponse' {Maybe [Destination]
destinations :: Maybe [Destination]
$sel:destinations:DescribeDestinationsResponse' :: DescribeDestinationsResponse -> Maybe [Destination]
destinations} -> Maybe [Destination]
destinations) (\s :: DescribeDestinationsResponse
s@DescribeDestinationsResponse' {} Maybe [Destination]
a -> DescribeDestinationsResponse
s {$sel:destinations:DescribeDestinationsResponse' :: Maybe [Destination]
destinations = Maybe [Destination]
a} :: DescribeDestinationsResponse) ((Maybe [Destination] -> f (Maybe [Destination]))
-> DescribeDestinationsResponse -> f DescribeDestinationsResponse)
-> ((Maybe [Destination] -> f (Maybe [Destination]))
-> Maybe [Destination] -> f (Maybe [Destination]))
-> (Maybe [Destination] -> f (Maybe [Destination]))
-> DescribeDestinationsResponse
-> f DescribeDestinationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Destination] [Destination] [Destination] [Destination]
-> Iso
(Maybe [Destination])
(Maybe [Destination])
(Maybe [Destination])
(Maybe [Destination])
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 [Destination] [Destination] [Destination] [Destination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeDestinationsResponse_httpStatus :: Lens.Lens' DescribeDestinationsResponse Prelude.Int
describeDestinationsResponse_httpStatus :: (Int -> f Int)
-> DescribeDestinationsResponse -> f DescribeDestinationsResponse
describeDestinationsResponse_httpStatus = (DescribeDestinationsResponse -> Int)
-> (DescribeDestinationsResponse
-> Int -> DescribeDestinationsResponse)
-> Lens
DescribeDestinationsResponse DescribeDestinationsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDestinationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDestinationsResponse' :: DescribeDestinationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDestinationsResponse
s@DescribeDestinationsResponse' {} Int
a -> DescribeDestinationsResponse
s {$sel:httpStatus:DescribeDestinationsResponse' :: Int
httpStatus = Int
a} :: DescribeDestinationsResponse)
instance Prelude.NFData DescribeDestinationsResponse