{-# 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.ResourceDataSyncSource 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 ResourceDataSyncSource = ResourceDataSyncSource'
{
ResourceDataSyncSource -> Maybe Bool
enableAllOpsDataSources :: Prelude.Maybe Prelude.Bool,
ResourceDataSyncSource -> Maybe Bool
includeFutureRegions :: Prelude.Maybe Prelude.Bool,
ResourceDataSyncSource
-> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource :: Prelude.Maybe ResourceDataSyncAwsOrganizationsSource,
ResourceDataSyncSource -> Text
sourceType :: Prelude.Text,
ResourceDataSyncSource -> [Text]
sourceRegions :: [Prelude.Text]
}
deriving (ResourceDataSyncSource -> ResourceDataSyncSource -> Bool
(ResourceDataSyncSource -> ResourceDataSyncSource -> Bool)
-> (ResourceDataSyncSource -> ResourceDataSyncSource -> Bool)
-> Eq ResourceDataSyncSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceDataSyncSource -> ResourceDataSyncSource -> Bool
$c/= :: ResourceDataSyncSource -> ResourceDataSyncSource -> Bool
== :: ResourceDataSyncSource -> ResourceDataSyncSource -> Bool
$c== :: ResourceDataSyncSource -> ResourceDataSyncSource -> Bool
Prelude.Eq, ReadPrec [ResourceDataSyncSource]
ReadPrec ResourceDataSyncSource
Int -> ReadS ResourceDataSyncSource
ReadS [ResourceDataSyncSource]
(Int -> ReadS ResourceDataSyncSource)
-> ReadS [ResourceDataSyncSource]
-> ReadPrec ResourceDataSyncSource
-> ReadPrec [ResourceDataSyncSource]
-> Read ResourceDataSyncSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceDataSyncSource]
$creadListPrec :: ReadPrec [ResourceDataSyncSource]
readPrec :: ReadPrec ResourceDataSyncSource
$creadPrec :: ReadPrec ResourceDataSyncSource
readList :: ReadS [ResourceDataSyncSource]
$creadList :: ReadS [ResourceDataSyncSource]
readsPrec :: Int -> ReadS ResourceDataSyncSource
$creadsPrec :: Int -> ReadS ResourceDataSyncSource
Prelude.Read, Int -> ResourceDataSyncSource -> ShowS
[ResourceDataSyncSource] -> ShowS
ResourceDataSyncSource -> String
(Int -> ResourceDataSyncSource -> ShowS)
-> (ResourceDataSyncSource -> String)
-> ([ResourceDataSyncSource] -> ShowS)
-> Show ResourceDataSyncSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceDataSyncSource] -> ShowS
$cshowList :: [ResourceDataSyncSource] -> ShowS
show :: ResourceDataSyncSource -> String
$cshow :: ResourceDataSyncSource -> String
showsPrec :: Int -> ResourceDataSyncSource -> ShowS
$cshowsPrec :: Int -> ResourceDataSyncSource -> ShowS
Prelude.Show, (forall x. ResourceDataSyncSource -> Rep ResourceDataSyncSource x)
-> (forall x.
Rep ResourceDataSyncSource x -> ResourceDataSyncSource)
-> Generic ResourceDataSyncSource
forall x. Rep ResourceDataSyncSource x -> ResourceDataSyncSource
forall x. ResourceDataSyncSource -> Rep ResourceDataSyncSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceDataSyncSource x -> ResourceDataSyncSource
$cfrom :: forall x. ResourceDataSyncSource -> Rep ResourceDataSyncSource x
Prelude.Generic)
newResourceDataSyncSource ::
Prelude.Text ->
ResourceDataSyncSource
newResourceDataSyncSource :: Text -> ResourceDataSyncSource
newResourceDataSyncSource Text
pSourceType_ =
ResourceDataSyncSource' :: Maybe Bool
-> Maybe Bool
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> Text
-> [Text]
-> ResourceDataSyncSource
ResourceDataSyncSource'
{ $sel:enableAllOpsDataSources:ResourceDataSyncSource' :: Maybe Bool
enableAllOpsDataSources =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeFutureRegions:ResourceDataSyncSource' :: Maybe Bool
includeFutureRegions = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:awsOrganizationsSource:ResourceDataSyncSource' :: Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource = Maybe ResourceDataSyncAwsOrganizationsSource
forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:ResourceDataSyncSource' :: Text
sourceType = Text
pSourceType_,
$sel:sourceRegions:ResourceDataSyncSource' :: [Text]
sourceRegions = [Text]
forall a. Monoid a => a
Prelude.mempty
}
resourceDataSyncSource_enableAllOpsDataSources :: Lens.Lens' ResourceDataSyncSource (Prelude.Maybe Prelude.Bool)
resourceDataSyncSource_enableAllOpsDataSources :: (Maybe Bool -> f (Maybe Bool))
-> ResourceDataSyncSource -> f ResourceDataSyncSource
resourceDataSyncSource_enableAllOpsDataSources = (ResourceDataSyncSource -> Maybe Bool)
-> (ResourceDataSyncSource -> Maybe Bool -> ResourceDataSyncSource)
-> Lens
ResourceDataSyncSource
ResourceDataSyncSource
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSource' {Maybe Bool
enableAllOpsDataSources :: Maybe Bool
$sel:enableAllOpsDataSources:ResourceDataSyncSource' :: ResourceDataSyncSource -> Maybe Bool
enableAllOpsDataSources} -> Maybe Bool
enableAllOpsDataSources) (\s :: ResourceDataSyncSource
s@ResourceDataSyncSource' {} Maybe Bool
a -> ResourceDataSyncSource
s {$sel:enableAllOpsDataSources:ResourceDataSyncSource' :: Maybe Bool
enableAllOpsDataSources = Maybe Bool
a} :: ResourceDataSyncSource)
resourceDataSyncSource_includeFutureRegions :: Lens.Lens' ResourceDataSyncSource (Prelude.Maybe Prelude.Bool)
resourceDataSyncSource_includeFutureRegions :: (Maybe Bool -> f (Maybe Bool))
-> ResourceDataSyncSource -> f ResourceDataSyncSource
resourceDataSyncSource_includeFutureRegions = (ResourceDataSyncSource -> Maybe Bool)
-> (ResourceDataSyncSource -> Maybe Bool -> ResourceDataSyncSource)
-> Lens
ResourceDataSyncSource
ResourceDataSyncSource
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSource' {Maybe Bool
includeFutureRegions :: Maybe Bool
$sel:includeFutureRegions:ResourceDataSyncSource' :: ResourceDataSyncSource -> Maybe Bool
includeFutureRegions} -> Maybe Bool
includeFutureRegions) (\s :: ResourceDataSyncSource
s@ResourceDataSyncSource' {} Maybe Bool
a -> ResourceDataSyncSource
s {$sel:includeFutureRegions:ResourceDataSyncSource' :: Maybe Bool
includeFutureRegions = Maybe Bool
a} :: ResourceDataSyncSource)
resourceDataSyncSource_awsOrganizationsSource :: Lens.Lens' ResourceDataSyncSource (Prelude.Maybe ResourceDataSyncAwsOrganizationsSource)
resourceDataSyncSource_awsOrganizationsSource :: (Maybe ResourceDataSyncAwsOrganizationsSource
-> f (Maybe ResourceDataSyncAwsOrganizationsSource))
-> ResourceDataSyncSource -> f ResourceDataSyncSource
resourceDataSyncSource_awsOrganizationsSource = (ResourceDataSyncSource
-> Maybe ResourceDataSyncAwsOrganizationsSource)
-> (ResourceDataSyncSource
-> Maybe ResourceDataSyncAwsOrganizationsSource
-> ResourceDataSyncSource)
-> Lens
ResourceDataSyncSource
ResourceDataSyncSource
(Maybe ResourceDataSyncAwsOrganizationsSource)
(Maybe ResourceDataSyncAwsOrganizationsSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSource' {Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource :: Maybe ResourceDataSyncAwsOrganizationsSource
$sel:awsOrganizationsSource:ResourceDataSyncSource' :: ResourceDataSyncSource
-> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource} -> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource) (\s :: ResourceDataSyncSource
s@ResourceDataSyncSource' {} Maybe ResourceDataSyncAwsOrganizationsSource
a -> ResourceDataSyncSource
s {$sel:awsOrganizationsSource:ResourceDataSyncSource' :: Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource = Maybe ResourceDataSyncAwsOrganizationsSource
a} :: ResourceDataSyncSource)
resourceDataSyncSource_sourceType :: Lens.Lens' ResourceDataSyncSource Prelude.Text
resourceDataSyncSource_sourceType :: (Text -> f Text)
-> ResourceDataSyncSource -> f ResourceDataSyncSource
resourceDataSyncSource_sourceType = (ResourceDataSyncSource -> Text)
-> (ResourceDataSyncSource -> Text -> ResourceDataSyncSource)
-> Lens ResourceDataSyncSource ResourceDataSyncSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSource' {Text
sourceType :: Text
$sel:sourceType:ResourceDataSyncSource' :: ResourceDataSyncSource -> Text
sourceType} -> Text
sourceType) (\s :: ResourceDataSyncSource
s@ResourceDataSyncSource' {} Text
a -> ResourceDataSyncSource
s {$sel:sourceType:ResourceDataSyncSource' :: Text
sourceType = Text
a} :: ResourceDataSyncSource)
resourceDataSyncSource_sourceRegions :: Lens.Lens' ResourceDataSyncSource [Prelude.Text]
resourceDataSyncSource_sourceRegions :: ([Text] -> f [Text])
-> ResourceDataSyncSource -> f ResourceDataSyncSource
resourceDataSyncSource_sourceRegions = (ResourceDataSyncSource -> [Text])
-> (ResourceDataSyncSource -> [Text] -> ResourceDataSyncSource)
-> Lens ResourceDataSyncSource ResourceDataSyncSource [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceDataSyncSource' {[Text]
sourceRegions :: [Text]
$sel:sourceRegions:ResourceDataSyncSource' :: ResourceDataSyncSource -> [Text]
sourceRegions} -> [Text]
sourceRegions) (\s :: ResourceDataSyncSource
s@ResourceDataSyncSource' {} [Text]
a -> ResourceDataSyncSource
s {$sel:sourceRegions:ResourceDataSyncSource' :: [Text]
sourceRegions = [Text]
a} :: ResourceDataSyncSource) (([Text] -> f [Text])
-> ResourceDataSyncSource -> f ResourceDataSyncSource)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ResourceDataSyncSource
-> f ResourceDataSyncSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable ResourceDataSyncSource
instance Prelude.NFData ResourceDataSyncSource
instance Core.ToJSON ResourceDataSyncSource where
toJSON :: ResourceDataSyncSource -> Value
toJSON ResourceDataSyncSource' {[Text]
Maybe Bool
Maybe ResourceDataSyncAwsOrganizationsSource
Text
sourceRegions :: [Text]
sourceType :: Text
awsOrganizationsSource :: Maybe ResourceDataSyncAwsOrganizationsSource
includeFutureRegions :: Maybe Bool
enableAllOpsDataSources :: Maybe Bool
$sel:sourceRegions:ResourceDataSyncSource' :: ResourceDataSyncSource -> [Text]
$sel:sourceType:ResourceDataSyncSource' :: ResourceDataSyncSource -> Text
$sel:awsOrganizationsSource:ResourceDataSyncSource' :: ResourceDataSyncSource
-> Maybe ResourceDataSyncAwsOrganizationsSource
$sel:includeFutureRegions:ResourceDataSyncSource' :: ResourceDataSyncSource -> Maybe Bool
$sel:enableAllOpsDataSources:ResourceDataSyncSource' :: ResourceDataSyncSource -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EnableAllOpsDataSources" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableAllOpsDataSources,
(Text
"IncludeFutureRegions" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeFutureRegions,
(Text
"AwsOrganizationsSource" Text -> ResourceDataSyncAwsOrganizationsSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ResourceDataSyncAwsOrganizationsSource -> Pair)
-> Maybe ResourceDataSyncAwsOrganizationsSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceDataSyncAwsOrganizationsSource
awsOrganizationsSource,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SourceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SourceRegions" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
sourceRegions)
]
)