{-# 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.SMS.Types.ServerValidationOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SMS.Types.Server
data ServerValidationOutput = ServerValidationOutput'
{ ServerValidationOutput -> Maybe Server
server :: Prelude.Maybe Server
}
deriving (ServerValidationOutput -> ServerValidationOutput -> Bool
(ServerValidationOutput -> ServerValidationOutput -> Bool)
-> (ServerValidationOutput -> ServerValidationOutput -> Bool)
-> Eq ServerValidationOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerValidationOutput -> ServerValidationOutput -> Bool
$c/= :: ServerValidationOutput -> ServerValidationOutput -> Bool
== :: ServerValidationOutput -> ServerValidationOutput -> Bool
$c== :: ServerValidationOutput -> ServerValidationOutput -> Bool
Prelude.Eq, ReadPrec [ServerValidationOutput]
ReadPrec ServerValidationOutput
Int -> ReadS ServerValidationOutput
ReadS [ServerValidationOutput]
(Int -> ReadS ServerValidationOutput)
-> ReadS [ServerValidationOutput]
-> ReadPrec ServerValidationOutput
-> ReadPrec [ServerValidationOutput]
-> Read ServerValidationOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerValidationOutput]
$creadListPrec :: ReadPrec [ServerValidationOutput]
readPrec :: ReadPrec ServerValidationOutput
$creadPrec :: ReadPrec ServerValidationOutput
readList :: ReadS [ServerValidationOutput]
$creadList :: ReadS [ServerValidationOutput]
readsPrec :: Int -> ReadS ServerValidationOutput
$creadsPrec :: Int -> ReadS ServerValidationOutput
Prelude.Read, Int -> ServerValidationOutput -> ShowS
[ServerValidationOutput] -> ShowS
ServerValidationOutput -> String
(Int -> ServerValidationOutput -> ShowS)
-> (ServerValidationOutput -> String)
-> ([ServerValidationOutput] -> ShowS)
-> Show ServerValidationOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerValidationOutput] -> ShowS
$cshowList :: [ServerValidationOutput] -> ShowS
show :: ServerValidationOutput -> String
$cshow :: ServerValidationOutput -> String
showsPrec :: Int -> ServerValidationOutput -> ShowS
$cshowsPrec :: Int -> ServerValidationOutput -> ShowS
Prelude.Show, (forall x. ServerValidationOutput -> Rep ServerValidationOutput x)
-> (forall x.
Rep ServerValidationOutput x -> ServerValidationOutput)
-> Generic ServerValidationOutput
forall x. Rep ServerValidationOutput x -> ServerValidationOutput
forall x. ServerValidationOutput -> Rep ServerValidationOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServerValidationOutput x -> ServerValidationOutput
$cfrom :: forall x. ServerValidationOutput -> Rep ServerValidationOutput x
Prelude.Generic)
newServerValidationOutput ::
ServerValidationOutput
newServerValidationOutput :: ServerValidationOutput
newServerValidationOutput =
ServerValidationOutput' :: Maybe Server -> ServerValidationOutput
ServerValidationOutput' {$sel:server:ServerValidationOutput' :: Maybe Server
server = Maybe Server
forall a. Maybe a
Prelude.Nothing}
serverValidationOutput_server :: Lens.Lens' ServerValidationOutput (Prelude.Maybe Server)
serverValidationOutput_server :: (Maybe Server -> f (Maybe Server))
-> ServerValidationOutput -> f ServerValidationOutput
serverValidationOutput_server = (ServerValidationOutput -> Maybe Server)
-> (ServerValidationOutput
-> Maybe Server -> ServerValidationOutput)
-> Lens
ServerValidationOutput
ServerValidationOutput
(Maybe Server)
(Maybe Server)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerValidationOutput' {Maybe Server
server :: Maybe Server
$sel:server:ServerValidationOutput' :: ServerValidationOutput -> Maybe Server
server} -> Maybe Server
server) (\s :: ServerValidationOutput
s@ServerValidationOutput' {} Maybe Server
a -> ServerValidationOutput
s {$sel:server:ServerValidationOutput' :: Maybe Server
server = Maybe Server
a} :: ServerValidationOutput)
instance Core.FromJSON ServerValidationOutput where
parseJSON :: Value -> Parser ServerValidationOutput
parseJSON =
String
-> (Object -> Parser ServerValidationOutput)
-> Value
-> Parser ServerValidationOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServerValidationOutput"
( \Object
x ->
Maybe Server -> ServerValidationOutput
ServerValidationOutput'
(Maybe Server -> ServerValidationOutput)
-> Parser (Maybe Server) -> Parser ServerValidationOutput
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Server)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"server")
)
instance Prelude.Hashable ServerValidationOutput
instance Prelude.NFData ServerValidationOutput