{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SMS.Types.ServerValidationOutput
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SMS.Types.ServerValidationOutput 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
import Amazonka.SMS.Types.Server

-- | Contains output from validating an instance.
--
-- /See:/ 'newServerValidationOutput' smart constructor.
data ServerValidationOutput = ServerValidationOutput'
  { ServerValidationOutput -> Maybe Server
server :: Prelude.Maybe Server
  }
  deriving (ServerValidationOutput -> ServerValidationOutput -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'ServerValidationOutput' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'server', 'serverValidationOutput_server' - Undocumented member.
newServerValidationOutput ::
  ServerValidationOutput
newServerValidationOutput :: ServerValidationOutput
newServerValidationOutput =
  ServerValidationOutput' {$sel:server:ServerValidationOutput' :: Maybe Server
server = forall a. Maybe a
Prelude.Nothing}

-- | Undocumented member.
serverValidationOutput_server :: Lens.Lens' ServerValidationOutput (Prelude.Maybe Server)
serverValidationOutput_server :: Lens' ServerValidationOutput (Maybe Server)
serverValidationOutput_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 Data.FromJSON ServerValidationOutput where
  parseJSON :: Value -> Parser ServerValidationOutput
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ServerValidationOutput"
      ( \Object
x ->
          Maybe Server -> ServerValidationOutput
ServerValidationOutput'
            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
"server")
      )

instance Prelude.Hashable ServerValidationOutput where
  hashWithSalt :: Int -> ServerValidationOutput -> Int
hashWithSalt Int
_salt ServerValidationOutput' {Maybe Server
server :: Maybe Server
$sel:server:ServerValidationOutput' :: ServerValidationOutput -> Maybe Server
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Server
server

instance Prelude.NFData ServerValidationOutput where
  rnf :: ServerValidationOutput -> ()
rnf ServerValidationOutput' {Maybe Server
server :: Maybe Server
$sel:server:ServerValidationOutput' :: ServerValidationOutput -> Maybe Server
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Server
server