module Stratosphere.B2BI.Capability.S3LocationProperty (
S3LocationProperty(..), mkS3LocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3LocationProperty
=
S3LocationProperty {S3LocationProperty -> ()
haddock_workaround_ :: (),
S3LocationProperty -> Maybe (Value Text)
bucketName :: (Prelude.Maybe (Value Prelude.Text)),
S3LocationProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (S3LocationProperty -> S3LocationProperty -> Bool
(S3LocationProperty -> S3LocationProperty -> Bool)
-> (S3LocationProperty -> S3LocationProperty -> Bool)
-> Eq S3LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3LocationProperty -> S3LocationProperty -> Bool
== :: S3LocationProperty -> S3LocationProperty -> Bool
$c/= :: S3LocationProperty -> S3LocationProperty -> Bool
/= :: S3LocationProperty -> S3LocationProperty -> Bool
Prelude.Eq, Int -> S3LocationProperty -> ShowS
[S3LocationProperty] -> ShowS
S3LocationProperty -> String
(Int -> S3LocationProperty -> ShowS)
-> (S3LocationProperty -> String)
-> ([S3LocationProperty] -> ShowS)
-> Show S3LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3LocationProperty -> ShowS
showsPrec :: Int -> S3LocationProperty -> ShowS
$cshow :: S3LocationProperty -> String
show :: S3LocationProperty -> String
$cshowList :: [S3LocationProperty] -> ShowS
showList :: [S3LocationProperty] -> ShowS
Prelude.Show)
mkS3LocationProperty :: S3LocationProperty
mkS3LocationProperty :: S3LocationProperty
mkS3LocationProperty
= S3LocationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), bucketName :: Maybe (Value Text)
bucketName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3LocationProperty where
toResourceProperties :: S3LocationProperty -> ResourceProperties
toResourceProperties S3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LocationProperty -> ()
bucketName :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::B2BI::Capability.S3Location",
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
"BucketName" (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)
bucketName,
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
"Key" (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)
key])}
instance JSON.ToJSON S3LocationProperty where
toJSON :: S3LocationProperty -> Value
toJSON S3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LocationProperty -> ()
bucketName :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
key :: 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 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
"BucketName" (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)
bucketName,
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
"Key" (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)
key]))
instance Property "BucketName" S3LocationProperty where
type PropertyType "BucketName" S3LocationProperty = Value Prelude.Text
set :: PropertyType "BucketName" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "BucketName" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LocationProperty -> ()
bucketName :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
= S3LocationProperty {bucketName :: Maybe (Value Text)
bucketName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketName" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
..}
instance Property "Key" S3LocationProperty where
type PropertyType "Key" S3LocationProperty = Value Prelude.Text
set :: PropertyType "Key" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "Key" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LocationProperty -> ()
bucketName :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
= S3LocationProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
..}