{-# 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.ResourceDataSyncSourceWithState where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.ResourceDataSyncAwsOrganizationsSource
data ResourceDataSyncSourceWithState = ResourceDataSyncSourceWithState'
{
ResourceDataSyncSourceWithState -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ResourceDataSyncSourceWithState -> Maybe Bool
enableAllOpsDataSources :: Prelude.Maybe Prelude.Bool,
ResourceDataSyncSourceWithState -> Maybe Bool
includeFutureRegions :: Prelude.Maybe Prelude.Bool,
ResourceDataSyncSourceWithState -> Maybe Text
sourceType :: Prelude.Maybe Prelude.Text,
ResourceDataSyncSourceWithState
-> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource :: Prelude.Maybe ResourceDataSyncAwsOrganizationsSource,
ResourceDataSyncSourceWithState -> Maybe [Text]
sourceRegions :: Prelude.Maybe [Prelude.Text]
}
deriving (ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool
(ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool)
-> (ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool)
-> Eq ResourceDataSyncSourceWithState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool
$c/= :: ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool
== :: ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool
$c== :: ResourceDataSyncSourceWithState
-> ResourceDataSyncSourceWithState -> Bool
Prelude.Eq, ReadPrec [ResourceDataSyncSourceWithState]
ReadPrec ResourceDataSyncSourceWithState
Int -> ReadS ResourceDataSyncSourceWithState
ReadS [ResourceDataSyncSourceWithState]
(Int -> ReadS ResourceDataSyncSourceWithState)
-> ReadS [ResourceDataSyncSourceWithState]
-> ReadPrec ResourceDataSyncSourceWithState
-> ReadPrec [ResourceDataSyncSourceWithState]
-> Read ResourceDataSyncSourceWithState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceDataSyncSourceWithState]
$creadListPrec :: ReadPrec [ResourceDataSyncSourceWithState]
readPrec :: ReadPrec ResourceDataSyncSourceWithState
$creadPrec :: ReadPrec ResourceDataSyncSourceWithState
readList :: ReadS [ResourceDataSyncSourceWithState]
$creadList :: ReadS [ResourceDataSyncSourceWithState]
readsPrec :: Int -> ReadS ResourceDataSyncSourceWithState
$creadsPrec :: Int -> ReadS ResourceDataSyncSourceWithState
Prelude.Read, Int -> ResourceDataSyncSourceWithState -> ShowS
[ResourceDataSyncSourceWithState] -> ShowS
ResourceDataSyncSourceWithState -> String
(Int -> ResourceDataSyncSourceWithState -> ShowS)
-> (ResourceDataSyncSourceWithState -> String)
-> ([ResourceDataSyncSourceWithState] -> ShowS)
-> Show ResourceDataSyncSourceWithState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceDataSyncSourceWithState] -> ShowS
$cshowList :: [ResourceDataSyncSourceWithState] -> ShowS
show :: ResourceDataSyncSourceWithState -> String
$cshow :: ResourceDataSyncSourceWithState -> String
showsPrec :: Int -> ResourceDataSyncSourceWithState -> ShowS
$cshowsPrec :: Int -> ResourceDataSyncSourceWithState -> ShowS
Prelude.Show, (forall x.
ResourceDataSyncSourceWithState
-> Rep ResourceDataSyncSourceWithState x)
-> (forall x.
Rep ResourceDataSyncSourceWithState x
-> ResourceDataSyncSourceWithState)
-> Generic ResourceDataSyncSourceWithState
forall x.
Rep ResourceDataSyncSourceWithState x
-> ResourceDataSyncSourceWithState
forall x.
ResourceDataSyncSourceWithState
-> Rep ResourceDataSyncSourceWithState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResourceDataSyncSourceWithState x
-> ResourceDataSyncSourceWithState
$cfrom :: forall x.
ResourceDataSyncSourceWithState
-> Rep ResourceDataSyncSourceWithState x
Prelude.Generic)
newResourceDataSyncSourceWithState ::
ResourceDataSyncSourceWithState
newResourceDataSyncSourceWithState :: ResourceDataSyncSourceWithState
newResourceDataSyncSourceWithState =
ResourceDataSyncSourceWithState' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState'
{ $sel:state:ResourceDataSyncSourceWithState' :: Maybe Text
state =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableAllOpsDataSources:ResourceDataSyncSourceWithState' :: Maybe Bool
enableAllOpsDataSources = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeFutureRegions:ResourceDataSyncSourceWithState' :: Maybe Bool
includeFutureRegions = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:ResourceDataSyncSourceWithState' :: Maybe Text
sourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:awsOrganizationsSource:ResourceDataSyncSourceWithState' :: Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource = Maybe ResourceDataSyncAwsOrganizationsSource
forall a. Maybe a
Prelude.Nothing,
$sel:sourceRegions:ResourceDataSyncSourceWithState' :: Maybe [Text]
sourceRegions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
resourceDataSyncSourceWithState_state :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe Prelude.Text)
resourceDataSyncSourceWithState_state :: (Maybe Text -> f (Maybe Text))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_state = (ResourceDataSyncSourceWithState -> Maybe Text)
-> (ResourceDataSyncSourceWithState
-> Maybe Text -> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe Text
state :: Maybe Text
$sel:state:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState -> Maybe Text
state} -> Maybe Text
state) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe Text
a -> ResourceDataSyncSourceWithState
s {$sel:state:ResourceDataSyncSourceWithState' :: Maybe Text
state = Maybe Text
a} :: ResourceDataSyncSourceWithState)
resourceDataSyncSourceWithState_enableAllOpsDataSources :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe Prelude.Bool)
resourceDataSyncSourceWithState_enableAllOpsDataSources :: (Maybe Bool -> f (Maybe Bool))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_enableAllOpsDataSources = (ResourceDataSyncSourceWithState -> Maybe Bool)
-> (ResourceDataSyncSourceWithState
-> Maybe Bool -> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe Bool
enableAllOpsDataSources :: Maybe Bool
$sel:enableAllOpsDataSources:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState -> Maybe Bool
enableAllOpsDataSources} -> Maybe Bool
enableAllOpsDataSources) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe Bool
a -> ResourceDataSyncSourceWithState
s {$sel:enableAllOpsDataSources:ResourceDataSyncSourceWithState' :: Maybe Bool
enableAllOpsDataSources = Maybe Bool
a} :: ResourceDataSyncSourceWithState)
resourceDataSyncSourceWithState_includeFutureRegions :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe Prelude.Bool)
resourceDataSyncSourceWithState_includeFutureRegions :: (Maybe Bool -> f (Maybe Bool))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_includeFutureRegions = (ResourceDataSyncSourceWithState -> Maybe Bool)
-> (ResourceDataSyncSourceWithState
-> Maybe Bool -> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe Bool
includeFutureRegions :: Maybe Bool
$sel:includeFutureRegions:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState -> Maybe Bool
includeFutureRegions} -> Maybe Bool
includeFutureRegions) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe Bool
a -> ResourceDataSyncSourceWithState
s {$sel:includeFutureRegions:ResourceDataSyncSourceWithState' :: Maybe Bool
includeFutureRegions = Maybe Bool
a} :: ResourceDataSyncSourceWithState)
resourceDataSyncSourceWithState_sourceType :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe Prelude.Text)
resourceDataSyncSourceWithState_sourceType :: (Maybe Text -> f (Maybe Text))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_sourceType = (ResourceDataSyncSourceWithState -> Maybe Text)
-> (ResourceDataSyncSourceWithState
-> Maybe Text -> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe Text
sourceType :: Maybe Text
$sel:sourceType:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState -> Maybe Text
sourceType} -> Maybe Text
sourceType) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe Text
a -> ResourceDataSyncSourceWithState
s {$sel:sourceType:ResourceDataSyncSourceWithState' :: Maybe Text
sourceType = Maybe Text
a} :: ResourceDataSyncSourceWithState)
resourceDataSyncSourceWithState_awsOrganizationsSource :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe ResourceDataSyncAwsOrganizationsSource)
resourceDataSyncSourceWithState_awsOrganizationsSource :: (Maybe ResourceDataSyncAwsOrganizationsSource
-> f (Maybe ResourceDataSyncAwsOrganizationsSource))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_awsOrganizationsSource = (ResourceDataSyncSourceWithState
-> Maybe ResourceDataSyncAwsOrganizationsSource)
-> (ResourceDataSyncSourceWithState
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe ResourceDataSyncAwsOrganizationsSource)
(Maybe ResourceDataSyncAwsOrganizationsSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource :: Maybe ResourceDataSyncAwsOrganizationsSource
$sel:awsOrganizationsSource:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState
-> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource} -> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe ResourceDataSyncAwsOrganizationsSource
a -> ResourceDataSyncSourceWithState
s {$sel:awsOrganizationsSource:ResourceDataSyncSourceWithState' :: Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource = Maybe ResourceDataSyncAwsOrganizationsSource
a} :: ResourceDataSyncSourceWithState)
resourceDataSyncSourceWithState_sourceRegions :: Lens.Lens' ResourceDataSyncSourceWithState (Prelude.Maybe [Prelude.Text])
resourceDataSyncSourceWithState_sourceRegions :: (Maybe [Text] -> f (Maybe [Text]))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
resourceDataSyncSourceWithState_sourceRegions = (ResourceDataSyncSourceWithState -> Maybe [Text])
-> (ResourceDataSyncSourceWithState
-> Maybe [Text] -> ResourceDataSyncSourceWithState)
-> Lens
ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSourceWithState' {Maybe [Text]
sourceRegions :: Maybe [Text]
$sel:sourceRegions:ResourceDataSyncSourceWithState' :: ResourceDataSyncSourceWithState -> Maybe [Text]
sourceRegions} -> Maybe [Text]
sourceRegions) (\s :: ResourceDataSyncSourceWithState
s@ResourceDataSyncSourceWithState' {} Maybe [Text]
a -> ResourceDataSyncSourceWithState
s {$sel:sourceRegions:ResourceDataSyncSourceWithState' :: Maybe [Text]
sourceRegions = Maybe [Text]
a} :: ResourceDataSyncSourceWithState) ((Maybe [Text] -> f (Maybe [Text]))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ResourceDataSyncSourceWithState
-> f ResourceDataSyncSourceWithState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
ResourceDataSyncSourceWithState
where
parseJSON :: Value -> Parser ResourceDataSyncSourceWithState
parseJSON =
String
-> (Object -> Parser ResourceDataSyncSourceWithState)
-> Value
-> Parser ResourceDataSyncSourceWithState
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResourceDataSyncSourceWithState"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState
ResourceDataSyncSourceWithState'
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
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
"State")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableAllOpsDataSources")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeFutureRegions")
Parser
(Maybe Text
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text]
-> ResourceDataSyncSourceWithState)
-> Parser (Maybe Text)
-> Parser
(Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text] -> ResourceDataSyncSourceWithState)
forall (f :: * -> *) a b. Applicative f => 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
"SourceType")
Parser
(Maybe ResourceDataSyncAwsOrganizationsSource
-> Maybe [Text] -> ResourceDataSyncSourceWithState)
-> Parser (Maybe ResourceDataSyncAwsOrganizationsSource)
-> Parser (Maybe [Text] -> ResourceDataSyncSourceWithState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ResourceDataSyncAwsOrganizationsSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AwsOrganizationsSource")
Parser (Maybe [Text] -> ResourceDataSyncSourceWithState)
-> Parser (Maybe [Text]) -> Parser ResourceDataSyncSourceWithState
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceRegions" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
ResourceDataSyncSourceWithState
instance
Prelude.NFData
ResourceDataSyncSourceWithState