{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DMS.Types.ServerShortInfoResponse 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
data ServerShortInfoResponse = ServerShortInfoResponse'
{
ServerShortInfoResponse -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
ServerShortInfoResponse -> Maybe Text
serverId :: Prelude.Maybe Prelude.Text,
ServerShortInfoResponse -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text
}
deriving (ServerShortInfoResponse -> ServerShortInfoResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerShortInfoResponse -> ServerShortInfoResponse -> Bool
$c/= :: ServerShortInfoResponse -> ServerShortInfoResponse -> Bool
== :: ServerShortInfoResponse -> ServerShortInfoResponse -> Bool
$c== :: ServerShortInfoResponse -> ServerShortInfoResponse -> Bool
Prelude.Eq, ReadPrec [ServerShortInfoResponse]
ReadPrec ServerShortInfoResponse
Int -> ReadS ServerShortInfoResponse
ReadS [ServerShortInfoResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerShortInfoResponse]
$creadListPrec :: ReadPrec [ServerShortInfoResponse]
readPrec :: ReadPrec ServerShortInfoResponse
$creadPrec :: ReadPrec ServerShortInfoResponse
readList :: ReadS [ServerShortInfoResponse]
$creadList :: ReadS [ServerShortInfoResponse]
readsPrec :: Int -> ReadS ServerShortInfoResponse
$creadsPrec :: Int -> ReadS ServerShortInfoResponse
Prelude.Read, Int -> ServerShortInfoResponse -> ShowS
[ServerShortInfoResponse] -> ShowS
ServerShortInfoResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerShortInfoResponse] -> ShowS
$cshowList :: [ServerShortInfoResponse] -> ShowS
show :: ServerShortInfoResponse -> String
$cshow :: ServerShortInfoResponse -> String
showsPrec :: Int -> ServerShortInfoResponse -> ShowS
$cshowsPrec :: Int -> ServerShortInfoResponse -> ShowS
Prelude.Show, forall x. Rep ServerShortInfoResponse x -> ServerShortInfoResponse
forall x. ServerShortInfoResponse -> Rep ServerShortInfoResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServerShortInfoResponse x -> ServerShortInfoResponse
$cfrom :: forall x. ServerShortInfoResponse -> Rep ServerShortInfoResponse x
Prelude.Generic)
newServerShortInfoResponse ::
ServerShortInfoResponse
newServerShortInfoResponse :: ServerShortInfoResponse
newServerShortInfoResponse =
ServerShortInfoResponse'
{ $sel:ipAddress:ServerShortInfoResponse' :: Maybe Text
ipAddress =
forall a. Maybe a
Prelude.Nothing,
$sel:serverId:ServerShortInfoResponse' :: Maybe Text
serverId = forall a. Maybe a
Prelude.Nothing,
$sel:serverName:ServerShortInfoResponse' :: Maybe Text
serverName = forall a. Maybe a
Prelude.Nothing
}
serverShortInfoResponse_ipAddress :: Lens.Lens' ServerShortInfoResponse (Prelude.Maybe Prelude.Text)
serverShortInfoResponse_ipAddress :: Lens' ServerShortInfoResponse (Maybe Text)
serverShortInfoResponse_ipAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerShortInfoResponse' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: ServerShortInfoResponse
s@ServerShortInfoResponse' {} Maybe Text
a -> ServerShortInfoResponse
s {$sel:ipAddress:ServerShortInfoResponse' :: Maybe Text
ipAddress = Maybe Text
a} :: ServerShortInfoResponse)
serverShortInfoResponse_serverId :: Lens.Lens' ServerShortInfoResponse (Prelude.Maybe Prelude.Text)
serverShortInfoResponse_serverId :: Lens' ServerShortInfoResponse (Maybe Text)
serverShortInfoResponse_serverId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerShortInfoResponse' {Maybe Text
serverId :: Maybe Text
$sel:serverId:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
serverId} -> Maybe Text
serverId) (\s :: ServerShortInfoResponse
s@ServerShortInfoResponse' {} Maybe Text
a -> ServerShortInfoResponse
s {$sel:serverId:ServerShortInfoResponse' :: Maybe Text
serverId = Maybe Text
a} :: ServerShortInfoResponse)
serverShortInfoResponse_serverName :: Lens.Lens' ServerShortInfoResponse (Prelude.Maybe Prelude.Text)
serverShortInfoResponse_serverName :: Lens' ServerShortInfoResponse (Maybe Text)
serverShortInfoResponse_serverName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerShortInfoResponse' {Maybe Text
serverName :: Maybe Text
$sel:serverName:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: ServerShortInfoResponse
s@ServerShortInfoResponse' {} Maybe Text
a -> ServerShortInfoResponse
s {$sel:serverName:ServerShortInfoResponse' :: Maybe Text
serverName = Maybe Text
a} :: ServerShortInfoResponse)
instance Data.FromJSON ServerShortInfoResponse where
parseJSON :: Value -> Parser ServerShortInfoResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServerShortInfoResponse"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ServerShortInfoResponse
ServerShortInfoResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IpAddress")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServerId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServerName")
)
instance Prelude.Hashable ServerShortInfoResponse where
hashWithSalt :: Int -> ServerShortInfoResponse -> Int
hashWithSalt Int
_salt ServerShortInfoResponse' {Maybe Text
serverName :: Maybe Text
serverId :: Maybe Text
ipAddress :: Maybe Text
$sel:serverName:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
$sel:serverId:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
$sel:ipAddress:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverName
instance Prelude.NFData ServerShortInfoResponse where
rnf :: ServerShortInfoResponse -> ()
rnf ServerShortInfoResponse' {Maybe Text
serverName :: Maybe Text
serverId :: Maybe Text
ipAddress :: Maybe Text
$sel:serverName:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
$sel:serverId:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
$sel:ipAddress:ServerShortInfoResponse' :: ServerShortInfoResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverName