module Stratosphere.CloudFront.Distribution.StringSchemaProperty (
StringSchemaProperty(..), mkStringSchemaProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StringSchemaProperty
=
StringSchemaProperty {StringSchemaProperty -> ()
haddock_workaround_ :: (),
:: (Prelude.Maybe (Value Prelude.Text)),
StringSchemaProperty -> Maybe (Value Text)
defaultValue :: (Prelude.Maybe (Value Prelude.Text)),
StringSchemaProperty -> Value Bool
required :: (Value Prelude.Bool)}
deriving stock (StringSchemaProperty -> StringSchemaProperty -> Bool
(StringSchemaProperty -> StringSchemaProperty -> Bool)
-> (StringSchemaProperty -> StringSchemaProperty -> Bool)
-> Eq StringSchemaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StringSchemaProperty -> StringSchemaProperty -> Bool
== :: StringSchemaProperty -> StringSchemaProperty -> Bool
$c/= :: StringSchemaProperty -> StringSchemaProperty -> Bool
/= :: StringSchemaProperty -> StringSchemaProperty -> Bool
Prelude.Eq, Int -> StringSchemaProperty -> ShowS
[StringSchemaProperty] -> ShowS
StringSchemaProperty -> String
(Int -> StringSchemaProperty -> ShowS)
-> (StringSchemaProperty -> String)
-> ([StringSchemaProperty] -> ShowS)
-> Show StringSchemaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StringSchemaProperty -> ShowS
showsPrec :: Int -> StringSchemaProperty -> ShowS
$cshow :: StringSchemaProperty -> String
show :: StringSchemaProperty -> String
$cshowList :: [StringSchemaProperty] -> ShowS
showList :: [StringSchemaProperty] -> ShowS
Prelude.Show)
mkStringSchemaProperty ::
Value Prelude.Bool -> StringSchemaProperty
mkStringSchemaProperty :: Value Bool -> StringSchemaProperty
mkStringSchemaProperty Value Bool
required
= StringSchemaProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), required :: Value Bool
required = Value Bool
required,
comment :: Maybe (Value Text)
comment = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, defaultValue :: Maybe (Value Text)
defaultValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StringSchemaProperty where
toResourceProperties :: StringSchemaProperty -> ResourceProperties
toResourceProperties StringSchemaProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: StringSchemaProperty -> ()
comment :: StringSchemaProperty -> Maybe (Value Text)
defaultValue :: StringSchemaProperty -> Maybe (Value Text)
required :: StringSchemaProperty -> Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.StringSchema",
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
"Required" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
required]
([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
"Comment" (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)
comment,
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
"DefaultValue" (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)
defaultValue]))}
instance JSON.ToJSON StringSchemaProperty where
toJSON :: StringSchemaProperty -> Value
toJSON StringSchemaProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: StringSchemaProperty -> ()
comment :: StringSchemaProperty -> Maybe (Value Text)
defaultValue :: StringSchemaProperty -> Maybe (Value Text)
required :: StringSchemaProperty -> Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
= [(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
"Required" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
required]
([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
"Comment" (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)
comment,
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
"DefaultValue" (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)
defaultValue])))
instance Property "Comment" StringSchemaProperty where
type PropertyType "Comment" StringSchemaProperty = Value Prelude.Text
set :: PropertyType "Comment" StringSchemaProperty
-> StringSchemaProperty -> StringSchemaProperty
set PropertyType "Comment" StringSchemaProperty
newValue StringSchemaProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: StringSchemaProperty -> ()
comment :: StringSchemaProperty -> Maybe (Value Text)
defaultValue :: StringSchemaProperty -> Maybe (Value Text)
required :: StringSchemaProperty -> Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
= StringSchemaProperty {comment :: Maybe (Value Text)
comment = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Comment" StringSchemaProperty
Value Text
newValue, Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
required :: Value Bool
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
instance Property "DefaultValue" StringSchemaProperty where
type PropertyType "DefaultValue" StringSchemaProperty = Value Prelude.Text
set :: PropertyType "DefaultValue" StringSchemaProperty
-> StringSchemaProperty -> StringSchemaProperty
set PropertyType "DefaultValue" StringSchemaProperty
newValue StringSchemaProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: StringSchemaProperty -> ()
comment :: StringSchemaProperty -> Maybe (Value Text)
defaultValue :: StringSchemaProperty -> Maybe (Value Text)
required :: StringSchemaProperty -> Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
= StringSchemaProperty {defaultValue :: Maybe (Value Text)
defaultValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultValue" StringSchemaProperty
Value Text
newValue, Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
required :: Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
required :: Value Bool
..}
instance Property "Required" StringSchemaProperty where
type PropertyType "Required" StringSchemaProperty = Value Prelude.Bool
set :: PropertyType "Required" StringSchemaProperty
-> StringSchemaProperty -> StringSchemaProperty
set PropertyType "Required" StringSchemaProperty
newValue StringSchemaProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: StringSchemaProperty -> ()
comment :: StringSchemaProperty -> Maybe (Value Text)
defaultValue :: StringSchemaProperty -> Maybe (Value Text)
required :: StringSchemaProperty -> Value Bool
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
required :: Value Bool
..}
= StringSchemaProperty {required :: Value Bool
required = PropertyType "Required" StringSchemaProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
defaultValue :: Maybe (Value Text)
..}