module Stratosphere.Lightsail.Bucket.AccessRulesProperty (
AccessRulesProperty(..), mkAccessRulesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessRulesProperty
=
AccessRulesProperty {AccessRulesProperty -> ()
haddock_workaround_ :: (),
AccessRulesProperty -> Maybe (Value Bool)
allowPublicOverrides :: (Prelude.Maybe (Value Prelude.Bool)),
AccessRulesProperty -> Maybe (Value Text)
getObject :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AccessRulesProperty -> AccessRulesProperty -> Bool
(AccessRulesProperty -> AccessRulesProperty -> Bool)
-> (AccessRulesProperty -> AccessRulesProperty -> Bool)
-> Eq AccessRulesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessRulesProperty -> AccessRulesProperty -> Bool
== :: AccessRulesProperty -> AccessRulesProperty -> Bool
$c/= :: AccessRulesProperty -> AccessRulesProperty -> Bool
/= :: AccessRulesProperty -> AccessRulesProperty -> Bool
Prelude.Eq, Int -> AccessRulesProperty -> ShowS
[AccessRulesProperty] -> ShowS
AccessRulesProperty -> String
(Int -> AccessRulesProperty -> ShowS)
-> (AccessRulesProperty -> String)
-> ([AccessRulesProperty] -> ShowS)
-> Show AccessRulesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessRulesProperty -> ShowS
showsPrec :: Int -> AccessRulesProperty -> ShowS
$cshow :: AccessRulesProperty -> String
show :: AccessRulesProperty -> String
$cshowList :: [AccessRulesProperty] -> ShowS
showList :: [AccessRulesProperty] -> ShowS
Prelude.Show)
mkAccessRulesProperty :: AccessRulesProperty
mkAccessRulesProperty :: AccessRulesProperty
mkAccessRulesProperty
= AccessRulesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), allowPublicOverrides :: Maybe (Value Bool)
allowPublicOverrides = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
getObject :: Maybe (Value Text)
getObject = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessRulesProperty where
toResourceProperties :: AccessRulesProperty -> ResourceProperties
toResourceProperties AccessRulesProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AccessRulesProperty -> ()
allowPublicOverrides :: AccessRulesProperty -> Maybe (Value Bool)
getObject :: AccessRulesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
getObject :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lightsail::Bucket.AccessRules",
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowPublicOverrides" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
allowPublicOverrides,
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
"GetObject" (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)
getObject])}
instance JSON.ToJSON AccessRulesProperty where
toJSON :: AccessRulesProperty -> Value
toJSON AccessRulesProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AccessRulesProperty -> ()
allowPublicOverrides :: AccessRulesProperty -> Maybe (Value Bool)
getObject :: AccessRulesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
getObject :: Maybe (Value Text)
..}
= [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowPublicOverrides" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
allowPublicOverrides,
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
"GetObject" (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)
getObject]))
instance Property "AllowPublicOverrides" AccessRulesProperty where
type PropertyType "AllowPublicOverrides" AccessRulesProperty = Value Prelude.Bool
set :: PropertyType "AllowPublicOverrides" AccessRulesProperty
-> AccessRulesProperty -> AccessRulesProperty
set PropertyType "AllowPublicOverrides" AccessRulesProperty
newValue AccessRulesProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AccessRulesProperty -> ()
allowPublicOverrides :: AccessRulesProperty -> Maybe (Value Bool)
getObject :: AccessRulesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
getObject :: Maybe (Value Text)
..}
= AccessRulesProperty
{allowPublicOverrides :: Maybe (Value Bool)
allowPublicOverrides = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowPublicOverrides" AccessRulesProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
getObject :: Maybe (Value Text)
haddock_workaround_ :: ()
getObject :: Maybe (Value Text)
..}
instance Property "GetObject" AccessRulesProperty where
type PropertyType "GetObject" AccessRulesProperty = Value Prelude.Text
set :: PropertyType "GetObject" AccessRulesProperty
-> AccessRulesProperty -> AccessRulesProperty
set PropertyType "GetObject" AccessRulesProperty
newValue AccessRulesProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AccessRulesProperty -> ()
allowPublicOverrides :: AccessRulesProperty -> Maybe (Value Bool)
getObject :: AccessRulesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
getObject :: Maybe (Value Text)
..}
= AccessRulesProperty {getObject :: Maybe (Value Text)
getObject = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GetObject" AccessRulesProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
haddock_workaround_ :: ()
allowPublicOverrides :: Maybe (Value Bool)
..}