module Stratosphere.S3.Bucket.CorsConfigurationProperty (
module Exports, CorsConfigurationProperty(..),
mkCorsConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.CorsRuleProperty as Exports
import Stratosphere.ResourceProperties
data CorsConfigurationProperty
=
CorsConfigurationProperty {CorsConfigurationProperty -> ()
haddock_workaround_ :: (),
CorsConfigurationProperty -> [CorsRuleProperty]
corsRules :: [CorsRuleProperty]}
deriving stock (CorsConfigurationProperty -> CorsConfigurationProperty -> Bool
(CorsConfigurationProperty -> CorsConfigurationProperty -> Bool)
-> (CorsConfigurationProperty -> CorsConfigurationProperty -> Bool)
-> Eq CorsConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CorsConfigurationProperty -> CorsConfigurationProperty -> Bool
== :: CorsConfigurationProperty -> CorsConfigurationProperty -> Bool
$c/= :: CorsConfigurationProperty -> CorsConfigurationProperty -> Bool
/= :: CorsConfigurationProperty -> CorsConfigurationProperty -> Bool
Prelude.Eq, Int -> CorsConfigurationProperty -> ShowS
[CorsConfigurationProperty] -> ShowS
CorsConfigurationProperty -> String
(Int -> CorsConfigurationProperty -> ShowS)
-> (CorsConfigurationProperty -> String)
-> ([CorsConfigurationProperty] -> ShowS)
-> Show CorsConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CorsConfigurationProperty -> ShowS
showsPrec :: Int -> CorsConfigurationProperty -> ShowS
$cshow :: CorsConfigurationProperty -> String
show :: CorsConfigurationProperty -> String
$cshowList :: [CorsConfigurationProperty] -> ShowS
showList :: [CorsConfigurationProperty] -> ShowS
Prelude.Show)
mkCorsConfigurationProperty ::
[CorsRuleProperty] -> CorsConfigurationProperty
mkCorsConfigurationProperty :: [CorsRuleProperty] -> CorsConfigurationProperty
mkCorsConfigurationProperty [CorsRuleProperty]
corsRules
= CorsConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), corsRules :: [CorsRuleProperty]
corsRules = [CorsRuleProperty]
corsRules}
instance ToResourceProperties CorsConfigurationProperty where
toResourceProperties :: CorsConfigurationProperty -> ResourceProperties
toResourceProperties CorsConfigurationProperty {[CorsRuleProperty]
()
haddock_workaround_ :: CorsConfigurationProperty -> ()
corsRules :: CorsConfigurationProperty -> [CorsRuleProperty]
haddock_workaround_ :: ()
corsRules :: [CorsRuleProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.CorsConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"CorsRules" Key -> [CorsRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CorsRuleProperty]
corsRules]}
instance JSON.ToJSON CorsConfigurationProperty where
toJSON :: CorsConfigurationProperty -> Value
toJSON CorsConfigurationProperty {[CorsRuleProperty]
()
haddock_workaround_ :: CorsConfigurationProperty -> ()
corsRules :: CorsConfigurationProperty -> [CorsRuleProperty]
haddock_workaround_ :: ()
corsRules :: [CorsRuleProperty]
..}
= [(Key, Value)] -> Value
JSON.object [Key
"CorsRules" Key -> [CorsRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CorsRuleProperty]
corsRules]
instance Property "CorsRules" CorsConfigurationProperty where
type PropertyType "CorsRules" CorsConfigurationProperty = [CorsRuleProperty]
set :: PropertyType "CorsRules" CorsConfigurationProperty
-> CorsConfigurationProperty -> CorsConfigurationProperty
set PropertyType "CorsRules" CorsConfigurationProperty
newValue CorsConfigurationProperty {[CorsRuleProperty]
()
haddock_workaround_ :: CorsConfigurationProperty -> ()
corsRules :: CorsConfigurationProperty -> [CorsRuleProperty]
haddock_workaround_ :: ()
corsRules :: [CorsRuleProperty]
..}
= CorsConfigurationProperty {corsRules :: [CorsRuleProperty]
corsRules = [CorsRuleProperty]
PropertyType "CorsRules" CorsConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}