module Stratosphere.ImageBuilder.InfrastructureConfiguration.S3LogsProperty (
S3LogsProperty(..), mkS3LogsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3LogsProperty
=
S3LogsProperty {S3LogsProperty -> ()
haddock_workaround_ :: (),
S3LogsProperty -> Maybe (Value Text)
s3BucketName :: (Prelude.Maybe (Value Prelude.Text)),
S3LogsProperty -> Maybe (Value Text)
s3KeyPrefix :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (S3LogsProperty -> S3LogsProperty -> Bool
(S3LogsProperty -> S3LogsProperty -> Bool)
-> (S3LogsProperty -> S3LogsProperty -> Bool) -> Eq S3LogsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3LogsProperty -> S3LogsProperty -> Bool
== :: S3LogsProperty -> S3LogsProperty -> Bool
$c/= :: S3LogsProperty -> S3LogsProperty -> Bool
/= :: S3LogsProperty -> S3LogsProperty -> Bool
Prelude.Eq, Int -> S3LogsProperty -> ShowS
[S3LogsProperty] -> ShowS
S3LogsProperty -> String
(Int -> S3LogsProperty -> ShowS)
-> (S3LogsProperty -> String)
-> ([S3LogsProperty] -> ShowS)
-> Show S3LogsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3LogsProperty -> ShowS
showsPrec :: Int -> S3LogsProperty -> ShowS
$cshow :: S3LogsProperty -> String
show :: S3LogsProperty -> String
$cshowList :: [S3LogsProperty] -> ShowS
showList :: [S3LogsProperty] -> ShowS
Prelude.Show)
mkS3LogsProperty :: S3LogsProperty
mkS3LogsProperty :: S3LogsProperty
mkS3LogsProperty
= S3LogsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), s3BucketName :: Maybe (Value Text)
s3BucketName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
s3KeyPrefix :: Maybe (Value Text)
s3KeyPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3LogsProperty where
toResourceProperties :: S3LogsProperty -> ResourceProperties
toResourceProperties S3LogsProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LogsProperty -> ()
s3BucketName :: S3LogsProperty -> Maybe (Value Text)
s3KeyPrefix :: S3LogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
s3KeyPrefix :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ImageBuilder::InfrastructureConfiguration.S3Logs",
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
"S3BucketName" (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)
s3BucketName,
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
"S3KeyPrefix" (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)
s3KeyPrefix])}
instance JSON.ToJSON S3LogsProperty where
toJSON :: S3LogsProperty -> Value
toJSON S3LogsProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LogsProperty -> ()
s3BucketName :: S3LogsProperty -> Maybe (Value Text)
s3KeyPrefix :: S3LogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
s3KeyPrefix :: 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
"S3BucketName" (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)
s3BucketName,
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
"S3KeyPrefix" (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)
s3KeyPrefix]))
instance Property "S3BucketName" S3LogsProperty where
type PropertyType "S3BucketName" S3LogsProperty = Value Prelude.Text
set :: PropertyType "S3BucketName" S3LogsProperty
-> S3LogsProperty -> S3LogsProperty
set PropertyType "S3BucketName" S3LogsProperty
newValue S3LogsProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LogsProperty -> ()
s3BucketName :: S3LogsProperty -> Maybe (Value Text)
s3KeyPrefix :: S3LogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
s3KeyPrefix :: Maybe (Value Text)
..}
= S3LogsProperty {s3BucketName :: Maybe (Value Text)
s3BucketName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3BucketName" S3LogsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
s3KeyPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
s3KeyPrefix :: Maybe (Value Text)
..}
instance Property "S3KeyPrefix" S3LogsProperty where
type PropertyType "S3KeyPrefix" S3LogsProperty = Value Prelude.Text
set :: PropertyType "S3KeyPrefix" S3LogsProperty
-> S3LogsProperty -> S3LogsProperty
set PropertyType "S3KeyPrefix" S3LogsProperty
newValue S3LogsProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3LogsProperty -> ()
s3BucketName :: S3LogsProperty -> Maybe (Value Text)
s3KeyPrefix :: S3LogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
s3KeyPrefix :: Maybe (Value Text)
..}
= S3LogsProperty {s3KeyPrefix :: Maybe (Value Text)
s3KeyPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3KeyPrefix" S3LogsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
haddock_workaround_ :: ()
s3BucketName :: Maybe (Value Text)
..}