{-# 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.AppValidationOutput
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SMS.Types.AppValidationOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SMS.Types.SSMOutput

-- | Output from validating an application.
--
-- /See:/ 'newAppValidationOutput' smart constructor.
data AppValidationOutput = AppValidationOutput'
  { -- | Output from using SSM to validate the application.
    AppValidationOutput -> Maybe SSMOutput
ssmOutput :: Prelude.Maybe SSMOutput
  }
  deriving (AppValidationOutput -> AppValidationOutput -> Bool
(AppValidationOutput -> AppValidationOutput -> Bool)
-> (AppValidationOutput -> AppValidationOutput -> Bool)
-> Eq AppValidationOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppValidationOutput -> AppValidationOutput -> Bool
$c/= :: AppValidationOutput -> AppValidationOutput -> Bool
== :: AppValidationOutput -> AppValidationOutput -> Bool
$c== :: AppValidationOutput -> AppValidationOutput -> Bool
Prelude.Eq, ReadPrec [AppValidationOutput]
ReadPrec AppValidationOutput
Int -> ReadS AppValidationOutput
ReadS [AppValidationOutput]
(Int -> ReadS AppValidationOutput)
-> ReadS [AppValidationOutput]
-> ReadPrec AppValidationOutput
-> ReadPrec [AppValidationOutput]
-> Read AppValidationOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AppValidationOutput]
$creadListPrec :: ReadPrec [AppValidationOutput]
readPrec :: ReadPrec AppValidationOutput
$creadPrec :: ReadPrec AppValidationOutput
readList :: ReadS [AppValidationOutput]
$creadList :: ReadS [AppValidationOutput]
readsPrec :: Int -> ReadS AppValidationOutput
$creadsPrec :: Int -> ReadS AppValidationOutput
Prelude.Read, Int -> AppValidationOutput -> ShowS
[AppValidationOutput] -> ShowS
AppValidationOutput -> String
(Int -> AppValidationOutput -> ShowS)
-> (AppValidationOutput -> String)
-> ([AppValidationOutput] -> ShowS)
-> Show AppValidationOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AppValidationOutput] -> ShowS
$cshowList :: [AppValidationOutput] -> ShowS
show :: AppValidationOutput -> String
$cshow :: AppValidationOutput -> String
showsPrec :: Int -> AppValidationOutput -> ShowS
$cshowsPrec :: Int -> AppValidationOutput -> ShowS
Prelude.Show, (forall x. AppValidationOutput -> Rep AppValidationOutput x)
-> (forall x. Rep AppValidationOutput x -> AppValidationOutput)
-> Generic AppValidationOutput
forall x. Rep AppValidationOutput x -> AppValidationOutput
forall x. AppValidationOutput -> Rep AppValidationOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AppValidationOutput x -> AppValidationOutput
$cfrom :: forall x. AppValidationOutput -> Rep AppValidationOutput x
Prelude.Generic)

-- |
-- Create a value of 'AppValidationOutput' 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:
--
-- 'ssmOutput', 'appValidationOutput_ssmOutput' - Output from using SSM to validate the application.
newAppValidationOutput ::
  AppValidationOutput
newAppValidationOutput :: AppValidationOutput
newAppValidationOutput =
  AppValidationOutput' :: Maybe SSMOutput -> AppValidationOutput
AppValidationOutput' {$sel:ssmOutput:AppValidationOutput' :: Maybe SSMOutput
ssmOutput = Maybe SSMOutput
forall a. Maybe a
Prelude.Nothing}

-- | Output from using SSM to validate the application.
appValidationOutput_ssmOutput :: Lens.Lens' AppValidationOutput (Prelude.Maybe SSMOutput)
appValidationOutput_ssmOutput :: (Maybe SSMOutput -> f (Maybe SSMOutput))
-> AppValidationOutput -> f AppValidationOutput
appValidationOutput_ssmOutput = (AppValidationOutput -> Maybe SSMOutput)
-> (AppValidationOutput -> Maybe SSMOutput -> AppValidationOutput)
-> Lens
     AppValidationOutput
     AppValidationOutput
     (Maybe SSMOutput)
     (Maybe SSMOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppValidationOutput' {Maybe SSMOutput
ssmOutput :: Maybe SSMOutput
$sel:ssmOutput:AppValidationOutput' :: AppValidationOutput -> Maybe SSMOutput
ssmOutput} -> Maybe SSMOutput
ssmOutput) (\s :: AppValidationOutput
s@AppValidationOutput' {} Maybe SSMOutput
a -> AppValidationOutput
s {$sel:ssmOutput:AppValidationOutput' :: Maybe SSMOutput
ssmOutput = Maybe SSMOutput
a} :: AppValidationOutput)

instance Core.FromJSON AppValidationOutput where
  parseJSON :: Value -> Parser AppValidationOutput
parseJSON =
    String
-> (Object -> Parser AppValidationOutput)
-> Value
-> Parser AppValidationOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AppValidationOutput"
      ( \Object
x ->
          Maybe SSMOutput -> AppValidationOutput
AppValidationOutput'
            (Maybe SSMOutput -> AppValidationOutput)
-> Parser (Maybe SSMOutput) -> Parser AppValidationOutput
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SSMOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ssmOutput")
      )

instance Prelude.Hashable AppValidationOutput

instance Prelude.NFData AppValidationOutput