module Stratosphere.ElasticLoadBalancingV2.ListenerRule.FixedResponseConfigProperty (
        FixedResponseConfigProperty(..), mkFixedResponseConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FixedResponseConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html>
    FixedResponseConfigProperty {FixedResponseConfigProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-contenttype>
                                 FixedResponseConfigProperty -> Maybe (Value Text)
contentType :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-messagebody>
                                 FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-statuscode>
                                 FixedResponseConfigProperty -> Value Text
statusCode :: (Value Prelude.Text)}
  deriving stock (FixedResponseConfigProperty -> FixedResponseConfigProperty -> Bool
(FixedResponseConfigProperty
 -> FixedResponseConfigProperty -> Bool)
-> (FixedResponseConfigProperty
    -> FixedResponseConfigProperty -> Bool)
-> Eq FixedResponseConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FixedResponseConfigProperty -> FixedResponseConfigProperty -> Bool
== :: FixedResponseConfigProperty -> FixedResponseConfigProperty -> Bool
$c/= :: FixedResponseConfigProperty -> FixedResponseConfigProperty -> Bool
/= :: FixedResponseConfigProperty -> FixedResponseConfigProperty -> Bool
Prelude.Eq, Int -> FixedResponseConfigProperty -> ShowS
[FixedResponseConfigProperty] -> ShowS
FixedResponseConfigProperty -> String
(Int -> FixedResponseConfigProperty -> ShowS)
-> (FixedResponseConfigProperty -> String)
-> ([FixedResponseConfigProperty] -> ShowS)
-> Show FixedResponseConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FixedResponseConfigProperty -> ShowS
showsPrec :: Int -> FixedResponseConfigProperty -> ShowS
$cshow :: FixedResponseConfigProperty -> String
show :: FixedResponseConfigProperty -> String
$cshowList :: [FixedResponseConfigProperty] -> ShowS
showList :: [FixedResponseConfigProperty] -> ShowS
Prelude.Show)
mkFixedResponseConfigProperty ::
  Value Prelude.Text -> FixedResponseConfigProperty
mkFixedResponseConfigProperty :: Value Text -> FixedResponseConfigProperty
mkFixedResponseConfigProperty Value Text
statusCode
  = FixedResponseConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), statusCode :: Value Text
statusCode = Value Text
statusCode,
       contentType :: Maybe (Value Text)
contentType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, messageBody :: Maybe (Value Text)
messageBody = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FixedResponseConfigProperty where
  toResourceProperties :: FixedResponseConfigProperty -> ResourceProperties
toResourceProperties FixedResponseConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FixedResponseConfigProperty -> ()
contentType :: FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: FixedResponseConfigProperty -> Maybe (Value Text)
statusCode :: FixedResponseConfigProperty -> Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
statusCode :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::ListenerRule.FixedResponseConfig",
         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
"StatusCode" 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
statusCode]
                           ([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
"ContentType" (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)
contentType,
                               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
"MessageBody" (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)
messageBody]))}
instance JSON.ToJSON FixedResponseConfigProperty where
  toJSON :: FixedResponseConfigProperty -> Value
toJSON FixedResponseConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FixedResponseConfigProperty -> ()
contentType :: FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: FixedResponseConfigProperty -> Maybe (Value Text)
statusCode :: FixedResponseConfigProperty -> Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
statusCode :: 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
"StatusCode" 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
statusCode]
              ([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
"ContentType" (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)
contentType,
                  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
"MessageBody" (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)
messageBody])))
instance Property "ContentType" FixedResponseConfigProperty where
  type PropertyType "ContentType" FixedResponseConfigProperty = Value Prelude.Text
  set :: PropertyType "ContentType" FixedResponseConfigProperty
-> FixedResponseConfigProperty -> FixedResponseConfigProperty
set PropertyType "ContentType" FixedResponseConfigProperty
newValue FixedResponseConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FixedResponseConfigProperty -> ()
contentType :: FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: FixedResponseConfigProperty -> Maybe (Value Text)
statusCode :: FixedResponseConfigProperty -> Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
statusCode :: Value Text
..}
    = FixedResponseConfigProperty
        {contentType :: Maybe (Value Text)
contentType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContentType" FixedResponseConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
messageBody :: Maybe (Value Text)
statusCode :: Value Text
haddock_workaround_ :: ()
messageBody :: Maybe (Value Text)
statusCode :: Value Text
..}
instance Property "MessageBody" FixedResponseConfigProperty where
  type PropertyType "MessageBody" FixedResponseConfigProperty = Value Prelude.Text
  set :: PropertyType "MessageBody" FixedResponseConfigProperty
-> FixedResponseConfigProperty -> FixedResponseConfigProperty
set PropertyType "MessageBody" FixedResponseConfigProperty
newValue FixedResponseConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FixedResponseConfigProperty -> ()
contentType :: FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: FixedResponseConfigProperty -> Maybe (Value Text)
statusCode :: FixedResponseConfigProperty -> Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
statusCode :: Value Text
..}
    = FixedResponseConfigProperty
        {messageBody :: Maybe (Value Text)
messageBody = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MessageBody" FixedResponseConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
statusCode :: Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
statusCode :: Value Text
..}
instance Property "StatusCode" FixedResponseConfigProperty where
  type PropertyType "StatusCode" FixedResponseConfigProperty = Value Prelude.Text
  set :: PropertyType "StatusCode" FixedResponseConfigProperty
-> FixedResponseConfigProperty -> FixedResponseConfigProperty
set PropertyType "StatusCode" FixedResponseConfigProperty
newValue FixedResponseConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FixedResponseConfigProperty -> ()
contentType :: FixedResponseConfigProperty -> Maybe (Value Text)
messageBody :: FixedResponseConfigProperty -> Maybe (Value Text)
statusCode :: FixedResponseConfigProperty -> Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
statusCode :: Value Text
..}
    = FixedResponseConfigProperty {statusCode :: Value Text
statusCode = PropertyType "StatusCode" FixedResponseConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
messageBody :: Maybe (Value Text)
..}