{-# 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.ChimeSDKMessaging.Types.ChannelFlowSummary where
import Amazonka.ChimeSDKMessaging.Types.Processor
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelFlowSummary = ChannelFlowSummary'
{
ChannelFlowSummary -> Maybe (NonEmpty Processor)
processors :: Prelude.Maybe (Prelude.NonEmpty Processor),
ChannelFlowSummary -> Maybe Text
channelFlowArn :: Prelude.Maybe Prelude.Text,
ChannelFlowSummary -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (ChannelFlowSummary -> ChannelFlowSummary -> Bool
(ChannelFlowSummary -> ChannelFlowSummary -> Bool)
-> (ChannelFlowSummary -> ChannelFlowSummary -> Bool)
-> Eq ChannelFlowSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelFlowSummary -> ChannelFlowSummary -> Bool
$c/= :: ChannelFlowSummary -> ChannelFlowSummary -> Bool
== :: ChannelFlowSummary -> ChannelFlowSummary -> Bool
$c== :: ChannelFlowSummary -> ChannelFlowSummary -> Bool
Prelude.Eq, Int -> ChannelFlowSummary -> ShowS
[ChannelFlowSummary] -> ShowS
ChannelFlowSummary -> String
(Int -> ChannelFlowSummary -> ShowS)
-> (ChannelFlowSummary -> String)
-> ([ChannelFlowSummary] -> ShowS)
-> Show ChannelFlowSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelFlowSummary] -> ShowS
$cshowList :: [ChannelFlowSummary] -> ShowS
show :: ChannelFlowSummary -> String
$cshow :: ChannelFlowSummary -> String
showsPrec :: Int -> ChannelFlowSummary -> ShowS
$cshowsPrec :: Int -> ChannelFlowSummary -> ShowS
Prelude.Show, (forall x. ChannelFlowSummary -> Rep ChannelFlowSummary x)
-> (forall x. Rep ChannelFlowSummary x -> ChannelFlowSummary)
-> Generic ChannelFlowSummary
forall x. Rep ChannelFlowSummary x -> ChannelFlowSummary
forall x. ChannelFlowSummary -> Rep ChannelFlowSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelFlowSummary x -> ChannelFlowSummary
$cfrom :: forall x. ChannelFlowSummary -> Rep ChannelFlowSummary x
Prelude.Generic)
newChannelFlowSummary ::
ChannelFlowSummary
newChannelFlowSummary :: ChannelFlowSummary
newChannelFlowSummary =
ChannelFlowSummary' :: Maybe (NonEmpty Processor)
-> Maybe Text -> Maybe (Sensitive Text) -> ChannelFlowSummary
ChannelFlowSummary'
{ $sel:processors:ChannelFlowSummary' :: Maybe (NonEmpty Processor)
processors = Maybe (NonEmpty Processor)
forall a. Maybe a
Prelude.Nothing,
$sel:channelFlowArn:ChannelFlowSummary' :: Maybe Text
channelFlowArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ChannelFlowSummary' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
channelFlowSummary_processors :: Lens.Lens' ChannelFlowSummary (Prelude.Maybe (Prelude.NonEmpty Processor))
channelFlowSummary_processors :: (Maybe (NonEmpty Processor) -> f (Maybe (NonEmpty Processor)))
-> ChannelFlowSummary -> f ChannelFlowSummary
channelFlowSummary_processors = (ChannelFlowSummary -> Maybe (NonEmpty Processor))
-> (ChannelFlowSummary
-> Maybe (NonEmpty Processor) -> ChannelFlowSummary)
-> Lens
ChannelFlowSummary
ChannelFlowSummary
(Maybe (NonEmpty Processor))
(Maybe (NonEmpty Processor))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowSummary' {Maybe (NonEmpty Processor)
processors :: Maybe (NonEmpty Processor)
$sel:processors:ChannelFlowSummary' :: ChannelFlowSummary -> Maybe (NonEmpty Processor)
processors} -> Maybe (NonEmpty Processor)
processors) (\s :: ChannelFlowSummary
s@ChannelFlowSummary' {} Maybe (NonEmpty Processor)
a -> ChannelFlowSummary
s {$sel:processors:ChannelFlowSummary' :: Maybe (NonEmpty Processor)
processors = Maybe (NonEmpty Processor)
a} :: ChannelFlowSummary) ((Maybe (NonEmpty Processor) -> f (Maybe (NonEmpty Processor)))
-> ChannelFlowSummary -> f ChannelFlowSummary)
-> ((Maybe (NonEmpty Processor) -> f (Maybe (NonEmpty Processor)))
-> Maybe (NonEmpty Processor) -> f (Maybe (NonEmpty Processor)))
-> (Maybe (NonEmpty Processor) -> f (Maybe (NonEmpty Processor)))
-> ChannelFlowSummary
-> f ChannelFlowSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Processor)
(NonEmpty Processor)
(NonEmpty Processor)
(NonEmpty Processor)
-> Iso
(Maybe (NonEmpty Processor))
(Maybe (NonEmpty Processor))
(Maybe (NonEmpty Processor))
(Maybe (NonEmpty Processor))
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 AnIso
(NonEmpty Processor)
(NonEmpty Processor)
(NonEmpty Processor)
(NonEmpty Processor)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
channelFlowSummary_channelFlowArn :: Lens.Lens' ChannelFlowSummary (Prelude.Maybe Prelude.Text)
channelFlowSummary_channelFlowArn :: (Maybe Text -> f (Maybe Text))
-> ChannelFlowSummary -> f ChannelFlowSummary
channelFlowSummary_channelFlowArn = (ChannelFlowSummary -> Maybe Text)
-> (ChannelFlowSummary -> Maybe Text -> ChannelFlowSummary)
-> Lens
ChannelFlowSummary ChannelFlowSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowSummary' {Maybe Text
channelFlowArn :: Maybe Text
$sel:channelFlowArn:ChannelFlowSummary' :: ChannelFlowSummary -> Maybe Text
channelFlowArn} -> Maybe Text
channelFlowArn) (\s :: ChannelFlowSummary
s@ChannelFlowSummary' {} Maybe Text
a -> ChannelFlowSummary
s {$sel:channelFlowArn:ChannelFlowSummary' :: Maybe Text
channelFlowArn = Maybe Text
a} :: ChannelFlowSummary)
channelFlowSummary_name :: Lens.Lens' ChannelFlowSummary (Prelude.Maybe Prelude.Text)
channelFlowSummary_name :: (Maybe Text -> f (Maybe Text))
-> ChannelFlowSummary -> f ChannelFlowSummary
channelFlowSummary_name = (ChannelFlowSummary -> Maybe (Sensitive Text))
-> (ChannelFlowSummary
-> Maybe (Sensitive Text) -> ChannelFlowSummary)
-> Lens
ChannelFlowSummary
ChannelFlowSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelFlowSummary' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:ChannelFlowSummary' :: ChannelFlowSummary -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: ChannelFlowSummary
s@ChannelFlowSummary' {} Maybe (Sensitive Text)
a -> ChannelFlowSummary
s {$sel:name:ChannelFlowSummary' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: ChannelFlowSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ChannelFlowSummary -> f ChannelFlowSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ChannelFlowSummary
-> f ChannelFlowSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.FromJSON ChannelFlowSummary where
parseJSON :: Value -> Parser ChannelFlowSummary
parseJSON =
String
-> (Object -> Parser ChannelFlowSummary)
-> Value
-> Parser ChannelFlowSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelFlowSummary"
( \Object
x ->
Maybe (NonEmpty Processor)
-> Maybe Text -> Maybe (Sensitive Text) -> ChannelFlowSummary
ChannelFlowSummary'
(Maybe (NonEmpty Processor)
-> Maybe Text -> Maybe (Sensitive Text) -> ChannelFlowSummary)
-> Parser (Maybe (NonEmpty Processor))
-> Parser
(Maybe Text -> Maybe (Sensitive Text) -> ChannelFlowSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Processor))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Processors")
Parser (Maybe Text -> Maybe (Sensitive Text) -> ChannelFlowSummary)
-> Parser (Maybe Text)
-> Parser (Maybe (Sensitive Text) -> ChannelFlowSummary)
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
"ChannelFlowArn")
Parser (Maybe (Sensitive Text) -> ChannelFlowSummary)
-> Parser (Maybe (Sensitive Text)) -> Parser ChannelFlowSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
)
instance Prelude.Hashable ChannelFlowSummary
instance Prelude.NFData ChannelFlowSummary