module Stratosphere.APS.Scraper.RoleConfigurationProperty (
RoleConfigurationProperty(..), mkRoleConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoleConfigurationProperty
=
RoleConfigurationProperty {RoleConfigurationProperty -> ()
haddock_workaround_ :: (),
RoleConfigurationProperty -> Maybe (Value Text)
sourceRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
RoleConfigurationProperty -> Maybe (Value Text)
targetRoleArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (RoleConfigurationProperty -> RoleConfigurationProperty -> Bool
(RoleConfigurationProperty -> RoleConfigurationProperty -> Bool)
-> (RoleConfigurationProperty -> RoleConfigurationProperty -> Bool)
-> Eq RoleConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoleConfigurationProperty -> RoleConfigurationProperty -> Bool
== :: RoleConfigurationProperty -> RoleConfigurationProperty -> Bool
$c/= :: RoleConfigurationProperty -> RoleConfigurationProperty -> Bool
/= :: RoleConfigurationProperty -> RoleConfigurationProperty -> Bool
Prelude.Eq, Int -> RoleConfigurationProperty -> ShowS
[RoleConfigurationProperty] -> ShowS
RoleConfigurationProperty -> String
(Int -> RoleConfigurationProperty -> ShowS)
-> (RoleConfigurationProperty -> String)
-> ([RoleConfigurationProperty] -> ShowS)
-> Show RoleConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoleConfigurationProperty -> ShowS
showsPrec :: Int -> RoleConfigurationProperty -> ShowS
$cshow :: RoleConfigurationProperty -> String
show :: RoleConfigurationProperty -> String
$cshowList :: [RoleConfigurationProperty] -> ShowS
showList :: [RoleConfigurationProperty] -> ShowS
Prelude.Show)
mkRoleConfigurationProperty :: RoleConfigurationProperty
mkRoleConfigurationProperty :: RoleConfigurationProperty
mkRoleConfigurationProperty
= RoleConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), sourceRoleArn :: Maybe (Value Text)
sourceRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
targetRoleArn :: Maybe (Value Text)
targetRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoleConfigurationProperty where
toResourceProperties :: RoleConfigurationProperty -> ResourceProperties
toResourceProperties RoleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleConfigurationProperty -> ()
sourceRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
targetRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
targetRoleArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::APS::Scraper.RoleConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceRoleArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sourceRoleArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetRoleArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
targetRoleArn])}
instance JSON.ToJSON RoleConfigurationProperty where
toJSON :: RoleConfigurationProperty -> Value
toJSON RoleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleConfigurationProperty -> ()
sourceRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
targetRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
targetRoleArn :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceRoleArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sourceRoleArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetRoleArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
targetRoleArn]))
instance Property "SourceRoleArn" RoleConfigurationProperty where
type PropertyType "SourceRoleArn" RoleConfigurationProperty = Value Prelude.Text
set :: PropertyType "SourceRoleArn" RoleConfigurationProperty
-> RoleConfigurationProperty -> RoleConfigurationProperty
set PropertyType "SourceRoleArn" RoleConfigurationProperty
newValue RoleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleConfigurationProperty -> ()
sourceRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
targetRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
targetRoleArn :: Maybe (Value Text)
..}
= RoleConfigurationProperty
{sourceRoleArn :: Maybe (Value Text)
sourceRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceRoleArn" RoleConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
targetRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
targetRoleArn :: Maybe (Value Text)
..}
instance Property "TargetRoleArn" RoleConfigurationProperty where
type PropertyType "TargetRoleArn" RoleConfigurationProperty = Value Prelude.Text
set :: PropertyType "TargetRoleArn" RoleConfigurationProperty
-> RoleConfigurationProperty -> RoleConfigurationProperty
set PropertyType "TargetRoleArn" RoleConfigurationProperty
newValue RoleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleConfigurationProperty -> ()
sourceRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
targetRoleArn :: RoleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
targetRoleArn :: Maybe (Value Text)
..}
= RoleConfigurationProperty
{targetRoleArn :: Maybe (Value Text)
targetRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetRoleArn" RoleConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceRoleArn :: Maybe (Value Text)
..}