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