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