{-# 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.SMS.GetServers
(
GetServers (..),
newGetServers,
getServers_vmServerAddressList,
getServers_nextToken,
getServers_maxResults,
GetServersResponse (..),
newGetServersResponse,
getServersResponse_serverCatalogStatus,
getServersResponse_lastModifiedOn,
getServersResponse_nextToken,
getServersResponse_serverList,
getServersResponse_httpStatus,
)
where
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
import Amazonka.SMS.Types
data GetServers = GetServers'
{
GetServers -> Maybe [VmServerAddress]
vmServerAddressList :: Prelude.Maybe [VmServerAddress],
GetServers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetServers -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (GetServers -> GetServers -> Bool
(GetServers -> GetServers -> Bool)
-> (GetServers -> GetServers -> Bool) -> Eq GetServers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetServers -> GetServers -> Bool
$c/= :: GetServers -> GetServers -> Bool
== :: GetServers -> GetServers -> Bool
$c== :: GetServers -> GetServers -> Bool
Prelude.Eq, ReadPrec [GetServers]
ReadPrec GetServers
Int -> ReadS GetServers
ReadS [GetServers]
(Int -> ReadS GetServers)
-> ReadS [GetServers]
-> ReadPrec GetServers
-> ReadPrec [GetServers]
-> Read GetServers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetServers]
$creadListPrec :: ReadPrec [GetServers]
readPrec :: ReadPrec GetServers
$creadPrec :: ReadPrec GetServers
readList :: ReadS [GetServers]
$creadList :: ReadS [GetServers]
readsPrec :: Int -> ReadS GetServers
$creadsPrec :: Int -> ReadS GetServers
Prelude.Read, Int -> GetServers -> ShowS
[GetServers] -> ShowS
GetServers -> String
(Int -> GetServers -> ShowS)
-> (GetServers -> String)
-> ([GetServers] -> ShowS)
-> Show GetServers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetServers] -> ShowS
$cshowList :: [GetServers] -> ShowS
show :: GetServers -> String
$cshow :: GetServers -> String
showsPrec :: Int -> GetServers -> ShowS
$cshowsPrec :: Int -> GetServers -> ShowS
Prelude.Show, (forall x. GetServers -> Rep GetServers x)
-> (forall x. Rep GetServers x -> GetServers) -> Generic GetServers
forall x. Rep GetServers x -> GetServers
forall x. GetServers -> Rep GetServers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetServers x -> GetServers
$cfrom :: forall x. GetServers -> Rep GetServers x
Prelude.Generic)
newGetServers ::
GetServers
newGetServers :: GetServers
newGetServers =
GetServers' :: Maybe [VmServerAddress] -> Maybe Text -> Maybe Int -> GetServers
GetServers'
{ $sel:vmServerAddressList:GetServers' :: Maybe [VmServerAddress]
vmServerAddressList = Maybe [VmServerAddress]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetServers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetServers' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
getServers_vmServerAddressList :: Lens.Lens' GetServers (Prelude.Maybe [VmServerAddress])
getServers_vmServerAddressList :: (Maybe [VmServerAddress] -> f (Maybe [VmServerAddress]))
-> GetServers -> f GetServers
getServers_vmServerAddressList = (GetServers -> Maybe [VmServerAddress])
-> (GetServers -> Maybe [VmServerAddress] -> GetServers)
-> Lens
GetServers
GetServers
(Maybe [VmServerAddress])
(Maybe [VmServerAddress])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServers' {Maybe [VmServerAddress]
vmServerAddressList :: Maybe [VmServerAddress]
$sel:vmServerAddressList:GetServers' :: GetServers -> Maybe [VmServerAddress]
vmServerAddressList} -> Maybe [VmServerAddress]
vmServerAddressList) (\s :: GetServers
s@GetServers' {} Maybe [VmServerAddress]
a -> GetServers
s {$sel:vmServerAddressList:GetServers' :: Maybe [VmServerAddress]
vmServerAddressList = Maybe [VmServerAddress]
a} :: GetServers) ((Maybe [VmServerAddress] -> f (Maybe [VmServerAddress]))
-> GetServers -> f GetServers)
-> ((Maybe [VmServerAddress] -> f (Maybe [VmServerAddress]))
-> Maybe [VmServerAddress] -> f (Maybe [VmServerAddress]))
-> (Maybe [VmServerAddress] -> f (Maybe [VmServerAddress]))
-> GetServers
-> f GetServers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[VmServerAddress]
[VmServerAddress]
[VmServerAddress]
[VmServerAddress]
-> Iso
(Maybe [VmServerAddress])
(Maybe [VmServerAddress])
(Maybe [VmServerAddress])
(Maybe [VmServerAddress])
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
[VmServerAddress]
[VmServerAddress]
[VmServerAddress]
[VmServerAddress]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getServers_nextToken :: Lens.Lens' GetServers (Prelude.Maybe Prelude.Text)
getServers_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetServers -> f GetServers
getServers_nextToken = (GetServers -> Maybe Text)
-> (GetServers -> Maybe Text -> GetServers)
-> Lens GetServers GetServers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetServers' :: GetServers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetServers
s@GetServers' {} Maybe Text
a -> GetServers
s {$sel:nextToken:GetServers' :: Maybe Text
nextToken = Maybe Text
a} :: GetServers)
getServers_maxResults :: Lens.Lens' GetServers (Prelude.Maybe Prelude.Int)
getServers_maxResults :: (Maybe Int -> f (Maybe Int)) -> GetServers -> f GetServers
getServers_maxResults = (GetServers -> Maybe Int)
-> (GetServers -> Maybe Int -> GetServers)
-> Lens GetServers GetServers (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServers' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetServers' :: GetServers -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetServers
s@GetServers' {} Maybe Int
a -> GetServers
s {$sel:maxResults:GetServers' :: Maybe Int
maxResults = Maybe Int
a} :: GetServers)
instance Core.AWSPager GetServers where
page :: GetServers -> AWSResponse GetServers -> Maybe GetServers
page GetServers
rq AWSResponse GetServers
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetServers
GetServersResponse
rs
GetServersResponse
-> Getting (First Text) GetServersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetServersResponse -> Const (First Text) GetServersResponse
Lens' GetServersResponse (Maybe Text)
getServersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetServersResponse -> Const (First Text) GetServersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetServersResponse 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 GetServers
forall a. Maybe a
Prelude.Nothing
| Maybe [Server] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetServers
GetServersResponse
rs
GetServersResponse
-> Getting (First [Server]) GetServersResponse [Server]
-> Maybe [Server]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Server] -> Const (First [Server]) (Maybe [Server]))
-> GetServersResponse -> Const (First [Server]) GetServersResponse
Lens' GetServersResponse (Maybe [Server])
getServersResponse_serverList ((Maybe [Server] -> Const (First [Server]) (Maybe [Server]))
-> GetServersResponse -> Const (First [Server]) GetServersResponse)
-> (([Server] -> Const (First [Server]) [Server])
-> Maybe [Server] -> Const (First [Server]) (Maybe [Server]))
-> Getting (First [Server]) GetServersResponse [Server]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Server] -> Const (First [Server]) [Server])
-> Maybe [Server] -> Const (First [Server]) (Maybe [Server])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetServers
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetServers -> Maybe GetServers
forall a. a -> Maybe a
Prelude.Just (GetServers -> Maybe GetServers) -> GetServers -> Maybe GetServers
forall a b. (a -> b) -> a -> b
Prelude.$
GetServers
rq
GetServers -> (GetServers -> GetServers) -> GetServers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetServers -> Identity GetServers
Lens GetServers GetServers (Maybe Text) (Maybe Text)
getServers_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetServers -> Identity GetServers)
-> Maybe Text -> GetServers -> GetServers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetServers
GetServersResponse
rs
GetServersResponse
-> Getting (First Text) GetServersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetServersResponse -> Const (First Text) GetServersResponse
Lens' GetServersResponse (Maybe Text)
getServersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetServersResponse -> Const (First Text) GetServersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetServersResponse 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 GetServers where
type AWSResponse GetServers = GetServersResponse
request :: GetServers -> Request GetServers
request = Service -> GetServers -> Request GetServers
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetServers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetServers)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetServers))
-> Logger
-> Service
-> Proxy GetServers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetServers)))
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 ServerCatalogStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe [Server]
-> Int
-> GetServersResponse
GetServersResponse'
(Maybe ServerCatalogStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe [Server]
-> Int
-> GetServersResponse)
-> Either String (Maybe ServerCatalogStatus)
-> Either
String
(Maybe POSIX
-> Maybe Text -> Maybe [Server] -> Int -> GetServersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ServerCatalogStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serverCatalogStatus")
Either
String
(Maybe POSIX
-> Maybe Text -> Maybe [Server] -> Int -> GetServersResponse)
-> Either String (Maybe POSIX)
-> Either
String (Maybe Text -> Maybe [Server] -> Int -> GetServersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastModifiedOn")
Either
String (Maybe Text -> Maybe [Server] -> Int -> GetServersResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Server] -> Int -> GetServersResponse)
forall (f :: * -> *) a b. Applicative f => 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 [Server] -> Int -> GetServersResponse)
-> Either String (Maybe [Server])
-> Either String (Int -> GetServersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Server]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serverList" Either String (Maybe (Maybe [Server]))
-> Maybe [Server] -> Either String (Maybe [Server])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Server]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> GetServersResponse)
-> Either String Int -> Either String GetServersResponse
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 GetServers
instance Prelude.NFData GetServers
instance Core.ToHeaders GetServers where
toHeaders :: GetServers -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetServers -> 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
"AWSServerMigrationService_V2016_10_24.GetServers" ::
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 GetServers where
toJSON :: GetServers -> Value
toJSON GetServers' {Maybe Int
Maybe [VmServerAddress]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
vmServerAddressList :: Maybe [VmServerAddress]
$sel:maxResults:GetServers' :: GetServers -> Maybe Int
$sel:nextToken:GetServers' :: GetServers -> Maybe Text
$sel:vmServerAddressList:GetServers' :: GetServers -> Maybe [VmServerAddress]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"vmServerAddressList" Text -> [VmServerAddress] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([VmServerAddress] -> Pair)
-> Maybe [VmServerAddress] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VmServerAddress]
vmServerAddressList,
(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
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath GetServers where
toPath :: GetServers -> ByteString
toPath = ByteString -> GetServers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetServers where
toQuery :: GetServers -> QueryString
toQuery = QueryString -> GetServers -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetServersResponse = GetServersResponse'
{
GetServersResponse -> Maybe ServerCatalogStatus
serverCatalogStatus :: Prelude.Maybe ServerCatalogStatus,
GetServersResponse -> Maybe POSIX
lastModifiedOn :: Prelude.Maybe Core.POSIX,
GetServersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetServersResponse -> Maybe [Server]
serverList :: Prelude.Maybe [Server],
GetServersResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetServersResponse -> GetServersResponse -> Bool
(GetServersResponse -> GetServersResponse -> Bool)
-> (GetServersResponse -> GetServersResponse -> Bool)
-> Eq GetServersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetServersResponse -> GetServersResponse -> Bool
$c/= :: GetServersResponse -> GetServersResponse -> Bool
== :: GetServersResponse -> GetServersResponse -> Bool
$c== :: GetServersResponse -> GetServersResponse -> Bool
Prelude.Eq, ReadPrec [GetServersResponse]
ReadPrec GetServersResponse
Int -> ReadS GetServersResponse
ReadS [GetServersResponse]
(Int -> ReadS GetServersResponse)
-> ReadS [GetServersResponse]
-> ReadPrec GetServersResponse
-> ReadPrec [GetServersResponse]
-> Read GetServersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetServersResponse]
$creadListPrec :: ReadPrec [GetServersResponse]
readPrec :: ReadPrec GetServersResponse
$creadPrec :: ReadPrec GetServersResponse
readList :: ReadS [GetServersResponse]
$creadList :: ReadS [GetServersResponse]
readsPrec :: Int -> ReadS GetServersResponse
$creadsPrec :: Int -> ReadS GetServersResponse
Prelude.Read, Int -> GetServersResponse -> ShowS
[GetServersResponse] -> ShowS
GetServersResponse -> String
(Int -> GetServersResponse -> ShowS)
-> (GetServersResponse -> String)
-> ([GetServersResponse] -> ShowS)
-> Show GetServersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetServersResponse] -> ShowS
$cshowList :: [GetServersResponse] -> ShowS
show :: GetServersResponse -> String
$cshow :: GetServersResponse -> String
showsPrec :: Int -> GetServersResponse -> ShowS
$cshowsPrec :: Int -> GetServersResponse -> ShowS
Prelude.Show, (forall x. GetServersResponse -> Rep GetServersResponse x)
-> (forall x. Rep GetServersResponse x -> GetServersResponse)
-> Generic GetServersResponse
forall x. Rep GetServersResponse x -> GetServersResponse
forall x. GetServersResponse -> Rep GetServersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetServersResponse x -> GetServersResponse
$cfrom :: forall x. GetServersResponse -> Rep GetServersResponse x
Prelude.Generic)
newGetServersResponse ::
Prelude.Int ->
GetServersResponse
newGetServersResponse :: Int -> GetServersResponse
newGetServersResponse Int
pHttpStatus_ =
GetServersResponse' :: Maybe ServerCatalogStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe [Server]
-> Int
-> GetServersResponse
GetServersResponse'
{ $sel:serverCatalogStatus:GetServersResponse' :: Maybe ServerCatalogStatus
serverCatalogStatus =
Maybe ServerCatalogStatus
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedOn:GetServersResponse' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetServersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverList:GetServersResponse' :: Maybe [Server]
serverList = Maybe [Server]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetServersResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getServersResponse_serverCatalogStatus :: Lens.Lens' GetServersResponse (Prelude.Maybe ServerCatalogStatus)
getServersResponse_serverCatalogStatus :: (Maybe ServerCatalogStatus -> f (Maybe ServerCatalogStatus))
-> GetServersResponse -> f GetServersResponse
getServersResponse_serverCatalogStatus = (GetServersResponse -> Maybe ServerCatalogStatus)
-> (GetServersResponse
-> Maybe ServerCatalogStatus -> GetServersResponse)
-> Lens
GetServersResponse
GetServersResponse
(Maybe ServerCatalogStatus)
(Maybe ServerCatalogStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServersResponse' {Maybe ServerCatalogStatus
serverCatalogStatus :: Maybe ServerCatalogStatus
$sel:serverCatalogStatus:GetServersResponse' :: GetServersResponse -> Maybe ServerCatalogStatus
serverCatalogStatus} -> Maybe ServerCatalogStatus
serverCatalogStatus) (\s :: GetServersResponse
s@GetServersResponse' {} Maybe ServerCatalogStatus
a -> GetServersResponse
s {$sel:serverCatalogStatus:GetServersResponse' :: Maybe ServerCatalogStatus
serverCatalogStatus = Maybe ServerCatalogStatus
a} :: GetServersResponse)
getServersResponse_lastModifiedOn :: Lens.Lens' GetServersResponse (Prelude.Maybe Prelude.UTCTime)
getServersResponse_lastModifiedOn :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetServersResponse -> f GetServersResponse
getServersResponse_lastModifiedOn = (GetServersResponse -> Maybe POSIX)
-> (GetServersResponse -> Maybe POSIX -> GetServersResponse)
-> Lens
GetServersResponse GetServersResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServersResponse' {Maybe POSIX
lastModifiedOn :: Maybe POSIX
$sel:lastModifiedOn:GetServersResponse' :: GetServersResponse -> Maybe POSIX
lastModifiedOn} -> Maybe POSIX
lastModifiedOn) (\s :: GetServersResponse
s@GetServersResponse' {} Maybe POSIX
a -> GetServersResponse
s {$sel:lastModifiedOn:GetServersResponse' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
a} :: GetServersResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetServersResponse -> f GetServersResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetServersResponse
-> f GetServersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getServersResponse_nextToken :: Lens.Lens' GetServersResponse (Prelude.Maybe Prelude.Text)
getServersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetServersResponse -> f GetServersResponse
getServersResponse_nextToken = (GetServersResponse -> Maybe Text)
-> (GetServersResponse -> Maybe Text -> GetServersResponse)
-> Lens' GetServersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetServersResponse' :: GetServersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetServersResponse
s@GetServersResponse' {} Maybe Text
a -> GetServersResponse
s {$sel:nextToken:GetServersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetServersResponse)
getServersResponse_serverList :: Lens.Lens' GetServersResponse (Prelude.Maybe [Server])
getServersResponse_serverList :: (Maybe [Server] -> f (Maybe [Server]))
-> GetServersResponse -> f GetServersResponse
getServersResponse_serverList = (GetServersResponse -> Maybe [Server])
-> (GetServersResponse -> Maybe [Server] -> GetServersResponse)
-> Lens' GetServersResponse (Maybe [Server])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServersResponse' {Maybe [Server]
serverList :: Maybe [Server]
$sel:serverList:GetServersResponse' :: GetServersResponse -> Maybe [Server]
serverList} -> Maybe [Server]
serverList) (\s :: GetServersResponse
s@GetServersResponse' {} Maybe [Server]
a -> GetServersResponse
s {$sel:serverList:GetServersResponse' :: Maybe [Server]
serverList = Maybe [Server]
a} :: GetServersResponse) ((Maybe [Server] -> f (Maybe [Server]))
-> GetServersResponse -> f GetServersResponse)
-> ((Maybe [Server] -> f (Maybe [Server]))
-> Maybe [Server] -> f (Maybe [Server]))
-> (Maybe [Server] -> f (Maybe [Server]))
-> GetServersResponse
-> f GetServersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Server] [Server] [Server] [Server]
-> Iso
(Maybe [Server]) (Maybe [Server]) (Maybe [Server]) (Maybe [Server])
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 [Server] [Server] [Server] [Server]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getServersResponse_httpStatus :: Lens.Lens' GetServersResponse Prelude.Int
getServersResponse_httpStatus :: (Int -> f Int) -> GetServersResponse -> f GetServersResponse
getServersResponse_httpStatus = (GetServersResponse -> Int)
-> (GetServersResponse -> Int -> GetServersResponse)
-> Lens GetServersResponse GetServersResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServersResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetServersResponse' :: GetServersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetServersResponse
s@GetServersResponse' {} Int
a -> GetServersResponse
s {$sel:httpStatus:GetServersResponse' :: Int
httpStatus = Int
a} :: GetServersResponse)
instance Prelude.NFData GetServersResponse