module Stratosphere.Rekognition.Collection (
Collection(..), mkCollection
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Collection
=
Collection {Collection -> ()
haddock_workaround_ :: (),
Collection -> Value Text
collectionId :: (Value Prelude.Text),
Collection -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Collection -> Collection -> Bool
(Collection -> Collection -> Bool)
-> (Collection -> Collection -> Bool) -> Eq Collection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Collection -> Collection -> Bool
== :: Collection -> Collection -> Bool
$c/= :: Collection -> Collection -> Bool
/= :: Collection -> Collection -> Bool
Prelude.Eq, Int -> Collection -> ShowS
[Collection] -> ShowS
Collection -> String
(Int -> Collection -> ShowS)
-> (Collection -> String)
-> ([Collection] -> ShowS)
-> Show Collection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Collection -> ShowS
showsPrec :: Int -> Collection -> ShowS
$cshow :: Collection -> String
show :: Collection -> String
$cshowList :: [Collection] -> ShowS
showList :: [Collection] -> ShowS
Prelude.Show)
mkCollection :: Value Prelude.Text -> Collection
mkCollection :: Value Text -> Collection
mkCollection Value Text
collectionId
= Collection
{haddock_workaround_ :: ()
haddock_workaround_ = (), collectionId :: Value Text
collectionId = Value Text
collectionId,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Collection where
toResourceProperties :: Collection -> ResourceProperties
toResourceProperties Collection {Maybe [Tag]
()
Value Text
haddock_workaround_ :: Collection -> ()
collectionId :: Collection -> Value Text
tags :: Collection -> Maybe [Tag]
haddock_workaround_ :: ()
collectionId :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Rekognition::Collection",
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
"CollectionId" 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
collectionId]
([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 Collection where
toJSON :: Collection -> Value
toJSON Collection {Maybe [Tag]
()
Value Text
haddock_workaround_ :: Collection -> ()
collectionId :: Collection -> Value Text
tags :: Collection -> Maybe [Tag]
haddock_workaround_ :: ()
collectionId :: 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
"CollectionId" 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
collectionId]
([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 "CollectionId" Collection where
type PropertyType "CollectionId" Collection = Value Prelude.Text
set :: PropertyType "CollectionId" Collection -> Collection -> Collection
set PropertyType "CollectionId" Collection
newValue Collection {Maybe [Tag]
()
Value Text
haddock_workaround_ :: Collection -> ()
collectionId :: Collection -> Value Text
tags :: Collection -> Maybe [Tag]
haddock_workaround_ :: ()
collectionId :: Value Text
tags :: Maybe [Tag]
..}
= Collection {collectionId :: Value Text
collectionId = PropertyType "CollectionId" Collection
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" Collection where
type PropertyType "Tags" Collection = [Tag]
set :: PropertyType "Tags" Collection -> Collection -> Collection
set PropertyType "Tags" Collection
newValue Collection {Maybe [Tag]
()
Value Text
haddock_workaround_ :: Collection -> ()
collectionId :: Collection -> Value Text
tags :: Collection -> Maybe [Tag]
haddock_workaround_ :: ()
collectionId :: Value Text
tags :: Maybe [Tag]
..}
= Collection {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" Collection
newValue, ()
Value Text
haddock_workaround_ :: ()
collectionId :: Value Text
haddock_workaround_ :: ()
collectionId :: Value Text
..}