module Stratosphere.S3.StorageLensGroup (
module Exports, StorageLensGroup(..), mkStorageLensGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.StorageLensGroup.FilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data StorageLensGroup
=
StorageLensGroup {StorageLensGroup -> ()
haddock_workaround_ :: (),
StorageLensGroup -> FilterProperty
filter :: FilterProperty,
StorageLensGroup -> Value Text
name :: (Value Prelude.Text),
StorageLensGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (StorageLensGroup -> StorageLensGroup -> Bool
(StorageLensGroup -> StorageLensGroup -> Bool)
-> (StorageLensGroup -> StorageLensGroup -> Bool)
-> Eq StorageLensGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StorageLensGroup -> StorageLensGroup -> Bool
== :: StorageLensGroup -> StorageLensGroup -> Bool
$c/= :: StorageLensGroup -> StorageLensGroup -> Bool
/= :: StorageLensGroup -> StorageLensGroup -> Bool
Prelude.Eq, Int -> StorageLensGroup -> ShowS
[StorageLensGroup] -> ShowS
StorageLensGroup -> String
(Int -> StorageLensGroup -> ShowS)
-> (StorageLensGroup -> String)
-> ([StorageLensGroup] -> ShowS)
-> Show StorageLensGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StorageLensGroup -> ShowS
showsPrec :: Int -> StorageLensGroup -> ShowS
$cshow :: StorageLensGroup -> String
show :: StorageLensGroup -> String
$cshowList :: [StorageLensGroup] -> ShowS
showList :: [StorageLensGroup] -> ShowS
Prelude.Show)
mkStorageLensGroup ::
FilterProperty -> Value Prelude.Text -> StorageLensGroup
mkStorageLensGroup :: FilterProperty -> Value Text -> StorageLensGroup
mkStorageLensGroup FilterProperty
filter Value Text
name
= StorageLensGroup
{haddock_workaround_ :: ()
haddock_workaround_ = (), filter :: FilterProperty
filter = FilterProperty
filter, name :: Value Text
name = Value Text
name,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StorageLensGroup where
toResourceProperties :: StorageLensGroup -> ResourceProperties
toResourceProperties StorageLensGroup {Maybe [Tag]
()
Value Text
FilterProperty
haddock_workaround_ :: StorageLensGroup -> ()
filter :: StorageLensGroup -> FilterProperty
name :: StorageLensGroup -> Value Text
tags :: StorageLensGroup -> Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::StorageLensGroup",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Filter" Key -> FilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FilterProperty
filter, Key
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON StorageLensGroup where
toJSON :: StorageLensGroup -> Value
toJSON StorageLensGroup {Maybe [Tag]
()
Value Text
FilterProperty
haddock_workaround_ :: StorageLensGroup -> ()
filter :: StorageLensGroup -> FilterProperty
name :: StorageLensGroup -> Value Text
tags :: StorageLensGroup -> Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"Filter" Key -> FilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FilterProperty
filter, Key
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Filter" StorageLensGroup where
type PropertyType "Filter" StorageLensGroup = FilterProperty
set :: PropertyType "Filter" StorageLensGroup
-> StorageLensGroup -> StorageLensGroup
set PropertyType "Filter" StorageLensGroup
newValue StorageLensGroup {Maybe [Tag]
()
Value Text
FilterProperty
haddock_workaround_ :: StorageLensGroup -> ()
filter :: StorageLensGroup -> FilterProperty
name :: StorageLensGroup -> Value Text
tags :: StorageLensGroup -> Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
= StorageLensGroup {filter :: FilterProperty
filter = PropertyType "Filter" StorageLensGroup
FilterProperty
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" StorageLensGroup where
type PropertyType "Name" StorageLensGroup = Value Prelude.Text
set :: PropertyType "Name" StorageLensGroup
-> StorageLensGroup -> StorageLensGroup
set PropertyType "Name" StorageLensGroup
newValue StorageLensGroup {Maybe [Tag]
()
Value Text
FilterProperty
haddock_workaround_ :: StorageLensGroup -> ()
filter :: StorageLensGroup -> FilterProperty
name :: StorageLensGroup -> Value Text
tags :: StorageLensGroup -> Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
= StorageLensGroup {name :: Value Text
name = PropertyType "Name" StorageLensGroup
Value Text
newValue, Maybe [Tag]
()
FilterProperty
haddock_workaround_ :: ()
filter :: FilterProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" StorageLensGroup where
type PropertyType "Tags" StorageLensGroup = [Tag]
set :: PropertyType "Tags" StorageLensGroup
-> StorageLensGroup -> StorageLensGroup
set PropertyType "Tags" StorageLensGroup
newValue StorageLensGroup {Maybe [Tag]
()
Value Text
FilterProperty
haddock_workaround_ :: StorageLensGroup -> ()
filter :: StorageLensGroup -> FilterProperty
name :: StorageLensGroup -> Value Text
tags :: StorageLensGroup -> Maybe [Tag]
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
= StorageLensGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" StorageLensGroup
newValue, ()
Value Text
FilterProperty
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
haddock_workaround_ :: ()
filter :: FilterProperty
name :: Value Text
..}