{-# 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.CodeStarNotifications.Types.EventTypeSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventTypeSummary = EventTypeSummary'
{
EventTypeSummary -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
EventTypeSummary -> Maybe Text
eventTypeName :: Prelude.Maybe Prelude.Text,
EventTypeSummary -> Maybe Text
eventTypeId :: Prelude.Maybe Prelude.Text,
EventTypeSummary -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text
}
deriving (EventTypeSummary -> EventTypeSummary -> Bool
(EventTypeSummary -> EventTypeSummary -> Bool)
-> (EventTypeSummary -> EventTypeSummary -> Bool)
-> Eq EventTypeSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventTypeSummary -> EventTypeSummary -> Bool
$c/= :: EventTypeSummary -> EventTypeSummary -> Bool
== :: EventTypeSummary -> EventTypeSummary -> Bool
$c== :: EventTypeSummary -> EventTypeSummary -> Bool
Prelude.Eq, ReadPrec [EventTypeSummary]
ReadPrec EventTypeSummary
Int -> ReadS EventTypeSummary
ReadS [EventTypeSummary]
(Int -> ReadS EventTypeSummary)
-> ReadS [EventTypeSummary]
-> ReadPrec EventTypeSummary
-> ReadPrec [EventTypeSummary]
-> Read EventTypeSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventTypeSummary]
$creadListPrec :: ReadPrec [EventTypeSummary]
readPrec :: ReadPrec EventTypeSummary
$creadPrec :: ReadPrec EventTypeSummary
readList :: ReadS [EventTypeSummary]
$creadList :: ReadS [EventTypeSummary]
readsPrec :: Int -> ReadS EventTypeSummary
$creadsPrec :: Int -> ReadS EventTypeSummary
Prelude.Read, Int -> EventTypeSummary -> ShowS
[EventTypeSummary] -> ShowS
EventTypeSummary -> String
(Int -> EventTypeSummary -> ShowS)
-> (EventTypeSummary -> String)
-> ([EventTypeSummary] -> ShowS)
-> Show EventTypeSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventTypeSummary] -> ShowS
$cshowList :: [EventTypeSummary] -> ShowS
show :: EventTypeSummary -> String
$cshow :: EventTypeSummary -> String
showsPrec :: Int -> EventTypeSummary -> ShowS
$cshowsPrec :: Int -> EventTypeSummary -> ShowS
Prelude.Show, (forall x. EventTypeSummary -> Rep EventTypeSummary x)
-> (forall x. Rep EventTypeSummary x -> EventTypeSummary)
-> Generic EventTypeSummary
forall x. Rep EventTypeSummary x -> EventTypeSummary
forall x. EventTypeSummary -> Rep EventTypeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventTypeSummary x -> EventTypeSummary
$cfrom :: forall x. EventTypeSummary -> Rep EventTypeSummary x
Prelude.Generic)
newEventTypeSummary ::
EventTypeSummary
newEventTypeSummary :: EventTypeSummary
newEventTypeSummary =
EventTypeSummary' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EventTypeSummary
EventTypeSummary'
{ $sel:resourceType:EventTypeSummary' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventTypeName:EventTypeSummary' :: Maybe Text
eventTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventTypeId:EventTypeSummary' :: Maybe Text
eventTypeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:EventTypeSummary' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventTypeSummary_resourceType :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)
eventTypeSummary_resourceType :: (Maybe Text -> f (Maybe Text))
-> EventTypeSummary -> f EventTypeSummary
eventTypeSummary_resourceType = (EventTypeSummary -> Maybe Text)
-> (EventTypeSummary -> Maybe Text -> EventTypeSummary)
-> Lens EventTypeSummary EventTypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTypeSummary' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:EventTypeSummary' :: EventTypeSummary -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: EventTypeSummary
s@EventTypeSummary' {} Maybe Text
a -> EventTypeSummary
s {$sel:resourceType:EventTypeSummary' :: Maybe Text
resourceType = Maybe Text
a} :: EventTypeSummary)
eventTypeSummary_eventTypeName :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)
eventTypeSummary_eventTypeName :: (Maybe Text -> f (Maybe Text))
-> EventTypeSummary -> f EventTypeSummary
eventTypeSummary_eventTypeName = (EventTypeSummary -> Maybe Text)
-> (EventTypeSummary -> Maybe Text -> EventTypeSummary)
-> Lens EventTypeSummary EventTypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTypeSummary' {Maybe Text
eventTypeName :: Maybe Text
$sel:eventTypeName:EventTypeSummary' :: EventTypeSummary -> Maybe Text
eventTypeName} -> Maybe Text
eventTypeName) (\s :: EventTypeSummary
s@EventTypeSummary' {} Maybe Text
a -> EventTypeSummary
s {$sel:eventTypeName:EventTypeSummary' :: Maybe Text
eventTypeName = Maybe Text
a} :: EventTypeSummary)
eventTypeSummary_eventTypeId :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)
eventTypeSummary_eventTypeId :: (Maybe Text -> f (Maybe Text))
-> EventTypeSummary -> f EventTypeSummary
eventTypeSummary_eventTypeId = (EventTypeSummary -> Maybe Text)
-> (EventTypeSummary -> Maybe Text -> EventTypeSummary)
-> Lens EventTypeSummary EventTypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTypeSummary' {Maybe Text
eventTypeId :: Maybe Text
$sel:eventTypeId:EventTypeSummary' :: EventTypeSummary -> Maybe Text
eventTypeId} -> Maybe Text
eventTypeId) (\s :: EventTypeSummary
s@EventTypeSummary' {} Maybe Text
a -> EventTypeSummary
s {$sel:eventTypeId:EventTypeSummary' :: Maybe Text
eventTypeId = Maybe Text
a} :: EventTypeSummary)
eventTypeSummary_serviceName :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)
eventTypeSummary_serviceName :: (Maybe Text -> f (Maybe Text))
-> EventTypeSummary -> f EventTypeSummary
eventTypeSummary_serviceName = (EventTypeSummary -> Maybe Text)
-> (EventTypeSummary -> Maybe Text -> EventTypeSummary)
-> Lens EventTypeSummary EventTypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTypeSummary' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:EventTypeSummary' :: EventTypeSummary -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: EventTypeSummary
s@EventTypeSummary' {} Maybe Text
a -> EventTypeSummary
s {$sel:serviceName:EventTypeSummary' :: Maybe Text
serviceName = Maybe Text
a} :: EventTypeSummary)
instance Core.FromJSON EventTypeSummary where
parseJSON :: Value -> Parser EventTypeSummary
parseJSON =
String
-> (Object -> Parser EventTypeSummary)
-> Value
-> Parser EventTypeSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventTypeSummary"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EventTypeSummary
EventTypeSummary'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EventTypeSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> EventTypeSummary)
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
"ResourceType")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> EventTypeSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EventTypeSummary)
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
"EventTypeName")
Parser (Maybe Text -> Maybe Text -> EventTypeSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EventTypeSummary)
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
"EventTypeId")
Parser (Maybe Text -> EventTypeSummary)
-> Parser (Maybe Text) -> Parser EventTypeSummary
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
"ServiceName")
)
instance Prelude.Hashable EventTypeSummary
instance Prelude.NFData EventTypeSummary