module Stratosphere.S3.Bucket.DestinationProperty (
DestinationProperty(..), mkDestinationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DestinationProperty
=
DestinationProperty {DestinationProperty -> ()
haddock_workaround_ :: (),
DestinationProperty -> Maybe (Value Text)
bucketAccountId :: (Prelude.Maybe (Value Prelude.Text)),
DestinationProperty -> Value Text
bucketArn :: (Value Prelude.Text),
DestinationProperty -> Value Text
format :: (Value Prelude.Text),
DestinationProperty -> Maybe (Value Text)
prefix :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (DestinationProperty -> DestinationProperty -> Bool
(DestinationProperty -> DestinationProperty -> Bool)
-> (DestinationProperty -> DestinationProperty -> Bool)
-> Eq DestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DestinationProperty -> DestinationProperty -> Bool
== :: DestinationProperty -> DestinationProperty -> Bool
$c/= :: DestinationProperty -> DestinationProperty -> Bool
/= :: DestinationProperty -> DestinationProperty -> Bool
Prelude.Eq, Int -> DestinationProperty -> ShowS
[DestinationProperty] -> ShowS
DestinationProperty -> String
(Int -> DestinationProperty -> ShowS)
-> (DestinationProperty -> String)
-> ([DestinationProperty] -> ShowS)
-> Show DestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DestinationProperty -> ShowS
showsPrec :: Int -> DestinationProperty -> ShowS
$cshow :: DestinationProperty -> String
show :: DestinationProperty -> String
$cshowList :: [DestinationProperty] -> ShowS
showList :: [DestinationProperty] -> ShowS
Prelude.Show)
mkDestinationProperty ::
Value Prelude.Text -> Value Prelude.Text -> DestinationProperty
mkDestinationProperty :: Value Text -> Value Text -> DestinationProperty
mkDestinationProperty Value Text
bucketArn Value Text
format
= DestinationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), bucketArn :: Value Text
bucketArn = Value Text
bucketArn, format :: Value Text
format = Value Text
format,
bucketAccountId :: Maybe (Value Text)
bucketAccountId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, prefix :: Maybe (Value Text)
prefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DestinationProperty where
toResourceProperties :: DestinationProperty -> ResourceProperties
toResourceProperties DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.Destination",
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
"BucketArn" 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
bucketArn, Key
"Format" 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
format]
([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
"BucketAccountId" (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)
bucketAccountId,
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
"Prefix" (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)
prefix]))}
instance JSON.ToJSON DestinationProperty where
toJSON :: DestinationProperty -> Value
toJSON DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: 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
"BucketArn" 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
bucketArn, Key
"Format" 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
format]
([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
"BucketAccountId" (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)
bucketAccountId,
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
"Prefix" (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)
prefix])))
instance Property "BucketAccountId" DestinationProperty where
type PropertyType "BucketAccountId" DestinationProperty = Value Prelude.Text
set :: PropertyType "BucketAccountId" DestinationProperty
-> DestinationProperty -> DestinationProperty
set PropertyType "BucketAccountId" DestinationProperty
newValue DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
= DestinationProperty {bucketAccountId :: Maybe (Value Text)
bucketAccountId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketAccountId" DestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "BucketArn" DestinationProperty where
type PropertyType "BucketArn" DestinationProperty = Value Prelude.Text
set :: PropertyType "BucketArn" DestinationProperty
-> DestinationProperty -> DestinationProperty
set PropertyType "BucketArn" DestinationProperty
newValue DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
= DestinationProperty {bucketArn :: Value Text
bucketArn = PropertyType "BucketArn" DestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
format :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
format :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Format" DestinationProperty where
type PropertyType "Format" DestinationProperty = Value Prelude.Text
set :: PropertyType "Format" DestinationProperty
-> DestinationProperty -> DestinationProperty
set PropertyType "Format" DestinationProperty
newValue DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
= DestinationProperty {format :: Value Text
format = PropertyType "Format" DestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
prefix :: Maybe (Value Text)
..}
instance Property "Prefix" DestinationProperty where
type PropertyType "Prefix" DestinationProperty = Value Prelude.Text
set :: PropertyType "Prefix" DestinationProperty
-> DestinationProperty -> DestinationProperty
set PropertyType "Prefix" DestinationProperty
newValue DestinationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DestinationProperty -> ()
bucketAccountId :: DestinationProperty -> Maybe (Value Text)
bucketArn :: DestinationProperty -> Value Text
format :: DestinationProperty -> Value Text
prefix :: DestinationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
prefix :: Maybe (Value Text)
..}
= DestinationProperty {prefix :: Maybe (Value Text)
prefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Prefix" DestinationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
bucketArn :: Value Text
format :: Value Text
..}