{-# 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.Lightsail.GetDomains
-- 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 a list of all domains in the user\'s account.
--
-- This operation returns paginated results.
module Amazonka.Lightsail.GetDomains
  ( -- * Creating a Request
    GetDomains (..),
    newGetDomains,

    -- * Request Lenses
    getDomains_pageToken,

    -- * Destructuring the Response
    GetDomainsResponse (..),
    newGetDomainsResponse,

    -- * Response Lenses
    getDomainsResponse_nextPageToken,
    getDomainsResponse_domains,
    getDomainsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetDomains' smart constructor.
data GetDomains = GetDomains'
  { -- | The token to advance to the next page of results from your request.
    --
    -- To get a page token, perform an initial @GetDomains@ request. If your
    -- results are paginated, the response will return a next page token that
    -- you can specify as the page token in a subsequent request.
    GetDomains -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text
  }
  deriving (GetDomains -> GetDomains -> Bool
(GetDomains -> GetDomains -> Bool)
-> (GetDomains -> GetDomains -> Bool) -> Eq GetDomains
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomains -> GetDomains -> Bool
$c/= :: GetDomains -> GetDomains -> Bool
== :: GetDomains -> GetDomains -> Bool
$c== :: GetDomains -> GetDomains -> Bool
Prelude.Eq, ReadPrec [GetDomains]
ReadPrec GetDomains
Int -> ReadS GetDomains
ReadS [GetDomains]
(Int -> ReadS GetDomains)
-> ReadS [GetDomains]
-> ReadPrec GetDomains
-> ReadPrec [GetDomains]
-> Read GetDomains
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomains]
$creadListPrec :: ReadPrec [GetDomains]
readPrec :: ReadPrec GetDomains
$creadPrec :: ReadPrec GetDomains
readList :: ReadS [GetDomains]
$creadList :: ReadS [GetDomains]
readsPrec :: Int -> ReadS GetDomains
$creadsPrec :: Int -> ReadS GetDomains
Prelude.Read, Int -> GetDomains -> ShowS
[GetDomains] -> ShowS
GetDomains -> String
(Int -> GetDomains -> ShowS)
-> (GetDomains -> String)
-> ([GetDomains] -> ShowS)
-> Show GetDomains
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomains] -> ShowS
$cshowList :: [GetDomains] -> ShowS
show :: GetDomains -> String
$cshow :: GetDomains -> String
showsPrec :: Int -> GetDomains -> ShowS
$cshowsPrec :: Int -> GetDomains -> ShowS
Prelude.Show, (forall x. GetDomains -> Rep GetDomains x)
-> (forall x. Rep GetDomains x -> GetDomains) -> Generic GetDomains
forall x. Rep GetDomains x -> GetDomains
forall x. GetDomains -> Rep GetDomains x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomains x -> GetDomains
$cfrom :: forall x. GetDomains -> Rep GetDomains x
Prelude.Generic)

-- |
-- Create a value of 'GetDomains' 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:
--
-- 'pageToken', 'getDomains_pageToken' - The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetDomains@ request. If your
-- results are paginated, the response will return a next page token that
-- you can specify as the page token in a subsequent request.
newGetDomains ::
  GetDomains
newGetDomains :: GetDomains
newGetDomains =
  GetDomains' :: Maybe Text -> GetDomains
GetDomains' {$sel:pageToken:GetDomains' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetDomains@ request. If your
-- results are paginated, the response will return a next page token that
-- you can specify as the page token in a subsequent request.
getDomains_pageToken :: Lens.Lens' GetDomains (Prelude.Maybe Prelude.Text)
getDomains_pageToken :: (Maybe Text -> f (Maybe Text)) -> GetDomains -> f GetDomains
getDomains_pageToken = (GetDomains -> Maybe Text)
-> (GetDomains -> Maybe Text -> GetDomains)
-> Lens GetDomains GetDomains (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomains' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetDomains' :: GetDomains -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: GetDomains
s@GetDomains' {} Maybe Text
a -> GetDomains
s {$sel:pageToken:GetDomains' :: Maybe Text
pageToken = Maybe Text
a} :: GetDomains)

instance Core.AWSPager GetDomains where
  page :: GetDomains -> AWSResponse GetDomains -> Maybe GetDomains
page GetDomains
rq AWSResponse GetDomains
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetDomains
GetDomainsResponse
rs
            GetDomainsResponse
-> Getting (First Text) GetDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDomainsResponse -> Const (First Text) GetDomainsResponse
Lens' GetDomainsResponse (Maybe Text)
getDomainsResponse_nextPageToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetDomainsResponse -> Const (First Text) GetDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDomainsResponse 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 GetDomains
forall a. Maybe a
Prelude.Nothing
    | Maybe [Domain] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetDomains
GetDomainsResponse
rs
            GetDomainsResponse
-> Getting (First [Domain]) GetDomainsResponse [Domain]
-> Maybe [Domain]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Domain] -> Const (First [Domain]) (Maybe [Domain]))
-> GetDomainsResponse -> Const (First [Domain]) GetDomainsResponse
Lens' GetDomainsResponse (Maybe [Domain])
getDomainsResponse_domains ((Maybe [Domain] -> Const (First [Domain]) (Maybe [Domain]))
 -> GetDomainsResponse -> Const (First [Domain]) GetDomainsResponse)
-> (([Domain] -> Const (First [Domain]) [Domain])
    -> Maybe [Domain] -> Const (First [Domain]) (Maybe [Domain]))
-> Getting (First [Domain]) GetDomainsResponse [Domain]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Domain] -> Const (First [Domain]) [Domain])
-> Maybe [Domain] -> Const (First [Domain]) (Maybe [Domain])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetDomains
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetDomains -> Maybe GetDomains
forall a. a -> Maybe a
Prelude.Just (GetDomains -> Maybe GetDomains) -> GetDomains -> Maybe GetDomains
forall a b. (a -> b) -> a -> b
Prelude.$
        GetDomains
rq
          GetDomains -> (GetDomains -> GetDomains) -> GetDomains
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetDomains -> Identity GetDomains
Lens GetDomains GetDomains (Maybe Text) (Maybe Text)
getDomains_pageToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetDomains -> Identity GetDomains)
-> Maybe Text -> GetDomains -> GetDomains
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetDomains
GetDomainsResponse
rs
          GetDomainsResponse
-> Getting (First Text) GetDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDomainsResponse -> Const (First Text) GetDomainsResponse
Lens' GetDomainsResponse (Maybe Text)
getDomainsResponse_nextPageToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetDomainsResponse -> Const (First Text) GetDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDomainsResponse 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 GetDomains where
  type AWSResponse GetDomains = GetDomainsResponse
  request :: GetDomains -> Request GetDomains
request = Service -> GetDomains -> Request GetDomains
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomains)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDomains))
-> Logger
-> Service
-> Proxy GetDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomains)))
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 [Domain] -> Int -> GetDomainsResponse
GetDomainsResponse'
            (Maybe Text -> Maybe [Domain] -> Int -> GetDomainsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Domain] -> Int -> GetDomainsResponse)
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
"nextPageToken")
            Either String (Maybe [Domain] -> Int -> GetDomainsResponse)
-> Either String (Maybe [Domain])
-> Either String (Int -> GetDomainsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Domain]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"domains" Either String (Maybe (Maybe [Domain]))
-> Maybe [Domain] -> Either String (Maybe [Domain])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Domain]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetDomainsResponse)
-> Either String Int -> Either String GetDomainsResponse
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 GetDomains

instance Prelude.NFData GetDomains

instance Core.ToHeaders GetDomains where
  toHeaders :: GetDomains -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDomains -> 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
"Lightsail_20161128.GetDomains" ::
                          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 GetDomains where
  toJSON :: GetDomains -> Value
toJSON GetDomains' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetDomains' :: GetDomains -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"pageToken" 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
pageToken]
      )

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

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

-- | /See:/ 'newGetDomainsResponse' smart constructor.
data GetDomainsResponse = GetDomainsResponse'
  { -- | The token to advance to the next page of results from your request.
    --
    -- A next page token is not returned if there are no more results to
    -- display.
    --
    -- To get the next page of results, perform another @GetDomains@ request
    -- and specify the next page token using the @pageToken@ parameter.
    GetDomainsResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | An array of key-value pairs containing information about each of the
    -- domain entries in the user\'s account.
    GetDomainsResponse -> Maybe [Domain]
domains :: Prelude.Maybe [Domain],
    -- | The response's http status code.
    GetDomainsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDomainsResponse -> GetDomainsResponse -> Bool
(GetDomainsResponse -> GetDomainsResponse -> Bool)
-> (GetDomainsResponse -> GetDomainsResponse -> Bool)
-> Eq GetDomainsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomainsResponse -> GetDomainsResponse -> Bool
$c/= :: GetDomainsResponse -> GetDomainsResponse -> Bool
== :: GetDomainsResponse -> GetDomainsResponse -> Bool
$c== :: GetDomainsResponse -> GetDomainsResponse -> Bool
Prelude.Eq, ReadPrec [GetDomainsResponse]
ReadPrec GetDomainsResponse
Int -> ReadS GetDomainsResponse
ReadS [GetDomainsResponse]
(Int -> ReadS GetDomainsResponse)
-> ReadS [GetDomainsResponse]
-> ReadPrec GetDomainsResponse
-> ReadPrec [GetDomainsResponse]
-> Read GetDomainsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomainsResponse]
$creadListPrec :: ReadPrec [GetDomainsResponse]
readPrec :: ReadPrec GetDomainsResponse
$creadPrec :: ReadPrec GetDomainsResponse
readList :: ReadS [GetDomainsResponse]
$creadList :: ReadS [GetDomainsResponse]
readsPrec :: Int -> ReadS GetDomainsResponse
$creadsPrec :: Int -> ReadS GetDomainsResponse
Prelude.Read, Int -> GetDomainsResponse -> ShowS
[GetDomainsResponse] -> ShowS
GetDomainsResponse -> String
(Int -> GetDomainsResponse -> ShowS)
-> (GetDomainsResponse -> String)
-> ([GetDomainsResponse] -> ShowS)
-> Show GetDomainsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomainsResponse] -> ShowS
$cshowList :: [GetDomainsResponse] -> ShowS
show :: GetDomainsResponse -> String
$cshow :: GetDomainsResponse -> String
showsPrec :: Int -> GetDomainsResponse -> ShowS
$cshowsPrec :: Int -> GetDomainsResponse -> ShowS
Prelude.Show, (forall x. GetDomainsResponse -> Rep GetDomainsResponse x)
-> (forall x. Rep GetDomainsResponse x -> GetDomainsResponse)
-> Generic GetDomainsResponse
forall x. Rep GetDomainsResponse x -> GetDomainsResponse
forall x. GetDomainsResponse -> Rep GetDomainsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomainsResponse x -> GetDomainsResponse
$cfrom :: forall x. GetDomainsResponse -> Rep GetDomainsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDomainsResponse' 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:
--
-- 'nextPageToken', 'getDomainsResponse_nextPageToken' - The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another @GetDomains@ request
-- and specify the next page token using the @pageToken@ parameter.
--
-- 'domains', 'getDomainsResponse_domains' - An array of key-value pairs containing information about each of the
-- domain entries in the user\'s account.
--
-- 'httpStatus', 'getDomainsResponse_httpStatus' - The response's http status code.
newGetDomainsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDomainsResponse
newGetDomainsResponse :: Int -> GetDomainsResponse
newGetDomainsResponse Int
pHttpStatus_ =
  GetDomainsResponse' :: Maybe Text -> Maybe [Domain] -> Int -> GetDomainsResponse
GetDomainsResponse'
    { $sel:nextPageToken:GetDomainsResponse' :: Maybe Text
nextPageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domains:GetDomainsResponse' :: Maybe [Domain]
domains = Maybe [Domain]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDomainsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another @GetDomains@ request
-- and specify the next page token using the @pageToken@ parameter.
getDomainsResponse_nextPageToken :: Lens.Lens' GetDomainsResponse (Prelude.Maybe Prelude.Text)
getDomainsResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetDomainsResponse -> f GetDomainsResponse
getDomainsResponse_nextPageToken = (GetDomainsResponse -> Maybe Text)
-> (GetDomainsResponse -> Maybe Text -> GetDomainsResponse)
-> Lens' GetDomainsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetDomainsResponse' :: GetDomainsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetDomainsResponse
s@GetDomainsResponse' {} Maybe Text
a -> GetDomainsResponse
s {$sel:nextPageToken:GetDomainsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetDomainsResponse)

-- | An array of key-value pairs containing information about each of the
-- domain entries in the user\'s account.
getDomainsResponse_domains :: Lens.Lens' GetDomainsResponse (Prelude.Maybe [Domain])
getDomainsResponse_domains :: (Maybe [Domain] -> f (Maybe [Domain]))
-> GetDomainsResponse -> f GetDomainsResponse
getDomainsResponse_domains = (GetDomainsResponse -> Maybe [Domain])
-> (GetDomainsResponse -> Maybe [Domain] -> GetDomainsResponse)
-> Lens' GetDomainsResponse (Maybe [Domain])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainsResponse' {Maybe [Domain]
domains :: Maybe [Domain]
$sel:domains:GetDomainsResponse' :: GetDomainsResponse -> Maybe [Domain]
domains} -> Maybe [Domain]
domains) (\s :: GetDomainsResponse
s@GetDomainsResponse' {} Maybe [Domain]
a -> GetDomainsResponse
s {$sel:domains:GetDomainsResponse' :: Maybe [Domain]
domains = Maybe [Domain]
a} :: GetDomainsResponse) ((Maybe [Domain] -> f (Maybe [Domain]))
 -> GetDomainsResponse -> f GetDomainsResponse)
-> ((Maybe [Domain] -> f (Maybe [Domain]))
    -> Maybe [Domain] -> f (Maybe [Domain]))
-> (Maybe [Domain] -> f (Maybe [Domain]))
-> GetDomainsResponse
-> f GetDomainsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Domain] [Domain] [Domain] [Domain]
-> Iso
     (Maybe [Domain]) (Maybe [Domain]) (Maybe [Domain]) (Maybe [Domain])
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 [Domain] [Domain] [Domain] [Domain]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetDomainsResponse