{-# 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.IVS.Types.StreamKeySummary where
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 StreamKeySummary = StreamKeySummary'
{
StreamKeySummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
StreamKeySummary -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
StreamKeySummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (StreamKeySummary -> StreamKeySummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamKeySummary -> StreamKeySummary -> Bool
$c/= :: StreamKeySummary -> StreamKeySummary -> Bool
== :: StreamKeySummary -> StreamKeySummary -> Bool
$c== :: StreamKeySummary -> StreamKeySummary -> Bool
Prelude.Eq, ReadPrec [StreamKeySummary]
ReadPrec StreamKeySummary
Int -> ReadS StreamKeySummary
ReadS [StreamKeySummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamKeySummary]
$creadListPrec :: ReadPrec [StreamKeySummary]
readPrec :: ReadPrec StreamKeySummary
$creadPrec :: ReadPrec StreamKeySummary
readList :: ReadS [StreamKeySummary]
$creadList :: ReadS [StreamKeySummary]
readsPrec :: Int -> ReadS StreamKeySummary
$creadsPrec :: Int -> ReadS StreamKeySummary
Prelude.Read, Int -> StreamKeySummary -> ShowS
[StreamKeySummary] -> ShowS
StreamKeySummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamKeySummary] -> ShowS
$cshowList :: [StreamKeySummary] -> ShowS
show :: StreamKeySummary -> String
$cshow :: StreamKeySummary -> String
showsPrec :: Int -> StreamKeySummary -> ShowS
$cshowsPrec :: Int -> StreamKeySummary -> ShowS
Prelude.Show, forall x. Rep StreamKeySummary x -> StreamKeySummary
forall x. StreamKeySummary -> Rep StreamKeySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamKeySummary x -> StreamKeySummary
$cfrom :: forall x. StreamKeySummary -> Rep StreamKeySummary x
Prelude.Generic)
newStreamKeySummary ::
StreamKeySummary
newStreamKeySummary :: StreamKeySummary
newStreamKeySummary =
StreamKeySummary'
{ $sel:arn:StreamKeySummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:channelArn:StreamKeySummary' :: Maybe Text
channelArn = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StreamKeySummary' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
streamKeySummary_arn :: Lens.Lens' StreamKeySummary (Prelude.Maybe Prelude.Text)
streamKeySummary_arn :: Lens' StreamKeySummary (Maybe Text)
streamKeySummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamKeySummary' {Maybe Text
arn :: Maybe Text
$sel:arn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StreamKeySummary
s@StreamKeySummary' {} Maybe Text
a -> StreamKeySummary
s {$sel:arn:StreamKeySummary' :: Maybe Text
arn = Maybe Text
a} :: StreamKeySummary)
streamKeySummary_channelArn :: Lens.Lens' StreamKeySummary (Prelude.Maybe Prelude.Text)
streamKeySummary_channelArn :: Lens' StreamKeySummary (Maybe Text)
streamKeySummary_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamKeySummary' {Maybe Text
channelArn :: Maybe Text
$sel:channelArn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: StreamKeySummary
s@StreamKeySummary' {} Maybe Text
a -> StreamKeySummary
s {$sel:channelArn:StreamKeySummary' :: Maybe Text
channelArn = Maybe Text
a} :: StreamKeySummary)
streamKeySummary_tags :: Lens.Lens' StreamKeySummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
streamKeySummary_tags :: Lens' StreamKeySummary (Maybe (HashMap Text Text))
streamKeySummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamKeySummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StreamKeySummary' :: StreamKeySummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StreamKeySummary
s@StreamKeySummary' {} Maybe (HashMap Text Text)
a -> StreamKeySummary
s {$sel:tags:StreamKeySummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StreamKeySummary) 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
instance Data.FromJSON StreamKeySummary where
parseJSON :: Value -> Parser StreamKeySummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StreamKeySummary"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe (HashMap Text Text) -> StreamKeySummary
StreamKeySummary'
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
"arn")
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
"channelArn")
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)
)
instance Prelude.Hashable StreamKeySummary where
hashWithSalt :: Int -> StreamKeySummary -> Int
hashWithSalt Int
_salt StreamKeySummary' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
channelArn :: Maybe Text
arn :: Maybe Text
$sel:tags:StreamKeySummary' :: StreamKeySummary -> Maybe (HashMap Text Text)
$sel:channelArn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
$sel:arn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
channelArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData StreamKeySummary where
rnf :: StreamKeySummary -> ()
rnf StreamKeySummary' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
channelArn :: Maybe Text
arn :: Maybe Text
$sel:tags:StreamKeySummary' :: StreamKeySummary -> Maybe (HashMap Text Text)
$sel:channelArn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
$sel:arn:StreamKeySummary' :: StreamKeySummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags