{-# 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.Route53Domains.ListDomains
-- 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)
--
-- This operation returns all the domain names registered with Amazon Route
-- 53 for the current AWS account.
--
-- This operation returns paginated results.
module Amazonka.Route53Domains.ListDomains
  ( -- * Creating a Request
    ListDomains (..),
    newListDomains,

    -- * Request Lenses
    listDomains_marker,
    listDomains_maxItems,

    -- * Destructuring the Response
    ListDomainsResponse (..),
    newListDomainsResponse,

    -- * Response Lenses
    listDomainsResponse_nextPageMarker,
    listDomainsResponse_httpStatus,
    listDomainsResponse_domains,
  )
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.Route53Domains.Types

-- | The ListDomains request includes the following elements.
--
-- /See:/ 'newListDomains' smart constructor.
data ListDomains = ListDomains'
  { -- | For an initial request for a list of domains, omit this element. If the
    -- number of domains that are associated with the current AWS account is
    -- greater than the value that you specified for @MaxItems@, you can use
    -- @Marker@ to return additional domains. Get the value of @NextPageMarker@
    -- from the previous response, and submit another request that includes the
    -- value of @NextPageMarker@ in the @Marker@ element.
    --
    -- Constraints: The marker must match the value specified in the previous
    -- request.
    ListDomains -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Number of domains to be returned.
    --
    -- Default: 20
    ListDomains -> Maybe Int
maxItems :: Prelude.Maybe Prelude.Int
  }
  deriving (ListDomains -> ListDomains -> Bool
(ListDomains -> ListDomains -> Bool)
-> (ListDomains -> ListDomains -> Bool) -> Eq ListDomains
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomains -> ListDomains -> Bool
$c/= :: ListDomains -> ListDomains -> Bool
== :: ListDomains -> ListDomains -> Bool
$c== :: ListDomains -> ListDomains -> Bool
Prelude.Eq, ReadPrec [ListDomains]
ReadPrec ListDomains
Int -> ReadS ListDomains
ReadS [ListDomains]
(Int -> ReadS ListDomains)
-> ReadS [ListDomains]
-> ReadPrec ListDomains
-> ReadPrec [ListDomains]
-> Read ListDomains
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomains]
$creadListPrec :: ReadPrec [ListDomains]
readPrec :: ReadPrec ListDomains
$creadPrec :: ReadPrec ListDomains
readList :: ReadS [ListDomains]
$creadList :: ReadS [ListDomains]
readsPrec :: Int -> ReadS ListDomains
$creadsPrec :: Int -> ReadS ListDomains
Prelude.Read, Int -> ListDomains -> ShowS
[ListDomains] -> ShowS
ListDomains -> String
(Int -> ListDomains -> ShowS)
-> (ListDomains -> String)
-> ([ListDomains] -> ShowS)
-> Show ListDomains
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomains] -> ShowS
$cshowList :: [ListDomains] -> ShowS
show :: ListDomains -> String
$cshow :: ListDomains -> String
showsPrec :: Int -> ListDomains -> ShowS
$cshowsPrec :: Int -> ListDomains -> ShowS
Prelude.Show, (forall x. ListDomains -> Rep ListDomains x)
-> (forall x. Rep ListDomains x -> ListDomains)
-> Generic ListDomains
forall x. Rep ListDomains x -> ListDomains
forall x. ListDomains -> Rep ListDomains x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDomains x -> ListDomains
$cfrom :: forall x. ListDomains -> Rep ListDomains x
Prelude.Generic)

-- |
-- Create a value of 'ListDomains' 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:
--
-- 'marker', 'listDomains_marker' - For an initial request for a list of domains, omit this element. If the
-- number of domains that are associated with the current AWS account is
-- greater than the value that you specified for @MaxItems@, you can use
-- @Marker@ to return additional domains. Get the value of @NextPageMarker@
-- from the previous response, and submit another request that includes the
-- value of @NextPageMarker@ in the @Marker@ element.
--
-- Constraints: The marker must match the value specified in the previous
-- request.
--
-- 'maxItems', 'listDomains_maxItems' - Number of domains to be returned.
--
-- Default: 20
newListDomains ::
  ListDomains
newListDomains :: ListDomains
newListDomains =
  ListDomains' :: Maybe Text -> Maybe Int -> ListDomains
ListDomains'
    { $sel:marker:ListDomains' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListDomains' :: Maybe Int
maxItems = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | For an initial request for a list of domains, omit this element. If the
-- number of domains that are associated with the current AWS account is
-- greater than the value that you specified for @MaxItems@, you can use
-- @Marker@ to return additional domains. Get the value of @NextPageMarker@
-- from the previous response, and submit another request that includes the
-- value of @NextPageMarker@ in the @Marker@ element.
--
-- Constraints: The marker must match the value specified in the previous
-- request.
listDomains_marker :: Lens.Lens' ListDomains (Prelude.Maybe Prelude.Text)
listDomains_marker :: (Maybe Text -> f (Maybe Text)) -> ListDomains -> f ListDomains
listDomains_marker = (ListDomains -> Maybe Text)
-> (ListDomains -> Maybe Text -> ListDomains)
-> Lens ListDomains ListDomains (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomains' {Maybe Text
marker :: Maybe Text
$sel:marker:ListDomains' :: ListDomains -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListDomains
s@ListDomains' {} Maybe Text
a -> ListDomains
s {$sel:marker:ListDomains' :: Maybe Text
marker = Maybe Text
a} :: ListDomains)

-- | Number of domains to be returned.
--
-- Default: 20
listDomains_maxItems :: Lens.Lens' ListDomains (Prelude.Maybe Prelude.Int)
listDomains_maxItems :: (Maybe Int -> f (Maybe Int)) -> ListDomains -> f ListDomains
listDomains_maxItems = (ListDomains -> Maybe Int)
-> (ListDomains -> Maybe Int -> ListDomains)
-> Lens ListDomains ListDomains (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomains' {Maybe Int
maxItems :: Maybe Int
$sel:maxItems:ListDomains' :: ListDomains -> Maybe Int
maxItems} -> Maybe Int
maxItems) (\s :: ListDomains
s@ListDomains' {} Maybe Int
a -> ListDomains
s {$sel:maxItems:ListDomains' :: Maybe Int
maxItems = Maybe Int
a} :: ListDomains)

instance Core.AWSPager ListDomains where
  page :: ListDomains -> AWSResponse ListDomains -> Maybe ListDomains
page ListDomains
rq AWSResponse ListDomains
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDomains
ListDomainsResponse
rs
            ListDomainsResponse
-> Getting (First Text) ListDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainsResponse -> Const (First Text) ListDomainsResponse
Lens' ListDomainsResponse (Maybe Text)
listDomainsResponse_nextPageMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainsResponse -> Const (First Text) ListDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDomains
forall a. Maybe a
Prelude.Nothing
    | [DomainSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop (AWSResponse ListDomains
ListDomainsResponse
rs ListDomainsResponse
-> Getting [DomainSummary] ListDomainsResponse [DomainSummary]
-> [DomainSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [DomainSummary] ListDomainsResponse [DomainSummary]
Lens' ListDomainsResponse [DomainSummary]
listDomainsResponse_domains) =
      Maybe ListDomains
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDomains -> Maybe ListDomains
forall a. a -> Maybe a
Prelude.Just (ListDomains -> Maybe ListDomains)
-> ListDomains -> Maybe ListDomains
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDomains
rq
          ListDomains -> (ListDomains -> ListDomains) -> ListDomains
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDomains -> Identity ListDomains
Lens ListDomains ListDomains (Maybe Text) (Maybe Text)
listDomains_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDomains -> Identity ListDomains)
-> Maybe Text -> ListDomains -> ListDomains
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDomains
ListDomainsResponse
rs
          ListDomainsResponse
-> Getting (First Text) ListDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainsResponse -> Const (First Text) ListDomainsResponse
Lens' ListDomainsResponse (Maybe Text)
listDomainsResponse_nextPageMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainsResponse -> Const (First Text) ListDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable ListDomains

instance Prelude.NFData ListDomains

instance Core.ToHeaders ListDomains where
  toHeaders :: ListDomains -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDomains -> 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
"Route53Domains_v20140515.ListDomains" ::
                          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 ListDomains where
  toJSON :: ListDomains -> Value
toJSON ListDomains' {Maybe Int
Maybe Text
maxItems :: Maybe Int
marker :: Maybe Text
$sel:maxItems:ListDomains' :: ListDomains -> Maybe Int
$sel:marker:ListDomains' :: ListDomains -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Marker" 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
marker,
            (Text
"MaxItems" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxItems
          ]
      )

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

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

-- | The ListDomains response includes the following elements.
--
-- /See:/ 'newListDomainsResponse' smart constructor.
data ListDomainsResponse = ListDomainsResponse'
  { -- | If there are more domains than you specified for @MaxItems@ in the
    -- request, submit another request and include the value of
    -- @NextPageMarker@ in the value of @Marker@.
    ListDomainsResponse -> Maybe Text
nextPageMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDomainsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A summary of domains.
    ListDomainsResponse -> [DomainSummary]
domains :: [DomainSummary]
  }
  deriving (ListDomainsResponse -> ListDomainsResponse -> Bool
(ListDomainsResponse -> ListDomainsResponse -> Bool)
-> (ListDomainsResponse -> ListDomainsResponse -> Bool)
-> Eq ListDomainsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomainsResponse -> ListDomainsResponse -> Bool
$c/= :: ListDomainsResponse -> ListDomainsResponse -> Bool
== :: ListDomainsResponse -> ListDomainsResponse -> Bool
$c== :: ListDomainsResponse -> ListDomainsResponse -> Bool
Prelude.Eq, ReadPrec [ListDomainsResponse]
ReadPrec ListDomainsResponse
Int -> ReadS ListDomainsResponse
ReadS [ListDomainsResponse]
(Int -> ReadS ListDomainsResponse)
-> ReadS [ListDomainsResponse]
-> ReadPrec ListDomainsResponse
-> ReadPrec [ListDomainsResponse]
-> Read ListDomainsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomainsResponse]
$creadListPrec :: ReadPrec [ListDomainsResponse]
readPrec :: ReadPrec ListDomainsResponse
$creadPrec :: ReadPrec ListDomainsResponse
readList :: ReadS [ListDomainsResponse]
$creadList :: ReadS [ListDomainsResponse]
readsPrec :: Int -> ReadS ListDomainsResponse
$creadsPrec :: Int -> ReadS ListDomainsResponse
Prelude.Read, Int -> ListDomainsResponse -> ShowS
[ListDomainsResponse] -> ShowS
ListDomainsResponse -> String
(Int -> ListDomainsResponse -> ShowS)
-> (ListDomainsResponse -> String)
-> ([ListDomainsResponse] -> ShowS)
-> Show ListDomainsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomainsResponse] -> ShowS
$cshowList :: [ListDomainsResponse] -> ShowS
show :: ListDomainsResponse -> String
$cshow :: ListDomainsResponse -> String
showsPrec :: Int -> ListDomainsResponse -> ShowS
$cshowsPrec :: Int -> ListDomainsResponse -> ShowS
Prelude.Show, (forall x. ListDomainsResponse -> Rep ListDomainsResponse x)
-> (forall x. Rep ListDomainsResponse x -> ListDomainsResponse)
-> Generic ListDomainsResponse
forall x. Rep ListDomainsResponse x -> ListDomainsResponse
forall x. ListDomainsResponse -> Rep ListDomainsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDomainsResponse x -> ListDomainsResponse
$cfrom :: forall x. ListDomainsResponse -> Rep ListDomainsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDomainsResponse' 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:
--
-- 'nextPageMarker', 'listDomainsResponse_nextPageMarker' - If there are more domains than you specified for @MaxItems@ in the
-- request, submit another request and include the value of
-- @NextPageMarker@ in the value of @Marker@.
--
-- 'httpStatus', 'listDomainsResponse_httpStatus' - The response's http status code.
--
-- 'domains', 'listDomainsResponse_domains' - A summary of domains.
newListDomainsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDomainsResponse
newListDomainsResponse :: Int -> ListDomainsResponse
newListDomainsResponse Int
pHttpStatus_ =
  ListDomainsResponse' :: Maybe Text -> Int -> [DomainSummary] -> ListDomainsResponse
ListDomainsResponse'
    { $sel:nextPageMarker:ListDomainsResponse' :: Maybe Text
nextPageMarker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDomainsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:domains:ListDomainsResponse' :: [DomainSummary]
domains = [DomainSummary]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If there are more domains than you specified for @MaxItems@ in the
-- request, submit another request and include the value of
-- @NextPageMarker@ in the value of @Marker@.
listDomainsResponse_nextPageMarker :: Lens.Lens' ListDomainsResponse (Prelude.Maybe Prelude.Text)
listDomainsResponse_nextPageMarker :: (Maybe Text -> f (Maybe Text))
-> ListDomainsResponse -> f ListDomainsResponse
listDomainsResponse_nextPageMarker = (ListDomainsResponse -> Maybe Text)
-> (ListDomainsResponse -> Maybe Text -> ListDomainsResponse)
-> Lens' ListDomainsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainsResponse' {Maybe Text
nextPageMarker :: Maybe Text
$sel:nextPageMarker:ListDomainsResponse' :: ListDomainsResponse -> Maybe Text
nextPageMarker} -> Maybe Text
nextPageMarker) (\s :: ListDomainsResponse
s@ListDomainsResponse' {} Maybe Text
a -> ListDomainsResponse
s {$sel:nextPageMarker:ListDomainsResponse' :: Maybe Text
nextPageMarker = Maybe Text
a} :: ListDomainsResponse)

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

-- | A summary of domains.
listDomainsResponse_domains :: Lens.Lens' ListDomainsResponse [DomainSummary]
listDomainsResponse_domains :: ([DomainSummary] -> f [DomainSummary])
-> ListDomainsResponse -> f ListDomainsResponse
listDomainsResponse_domains = (ListDomainsResponse -> [DomainSummary])
-> (ListDomainsResponse -> [DomainSummary] -> ListDomainsResponse)
-> Lens' ListDomainsResponse [DomainSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainsResponse' {[DomainSummary]
domains :: [DomainSummary]
$sel:domains:ListDomainsResponse' :: ListDomainsResponse -> [DomainSummary]
domains} -> [DomainSummary]
domains) (\s :: ListDomainsResponse
s@ListDomainsResponse' {} [DomainSummary]
a -> ListDomainsResponse
s {$sel:domains:ListDomainsResponse' :: [DomainSummary]
domains = [DomainSummary]
a} :: ListDomainsResponse) (([DomainSummary] -> f [DomainSummary])
 -> ListDomainsResponse -> f ListDomainsResponse)
-> (([DomainSummary] -> f [DomainSummary])
    -> [DomainSummary] -> f [DomainSummary])
-> ([DomainSummary] -> f [DomainSummary])
-> ListDomainsResponse
-> f ListDomainsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DomainSummary] -> f [DomainSummary])
-> [DomainSummary] -> f [DomainSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListDomainsResponse