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