{-# 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.SSM.Types.OutputSource 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 OutputSource = OutputSource'
{
OutputSource -> Maybe Text
outputSourceId :: Prelude.Maybe Prelude.Text,
OutputSource -> Maybe Text
outputSourceType :: Prelude.Maybe Prelude.Text
}
deriving (OutputSource -> OutputSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputSource -> OutputSource -> Bool
$c/= :: OutputSource -> OutputSource -> Bool
== :: OutputSource -> OutputSource -> Bool
$c== :: OutputSource -> OutputSource -> Bool
Prelude.Eq, ReadPrec [OutputSource]
ReadPrec OutputSource
Int -> ReadS OutputSource
ReadS [OutputSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputSource]
$creadListPrec :: ReadPrec [OutputSource]
readPrec :: ReadPrec OutputSource
$creadPrec :: ReadPrec OutputSource
readList :: ReadS [OutputSource]
$creadList :: ReadS [OutputSource]
readsPrec :: Int -> ReadS OutputSource
$creadsPrec :: Int -> ReadS OutputSource
Prelude.Read, Int -> OutputSource -> ShowS
[OutputSource] -> ShowS
OutputSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputSource] -> ShowS
$cshowList :: [OutputSource] -> ShowS
show :: OutputSource -> String
$cshow :: OutputSource -> String
showsPrec :: Int -> OutputSource -> ShowS
$cshowsPrec :: Int -> OutputSource -> ShowS
Prelude.Show, forall x. Rep OutputSource x -> OutputSource
forall x. OutputSource -> Rep OutputSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputSource x -> OutputSource
$cfrom :: forall x. OutputSource -> Rep OutputSource x
Prelude.Generic)
newOutputSource ::
OutputSource
newOutputSource :: OutputSource
newOutputSource =
OutputSource'
{ $sel:outputSourceId:OutputSource' :: Maybe Text
outputSourceId = forall a. Maybe a
Prelude.Nothing,
$sel:outputSourceType:OutputSource' :: Maybe Text
outputSourceType = forall a. Maybe a
Prelude.Nothing
}
outputSource_outputSourceId :: Lens.Lens' OutputSource (Prelude.Maybe Prelude.Text)
outputSource_outputSourceId :: Lens' OutputSource (Maybe Text)
outputSource_outputSourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSource' {Maybe Text
outputSourceId :: Maybe Text
$sel:outputSourceId:OutputSource' :: OutputSource -> Maybe Text
outputSourceId} -> Maybe Text
outputSourceId) (\s :: OutputSource
s@OutputSource' {} Maybe Text
a -> OutputSource
s {$sel:outputSourceId:OutputSource' :: Maybe Text
outputSourceId = Maybe Text
a} :: OutputSource)
outputSource_outputSourceType :: Lens.Lens' OutputSource (Prelude.Maybe Prelude.Text)
outputSource_outputSourceType :: Lens' OutputSource (Maybe Text)
outputSource_outputSourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSource' {Maybe Text
outputSourceType :: Maybe Text
$sel:outputSourceType:OutputSource' :: OutputSource -> Maybe Text
outputSourceType} -> Maybe Text
outputSourceType) (\s :: OutputSource
s@OutputSource' {} Maybe Text
a -> OutputSource
s {$sel:outputSourceType:OutputSource' :: Maybe Text
outputSourceType = Maybe Text
a} :: OutputSource)
instance Data.FromJSON OutputSource where
parseJSON :: Value -> Parser OutputSource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OutputSource"
( \Object
x ->
Maybe Text -> Maybe Text -> OutputSource
OutputSource'
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
"OutputSourceId")
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
"OutputSourceType")
)
instance Prelude.Hashable OutputSource where
hashWithSalt :: Int -> OutputSource -> Int
hashWithSalt Int
_salt OutputSource' {Maybe Text
outputSourceType :: Maybe Text
outputSourceId :: Maybe Text
$sel:outputSourceType:OutputSource' :: OutputSource -> Maybe Text
$sel:outputSourceId:OutputSource' :: OutputSource -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputSourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputSourceType
instance Prelude.NFData OutputSource where
rnf :: OutputSource -> ()
rnf OutputSource' {Maybe Text
outputSourceType :: Maybe Text
outputSourceId :: Maybe Text
$sel:outputSourceType:OutputSource' :: OutputSource -> Maybe Text
$sel:outputSourceId:OutputSource' :: OutputSource -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputSourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputSourceType