module Stratosphere.QBusiness.Plugin.APISchemaProperty (
        module Exports, APISchemaProperty(..), mkAPISchemaProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.Plugin.S3Property as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data APISchemaProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-apischema.html>
    APISchemaProperty {APISchemaProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-apischema.html#cfn-qbusiness-plugin-apischema-payload>
                       APISchemaProperty -> Maybe (Value Text)
payload :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-plugin-apischema.html#cfn-qbusiness-plugin-apischema-s3>
                       APISchemaProperty -> Maybe S3Property
s3 :: (Prelude.Maybe S3Property)}
  deriving stock (APISchemaProperty -> APISchemaProperty -> Bool
(APISchemaProperty -> APISchemaProperty -> Bool)
-> (APISchemaProperty -> APISchemaProperty -> Bool)
-> Eq APISchemaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: APISchemaProperty -> APISchemaProperty -> Bool
== :: APISchemaProperty -> APISchemaProperty -> Bool
$c/= :: APISchemaProperty -> APISchemaProperty -> Bool
/= :: APISchemaProperty -> APISchemaProperty -> Bool
Prelude.Eq, Int -> APISchemaProperty -> ShowS
[APISchemaProperty] -> ShowS
APISchemaProperty -> String
(Int -> APISchemaProperty -> ShowS)
-> (APISchemaProperty -> String)
-> ([APISchemaProperty] -> ShowS)
-> Show APISchemaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> APISchemaProperty -> ShowS
showsPrec :: Int -> APISchemaProperty -> ShowS
$cshow :: APISchemaProperty -> String
show :: APISchemaProperty -> String
$cshowList :: [APISchemaProperty] -> ShowS
showList :: [APISchemaProperty] -> ShowS
Prelude.Show)
mkAPISchemaProperty :: APISchemaProperty
mkAPISchemaProperty :: APISchemaProperty
mkAPISchemaProperty
  = APISchemaProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), payload :: Maybe (Value Text)
payload = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       s3 :: Maybe S3Property
s3 = Maybe S3Property
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties APISchemaProperty where
  toResourceProperties :: APISchemaProperty -> ResourceProperties
toResourceProperties APISchemaProperty {Maybe (Value Text)
Maybe S3Property
()
haddock_workaround_ :: APISchemaProperty -> ()
payload :: APISchemaProperty -> Maybe (Value Text)
s3 :: APISchemaProperty -> Maybe S3Property
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
s3 :: Maybe S3Property
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::Plugin.APISchema",
         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
"Payload" (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)
payload,
                            Key -> S3Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3Property -> (Key, Value))
-> Maybe S3Property -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3Property
s3])}
instance JSON.ToJSON APISchemaProperty where
  toJSON :: APISchemaProperty -> Value
toJSON APISchemaProperty {Maybe (Value Text)
Maybe S3Property
()
haddock_workaround_ :: APISchemaProperty -> ()
payload :: APISchemaProperty -> Maybe (Value Text)
s3 :: APISchemaProperty -> Maybe S3Property
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
s3 :: Maybe S3Property
..}
    = [(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
"Payload" (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)
payload,
               Key -> S3Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3" (S3Property -> (Key, Value))
-> Maybe S3Property -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3Property
s3]))
instance Property "Payload" APISchemaProperty where
  type PropertyType "Payload" APISchemaProperty = Value Prelude.Text
  set :: PropertyType "Payload" APISchemaProperty
-> APISchemaProperty -> APISchemaProperty
set PropertyType "Payload" APISchemaProperty
newValue APISchemaProperty {Maybe (Value Text)
Maybe S3Property
()
haddock_workaround_ :: APISchemaProperty -> ()
payload :: APISchemaProperty -> Maybe (Value Text)
s3 :: APISchemaProperty -> Maybe S3Property
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
s3 :: Maybe S3Property
..}
    = APISchemaProperty {payload :: Maybe (Value Text)
payload = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Payload" APISchemaProperty
Value Text
newValue, Maybe S3Property
()
haddock_workaround_ :: ()
s3 :: Maybe S3Property
haddock_workaround_ :: ()
s3 :: Maybe S3Property
..}
instance Property "S3" APISchemaProperty where
  type PropertyType "S3" APISchemaProperty = S3Property
  set :: PropertyType "S3" APISchemaProperty
-> APISchemaProperty -> APISchemaProperty
set PropertyType "S3" APISchemaProperty
newValue APISchemaProperty {Maybe (Value Text)
Maybe S3Property
()
haddock_workaround_ :: APISchemaProperty -> ()
payload :: APISchemaProperty -> Maybe (Value Text)
s3 :: APISchemaProperty -> Maybe S3Property
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
s3 :: Maybe S3Property
..}
    = APISchemaProperty {s3 :: Maybe S3Property
s3 = S3Property -> Maybe S3Property
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3" APISchemaProperty
S3Property
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
haddock_workaround_ :: ()
payload :: Maybe (Value Text)
..}