module Stratosphere.CloudFront.Distribution.CustomErrorResponseProperty (
        CustomErrorResponseProperty(..), mkCustomErrorResponseProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomErrorResponseProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html>
    CustomErrorResponseProperty {CustomErrorResponseProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcachingminttl>
                                 CustomErrorResponseProperty -> Maybe (Value Double)
errorCachingMinTTL :: (Prelude.Maybe (Value Prelude.Double)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcode>
                                 CustomErrorResponseProperty -> Value Integer
errorCode :: (Value Prelude.Integer),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsecode>
                                 CustomErrorResponseProperty -> Maybe (Value Integer)
responseCode :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsepagepath>
                                 CustomErrorResponseProperty -> Maybe (Value Text)
responsePagePath :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CustomErrorResponseProperty -> CustomErrorResponseProperty -> Bool
(CustomErrorResponseProperty
 -> CustomErrorResponseProperty -> Bool)
-> (CustomErrorResponseProperty
    -> CustomErrorResponseProperty -> Bool)
-> Eq CustomErrorResponseProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomErrorResponseProperty -> CustomErrorResponseProperty -> Bool
== :: CustomErrorResponseProperty -> CustomErrorResponseProperty -> Bool
$c/= :: CustomErrorResponseProperty -> CustomErrorResponseProperty -> Bool
/= :: CustomErrorResponseProperty -> CustomErrorResponseProperty -> Bool
Prelude.Eq, Int -> CustomErrorResponseProperty -> ShowS
[CustomErrorResponseProperty] -> ShowS
CustomErrorResponseProperty -> String
(Int -> CustomErrorResponseProperty -> ShowS)
-> (CustomErrorResponseProperty -> String)
-> ([CustomErrorResponseProperty] -> ShowS)
-> Show CustomErrorResponseProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomErrorResponseProperty -> ShowS
showsPrec :: Int -> CustomErrorResponseProperty -> ShowS
$cshow :: CustomErrorResponseProperty -> String
show :: CustomErrorResponseProperty -> String
$cshowList :: [CustomErrorResponseProperty] -> ShowS
showList :: [CustomErrorResponseProperty] -> ShowS
Prelude.Show)
mkCustomErrorResponseProperty ::
  Value Prelude.Integer -> CustomErrorResponseProperty
mkCustomErrorResponseProperty :: Value Integer -> CustomErrorResponseProperty
mkCustomErrorResponseProperty Value Integer
errorCode
  = CustomErrorResponseProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), errorCode :: Value Integer
errorCode = Value Integer
errorCode,
       errorCachingMinTTL :: Maybe (Value Double)
errorCachingMinTTL = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       responseCode :: Maybe (Value Integer)
responseCode = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, responsePagePath :: Maybe (Value Text)
responsePagePath = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomErrorResponseProperty where
  toResourceProperties :: CustomErrorResponseProperty -> ResourceProperties
toResourceProperties CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.CustomErrorResponse",
         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
"ErrorCode" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
errorCode]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ErrorCachingMinTTL" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
errorCachingMinTTL,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResponseCode" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
responseCode,
                               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
"ResponsePagePath" (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)
responsePagePath]))}
instance JSON.ToJSON CustomErrorResponseProperty where
  toJSON :: CustomErrorResponseProperty -> Value
toJSON CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (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
"ErrorCode" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
errorCode]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ErrorCachingMinTTL" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
errorCachingMinTTL,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ResponseCode" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
responseCode,
                  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
"ResponsePagePath" (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)
responsePagePath])))
instance Property "ErrorCachingMinTTL" CustomErrorResponseProperty where
  type PropertyType "ErrorCachingMinTTL" CustomErrorResponseProperty = Value Prelude.Double
  set :: PropertyType "ErrorCachingMinTTL" CustomErrorResponseProperty
-> CustomErrorResponseProperty -> CustomErrorResponseProperty
set PropertyType "ErrorCachingMinTTL" CustomErrorResponseProperty
newValue CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
    = CustomErrorResponseProperty
        {errorCachingMinTTL :: Maybe (Value Double)
errorCachingMinTTL = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ErrorCachingMinTTL" CustomErrorResponseProperty
Value Double
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
instance Property "ErrorCode" CustomErrorResponseProperty where
  type PropertyType "ErrorCode" CustomErrorResponseProperty = Value Prelude.Integer
  set :: PropertyType "ErrorCode" CustomErrorResponseProperty
-> CustomErrorResponseProperty -> CustomErrorResponseProperty
set PropertyType "ErrorCode" CustomErrorResponseProperty
newValue CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
    = CustomErrorResponseProperty {errorCode :: Value Integer
errorCode = PropertyType "ErrorCode" CustomErrorResponseProperty
Value Integer
newValue, Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
instance Property "ResponseCode" CustomErrorResponseProperty where
  type PropertyType "ResponseCode" CustomErrorResponseProperty = Value Prelude.Integer
  set :: PropertyType "ResponseCode" CustomErrorResponseProperty
-> CustomErrorResponseProperty -> CustomErrorResponseProperty
set PropertyType "ResponseCode" CustomErrorResponseProperty
newValue CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
    = CustomErrorResponseProperty
        {responseCode :: Maybe (Value Integer)
responseCode = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResponseCode" CustomErrorResponseProperty
Value Integer
newValue, Maybe (Value Double)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responsePagePath :: Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responsePagePath :: Maybe (Value Text)
..}
instance Property "ResponsePagePath" CustomErrorResponseProperty where
  type PropertyType "ResponsePagePath" CustomErrorResponseProperty = Value Prelude.Text
  set :: PropertyType "ResponsePagePath" CustomErrorResponseProperty
-> CustomErrorResponseProperty -> CustomErrorResponseProperty
set PropertyType "ResponsePagePath" CustomErrorResponseProperty
newValue CustomErrorResponseProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: CustomErrorResponseProperty -> ()
errorCachingMinTTL :: CustomErrorResponseProperty -> Maybe (Value Double)
errorCode :: CustomErrorResponseProperty -> Value Integer
responseCode :: CustomErrorResponseProperty -> Maybe (Value Integer)
responsePagePath :: CustomErrorResponseProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
responsePagePath :: Maybe (Value Text)
..}
    = CustomErrorResponseProperty
        {responsePagePath :: Maybe (Value Text)
responsePagePath = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResponsePagePath" CustomErrorResponseProperty
Value Text
newValue, Maybe (Value Double)
Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
haddock_workaround_ :: ()
errorCachingMinTTL :: Maybe (Value Double)
errorCode :: Value Integer
responseCode :: Maybe (Value Integer)
..}