{-# 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.XRay.Types.GroupSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.XRay.Types.InsightsConfiguration
data GroupSummary = GroupSummary'
{
GroupSummary -> Maybe Text
filterExpression :: Prelude.Maybe Prelude.Text,
GroupSummary -> Maybe InsightsConfiguration
insightsConfiguration :: Prelude.Maybe InsightsConfiguration,
GroupSummary -> Maybe Text
groupARN :: Prelude.Maybe Prelude.Text,
GroupSummary -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text
}
deriving (GroupSummary -> GroupSummary -> Bool
(GroupSummary -> GroupSummary -> Bool)
-> (GroupSummary -> GroupSummary -> Bool) -> Eq GroupSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupSummary -> GroupSummary -> Bool
$c/= :: GroupSummary -> GroupSummary -> Bool
== :: GroupSummary -> GroupSummary -> Bool
$c== :: GroupSummary -> GroupSummary -> Bool
Prelude.Eq, ReadPrec [GroupSummary]
ReadPrec GroupSummary
Int -> ReadS GroupSummary
ReadS [GroupSummary]
(Int -> ReadS GroupSummary)
-> ReadS [GroupSummary]
-> ReadPrec GroupSummary
-> ReadPrec [GroupSummary]
-> Read GroupSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroupSummary]
$creadListPrec :: ReadPrec [GroupSummary]
readPrec :: ReadPrec GroupSummary
$creadPrec :: ReadPrec GroupSummary
readList :: ReadS [GroupSummary]
$creadList :: ReadS [GroupSummary]
readsPrec :: Int -> ReadS GroupSummary
$creadsPrec :: Int -> ReadS GroupSummary
Prelude.Read, Int -> GroupSummary -> ShowS
[GroupSummary] -> ShowS
GroupSummary -> String
(Int -> GroupSummary -> ShowS)
-> (GroupSummary -> String)
-> ([GroupSummary] -> ShowS)
-> Show GroupSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroupSummary] -> ShowS
$cshowList :: [GroupSummary] -> ShowS
show :: GroupSummary -> String
$cshow :: GroupSummary -> String
showsPrec :: Int -> GroupSummary -> ShowS
$cshowsPrec :: Int -> GroupSummary -> ShowS
Prelude.Show, (forall x. GroupSummary -> Rep GroupSummary x)
-> (forall x. Rep GroupSummary x -> GroupSummary)
-> Generic GroupSummary
forall x. Rep GroupSummary x -> GroupSummary
forall x. GroupSummary -> Rep GroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroupSummary x -> GroupSummary
$cfrom :: forall x. GroupSummary -> Rep GroupSummary x
Prelude.Generic)
newGroupSummary ::
GroupSummary
newGroupSummary :: GroupSummary
newGroupSummary =
GroupSummary' :: Maybe Text
-> Maybe InsightsConfiguration
-> Maybe Text
-> Maybe Text
-> GroupSummary
GroupSummary'
{ $sel:filterExpression:GroupSummary' :: Maybe Text
filterExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:insightsConfiguration:GroupSummary' :: Maybe InsightsConfiguration
insightsConfiguration = Maybe InsightsConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:groupARN:GroupSummary' :: Maybe Text
groupARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groupName:GroupSummary' :: Maybe Text
groupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
groupSummary_filterExpression :: Lens.Lens' GroupSummary (Prelude.Maybe Prelude.Text)
groupSummary_filterExpression :: (Maybe Text -> f (Maybe Text)) -> GroupSummary -> f GroupSummary
groupSummary_filterExpression = (GroupSummary -> Maybe Text)
-> (GroupSummary -> Maybe Text -> GroupSummary)
-> Lens GroupSummary GroupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSummary' {Maybe Text
filterExpression :: Maybe Text
$sel:filterExpression:GroupSummary' :: GroupSummary -> Maybe Text
filterExpression} -> Maybe Text
filterExpression) (\s :: GroupSummary
s@GroupSummary' {} Maybe Text
a -> GroupSummary
s {$sel:filterExpression:GroupSummary' :: Maybe Text
filterExpression = Maybe Text
a} :: GroupSummary)
groupSummary_insightsConfiguration :: Lens.Lens' GroupSummary (Prelude.Maybe InsightsConfiguration)
groupSummary_insightsConfiguration :: (Maybe InsightsConfiguration -> f (Maybe InsightsConfiguration))
-> GroupSummary -> f GroupSummary
groupSummary_insightsConfiguration = (GroupSummary -> Maybe InsightsConfiguration)
-> (GroupSummary -> Maybe InsightsConfiguration -> GroupSummary)
-> Lens
GroupSummary
GroupSummary
(Maybe InsightsConfiguration)
(Maybe InsightsConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSummary' {Maybe InsightsConfiguration
insightsConfiguration :: Maybe InsightsConfiguration
$sel:insightsConfiguration:GroupSummary' :: GroupSummary -> Maybe InsightsConfiguration
insightsConfiguration} -> Maybe InsightsConfiguration
insightsConfiguration) (\s :: GroupSummary
s@GroupSummary' {} Maybe InsightsConfiguration
a -> GroupSummary
s {$sel:insightsConfiguration:GroupSummary' :: Maybe InsightsConfiguration
insightsConfiguration = Maybe InsightsConfiguration
a} :: GroupSummary)
groupSummary_groupARN :: Lens.Lens' GroupSummary (Prelude.Maybe Prelude.Text)
groupSummary_groupARN :: (Maybe Text -> f (Maybe Text)) -> GroupSummary -> f GroupSummary
groupSummary_groupARN = (GroupSummary -> Maybe Text)
-> (GroupSummary -> Maybe Text -> GroupSummary)
-> Lens GroupSummary GroupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSummary' {Maybe Text
groupARN :: Maybe Text
$sel:groupARN:GroupSummary' :: GroupSummary -> Maybe Text
groupARN} -> Maybe Text
groupARN) (\s :: GroupSummary
s@GroupSummary' {} Maybe Text
a -> GroupSummary
s {$sel:groupARN:GroupSummary' :: Maybe Text
groupARN = Maybe Text
a} :: GroupSummary)
groupSummary_groupName :: Lens.Lens' GroupSummary (Prelude.Maybe Prelude.Text)
groupSummary_groupName :: (Maybe Text -> f (Maybe Text)) -> GroupSummary -> f GroupSummary
groupSummary_groupName = (GroupSummary -> Maybe Text)
-> (GroupSummary -> Maybe Text -> GroupSummary)
-> Lens GroupSummary GroupSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSummary' {Maybe Text
groupName :: Maybe Text
$sel:groupName:GroupSummary' :: GroupSummary -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: GroupSummary
s@GroupSummary' {} Maybe Text
a -> GroupSummary
s {$sel:groupName:GroupSummary' :: Maybe Text
groupName = Maybe Text
a} :: GroupSummary)
instance Core.FromJSON GroupSummary where
parseJSON :: Value -> Parser GroupSummary
parseJSON =
String
-> (Object -> Parser GroupSummary) -> Value -> Parser GroupSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GroupSummary"
( \Object
x ->
Maybe Text
-> Maybe InsightsConfiguration
-> Maybe Text
-> Maybe Text
-> GroupSummary
GroupSummary'
(Maybe Text
-> Maybe InsightsConfiguration
-> Maybe Text
-> Maybe Text
-> GroupSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe InsightsConfiguration
-> Maybe Text -> Maybe Text -> GroupSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FilterExpression")
Parser
(Maybe InsightsConfiguration
-> Maybe Text -> Maybe Text -> GroupSummary)
-> Parser (Maybe InsightsConfiguration)
-> Parser (Maybe Text -> Maybe Text -> GroupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InsightsConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InsightsConfiguration")
Parser (Maybe Text -> Maybe Text -> GroupSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GroupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GroupARN")
Parser (Maybe Text -> GroupSummary)
-> Parser (Maybe Text) -> Parser GroupSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GroupName")
)
instance Prelude.Hashable GroupSummary
instance Prelude.NFData GroupSummary