{-# 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.WorkMail.ListMailDomains
-- 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)
--
-- Lists the mail domains in a given Amazon WorkMail organization.
module Amazonka.WorkMail.ListMailDomains
  ( -- * Creating a Request
    ListMailDomains (..),
    newListMailDomains,

    -- * Request Lenses
    listMailDomains_nextToken,
    listMailDomains_maxResults,
    listMailDomains_organizationId,

    -- * Destructuring the Response
    ListMailDomainsResponse (..),
    newListMailDomainsResponse,

    -- * Response Lenses
    listMailDomainsResponse_nextToken,
    listMailDomainsResponse_mailDomains,
    listMailDomainsResponse_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.WorkMail.Types

-- | /See:/ 'newListMailDomains' smart constructor.
data ListMailDomains = ListMailDomains'
  { -- | The token to use to retrieve the next page of results. The first call
    -- does not require a token.
    ListMailDomains -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in a single call.
    ListMailDomains -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon WorkMail organization for which to list domains.
    ListMailDomains -> Text
organizationId :: Prelude.Text
  }
  deriving (ListMailDomains -> ListMailDomains -> Bool
(ListMailDomains -> ListMailDomains -> Bool)
-> (ListMailDomains -> ListMailDomains -> Bool)
-> Eq ListMailDomains
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMailDomains -> ListMailDomains -> Bool
$c/= :: ListMailDomains -> ListMailDomains -> Bool
== :: ListMailDomains -> ListMailDomains -> Bool
$c== :: ListMailDomains -> ListMailDomains -> Bool
Prelude.Eq, ReadPrec [ListMailDomains]
ReadPrec ListMailDomains
Int -> ReadS ListMailDomains
ReadS [ListMailDomains]
(Int -> ReadS ListMailDomains)
-> ReadS [ListMailDomains]
-> ReadPrec ListMailDomains
-> ReadPrec [ListMailDomains]
-> Read ListMailDomains
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMailDomains]
$creadListPrec :: ReadPrec [ListMailDomains]
readPrec :: ReadPrec ListMailDomains
$creadPrec :: ReadPrec ListMailDomains
readList :: ReadS [ListMailDomains]
$creadList :: ReadS [ListMailDomains]
readsPrec :: Int -> ReadS ListMailDomains
$creadsPrec :: Int -> ReadS ListMailDomains
Prelude.Read, Int -> ListMailDomains -> ShowS
[ListMailDomains] -> ShowS
ListMailDomains -> String
(Int -> ListMailDomains -> ShowS)
-> (ListMailDomains -> String)
-> ([ListMailDomains] -> ShowS)
-> Show ListMailDomains
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMailDomains] -> ShowS
$cshowList :: [ListMailDomains] -> ShowS
show :: ListMailDomains -> String
$cshow :: ListMailDomains -> String
showsPrec :: Int -> ListMailDomains -> ShowS
$cshowsPrec :: Int -> ListMailDomains -> ShowS
Prelude.Show, (forall x. ListMailDomains -> Rep ListMailDomains x)
-> (forall x. Rep ListMailDomains x -> ListMailDomains)
-> Generic ListMailDomains
forall x. Rep ListMailDomains x -> ListMailDomains
forall x. ListMailDomains -> Rep ListMailDomains x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMailDomains x -> ListMailDomains
$cfrom :: forall x. ListMailDomains -> Rep ListMailDomains x
Prelude.Generic)

-- |
-- Create a value of 'ListMailDomains' 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:
--
-- 'nextToken', 'listMailDomains_nextToken' - The token to use to retrieve the next page of results. The first call
-- does not require a token.
--
-- 'maxResults', 'listMailDomains_maxResults' - The maximum number of results to return in a single call.
--
-- 'organizationId', 'listMailDomains_organizationId' - The Amazon WorkMail organization for which to list domains.
newListMailDomains ::
  -- | 'organizationId'
  Prelude.Text ->
  ListMailDomains
newListMailDomains :: Text -> ListMailDomains
newListMailDomains Text
pOrganizationId_ =
  ListMailDomains' :: Maybe Text -> Maybe Natural -> Text -> ListMailDomains
ListMailDomains'
    { $sel:nextToken:ListMailDomains' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMailDomains' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationId:ListMailDomains' :: Text
organizationId = Text
pOrganizationId_
    }

-- | The token to use to retrieve the next page of results. The first call
-- does not require a token.
listMailDomains_nextToken :: Lens.Lens' ListMailDomains (Prelude.Maybe Prelude.Text)
listMailDomains_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMailDomains -> f ListMailDomains
listMailDomains_nextToken = (ListMailDomains -> Maybe Text)
-> (ListMailDomains -> Maybe Text -> ListMailDomains)
-> Lens ListMailDomains ListMailDomains (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMailDomains' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMailDomains' :: ListMailDomains -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMailDomains
s@ListMailDomains' {} Maybe Text
a -> ListMailDomains
s {$sel:nextToken:ListMailDomains' :: Maybe Text
nextToken = Maybe Text
a} :: ListMailDomains)

-- | The maximum number of results to return in a single call.
listMailDomains_maxResults :: Lens.Lens' ListMailDomains (Prelude.Maybe Prelude.Natural)
listMailDomains_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMailDomains -> f ListMailDomains
listMailDomains_maxResults = (ListMailDomains -> Maybe Natural)
-> (ListMailDomains -> Maybe Natural -> ListMailDomains)
-> Lens
     ListMailDomains ListMailDomains (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMailDomains' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMailDomains' :: ListMailDomains -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMailDomains
s@ListMailDomains' {} Maybe Natural
a -> ListMailDomains
s {$sel:maxResults:ListMailDomains' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMailDomains)

-- | The Amazon WorkMail organization for which to list domains.
listMailDomains_organizationId :: Lens.Lens' ListMailDomains Prelude.Text
listMailDomains_organizationId :: (Text -> f Text) -> ListMailDomains -> f ListMailDomains
listMailDomains_organizationId = (ListMailDomains -> Text)
-> (ListMailDomains -> Text -> ListMailDomains)
-> Lens ListMailDomains ListMailDomains Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMailDomains' {Text
organizationId :: Text
$sel:organizationId:ListMailDomains' :: ListMailDomains -> Text
organizationId} -> Text
organizationId) (\s :: ListMailDomains
s@ListMailDomains' {} Text
a -> ListMailDomains
s {$sel:organizationId:ListMailDomains' :: Text
organizationId = Text
a} :: ListMailDomains)

instance Core.AWSRequest ListMailDomains where
  type
    AWSResponse ListMailDomains =
      ListMailDomainsResponse
  request :: ListMailDomains -> Request ListMailDomains
request = Service -> ListMailDomains -> Request ListMailDomains
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMailDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMailDomains)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListMailDomains))
-> Logger
-> Service
-> Proxy ListMailDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMailDomains)))
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 Text
-> Maybe [MailDomainSummary] -> Int -> ListMailDomainsResponse
ListMailDomainsResponse'
            (Maybe Text
 -> Maybe [MailDomainSummary] -> Int -> ListMailDomainsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [MailDomainSummary] -> Int -> ListMailDomainsResponse)
forall (f :: * -> *) a b. Functor 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
"NextToken")
            Either
  String
  (Maybe [MailDomainSummary] -> Int -> ListMailDomainsResponse)
-> Either String (Maybe [MailDomainSummary])
-> Either String (Int -> ListMailDomainsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [MailDomainSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MailDomains" Either String (Maybe (Maybe [MailDomainSummary]))
-> Maybe [MailDomainSummary]
-> Either String (Maybe [MailDomainSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MailDomainSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListMailDomainsResponse)
-> Either String Int -> Either String ListMailDomainsResponse
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 ListMailDomains

instance Prelude.NFData ListMailDomains

instance Core.ToHeaders ListMailDomains where
  toHeaders :: ListMailDomains -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMailDomains -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"WorkMailService.ListMailDomains" ::
                          Prelude.ByteString
                      ),
            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.ToJSON ListMailDomains where
  toJSON :: ListMailDomains -> Value
toJSON ListMailDomains' {Maybe Natural
Maybe Text
Text
organizationId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:organizationId:ListMailDomains' :: ListMailDomains -> Text
$sel:maxResults:ListMailDomains' :: ListMailDomains -> Maybe Natural
$sel:nextToken:ListMailDomains' :: ListMailDomains -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OrganizationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationId)
          ]
      )

instance Core.ToPath ListMailDomains where
  toPath :: ListMailDomains -> ByteString
toPath = ByteString -> ListMailDomains -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListMailDomainsResponse' smart constructor.
data ListMailDomainsResponse = ListMailDomainsResponse'
  { -- | The token to use to retrieve the next page of results. The value becomes
    -- @null@ when there are no more results to return.
    ListMailDomainsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of mail domain summaries, specifying domains that exist in the
    -- specified Amazon WorkMail organization, along with the information about
    -- whether the domain is or isn\'t the default.
    ListMailDomainsResponse -> Maybe [MailDomainSummary]
mailDomains :: Prelude.Maybe [MailDomainSummary],
    -- | The response's http status code.
    ListMailDomainsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMailDomainsResponse -> ListMailDomainsResponse -> Bool
(ListMailDomainsResponse -> ListMailDomainsResponse -> Bool)
-> (ListMailDomainsResponse -> ListMailDomainsResponse -> Bool)
-> Eq ListMailDomainsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMailDomainsResponse -> ListMailDomainsResponse -> Bool
$c/= :: ListMailDomainsResponse -> ListMailDomainsResponse -> Bool
== :: ListMailDomainsResponse -> ListMailDomainsResponse -> Bool
$c== :: ListMailDomainsResponse -> ListMailDomainsResponse -> Bool
Prelude.Eq, ReadPrec [ListMailDomainsResponse]
ReadPrec ListMailDomainsResponse
Int -> ReadS ListMailDomainsResponse
ReadS [ListMailDomainsResponse]
(Int -> ReadS ListMailDomainsResponse)
-> ReadS [ListMailDomainsResponse]
-> ReadPrec ListMailDomainsResponse
-> ReadPrec [ListMailDomainsResponse]
-> Read ListMailDomainsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMailDomainsResponse]
$creadListPrec :: ReadPrec [ListMailDomainsResponse]
readPrec :: ReadPrec ListMailDomainsResponse
$creadPrec :: ReadPrec ListMailDomainsResponse
readList :: ReadS [ListMailDomainsResponse]
$creadList :: ReadS [ListMailDomainsResponse]
readsPrec :: Int -> ReadS ListMailDomainsResponse
$creadsPrec :: Int -> ReadS ListMailDomainsResponse
Prelude.Read, Int -> ListMailDomainsResponse -> ShowS
[ListMailDomainsResponse] -> ShowS
ListMailDomainsResponse -> String
(Int -> ListMailDomainsResponse -> ShowS)
-> (ListMailDomainsResponse -> String)
-> ([ListMailDomainsResponse] -> ShowS)
-> Show ListMailDomainsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMailDomainsResponse] -> ShowS
$cshowList :: [ListMailDomainsResponse] -> ShowS
show :: ListMailDomainsResponse -> String
$cshow :: ListMailDomainsResponse -> String
showsPrec :: Int -> ListMailDomainsResponse -> ShowS
$cshowsPrec :: Int -> ListMailDomainsResponse -> ShowS
Prelude.Show, (forall x.
 ListMailDomainsResponse -> Rep ListMailDomainsResponse x)
-> (forall x.
    Rep ListMailDomainsResponse x -> ListMailDomainsResponse)
-> Generic ListMailDomainsResponse
forall x. Rep ListMailDomainsResponse x -> ListMailDomainsResponse
forall x. ListMailDomainsResponse -> Rep ListMailDomainsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMailDomainsResponse x -> ListMailDomainsResponse
$cfrom :: forall x. ListMailDomainsResponse -> Rep ListMailDomainsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMailDomainsResponse' 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:
--
-- 'nextToken', 'listMailDomainsResponse_nextToken' - The token to use to retrieve the next page of results. The value becomes
-- @null@ when there are no more results to return.
--
-- 'mailDomains', 'listMailDomainsResponse_mailDomains' - The list of mail domain summaries, specifying domains that exist in the
-- specified Amazon WorkMail organization, along with the information about
-- whether the domain is or isn\'t the default.
--
-- 'httpStatus', 'listMailDomainsResponse_httpStatus' - The response's http status code.
newListMailDomainsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMailDomainsResponse
newListMailDomainsResponse :: Int -> ListMailDomainsResponse
newListMailDomainsResponse Int
pHttpStatus_ =
  ListMailDomainsResponse' :: Maybe Text
-> Maybe [MailDomainSummary] -> Int -> ListMailDomainsResponse
ListMailDomainsResponse'
    { $sel:nextToken:ListMailDomainsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mailDomains:ListMailDomainsResponse' :: Maybe [MailDomainSummary]
mailDomains = Maybe [MailDomainSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMailDomainsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to retrieve the next page of results. The value becomes
-- @null@ when there are no more results to return.
listMailDomainsResponse_nextToken :: Lens.Lens' ListMailDomainsResponse (Prelude.Maybe Prelude.Text)
listMailDomainsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMailDomainsResponse -> f ListMailDomainsResponse
listMailDomainsResponse_nextToken = (ListMailDomainsResponse -> Maybe Text)
-> (ListMailDomainsResponse
    -> Maybe Text -> ListMailDomainsResponse)
-> Lens
     ListMailDomainsResponse
     ListMailDomainsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMailDomainsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMailDomainsResponse' :: ListMailDomainsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMailDomainsResponse
s@ListMailDomainsResponse' {} Maybe Text
a -> ListMailDomainsResponse
s {$sel:nextToken:ListMailDomainsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMailDomainsResponse)

-- | The list of mail domain summaries, specifying domains that exist in the
-- specified Amazon WorkMail organization, along with the information about
-- whether the domain is or isn\'t the default.
listMailDomainsResponse_mailDomains :: Lens.Lens' ListMailDomainsResponse (Prelude.Maybe [MailDomainSummary])
listMailDomainsResponse_mailDomains :: (Maybe [MailDomainSummary] -> f (Maybe [MailDomainSummary]))
-> ListMailDomainsResponse -> f ListMailDomainsResponse
listMailDomainsResponse_mailDomains = (ListMailDomainsResponse -> Maybe [MailDomainSummary])
-> (ListMailDomainsResponse
    -> Maybe [MailDomainSummary] -> ListMailDomainsResponse)
-> Lens
     ListMailDomainsResponse
     ListMailDomainsResponse
     (Maybe [MailDomainSummary])
     (Maybe [MailDomainSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMailDomainsResponse' {Maybe [MailDomainSummary]
mailDomains :: Maybe [MailDomainSummary]
$sel:mailDomains:ListMailDomainsResponse' :: ListMailDomainsResponse -> Maybe [MailDomainSummary]
mailDomains} -> Maybe [MailDomainSummary]
mailDomains) (\s :: ListMailDomainsResponse
s@ListMailDomainsResponse' {} Maybe [MailDomainSummary]
a -> ListMailDomainsResponse
s {$sel:mailDomains:ListMailDomainsResponse' :: Maybe [MailDomainSummary]
mailDomains = Maybe [MailDomainSummary]
a} :: ListMailDomainsResponse) ((Maybe [MailDomainSummary] -> f (Maybe [MailDomainSummary]))
 -> ListMailDomainsResponse -> f ListMailDomainsResponse)
-> ((Maybe [MailDomainSummary] -> f (Maybe [MailDomainSummary]))
    -> Maybe [MailDomainSummary] -> f (Maybe [MailDomainSummary]))
-> (Maybe [MailDomainSummary] -> f (Maybe [MailDomainSummary]))
-> ListMailDomainsResponse
-> f ListMailDomainsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MailDomainSummary]
  [MailDomainSummary]
  [MailDomainSummary]
  [MailDomainSummary]
-> Iso
     (Maybe [MailDomainSummary])
     (Maybe [MailDomainSummary])
     (Maybe [MailDomainSummary])
     (Maybe [MailDomainSummary])
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
  [MailDomainSummary]
  [MailDomainSummary]
  [MailDomainSummary]
  [MailDomainSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListMailDomainsResponse