{-# 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.IotTwinMaker.Types.ComponentPropertyGroupResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IotTwinMaker.Types.GroupType
import qualified Amazonka.Prelude as Prelude
data ComponentPropertyGroupResponse = ComponentPropertyGroupResponse'
{
ComponentPropertyGroupResponse -> GroupType
groupType :: GroupType,
ComponentPropertyGroupResponse -> [Text]
propertyNames :: [Prelude.Text],
ComponentPropertyGroupResponse -> Bool
isInherited :: Prelude.Bool
}
deriving (ComponentPropertyGroupResponse
-> ComponentPropertyGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentPropertyGroupResponse
-> ComponentPropertyGroupResponse -> Bool
$c/= :: ComponentPropertyGroupResponse
-> ComponentPropertyGroupResponse -> Bool
== :: ComponentPropertyGroupResponse
-> ComponentPropertyGroupResponse -> Bool
$c== :: ComponentPropertyGroupResponse
-> ComponentPropertyGroupResponse -> Bool
Prelude.Eq, ReadPrec [ComponentPropertyGroupResponse]
ReadPrec ComponentPropertyGroupResponse
Int -> ReadS ComponentPropertyGroupResponse
ReadS [ComponentPropertyGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentPropertyGroupResponse]
$creadListPrec :: ReadPrec [ComponentPropertyGroupResponse]
readPrec :: ReadPrec ComponentPropertyGroupResponse
$creadPrec :: ReadPrec ComponentPropertyGroupResponse
readList :: ReadS [ComponentPropertyGroupResponse]
$creadList :: ReadS [ComponentPropertyGroupResponse]
readsPrec :: Int -> ReadS ComponentPropertyGroupResponse
$creadsPrec :: Int -> ReadS ComponentPropertyGroupResponse
Prelude.Read, Int -> ComponentPropertyGroupResponse -> ShowS
[ComponentPropertyGroupResponse] -> ShowS
ComponentPropertyGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentPropertyGroupResponse] -> ShowS
$cshowList :: [ComponentPropertyGroupResponse] -> ShowS
show :: ComponentPropertyGroupResponse -> String
$cshow :: ComponentPropertyGroupResponse -> String
showsPrec :: Int -> ComponentPropertyGroupResponse -> ShowS
$cshowsPrec :: Int -> ComponentPropertyGroupResponse -> ShowS
Prelude.Show, forall x.
Rep ComponentPropertyGroupResponse x
-> ComponentPropertyGroupResponse
forall x.
ComponentPropertyGroupResponse
-> Rep ComponentPropertyGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ComponentPropertyGroupResponse x
-> ComponentPropertyGroupResponse
$cfrom :: forall x.
ComponentPropertyGroupResponse
-> Rep ComponentPropertyGroupResponse x
Prelude.Generic)
newComponentPropertyGroupResponse ::
GroupType ->
Prelude.Bool ->
ComponentPropertyGroupResponse
newComponentPropertyGroupResponse :: GroupType -> Bool -> ComponentPropertyGroupResponse
newComponentPropertyGroupResponse
GroupType
pGroupType_
Bool
pIsInherited_ =
ComponentPropertyGroupResponse'
{ $sel:groupType:ComponentPropertyGroupResponse' :: GroupType
groupType =
GroupType
pGroupType_,
$sel:propertyNames:ComponentPropertyGroupResponse' :: [Text]
propertyNames = forall a. Monoid a => a
Prelude.mempty,
$sel:isInherited:ComponentPropertyGroupResponse' :: Bool
isInherited = Bool
pIsInherited_
}
componentPropertyGroupResponse_groupType :: Lens.Lens' ComponentPropertyGroupResponse GroupType
componentPropertyGroupResponse_groupType :: Lens' ComponentPropertyGroupResponse GroupType
componentPropertyGroupResponse_groupType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentPropertyGroupResponse' {GroupType
groupType :: GroupType
$sel:groupType:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> GroupType
groupType} -> GroupType
groupType) (\s :: ComponentPropertyGroupResponse
s@ComponentPropertyGroupResponse' {} GroupType
a -> ComponentPropertyGroupResponse
s {$sel:groupType:ComponentPropertyGroupResponse' :: GroupType
groupType = GroupType
a} :: ComponentPropertyGroupResponse)
componentPropertyGroupResponse_propertyNames :: Lens.Lens' ComponentPropertyGroupResponse [Prelude.Text]
componentPropertyGroupResponse_propertyNames :: Lens' ComponentPropertyGroupResponse [Text]
componentPropertyGroupResponse_propertyNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentPropertyGroupResponse' {[Text]
propertyNames :: [Text]
$sel:propertyNames:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> [Text]
propertyNames} -> [Text]
propertyNames) (\s :: ComponentPropertyGroupResponse
s@ComponentPropertyGroupResponse' {} [Text]
a -> ComponentPropertyGroupResponse
s {$sel:propertyNames:ComponentPropertyGroupResponse' :: [Text]
propertyNames = [Text]
a} :: ComponentPropertyGroupResponse) 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
componentPropertyGroupResponse_isInherited :: Lens.Lens' ComponentPropertyGroupResponse Prelude.Bool
componentPropertyGroupResponse_isInherited :: Lens' ComponentPropertyGroupResponse Bool
componentPropertyGroupResponse_isInherited = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentPropertyGroupResponse' {Bool
isInherited :: Bool
$sel:isInherited:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> Bool
isInherited} -> Bool
isInherited) (\s :: ComponentPropertyGroupResponse
s@ComponentPropertyGroupResponse' {} Bool
a -> ComponentPropertyGroupResponse
s {$sel:isInherited:ComponentPropertyGroupResponse' :: Bool
isInherited = Bool
a} :: ComponentPropertyGroupResponse)
instance Data.FromJSON ComponentPropertyGroupResponse where
parseJSON :: Value -> Parser ComponentPropertyGroupResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComponentPropertyGroupResponse"
( \Object
x ->
GroupType -> [Text] -> Bool -> ComponentPropertyGroupResponse
ComponentPropertyGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"groupType")
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
"propertyNames" 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
"isInherited")
)
instance
Prelude.Hashable
ComponentPropertyGroupResponse
where
hashWithSalt :: Int -> ComponentPropertyGroupResponse -> Int
hashWithSalt
Int
_salt
ComponentPropertyGroupResponse' {Bool
[Text]
GroupType
isInherited :: Bool
propertyNames :: [Text]
groupType :: GroupType
$sel:isInherited:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> Bool
$sel:propertyNames:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> [Text]
$sel:groupType:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> GroupType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` GroupType
groupType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
propertyNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
isInherited
instance
Prelude.NFData
ComponentPropertyGroupResponse
where
rnf :: ComponentPropertyGroupResponse -> ()
rnf ComponentPropertyGroupResponse' {Bool
[Text]
GroupType
isInherited :: Bool
propertyNames :: [Text]
groupType :: GroupType
$sel:isInherited:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> Bool
$sel:propertyNames:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> [Text]
$sel:groupType:ComponentPropertyGroupResponse' :: ComponentPropertyGroupResponse -> GroupType
..} =
forall a. NFData a => a -> ()
Prelude.rnf GroupType
groupType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
propertyNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
isInherited