{-# 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.AmplifyUiBuilder.Types.Component where
import Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValue
import Amazonka.AmplifyUiBuilder.Types.ComponentChild
import Amazonka.AmplifyUiBuilder.Types.ComponentDataConfiguration
import Amazonka.AmplifyUiBuilder.Types.ComponentEvent
import Amazonka.AmplifyUiBuilder.Types.ComponentProperty
import Amazonka.AmplifyUiBuilder.Types.ComponentVariant
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
data Component = Component'
{
Component -> Maybe [ComponentChild]
children :: Prelude.Maybe [ComponentChild],
Component -> Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDataConfiguration),
Component -> Maybe (HashMap Text ComponentEvent)
events :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentEvent),
Component -> Maybe ISO8601
modifiedAt :: Prelude.Maybe Data.ISO8601,
Component -> Maybe Text
schemaVersion :: Prelude.Maybe Prelude.Text,
Component -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
Component -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Component -> Text
appId :: Prelude.Text,
Component -> HashMap Text ComponentBindingPropertiesValue
bindingProperties :: Prelude.HashMap Prelude.Text ComponentBindingPropertiesValue,
Component -> Text
componentType :: Prelude.Text,
Component -> ISO8601
createdAt :: Data.ISO8601,
Component -> Text
environmentName :: Prelude.Text,
Component -> Text
id :: Prelude.Text,
Component -> Text
name :: Prelude.Text,
Component -> HashMap Text (HashMap Text Text)
overrides :: Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text),
Component -> HashMap Text ComponentProperty
properties :: Prelude.HashMap Prelude.Text ComponentProperty,
Component -> [ComponentVariant]
variants :: [ComponentVariant]
}
deriving (Component -> Component -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Component -> Component -> Bool
$c/= :: Component -> Component -> Bool
== :: Component -> Component -> Bool
$c== :: Component -> Component -> Bool
Prelude.Eq, ReadPrec [Component]
ReadPrec Component
Int -> ReadS Component
ReadS [Component]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Component]
$creadListPrec :: ReadPrec [Component]
readPrec :: ReadPrec Component
$creadPrec :: ReadPrec Component
readList :: ReadS [Component]
$creadList :: ReadS [Component]
readsPrec :: Int -> ReadS Component
$creadsPrec :: Int -> ReadS Component
Prelude.Read, Int -> Component -> ShowS
[Component] -> ShowS
Component -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Component] -> ShowS
$cshowList :: [Component] -> ShowS
show :: Component -> String
$cshow :: Component -> String
showsPrec :: Int -> Component -> ShowS
$cshowsPrec :: Int -> Component -> ShowS
Prelude.Show, forall x. Rep Component x -> Component
forall x. Component -> Rep Component x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Component x -> Component
$cfrom :: forall x. Component -> Rep Component x
Prelude.Generic)
newComponent ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Component
newComponent :: Text -> Text -> UTCTime -> Text -> Text -> Text -> Component
newComponent
Text
pAppId_
Text
pComponentType_
UTCTime
pCreatedAt_
Text
pEnvironmentName_
Text
pId_
Text
pName_ =
Component'
{ $sel:children:Component' :: Maybe [ComponentChild]
children = forall a. Maybe a
Prelude.Nothing,
$sel:collectionProperties:Component' :: Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties = forall a. Maybe a
Prelude.Nothing,
$sel:events:Component' :: Maybe (HashMap Text ComponentEvent)
events = forall a. Maybe a
Prelude.Nothing,
$sel:modifiedAt:Component' :: Maybe ISO8601
modifiedAt = forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersion:Component' :: Maybe Text
schemaVersion = forall a. Maybe a
Prelude.Nothing,
$sel:sourceId:Component' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Component' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:appId:Component' :: Text
appId = Text
pAppId_,
$sel:bindingProperties:Component' :: HashMap Text ComponentBindingPropertiesValue
bindingProperties = forall a. Monoid a => a
Prelude.mempty,
$sel:componentType:Component' :: Text
componentType = Text
pComponentType_,
$sel:createdAt:Component' :: ISO8601
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:environmentName:Component' :: Text
environmentName = Text
pEnvironmentName_,
$sel:id:Component' :: Text
id = Text
pId_,
$sel:name:Component' :: Text
name = Text
pName_,
$sel:overrides:Component' :: HashMap Text (HashMap Text Text)
overrides = forall a. Monoid a => a
Prelude.mempty,
$sel:properties:Component' :: HashMap Text ComponentProperty
properties = forall a. Monoid a => a
Prelude.mempty,
$sel:variants:Component' :: [ComponentVariant]
variants = forall a. Monoid a => a
Prelude.mempty
}
component_children :: Lens.Lens' Component (Prelude.Maybe [ComponentChild])
component_children :: Lens' Component (Maybe [ComponentChild])
component_children = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe [ComponentChild]
children :: Maybe [ComponentChild]
$sel:children:Component' :: Component -> Maybe [ComponentChild]
children} -> Maybe [ComponentChild]
children) (\s :: Component
s@Component' {} Maybe [ComponentChild]
a -> Component
s {$sel:children:Component' :: Maybe [ComponentChild]
children = Maybe [ComponentChild]
a} :: Component) 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
component_collectionProperties :: Lens.Lens' Component (Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDataConfiguration))
component_collectionProperties :: Lens' Component (Maybe (HashMap Text ComponentDataConfiguration))
component_collectionProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties :: Maybe (HashMap Text ComponentDataConfiguration)
$sel:collectionProperties:Component' :: Component -> Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties} -> Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties) (\s :: Component
s@Component' {} Maybe (HashMap Text ComponentDataConfiguration)
a -> Component
s {$sel:collectionProperties:Component' :: Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties = Maybe (HashMap Text ComponentDataConfiguration)
a} :: Component) 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
component_events :: Lens.Lens' Component (Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentEvent))
component_events :: Lens' Component (Maybe (HashMap Text ComponentEvent))
component_events = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe (HashMap Text ComponentEvent)
events :: Maybe (HashMap Text ComponentEvent)
$sel:events:Component' :: Component -> Maybe (HashMap Text ComponentEvent)
events} -> Maybe (HashMap Text ComponentEvent)
events) (\s :: Component
s@Component' {} Maybe (HashMap Text ComponentEvent)
a -> Component
s {$sel:events:Component' :: Maybe (HashMap Text ComponentEvent)
events = Maybe (HashMap Text ComponentEvent)
a} :: Component) 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
component_modifiedAt :: Lens.Lens' Component (Prelude.Maybe Prelude.UTCTime)
component_modifiedAt :: Lens' Component (Maybe UTCTime)
component_modifiedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe ISO8601
modifiedAt :: Maybe ISO8601
$sel:modifiedAt:Component' :: Component -> Maybe ISO8601
modifiedAt} -> Maybe ISO8601
modifiedAt) (\s :: Component
s@Component' {} Maybe ISO8601
a -> Component
s {$sel:modifiedAt:Component' :: Maybe ISO8601
modifiedAt = Maybe ISO8601
a} :: Component) 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
component_schemaVersion :: Lens.Lens' Component (Prelude.Maybe Prelude.Text)
component_schemaVersion :: Lens' Component (Maybe Text)
component_schemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe Text
schemaVersion :: Maybe Text
$sel:schemaVersion:Component' :: Component -> Maybe Text
schemaVersion} -> Maybe Text
schemaVersion) (\s :: Component
s@Component' {} Maybe Text
a -> Component
s {$sel:schemaVersion:Component' :: Maybe Text
schemaVersion = Maybe Text
a} :: Component)
component_sourceId :: Lens.Lens' Component (Prelude.Maybe Prelude.Text)
component_sourceId :: Lens' Component (Maybe Text)
component_sourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:Component' :: Component -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: Component
s@Component' {} Maybe Text
a -> Component
s {$sel:sourceId:Component' :: Maybe Text
sourceId = Maybe Text
a} :: Component)
component_tags :: Lens.Lens' Component (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
component_tags :: Lens' Component (Maybe (HashMap Text Text))
component_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Component' :: Component -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Component
s@Component' {} Maybe (HashMap Text Text)
a -> Component
s {$sel:tags:Component' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Component) 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
component_appId :: Lens.Lens' Component Prelude.Text
component_appId :: Lens' Component Text
component_appId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Text
appId :: Text
$sel:appId:Component' :: Component -> Text
appId} -> Text
appId) (\s :: Component
s@Component' {} Text
a -> Component
s {$sel:appId:Component' :: Text
appId = Text
a} :: Component)
component_bindingProperties :: Lens.Lens' Component (Prelude.HashMap Prelude.Text ComponentBindingPropertiesValue)
component_bindingProperties :: Lens' Component (HashMap Text ComponentBindingPropertiesValue)
component_bindingProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {HashMap Text ComponentBindingPropertiesValue
bindingProperties :: HashMap Text ComponentBindingPropertiesValue
$sel:bindingProperties:Component' :: Component -> HashMap Text ComponentBindingPropertiesValue
bindingProperties} -> HashMap Text ComponentBindingPropertiesValue
bindingProperties) (\s :: Component
s@Component' {} HashMap Text ComponentBindingPropertiesValue
a -> Component
s {$sel:bindingProperties:Component' :: HashMap Text ComponentBindingPropertiesValue
bindingProperties = HashMap Text ComponentBindingPropertiesValue
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
component_componentType :: Lens.Lens' Component Prelude.Text
component_componentType :: Lens' Component Text
component_componentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Text
componentType :: Text
$sel:componentType:Component' :: Component -> Text
componentType} -> Text
componentType) (\s :: Component
s@Component' {} Text
a -> Component
s {$sel:componentType:Component' :: Text
componentType = Text
a} :: Component)
component_createdAt :: Lens.Lens' Component Prelude.UTCTime
component_createdAt :: Lens' Component UTCTime
component_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {ISO8601
createdAt :: ISO8601
$sel:createdAt:Component' :: Component -> ISO8601
createdAt} -> ISO8601
createdAt) (\s :: Component
s@Component' {} ISO8601
a -> Component
s {$sel:createdAt:Component' :: ISO8601
createdAt = ISO8601
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
component_environmentName :: Lens.Lens' Component Prelude.Text
component_environmentName :: Lens' Component Text
component_environmentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Text
environmentName :: Text
$sel:environmentName:Component' :: Component -> Text
environmentName} -> Text
environmentName) (\s :: Component
s@Component' {} Text
a -> Component
s {$sel:environmentName:Component' :: Text
environmentName = Text
a} :: Component)
component_id :: Lens.Lens' Component Prelude.Text
component_id :: Lens' Component Text
component_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Text
id :: Text
$sel:id:Component' :: Component -> Text
id} -> Text
id) (\s :: Component
s@Component' {} Text
a -> Component
s {$sel:id:Component' :: Text
id = Text
a} :: Component)
component_name :: Lens.Lens' Component Prelude.Text
component_name :: Lens' Component Text
component_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Text
name :: Text
$sel:name:Component' :: Component -> Text
name} -> Text
name) (\s :: Component
s@Component' {} Text
a -> Component
s {$sel:name:Component' :: Text
name = Text
a} :: Component)
component_overrides :: Lens.Lens' Component (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text))
component_overrides :: Lens' Component (HashMap Text (HashMap Text Text))
component_overrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {HashMap Text (HashMap Text Text)
overrides :: HashMap Text (HashMap Text Text)
$sel:overrides:Component' :: Component -> HashMap Text (HashMap Text Text)
overrides} -> HashMap Text (HashMap Text Text)
overrides) (\s :: Component
s@Component' {} HashMap Text (HashMap Text Text)
a -> Component
s {$sel:overrides:Component' :: HashMap Text (HashMap Text Text)
overrides = HashMap Text (HashMap Text Text)
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
component_properties :: Lens.Lens' Component (Prelude.HashMap Prelude.Text ComponentProperty)
component_properties :: Lens' Component (HashMap Text ComponentProperty)
component_properties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {HashMap Text ComponentProperty
properties :: HashMap Text ComponentProperty
$sel:properties:Component' :: Component -> HashMap Text ComponentProperty
properties} -> HashMap Text ComponentProperty
properties) (\s :: Component
s@Component' {} HashMap Text ComponentProperty
a -> Component
s {$sel:properties:Component' :: HashMap Text ComponentProperty
properties = HashMap Text ComponentProperty
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
component_variants :: Lens.Lens' Component [ComponentVariant]
component_variants :: Lens' Component [ComponentVariant]
component_variants = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {[ComponentVariant]
variants :: [ComponentVariant]
$sel:variants:Component' :: Component -> [ComponentVariant]
variants} -> [ComponentVariant]
variants) (\s :: Component
s@Component' {} [ComponentVariant]
a -> Component
s {$sel:variants:Component' :: [ComponentVariant]
variants = [ComponentVariant]
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Component where
parseJSON :: Value -> Parser Component
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Component"
( \Object
x ->
Maybe [ComponentChild]
-> Maybe (HashMap Text ComponentDataConfiguration)
-> Maybe (HashMap Text ComponentEvent)
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> HashMap Text ComponentBindingPropertiesValue
-> Text
-> ISO8601
-> Text
-> Text
-> Text
-> HashMap Text (HashMap Text Text)
-> HashMap Text ComponentProperty
-> [ComponentVariant]
-> Component
Component'
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
"children" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"collectionProperties"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
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
"events" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"modifiedAt")
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
"schemaVersion")
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
"sourceId")
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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"appId")
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
"bindingProperties"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"componentType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"environmentName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
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
"overrides" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"properties" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"variants" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Component where
hashWithSalt :: Int -> Component -> Int
hashWithSalt Int
_salt Component' {[ComponentVariant]
Maybe [ComponentChild]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text ComponentEvent)
Maybe (HashMap Text ComponentDataConfiguration)
Maybe ISO8601
Text
HashMap Text (HashMap Text Text)
HashMap Text ComponentProperty
HashMap Text ComponentBindingPropertiesValue
ISO8601
variants :: [ComponentVariant]
properties :: HashMap Text ComponentProperty
overrides :: HashMap Text (HashMap Text Text)
name :: Text
id :: Text
environmentName :: Text
createdAt :: ISO8601
componentType :: Text
bindingProperties :: HashMap Text ComponentBindingPropertiesValue
appId :: Text
tags :: Maybe (HashMap Text Text)
sourceId :: Maybe Text
schemaVersion :: Maybe Text
modifiedAt :: Maybe ISO8601
events :: Maybe (HashMap Text ComponentEvent)
collectionProperties :: Maybe (HashMap Text ComponentDataConfiguration)
children :: Maybe [ComponentChild]
$sel:variants:Component' :: Component -> [ComponentVariant]
$sel:properties:Component' :: Component -> HashMap Text ComponentProperty
$sel:overrides:Component' :: Component -> HashMap Text (HashMap Text Text)
$sel:name:Component' :: Component -> Text
$sel:id:Component' :: Component -> Text
$sel:environmentName:Component' :: Component -> Text
$sel:createdAt:Component' :: Component -> ISO8601
$sel:componentType:Component' :: Component -> Text
$sel:bindingProperties:Component' :: Component -> HashMap Text ComponentBindingPropertiesValue
$sel:appId:Component' :: Component -> Text
$sel:tags:Component' :: Component -> Maybe (HashMap Text Text)
$sel:sourceId:Component' :: Component -> Maybe Text
$sel:schemaVersion:Component' :: Component -> Maybe Text
$sel:modifiedAt:Component' :: Component -> Maybe ISO8601
$sel:events:Component' :: Component -> Maybe (HashMap Text ComponentEvent)
$sel:collectionProperties:Component' :: Component -> Maybe (HashMap Text ComponentDataConfiguration)
$sel:children:Component' :: Component -> Maybe [ComponentChild]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ComponentChild]
children
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text ComponentEvent)
events
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
modifiedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text ComponentBindingPropertiesValue
bindingProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
componentType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
environmentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text (HashMap Text Text)
overrides
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text ComponentProperty
properties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ComponentVariant]
variants
instance Prelude.NFData Component where
rnf :: Component -> ()
rnf Component' {[ComponentVariant]
Maybe [ComponentChild]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text ComponentEvent)
Maybe (HashMap Text ComponentDataConfiguration)
Maybe ISO8601
Text
HashMap Text (HashMap Text Text)
HashMap Text ComponentProperty
HashMap Text ComponentBindingPropertiesValue
ISO8601
variants :: [ComponentVariant]
properties :: HashMap Text ComponentProperty
overrides :: HashMap Text (HashMap Text Text)
name :: Text
id :: Text
environmentName :: Text
createdAt :: ISO8601
componentType :: Text
bindingProperties :: HashMap Text ComponentBindingPropertiesValue
appId :: Text
tags :: Maybe (HashMap Text Text)
sourceId :: Maybe Text
schemaVersion :: Maybe Text
modifiedAt :: Maybe ISO8601
events :: Maybe (HashMap Text ComponentEvent)
collectionProperties :: Maybe (HashMap Text ComponentDataConfiguration)
children :: Maybe [ComponentChild]
$sel:variants:Component' :: Component -> [ComponentVariant]
$sel:properties:Component' :: Component -> HashMap Text ComponentProperty
$sel:overrides:Component' :: Component -> HashMap Text (HashMap Text Text)
$sel:name:Component' :: Component -> Text
$sel:id:Component' :: Component -> Text
$sel:environmentName:Component' :: Component -> Text
$sel:createdAt:Component' :: Component -> ISO8601
$sel:componentType:Component' :: Component -> Text
$sel:bindingProperties:Component' :: Component -> HashMap Text ComponentBindingPropertiesValue
$sel:appId:Component' :: Component -> Text
$sel:tags:Component' :: Component -> Maybe (HashMap Text Text)
$sel:sourceId:Component' :: Component -> Maybe Text
$sel:schemaVersion:Component' :: Component -> Maybe Text
$sel:modifiedAt:Component' :: Component -> Maybe ISO8601
$sel:events:Component' :: Component -> Maybe (HashMap Text ComponentEvent)
$sel:collectionProperties:Component' :: Component -> Maybe (HashMap Text ComponentDataConfiguration)
$sel:children:Component' :: Component -> Maybe [ComponentChild]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ComponentChild]
children
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text ComponentDataConfiguration)
collectionProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text ComponentEvent)
events
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
modifiedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text ComponentBindingPropertiesValue
bindingProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
componentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
environmentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text (HashMap Text Text)
overrides
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text ComponentProperty
properties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ComponentVariant]
variants