module Stratosphere.Glue.Trigger.ConditionProperty (
ConditionProperty(..), mkConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionProperty
=
ConditionProperty {ConditionProperty -> ()
haddock_workaround_ :: (),
ConditionProperty -> Maybe (Value Text)
crawlState :: (Prelude.Maybe (Value Prelude.Text)),
ConditionProperty -> Maybe (Value Text)
crawlerName :: (Prelude.Maybe (Value Prelude.Text)),
ConditionProperty -> Maybe (Value Text)
jobName :: (Prelude.Maybe (Value Prelude.Text)),
ConditionProperty -> Maybe (Value Text)
logicalOperator :: (Prelude.Maybe (Value Prelude.Text)),
ConditionProperty -> Maybe (Value Text)
state :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ConditionProperty -> ConditionProperty -> Bool
(ConditionProperty -> ConditionProperty -> Bool)
-> (ConditionProperty -> ConditionProperty -> Bool)
-> Eq ConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionProperty -> ConditionProperty -> Bool
== :: ConditionProperty -> ConditionProperty -> Bool
$c/= :: ConditionProperty -> ConditionProperty -> Bool
/= :: ConditionProperty -> ConditionProperty -> Bool
Prelude.Eq, Int -> ConditionProperty -> ShowS
[ConditionProperty] -> ShowS
ConditionProperty -> String
(Int -> ConditionProperty -> ShowS)
-> (ConditionProperty -> String)
-> ([ConditionProperty] -> ShowS)
-> Show ConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionProperty -> ShowS
showsPrec :: Int -> ConditionProperty -> ShowS
$cshow :: ConditionProperty -> String
show :: ConditionProperty -> String
$cshowList :: [ConditionProperty] -> ShowS
showList :: [ConditionProperty] -> ShowS
Prelude.Show)
mkConditionProperty :: ConditionProperty
mkConditionProperty :: ConditionProperty
mkConditionProperty
= ConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), crawlState :: Maybe (Value Text)
crawlState = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
crawlerName :: Maybe (Value Text)
crawlerName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, jobName :: Maybe (Value Text)
jobName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
logicalOperator :: Maybe (Value Text)
logicalOperator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, state :: Maybe (Value Text)
state = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionProperty where
toResourceProperties :: ConditionProperty -> ResourceProperties
toResourceProperties ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Glue::Trigger.Condition",
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
"CrawlState" (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)
crawlState,
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
"CrawlerName" (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)
crawlerName,
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
"JobName" (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)
jobName,
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
"LogicalOperator" (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)
logicalOperator,
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
"State" (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)
state])}
instance JSON.ToJSON ConditionProperty where
toJSON :: ConditionProperty -> Value
toJSON ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: 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
"CrawlState" (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)
crawlState,
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
"CrawlerName" (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)
crawlerName,
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
"JobName" (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)
jobName,
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
"LogicalOperator" (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)
logicalOperator,
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
"State" (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)
state]))
instance Property "CrawlState" ConditionProperty where
type PropertyType "CrawlState" ConditionProperty = Value Prelude.Text
set :: PropertyType "CrawlState" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "CrawlState" ConditionProperty
newValue ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ConditionProperty {crawlState :: Maybe (Value Text)
crawlState = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CrawlState" ConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
haddock_workaround_ :: ()
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
instance Property "CrawlerName" ConditionProperty where
type PropertyType "CrawlerName" ConditionProperty = Value Prelude.Text
set :: PropertyType "CrawlerName" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "CrawlerName" ConditionProperty
newValue ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ConditionProperty {crawlerName :: Maybe (Value Text)
crawlerName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CrawlerName" ConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
instance Property "JobName" ConditionProperty where
type PropertyType "JobName" ConditionProperty = Value Prelude.Text
set :: PropertyType "JobName" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "JobName" ConditionProperty
newValue ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ConditionProperty {jobName :: Maybe (Value Text)
jobName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "JobName" ConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
instance Property "LogicalOperator" ConditionProperty where
type PropertyType "LogicalOperator" ConditionProperty = Value Prelude.Text
set :: PropertyType "LogicalOperator" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "LogicalOperator" ConditionProperty
newValue ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ConditionProperty {logicalOperator :: Maybe (Value Text)
logicalOperator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogicalOperator" ConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
state :: Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
instance Property "State" ConditionProperty where
type PropertyType "State" ConditionProperty = Value Prelude.Text
set :: PropertyType "State" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "State" ConditionProperty
newValue ConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
crawlState :: ConditionProperty -> Maybe (Value Text)
crawlerName :: ConditionProperty -> Maybe (Value Text)
jobName :: ConditionProperty -> Maybe (Value Text)
logicalOperator :: ConditionProperty -> Maybe (Value Text)
state :: ConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
state :: Maybe (Value Text)
..}
= ConditionProperty {state :: Maybe (Value Text)
state = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "State" ConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
haddock_workaround_ :: ()
crawlState :: Maybe (Value Text)
crawlerName :: Maybe (Value Text)
jobName :: Maybe (Value Text)
logicalOperator :: Maybe (Value Text)
..}