module Stratosphere.S3.Bucket.WebsiteConfigurationProperty (
module Exports, WebsiteConfigurationProperty(..),
mkWebsiteConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.RedirectAllRequestsToProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.Bucket.RoutingRuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WebsiteConfigurationProperty
=
WebsiteConfigurationProperty {WebsiteConfigurationProperty -> ()
haddock_workaround_ :: (),
WebsiteConfigurationProperty -> Maybe (Value Text)
errorDocument :: (Prelude.Maybe (Value Prelude.Text)),
WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: (Prelude.Maybe (Value Prelude.Text)),
WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
redirectAllRequestsTo :: (Prelude.Maybe RedirectAllRequestsToProperty),
WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
routingRules :: (Prelude.Maybe [RoutingRuleProperty])}
deriving stock (WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool
(WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool)
-> (WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool)
-> Eq WebsiteConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool
== :: WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool
$c/= :: WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool
/= :: WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> Bool
Prelude.Eq, Int -> WebsiteConfigurationProperty -> ShowS
[WebsiteConfigurationProperty] -> ShowS
WebsiteConfigurationProperty -> String
(Int -> WebsiteConfigurationProperty -> ShowS)
-> (WebsiteConfigurationProperty -> String)
-> ([WebsiteConfigurationProperty] -> ShowS)
-> Show WebsiteConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsiteConfigurationProperty -> ShowS
showsPrec :: Int -> WebsiteConfigurationProperty -> ShowS
$cshow :: WebsiteConfigurationProperty -> String
show :: WebsiteConfigurationProperty -> String
$cshowList :: [WebsiteConfigurationProperty] -> ShowS
showList :: [WebsiteConfigurationProperty] -> ShowS
Prelude.Show)
mkWebsiteConfigurationProperty :: WebsiteConfigurationProperty
mkWebsiteConfigurationProperty :: WebsiteConfigurationProperty
mkWebsiteConfigurationProperty
= WebsiteConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), errorDocument :: Maybe (Value Text)
errorDocument = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
indexDocument :: Maybe (Value Text)
indexDocument = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
redirectAllRequestsTo = Maybe RedirectAllRequestsToProperty
forall a. Maybe a
Prelude.Nothing,
routingRules :: Maybe [RoutingRuleProperty]
routingRules = Maybe [RoutingRuleProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WebsiteConfigurationProperty where
toResourceProperties :: WebsiteConfigurationProperty -> ResourceProperties
toResourceProperties WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.WebsiteConfiguration",
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
"ErrorDocument" (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)
errorDocument,
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
"IndexDocument" (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)
indexDocument,
Key -> RedirectAllRequestsToProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RedirectAllRequestsTo"
(RedirectAllRequestsToProperty -> (Key, Value))
-> Maybe RedirectAllRequestsToProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedirectAllRequestsToProperty
redirectAllRequestsTo,
Key -> [RoutingRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoutingRules" ([RoutingRuleProperty] -> (Key, Value))
-> Maybe [RoutingRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RoutingRuleProperty]
routingRules])}
instance JSON.ToJSON WebsiteConfigurationProperty where
toJSON :: WebsiteConfigurationProperty -> Value
toJSON WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= [(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
"ErrorDocument" (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)
errorDocument,
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
"IndexDocument" (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)
indexDocument,
Key -> RedirectAllRequestsToProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RedirectAllRequestsTo"
(RedirectAllRequestsToProperty -> (Key, Value))
-> Maybe RedirectAllRequestsToProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedirectAllRequestsToProperty
redirectAllRequestsTo,
Key -> [RoutingRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoutingRules" ([RoutingRuleProperty] -> (Key, Value))
-> Maybe [RoutingRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RoutingRuleProperty]
routingRules]))
instance Property "ErrorDocument" WebsiteConfigurationProperty where
type PropertyType "ErrorDocument" WebsiteConfigurationProperty = Value Prelude.Text
set :: PropertyType "ErrorDocument" WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> WebsiteConfigurationProperty
set PropertyType "ErrorDocument" WebsiteConfigurationProperty
newValue WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= WebsiteConfigurationProperty
{errorDocument :: Maybe (Value Text)
errorDocument = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ErrorDocument" WebsiteConfigurationProperty
Value Text
newValue, Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: ()
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
instance Property "IndexDocument" WebsiteConfigurationProperty where
type PropertyType "IndexDocument" WebsiteConfigurationProperty = Value Prelude.Text
set :: PropertyType "IndexDocument" WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> WebsiteConfigurationProperty
set PropertyType "IndexDocument" WebsiteConfigurationProperty
newValue WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= WebsiteConfigurationProperty
{indexDocument :: Maybe (Value Text)
indexDocument = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IndexDocument" WebsiteConfigurationProperty
Value Text
newValue, Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
instance Property "RedirectAllRequestsTo" WebsiteConfigurationProperty where
type PropertyType "RedirectAllRequestsTo" WebsiteConfigurationProperty = RedirectAllRequestsToProperty
set :: PropertyType "RedirectAllRequestsTo" WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> WebsiteConfigurationProperty
set PropertyType "RedirectAllRequestsTo" WebsiteConfigurationProperty
newValue WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= WebsiteConfigurationProperty
{redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
redirectAllRequestsTo = RedirectAllRequestsToProperty
-> Maybe RedirectAllRequestsToProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RedirectAllRequestsTo" WebsiteConfigurationProperty
RedirectAllRequestsToProperty
newValue, Maybe [RoutingRuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
routingRules :: Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
routingRules :: Maybe [RoutingRuleProperty]
..}
instance Property "RoutingRules" WebsiteConfigurationProperty where
type PropertyType "RoutingRules" WebsiteConfigurationProperty = [RoutingRuleProperty]
set :: PropertyType "RoutingRules" WebsiteConfigurationProperty
-> WebsiteConfigurationProperty -> WebsiteConfigurationProperty
set PropertyType "RoutingRules" WebsiteConfigurationProperty
newValue WebsiteConfigurationProperty {Maybe [RoutingRuleProperty]
Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: WebsiteConfigurationProperty -> ()
errorDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
indexDocument :: WebsiteConfigurationProperty -> Maybe (Value Text)
redirectAllRequestsTo :: WebsiteConfigurationProperty -> Maybe RedirectAllRequestsToProperty
routingRules :: WebsiteConfigurationProperty -> Maybe [RoutingRuleProperty]
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
routingRules :: Maybe [RoutingRuleProperty]
..}
= WebsiteConfigurationProperty
{routingRules :: Maybe [RoutingRuleProperty]
routingRules = [RoutingRuleProperty] -> Maybe [RoutingRuleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [RoutingRuleProperty]
PropertyType "RoutingRules" WebsiteConfigurationProperty
newValue, Maybe (Value Text)
Maybe RedirectAllRequestsToProperty
()
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
haddock_workaround_ :: ()
errorDocument :: Maybe (Value Text)
indexDocument :: Maybe (Value Text)
redirectAllRequestsTo :: Maybe RedirectAllRequestsToProperty
..}