module Stratosphere.B2BI.Transformer.X12CodeListValidationRuleProperty (
X12CodeListValidationRuleProperty(..),
mkX12CodeListValidationRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data X12CodeListValidationRuleProperty
=
X12CodeListValidationRuleProperty {X12CodeListValidationRuleProperty -> ()
haddock_workaround_ :: (),
X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToAdd :: (Prelude.Maybe (ValueList Prelude.Text)),
X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: (Prelude.Maybe (ValueList Prelude.Text)),
X12CodeListValidationRuleProperty -> Value Text
elementId :: (Value Prelude.Text)}
deriving stock (X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool
(X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool)
-> (X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool)
-> Eq X12CodeListValidationRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool
== :: X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool
$c/= :: X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool
/= :: X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty -> Bool
Prelude.Eq, Int -> X12CodeListValidationRuleProperty -> ShowS
[X12CodeListValidationRuleProperty] -> ShowS
X12CodeListValidationRuleProperty -> String
(Int -> X12CodeListValidationRuleProperty -> ShowS)
-> (X12CodeListValidationRuleProperty -> String)
-> ([X12CodeListValidationRuleProperty] -> ShowS)
-> Show X12CodeListValidationRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> X12CodeListValidationRuleProperty -> ShowS
showsPrec :: Int -> X12CodeListValidationRuleProperty -> ShowS
$cshow :: X12CodeListValidationRuleProperty -> String
show :: X12CodeListValidationRuleProperty -> String
$cshowList :: [X12CodeListValidationRuleProperty] -> ShowS
showList :: [X12CodeListValidationRuleProperty] -> ShowS
Prelude.Show)
mkX12CodeListValidationRuleProperty ::
Value Prelude.Text -> X12CodeListValidationRuleProperty
mkX12CodeListValidationRuleProperty :: Value Text -> X12CodeListValidationRuleProperty
mkX12CodeListValidationRuleProperty Value Text
elementId
= X12CodeListValidationRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), elementId :: Value Text
elementId = Value Text
elementId,
codesToAdd :: Maybe (ValueList Text)
codesToAdd = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, codesToRemove :: Maybe (ValueList Text)
codesToRemove = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties X12CodeListValidationRuleProperty where
toResourceProperties :: X12CodeListValidationRuleProperty -> ResourceProperties
toResourceProperties X12CodeListValidationRuleProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: X12CodeListValidationRuleProperty -> ()
codesToAdd :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
elementId :: X12CodeListValidationRuleProperty -> Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::B2BI::Transformer.X12CodeListValidationRule",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ElementId" 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..= Value Text
elementId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList 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
"CodesToAdd" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
codesToAdd,
Key -> ValueList 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
"CodesToRemove" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
codesToRemove]))}
instance JSON.ToJSON X12CodeListValidationRuleProperty where
toJSON :: X12CodeListValidationRuleProperty -> Value
toJSON X12CodeListValidationRuleProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: X12CodeListValidationRuleProperty -> ()
codesToAdd :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
elementId :: X12CodeListValidationRuleProperty -> Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ElementId" 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..= Value Text
elementId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList 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
"CodesToAdd" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
codesToAdd,
Key -> ValueList 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
"CodesToRemove" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
codesToRemove])))
instance Property "CodesToAdd" X12CodeListValidationRuleProperty where
type PropertyType "CodesToAdd" X12CodeListValidationRuleProperty = ValueList Prelude.Text
set :: PropertyType "CodesToAdd" X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
set PropertyType "CodesToAdd" X12CodeListValidationRuleProperty
newValue X12CodeListValidationRuleProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: X12CodeListValidationRuleProperty -> ()
codesToAdd :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
elementId :: X12CodeListValidationRuleProperty -> Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
= X12CodeListValidationRuleProperty
{codesToAdd :: Maybe (ValueList Text)
codesToAdd = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodesToAdd" X12CodeListValidationRuleProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
haddock_workaround_ :: ()
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
instance Property "CodesToRemove" X12CodeListValidationRuleProperty where
type PropertyType "CodesToRemove" X12CodeListValidationRuleProperty = ValueList Prelude.Text
set :: PropertyType "CodesToRemove" X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
set PropertyType "CodesToRemove" X12CodeListValidationRuleProperty
newValue X12CodeListValidationRuleProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: X12CodeListValidationRuleProperty -> ()
codesToAdd :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
elementId :: X12CodeListValidationRuleProperty -> Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
= X12CodeListValidationRuleProperty
{codesToRemove :: Maybe (ValueList Text)
codesToRemove = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodesToRemove" X12CodeListValidationRuleProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
elementId :: Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
elementId :: Value Text
..}
instance Property "ElementId" X12CodeListValidationRuleProperty where
type PropertyType "ElementId" X12CodeListValidationRuleProperty = Value Prelude.Text
set :: PropertyType "ElementId" X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
-> X12CodeListValidationRuleProperty
set PropertyType "ElementId" X12CodeListValidationRuleProperty
newValue X12CodeListValidationRuleProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: X12CodeListValidationRuleProperty -> ()
codesToAdd :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
codesToRemove :: X12CodeListValidationRuleProperty -> Maybe (ValueList Text)
elementId :: X12CodeListValidationRuleProperty -> Value Text
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
elementId :: Value Text
..}
= X12CodeListValidationRuleProperty {elementId :: Value Text
elementId = PropertyType "ElementId" X12CodeListValidationRuleProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
haddock_workaround_ :: ()
codesToAdd :: Maybe (ValueList Text)
codesToRemove :: Maybe (ValueList Text)
..}