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