{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.SESV2.GetContactList
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns contact list metadata. It does not return any information about
-- the contacts present in the list.
module Amazonka.SESV2.GetContactList
  ( -- * Creating a Request
    GetContactList (..),
    newGetContactList,

    -- * Request Lenses
    getContactList_contactListName,

    -- * Destructuring the Response
    GetContactListResponse (..),
    newGetContactListResponse,

    -- * Response Lenses
    getContactListResponse_topics,
    getContactListResponse_contactListName,
    getContactListResponse_createdTimestamp,
    getContactListResponse_description,
    getContactListResponse_tags,
    getContactListResponse_lastUpdatedTimestamp,
    getContactListResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SESV2.Types

-- | /See:/ 'newGetContactList' smart constructor.
data GetContactList = GetContactList'
  { -- | The name of the contact list.
    GetContactList -> Text
contactListName :: Prelude.Text
  }
  deriving (GetContactList -> GetContactList -> Bool
(GetContactList -> GetContactList -> Bool)
-> (GetContactList -> GetContactList -> Bool) -> Eq GetContactList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetContactList -> GetContactList -> Bool
$c/= :: GetContactList -> GetContactList -> Bool
== :: GetContactList -> GetContactList -> Bool
$c== :: GetContactList -> GetContactList -> Bool
Prelude.Eq, ReadPrec [GetContactList]
ReadPrec GetContactList
Int -> ReadS GetContactList
ReadS [GetContactList]
(Int -> ReadS GetContactList)
-> ReadS [GetContactList]
-> ReadPrec GetContactList
-> ReadPrec [GetContactList]
-> Read GetContactList
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetContactList]
$creadListPrec :: ReadPrec [GetContactList]
readPrec :: ReadPrec GetContactList
$creadPrec :: ReadPrec GetContactList
readList :: ReadS [GetContactList]
$creadList :: ReadS [GetContactList]
readsPrec :: Int -> ReadS GetContactList
$creadsPrec :: Int -> ReadS GetContactList
Prelude.Read, Int -> GetContactList -> ShowS
[GetContactList] -> ShowS
GetContactList -> String
(Int -> GetContactList -> ShowS)
-> (GetContactList -> String)
-> ([GetContactList] -> ShowS)
-> Show GetContactList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetContactList] -> ShowS
$cshowList :: [GetContactList] -> ShowS
show :: GetContactList -> String
$cshow :: GetContactList -> String
showsPrec :: Int -> GetContactList -> ShowS
$cshowsPrec :: Int -> GetContactList -> ShowS
Prelude.Show, (forall x. GetContactList -> Rep GetContactList x)
-> (forall x. Rep GetContactList x -> GetContactList)
-> Generic GetContactList
forall x. Rep GetContactList x -> GetContactList
forall x. GetContactList -> Rep GetContactList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetContactList x -> GetContactList
$cfrom :: forall x. GetContactList -> Rep GetContactList x
Prelude.Generic)

-- |
-- Create a value of 'GetContactList' 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:
--
-- 'contactListName', 'getContactList_contactListName' - The name of the contact list.
newGetContactList ::
  -- | 'contactListName'
  Prelude.Text ->
  GetContactList
newGetContactList :: Text -> GetContactList
newGetContactList Text
pContactListName_ =
  GetContactList' :: Text -> GetContactList
GetContactList'
    { $sel:contactListName:GetContactList' :: Text
contactListName =
        Text
pContactListName_
    }

-- | The name of the contact list.
getContactList_contactListName :: Lens.Lens' GetContactList Prelude.Text
getContactList_contactListName :: (Text -> f Text) -> GetContactList -> f GetContactList
getContactList_contactListName = (GetContactList -> Text)
-> (GetContactList -> Text -> GetContactList)
-> Lens GetContactList GetContactList Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactList' {Text
contactListName :: Text
$sel:contactListName:GetContactList' :: GetContactList -> Text
contactListName} -> Text
contactListName) (\s :: GetContactList
s@GetContactList' {} Text
a -> GetContactList
s {$sel:contactListName:GetContactList' :: Text
contactListName = Text
a} :: GetContactList)

instance Core.AWSRequest GetContactList where
  type
    AWSResponse GetContactList =
      GetContactListResponse
  request :: GetContactList -> Request GetContactList
request = Service -> GetContactList -> Request GetContactList
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetContactList
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetContactList)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetContactList))
-> Logger
-> Service
-> Proxy GetContactList
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetContactList)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Topic]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Maybe POSIX
-> Int
-> GetContactListResponse
GetContactListResponse'
            (Maybe [Topic]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Tag]
 -> Maybe POSIX
 -> Int
 -> GetContactListResponse)
-> Either String (Maybe [Topic])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe POSIX
      -> Int
      -> GetContactListResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Topic]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Topics" Either String (Maybe (Maybe [Topic]))
-> Maybe [Topic] -> Either String (Maybe [Topic])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Topic]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe POSIX
   -> Int
   -> GetContactListResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe POSIX
      -> Int
      -> GetContactListResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ContactListName")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe POSIX
   -> Int
   -> GetContactListResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe [Tag] -> Maybe POSIX -> Int -> GetContactListResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedTimestamp")
            Either
  String
  (Maybe Text
   -> Maybe [Tag] -> Maybe POSIX -> Int -> GetContactListResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Tag] -> Maybe POSIX -> Int -> GetContactListResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either
  String
  (Maybe [Tag] -> Maybe POSIX -> Int -> GetContactListResponse)
-> Either String (Maybe [Tag])
-> Either String (Maybe POSIX -> Int -> GetContactListResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe POSIX -> Int -> GetContactListResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> GetContactListResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedTimestamp")
            Either String (Int -> GetContactListResponse)
-> Either String Int -> Either String GetContactListResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetContactList

instance Prelude.NFData GetContactList

instance Core.ToHeaders GetContactList where
  toHeaders :: GetContactList -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetContactList -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath GetContactList where
  toPath :: GetContactList -> ByteString
toPath GetContactList' {Text
contactListName :: Text
$sel:contactListName:GetContactList' :: GetContactList -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/email/contact-lists/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
contactListName
      ]

instance Core.ToQuery GetContactList where
  toQuery :: GetContactList -> QueryString
toQuery = QueryString -> GetContactList -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetContactListResponse' smart constructor.
data GetContactListResponse = GetContactListResponse'
  { -- | An interest group, theme, or label within a list. A contact list can
    -- have multiple topics.
    GetContactListResponse -> Maybe [Topic]
topics :: Prelude.Maybe [Topic],
    -- | The name of the contact list.
    GetContactListResponse -> Maybe Text
contactListName :: Prelude.Maybe Prelude.Text,
    -- | A timestamp noting when the contact list was created.
    GetContactListResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | A description of what the contact list is about.
    GetContactListResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with a contact list.
    GetContactListResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A timestamp noting the last time the contact list was updated.
    GetContactListResponse -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    GetContactListResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetContactListResponse -> GetContactListResponse -> Bool
(GetContactListResponse -> GetContactListResponse -> Bool)
-> (GetContactListResponse -> GetContactListResponse -> Bool)
-> Eq GetContactListResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetContactListResponse -> GetContactListResponse -> Bool
$c/= :: GetContactListResponse -> GetContactListResponse -> Bool
== :: GetContactListResponse -> GetContactListResponse -> Bool
$c== :: GetContactListResponse -> GetContactListResponse -> Bool
Prelude.Eq, ReadPrec [GetContactListResponse]
ReadPrec GetContactListResponse
Int -> ReadS GetContactListResponse
ReadS [GetContactListResponse]
(Int -> ReadS GetContactListResponse)
-> ReadS [GetContactListResponse]
-> ReadPrec GetContactListResponse
-> ReadPrec [GetContactListResponse]
-> Read GetContactListResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetContactListResponse]
$creadListPrec :: ReadPrec [GetContactListResponse]
readPrec :: ReadPrec GetContactListResponse
$creadPrec :: ReadPrec GetContactListResponse
readList :: ReadS [GetContactListResponse]
$creadList :: ReadS [GetContactListResponse]
readsPrec :: Int -> ReadS GetContactListResponse
$creadsPrec :: Int -> ReadS GetContactListResponse
Prelude.Read, Int -> GetContactListResponse -> ShowS
[GetContactListResponse] -> ShowS
GetContactListResponse -> String
(Int -> GetContactListResponse -> ShowS)
-> (GetContactListResponse -> String)
-> ([GetContactListResponse] -> ShowS)
-> Show GetContactListResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetContactListResponse] -> ShowS
$cshowList :: [GetContactListResponse] -> ShowS
show :: GetContactListResponse -> String
$cshow :: GetContactListResponse -> String
showsPrec :: Int -> GetContactListResponse -> ShowS
$cshowsPrec :: Int -> GetContactListResponse -> ShowS
Prelude.Show, (forall x. GetContactListResponse -> Rep GetContactListResponse x)
-> (forall x.
    Rep GetContactListResponse x -> GetContactListResponse)
-> Generic GetContactListResponse
forall x. Rep GetContactListResponse x -> GetContactListResponse
forall x. GetContactListResponse -> Rep GetContactListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetContactListResponse x -> GetContactListResponse
$cfrom :: forall x. GetContactListResponse -> Rep GetContactListResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetContactListResponse' 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:
--
-- 'topics', 'getContactListResponse_topics' - An interest group, theme, or label within a list. A contact list can
-- have multiple topics.
--
-- 'contactListName', 'getContactListResponse_contactListName' - The name of the contact list.
--
-- 'createdTimestamp', 'getContactListResponse_createdTimestamp' - A timestamp noting when the contact list was created.
--
-- 'description', 'getContactListResponse_description' - A description of what the contact list is about.
--
-- 'tags', 'getContactListResponse_tags' - The tags associated with a contact list.
--
-- 'lastUpdatedTimestamp', 'getContactListResponse_lastUpdatedTimestamp' - A timestamp noting the last time the contact list was updated.
--
-- 'httpStatus', 'getContactListResponse_httpStatus' - The response's http status code.
newGetContactListResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetContactListResponse
newGetContactListResponse :: Int -> GetContactListResponse
newGetContactListResponse Int
pHttpStatus_ =
  GetContactListResponse' :: Maybe [Topic]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Maybe POSIX
-> Int
-> GetContactListResponse
GetContactListResponse'
    { $sel:topics:GetContactListResponse' :: Maybe [Topic]
topics = Maybe [Topic]
forall a. Maybe a
Prelude.Nothing,
      $sel:contactListName:GetContactListResponse' :: Maybe Text
contactListName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:GetContactListResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetContactListResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetContactListResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetContactListResponse' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetContactListResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An interest group, theme, or label within a list. A contact list can
-- have multiple topics.
getContactListResponse_topics :: Lens.Lens' GetContactListResponse (Prelude.Maybe [Topic])
getContactListResponse_topics :: (Maybe [Topic] -> f (Maybe [Topic]))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_topics = (GetContactListResponse -> Maybe [Topic])
-> (GetContactListResponse
    -> Maybe [Topic] -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe [Topic])
     (Maybe [Topic])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe [Topic]
topics :: Maybe [Topic]
$sel:topics:GetContactListResponse' :: GetContactListResponse -> Maybe [Topic]
topics} -> Maybe [Topic]
topics) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe [Topic]
a -> GetContactListResponse
s {$sel:topics:GetContactListResponse' :: Maybe [Topic]
topics = Maybe [Topic]
a} :: GetContactListResponse) ((Maybe [Topic] -> f (Maybe [Topic]))
 -> GetContactListResponse -> f GetContactListResponse)
-> ((Maybe [Topic] -> f (Maybe [Topic]))
    -> Maybe [Topic] -> f (Maybe [Topic]))
-> (Maybe [Topic] -> f (Maybe [Topic]))
-> GetContactListResponse
-> f GetContactListResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Topic] [Topic] [Topic] [Topic]
-> Iso
     (Maybe [Topic]) (Maybe [Topic]) (Maybe [Topic]) (Maybe [Topic])
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 [Topic] [Topic] [Topic] [Topic]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the contact list.
getContactListResponse_contactListName :: Lens.Lens' GetContactListResponse (Prelude.Maybe Prelude.Text)
getContactListResponse_contactListName :: (Maybe Text -> f (Maybe Text))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_contactListName = (GetContactListResponse -> Maybe Text)
-> (GetContactListResponse -> Maybe Text -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe Text
contactListName :: Maybe Text
$sel:contactListName:GetContactListResponse' :: GetContactListResponse -> Maybe Text
contactListName} -> Maybe Text
contactListName) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe Text
a -> GetContactListResponse
s {$sel:contactListName:GetContactListResponse' :: Maybe Text
contactListName = Maybe Text
a} :: GetContactListResponse)

-- | A timestamp noting when the contact list was created.
getContactListResponse_createdTimestamp :: Lens.Lens' GetContactListResponse (Prelude.Maybe Prelude.UTCTime)
getContactListResponse_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_createdTimestamp = (GetContactListResponse -> Maybe POSIX)
-> (GetContactListResponse
    -> Maybe POSIX -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:GetContactListResponse' :: GetContactListResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe POSIX
a -> GetContactListResponse
s {$sel:createdTimestamp:GetContactListResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: GetContactListResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetContactListResponse -> f GetContactListResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetContactListResponse
-> f GetContactListResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A description of what the contact list is about.
getContactListResponse_description :: Lens.Lens' GetContactListResponse (Prelude.Maybe Prelude.Text)
getContactListResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_description = (GetContactListResponse -> Maybe Text)
-> (GetContactListResponse -> Maybe Text -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetContactListResponse' :: GetContactListResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe Text
a -> GetContactListResponse
s {$sel:description:GetContactListResponse' :: Maybe Text
description = Maybe Text
a} :: GetContactListResponse)

-- | The tags associated with a contact list.
getContactListResponse_tags :: Lens.Lens' GetContactListResponse (Prelude.Maybe [Tag])
getContactListResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_tags = (GetContactListResponse -> Maybe [Tag])
-> (GetContactListResponse
    -> Maybe [Tag] -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:GetContactListResponse' :: GetContactListResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe [Tag]
a -> GetContactListResponse
s {$sel:tags:GetContactListResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: GetContactListResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> GetContactListResponse -> f GetContactListResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> GetContactListResponse
-> f GetContactListResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A timestamp noting the last time the contact list was updated.
getContactListResponse_lastUpdatedTimestamp :: Lens.Lens' GetContactListResponse (Prelude.Maybe Prelude.UTCTime)
getContactListResponse_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_lastUpdatedTimestamp = (GetContactListResponse -> Maybe POSIX)
-> (GetContactListResponse
    -> Maybe POSIX -> GetContactListResponse)
-> Lens
     GetContactListResponse
     GetContactListResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:GetContactListResponse' :: GetContactListResponse -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: GetContactListResponse
s@GetContactListResponse' {} Maybe POSIX
a -> GetContactListResponse
s {$sel:lastUpdatedTimestamp:GetContactListResponse' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: GetContactListResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetContactListResponse -> f GetContactListResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetContactListResponse
-> f GetContactListResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The response's http status code.
getContactListResponse_httpStatus :: Lens.Lens' GetContactListResponse Prelude.Int
getContactListResponse_httpStatus :: (Int -> f Int)
-> GetContactListResponse -> f GetContactListResponse
getContactListResponse_httpStatus = (GetContactListResponse -> Int)
-> (GetContactListResponse -> Int -> GetContactListResponse)
-> Lens GetContactListResponse GetContactListResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetContactListResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetContactListResponse' :: GetContactListResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetContactListResponse
s@GetContactListResponse' {} Int
a -> GetContactListResponse
s {$sel:httpStatus:GetContactListResponse' :: Int
httpStatus = Int
a} :: GetContactListResponse)

instance Prelude.NFData GetContactListResponse