{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transcribe.Types.CategoryProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.InputType
import Amazonka.Transcribe.Types.Rule
data CategoryProperties = CategoryProperties'
{
CategoryProperties -> Maybe Text
categoryName :: Prelude.Maybe Prelude.Text,
CategoryProperties -> Maybe POSIX
createTime :: Prelude.Maybe Data.POSIX,
CategoryProperties -> Maybe InputType
inputType :: Prelude.Maybe InputType,
CategoryProperties -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Data.POSIX,
CategoryProperties -> Maybe (NonEmpty Rule)
rules :: Prelude.Maybe (Prelude.NonEmpty Rule)
}
deriving (CategoryProperties -> CategoryProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CategoryProperties -> CategoryProperties -> Bool
$c/= :: CategoryProperties -> CategoryProperties -> Bool
== :: CategoryProperties -> CategoryProperties -> Bool
$c== :: CategoryProperties -> CategoryProperties -> Bool
Prelude.Eq, ReadPrec [CategoryProperties]
ReadPrec CategoryProperties
Int -> ReadS CategoryProperties
ReadS [CategoryProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CategoryProperties]
$creadListPrec :: ReadPrec [CategoryProperties]
readPrec :: ReadPrec CategoryProperties
$creadPrec :: ReadPrec CategoryProperties
readList :: ReadS [CategoryProperties]
$creadList :: ReadS [CategoryProperties]
readsPrec :: Int -> ReadS CategoryProperties
$creadsPrec :: Int -> ReadS CategoryProperties
Prelude.Read, Int -> CategoryProperties -> ShowS
[CategoryProperties] -> ShowS
CategoryProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CategoryProperties] -> ShowS
$cshowList :: [CategoryProperties] -> ShowS
show :: CategoryProperties -> String
$cshow :: CategoryProperties -> String
showsPrec :: Int -> CategoryProperties -> ShowS
$cshowsPrec :: Int -> CategoryProperties -> ShowS
Prelude.Show, forall x. Rep CategoryProperties x -> CategoryProperties
forall x. CategoryProperties -> Rep CategoryProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CategoryProperties x -> CategoryProperties
$cfrom :: forall x. CategoryProperties -> Rep CategoryProperties x
Prelude.Generic)
newCategoryProperties ::
CategoryProperties
newCategoryProperties :: CategoryProperties
newCategoryProperties =
CategoryProperties'
{ $sel:categoryName:CategoryProperties' :: Maybe Text
categoryName = forall a. Maybe a
Prelude.Nothing,
$sel:createTime:CategoryProperties' :: Maybe POSIX
createTime = forall a. Maybe a
Prelude.Nothing,
$sel:inputType:CategoryProperties' :: Maybe InputType
inputType = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:CategoryProperties' :: Maybe POSIX
lastUpdateTime = forall a. Maybe a
Prelude.Nothing,
$sel:rules:CategoryProperties' :: Maybe (NonEmpty Rule)
rules = forall a. Maybe a
Prelude.Nothing
}
categoryProperties_categoryName :: Lens.Lens' CategoryProperties (Prelude.Maybe Prelude.Text)
categoryProperties_categoryName :: Lens' CategoryProperties (Maybe Text)
categoryProperties_categoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryProperties' {Maybe Text
categoryName :: Maybe Text
$sel:categoryName:CategoryProperties' :: CategoryProperties -> Maybe Text
categoryName} -> Maybe Text
categoryName) (\s :: CategoryProperties
s@CategoryProperties' {} Maybe Text
a -> CategoryProperties
s {$sel:categoryName:CategoryProperties' :: Maybe Text
categoryName = Maybe Text
a} :: CategoryProperties)
categoryProperties_createTime :: Lens.Lens' CategoryProperties (Prelude.Maybe Prelude.UTCTime)
categoryProperties_createTime :: Lens' CategoryProperties (Maybe UTCTime)
categoryProperties_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryProperties' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: CategoryProperties
s@CategoryProperties' {} Maybe POSIX
a -> CategoryProperties
s {$sel:createTime:CategoryProperties' :: Maybe POSIX
createTime = Maybe POSIX
a} :: CategoryProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
categoryProperties_inputType :: Lens.Lens' CategoryProperties (Prelude.Maybe InputType)
categoryProperties_inputType :: Lens' CategoryProperties (Maybe InputType)
categoryProperties_inputType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryProperties' {Maybe InputType
inputType :: Maybe InputType
$sel:inputType:CategoryProperties' :: CategoryProperties -> Maybe InputType
inputType} -> Maybe InputType
inputType) (\s :: CategoryProperties
s@CategoryProperties' {} Maybe InputType
a -> CategoryProperties
s {$sel:inputType:CategoryProperties' :: Maybe InputType
inputType = Maybe InputType
a} :: CategoryProperties)
categoryProperties_lastUpdateTime :: Lens.Lens' CategoryProperties (Prelude.Maybe Prelude.UTCTime)
categoryProperties_lastUpdateTime :: Lens' CategoryProperties (Maybe UTCTime)
categoryProperties_lastUpdateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryProperties' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: CategoryProperties
s@CategoryProperties' {} Maybe POSIX
a -> CategoryProperties
s {$sel:lastUpdateTime:CategoryProperties' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: CategoryProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
categoryProperties_rules :: Lens.Lens' CategoryProperties (Prelude.Maybe (Prelude.NonEmpty Rule))
categoryProperties_rules :: Lens' CategoryProperties (Maybe (NonEmpty Rule))
categoryProperties_rules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CategoryProperties' {Maybe (NonEmpty Rule)
rules :: Maybe (NonEmpty Rule)
$sel:rules:CategoryProperties' :: CategoryProperties -> Maybe (NonEmpty Rule)
rules} -> Maybe (NonEmpty Rule)
rules) (\s :: CategoryProperties
s@CategoryProperties' {} Maybe (NonEmpty Rule)
a -> CategoryProperties
s {$sel:rules:CategoryProperties' :: Maybe (NonEmpty Rule)
rules = Maybe (NonEmpty Rule)
a} :: CategoryProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON CategoryProperties where
parseJSON :: Value -> Parser CategoryProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CategoryProperties"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe InputType
-> Maybe POSIX
-> Maybe (NonEmpty Rule)
-> CategoryProperties
CategoryProperties'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CategoryName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InputType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Rules")
)
instance Prelude.Hashable CategoryProperties where
hashWithSalt :: Int -> CategoryProperties -> Int
hashWithSalt Int
_salt CategoryProperties' {Maybe (NonEmpty Rule)
Maybe Text
Maybe POSIX
Maybe InputType
rules :: Maybe (NonEmpty Rule)
lastUpdateTime :: Maybe POSIX
inputType :: Maybe InputType
createTime :: Maybe POSIX
categoryName :: Maybe Text
$sel:rules:CategoryProperties' :: CategoryProperties -> Maybe (NonEmpty Rule)
$sel:lastUpdateTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
$sel:inputType:CategoryProperties' :: CategoryProperties -> Maybe InputType
$sel:createTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
$sel:categoryName:CategoryProperties' :: CategoryProperties -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
categoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputType
inputType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Rule)
rules
instance Prelude.NFData CategoryProperties where
rnf :: CategoryProperties -> ()
rnf CategoryProperties' {Maybe (NonEmpty Rule)
Maybe Text
Maybe POSIX
Maybe InputType
rules :: Maybe (NonEmpty Rule)
lastUpdateTime :: Maybe POSIX
inputType :: Maybe InputType
createTime :: Maybe POSIX
categoryName :: Maybe Text
$sel:rules:CategoryProperties' :: CategoryProperties -> Maybe (NonEmpty Rule)
$sel:lastUpdateTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
$sel:inputType:CategoryProperties' :: CategoryProperties -> Maybe InputType
$sel:createTime:CategoryProperties' :: CategoryProperties -> Maybe POSIX
$sel:categoryName:CategoryProperties' :: CategoryProperties -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
categoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputType
inputType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Rule)
rules