module Stratosphere.S3.Bucket.RedirectAllRequestsToProperty (
        RedirectAllRequestsToProperty(..), mkRedirectAllRequestsToProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RedirectAllRequestsToProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.html>
    RedirectAllRequestsToProperty {RedirectAllRequestsToProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.html#cfn-s3-bucket-redirectallrequeststo-hostname>
                                   RedirectAllRequestsToProperty -> Value Text
hostName :: (Value Prelude.Text),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-redirectallrequeststo.html#cfn-s3-bucket-redirectallrequeststo-protocol>
                                   RedirectAllRequestsToProperty -> Maybe (Value Text)
protocol :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> Bool
(RedirectAllRequestsToProperty
 -> RedirectAllRequestsToProperty -> Bool)
-> (RedirectAllRequestsToProperty
    -> RedirectAllRequestsToProperty -> Bool)
-> Eq RedirectAllRequestsToProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> Bool
== :: RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> Bool
$c/= :: RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> Bool
/= :: RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> Bool
Prelude.Eq, Int -> RedirectAllRequestsToProperty -> ShowS
[RedirectAllRequestsToProperty] -> ShowS
RedirectAllRequestsToProperty -> String
(Int -> RedirectAllRequestsToProperty -> ShowS)
-> (RedirectAllRequestsToProperty -> String)
-> ([RedirectAllRequestsToProperty] -> ShowS)
-> Show RedirectAllRequestsToProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RedirectAllRequestsToProperty -> ShowS
showsPrec :: Int -> RedirectAllRequestsToProperty -> ShowS
$cshow :: RedirectAllRequestsToProperty -> String
show :: RedirectAllRequestsToProperty -> String
$cshowList :: [RedirectAllRequestsToProperty] -> ShowS
showList :: [RedirectAllRequestsToProperty] -> ShowS
Prelude.Show)
mkRedirectAllRequestsToProperty ::
  Value Prelude.Text -> RedirectAllRequestsToProperty
mkRedirectAllRequestsToProperty :: Value Text -> RedirectAllRequestsToProperty
mkRedirectAllRequestsToProperty Value Text
hostName
  = RedirectAllRequestsToProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), hostName :: Value Text
hostName = Value Text
hostName,
       protocol :: Maybe (Value Text)
protocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RedirectAllRequestsToProperty where
  toResourceProperties :: RedirectAllRequestsToProperty -> ResourceProperties
toResourceProperties RedirectAllRequestsToProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RedirectAllRequestsToProperty -> ()
hostName :: RedirectAllRequestsToProperty -> Value Text
protocol :: RedirectAllRequestsToProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostName :: Value Text
protocol :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.RedirectAllRequestsTo",
         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
"HostName" 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
hostName]
                           ([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
"Protocol" (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)
protocol]))}
instance JSON.ToJSON RedirectAllRequestsToProperty where
  toJSON :: RedirectAllRequestsToProperty -> Value
toJSON RedirectAllRequestsToProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RedirectAllRequestsToProperty -> ()
hostName :: RedirectAllRequestsToProperty -> Value Text
protocol :: RedirectAllRequestsToProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostName :: Value Text
protocol :: 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
"HostName" 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
hostName]
              ([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
"Protocol" (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)
protocol])))
instance Property "HostName" RedirectAllRequestsToProperty where
  type PropertyType "HostName" RedirectAllRequestsToProperty = Value Prelude.Text
  set :: PropertyType "HostName" RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> RedirectAllRequestsToProperty
set PropertyType "HostName" RedirectAllRequestsToProperty
newValue RedirectAllRequestsToProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RedirectAllRequestsToProperty -> ()
hostName :: RedirectAllRequestsToProperty -> Value Text
protocol :: RedirectAllRequestsToProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostName :: Value Text
protocol :: Maybe (Value Text)
..}
    = RedirectAllRequestsToProperty {hostName :: Value Text
hostName = PropertyType "HostName" RedirectAllRequestsToProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
..}
instance Property "Protocol" RedirectAllRequestsToProperty where
  type PropertyType "Protocol" RedirectAllRequestsToProperty = Value Prelude.Text
  set :: PropertyType "Protocol" RedirectAllRequestsToProperty
-> RedirectAllRequestsToProperty -> RedirectAllRequestsToProperty
set PropertyType "Protocol" RedirectAllRequestsToProperty
newValue RedirectAllRequestsToProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RedirectAllRequestsToProperty -> ()
hostName :: RedirectAllRequestsToProperty -> Value Text
protocol :: RedirectAllRequestsToProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostName :: Value Text
protocol :: Maybe (Value Text)
..}
    = RedirectAllRequestsToProperty
        {protocol :: Maybe (Value Text)
protocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Protocol" RedirectAllRequestsToProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
hostName :: Value Text
haddock_workaround_ :: ()
hostName :: Value Text
..}