{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GroundStation.Types.ContactIdResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GroundStation.Types.ContactIdResponse 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

-- |
--
-- /See:/ 'newContactIdResponse' smart constructor.
data ContactIdResponse = ContactIdResponse'
  { -- | UUID of a contact.
    ContactIdResponse -> Maybe Text
contactId :: Prelude.Maybe Prelude.Text
  }
  deriving (ContactIdResponse -> ContactIdResponse -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'ContactIdResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'contactId', 'contactIdResponse_contactId' - UUID of a contact.
newContactIdResponse ::
  ContactIdResponse
newContactIdResponse :: ContactIdResponse
newContactIdResponse =
  ContactIdResponse' {$sel:contactId:ContactIdResponse' :: Maybe Text
contactId = forall a. Maybe a
Prelude.Nothing}

-- | UUID of a contact.
contactIdResponse_contactId :: Lens.Lens' ContactIdResponse (Prelude.Maybe Prelude.Text)
contactIdResponse_contactId :: Lens' ContactIdResponse (Maybe Text)
contactIdResponse_contactId = 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 Data.FromJSON ContactIdResponse where
  parseJSON :: Value -> Parser ContactIdResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ContactIdResponse"
      ( \Object
x ->
          Maybe Text -> ContactIdResponse
ContactIdResponse'
            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
"contactId")
      )

instance Prelude.Hashable ContactIdResponse where
  hashWithSalt :: Int -> ContactIdResponse -> Int
hashWithSalt Int
_salt ContactIdResponse' {Maybe Text
contactId :: Maybe Text
$sel:contactId:ContactIdResponse' :: ContactIdResponse -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contactId

instance Prelude.NFData ContactIdResponse where
  rnf :: ContactIdResponse -> ()
rnf ContactIdResponse' {Maybe Text
contactId :: Maybe Text
$sel:contactId:ContactIdResponse' :: ContactIdResponse -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contactId