{-# 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.IoT.ListDomainConfigurations
-- 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)
--
-- Gets a list of domain configurations for the user. This list is sorted
-- alphabetically by domain configuration name.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListDomainConfigurations>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListDomainConfigurations
  ( -- * Creating a Request
    ListDomainConfigurations (..),
    newListDomainConfigurations,

    -- * Request Lenses
    listDomainConfigurations_marker,
    listDomainConfigurations_serviceType,
    listDomainConfigurations_pageSize,

    -- * Destructuring the Response
    ListDomainConfigurationsResponse (..),
    newListDomainConfigurationsResponse,

    -- * Response Lenses
    listDomainConfigurationsResponse_domainConfigurations,
    listDomainConfigurationsResponse_nextMarker,
    listDomainConfigurationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListDomainConfigurations' smart constructor.
data ListDomainConfigurations = ListDomainConfigurations'
  { -- | The marker for the next set of results.
    ListDomainConfigurations -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The type of service delivered by the endpoint.
    ListDomainConfigurations -> Maybe ServiceType
serviceType :: Prelude.Maybe ServiceType,
    -- | The result page size.
    ListDomainConfigurations -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListDomainConfigurations -> ListDomainConfigurations -> Bool
(ListDomainConfigurations -> ListDomainConfigurations -> Bool)
-> (ListDomainConfigurations -> ListDomainConfigurations -> Bool)
-> Eq ListDomainConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomainConfigurations -> ListDomainConfigurations -> Bool
$c/= :: ListDomainConfigurations -> ListDomainConfigurations -> Bool
== :: ListDomainConfigurations -> ListDomainConfigurations -> Bool
$c== :: ListDomainConfigurations -> ListDomainConfigurations -> Bool
Prelude.Eq, ReadPrec [ListDomainConfigurations]
ReadPrec ListDomainConfigurations
Int -> ReadS ListDomainConfigurations
ReadS [ListDomainConfigurations]
(Int -> ReadS ListDomainConfigurations)
-> ReadS [ListDomainConfigurations]
-> ReadPrec ListDomainConfigurations
-> ReadPrec [ListDomainConfigurations]
-> Read ListDomainConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomainConfigurations]
$creadListPrec :: ReadPrec [ListDomainConfigurations]
readPrec :: ReadPrec ListDomainConfigurations
$creadPrec :: ReadPrec ListDomainConfigurations
readList :: ReadS [ListDomainConfigurations]
$creadList :: ReadS [ListDomainConfigurations]
readsPrec :: Int -> ReadS ListDomainConfigurations
$creadsPrec :: Int -> ReadS ListDomainConfigurations
Prelude.Read, Int -> ListDomainConfigurations -> ShowS
[ListDomainConfigurations] -> ShowS
ListDomainConfigurations -> String
(Int -> ListDomainConfigurations -> ShowS)
-> (ListDomainConfigurations -> String)
-> ([ListDomainConfigurations] -> ShowS)
-> Show ListDomainConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomainConfigurations] -> ShowS
$cshowList :: [ListDomainConfigurations] -> ShowS
show :: ListDomainConfigurations -> String
$cshow :: ListDomainConfigurations -> String
showsPrec :: Int -> ListDomainConfigurations -> ShowS
$cshowsPrec :: Int -> ListDomainConfigurations -> ShowS
Prelude.Show, (forall x.
 ListDomainConfigurations -> Rep ListDomainConfigurations x)
-> (forall x.
    Rep ListDomainConfigurations x -> ListDomainConfigurations)
-> Generic ListDomainConfigurations
forall x.
Rep ListDomainConfigurations x -> ListDomainConfigurations
forall x.
ListDomainConfigurations -> Rep ListDomainConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDomainConfigurations x -> ListDomainConfigurations
$cfrom :: forall x.
ListDomainConfigurations -> Rep ListDomainConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListDomainConfigurations' 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', 'listDomainConfigurations_marker' - The marker for the next set of results.
--
-- 'serviceType', 'listDomainConfigurations_serviceType' - The type of service delivered by the endpoint.
--
-- 'pageSize', 'listDomainConfigurations_pageSize' - The result page size.
newListDomainConfigurations ::
  ListDomainConfigurations
newListDomainConfigurations :: ListDomainConfigurations
newListDomainConfigurations =
  ListDomainConfigurations' :: Maybe Text
-> Maybe ServiceType -> Maybe Natural -> ListDomainConfigurations
ListDomainConfigurations'
    { $sel:marker:ListDomainConfigurations' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceType:ListDomainConfigurations' :: Maybe ServiceType
serviceType = Maybe ServiceType
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListDomainConfigurations' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The marker for the next set of results.
listDomainConfigurations_marker :: Lens.Lens' ListDomainConfigurations (Prelude.Maybe Prelude.Text)
listDomainConfigurations_marker :: (Maybe Text -> f (Maybe Text))
-> ListDomainConfigurations -> f ListDomainConfigurations
listDomainConfigurations_marker = (ListDomainConfigurations -> Maybe Text)
-> (ListDomainConfigurations
    -> Maybe Text -> ListDomainConfigurations)
-> Lens
     ListDomainConfigurations
     ListDomainConfigurations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainConfigurations' {Maybe Text
marker :: Maybe Text
$sel:marker:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListDomainConfigurations
s@ListDomainConfigurations' {} Maybe Text
a -> ListDomainConfigurations
s {$sel:marker:ListDomainConfigurations' :: Maybe Text
marker = Maybe Text
a} :: ListDomainConfigurations)

-- | The type of service delivered by the endpoint.
listDomainConfigurations_serviceType :: Lens.Lens' ListDomainConfigurations (Prelude.Maybe ServiceType)
listDomainConfigurations_serviceType :: (Maybe ServiceType -> f (Maybe ServiceType))
-> ListDomainConfigurations -> f ListDomainConfigurations
listDomainConfigurations_serviceType = (ListDomainConfigurations -> Maybe ServiceType)
-> (ListDomainConfigurations
    -> Maybe ServiceType -> ListDomainConfigurations)
-> Lens
     ListDomainConfigurations
     ListDomainConfigurations
     (Maybe ServiceType)
     (Maybe ServiceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainConfigurations' {Maybe ServiceType
serviceType :: Maybe ServiceType
$sel:serviceType:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe ServiceType
serviceType} -> Maybe ServiceType
serviceType) (\s :: ListDomainConfigurations
s@ListDomainConfigurations' {} Maybe ServiceType
a -> ListDomainConfigurations
s {$sel:serviceType:ListDomainConfigurations' :: Maybe ServiceType
serviceType = Maybe ServiceType
a} :: ListDomainConfigurations)

-- | The result page size.
listDomainConfigurations_pageSize :: Lens.Lens' ListDomainConfigurations (Prelude.Maybe Prelude.Natural)
listDomainConfigurations_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListDomainConfigurations -> f ListDomainConfigurations
listDomainConfigurations_pageSize = (ListDomainConfigurations -> Maybe Natural)
-> (ListDomainConfigurations
    -> Maybe Natural -> ListDomainConfigurations)
-> Lens
     ListDomainConfigurations
     ListDomainConfigurations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainConfigurations' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListDomainConfigurations
s@ListDomainConfigurations' {} Maybe Natural
a -> ListDomainConfigurations
s {$sel:pageSize:ListDomainConfigurations' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListDomainConfigurations)

instance Core.AWSPager ListDomainConfigurations where
  page :: ListDomainConfigurations
-> AWSResponse ListDomainConfigurations
-> Maybe ListDomainConfigurations
page ListDomainConfigurations
rq AWSResponse ListDomainConfigurations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDomainConfigurations
ListDomainConfigurationsResponse
rs
            ListDomainConfigurationsResponse
-> Getting (First Text) ListDomainConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainConfigurationsResponse
-> Const (First Text) ListDomainConfigurationsResponse
Lens' ListDomainConfigurationsResponse (Maybe Text)
listDomainConfigurationsResponse_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainConfigurationsResponse
 -> Const (First Text) ListDomainConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainConfigurationsResponse 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 ListDomainConfigurations
forall a. Maybe a
Prelude.Nothing
    | Maybe [DomainConfigurationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDomainConfigurations
ListDomainConfigurationsResponse
rs
            ListDomainConfigurationsResponse
-> Getting
     (First [DomainConfigurationSummary])
     ListDomainConfigurationsResponse
     [DomainConfigurationSummary]
-> Maybe [DomainConfigurationSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DomainConfigurationSummary]
 -> Const
      (First [DomainConfigurationSummary])
      (Maybe [DomainConfigurationSummary]))
-> ListDomainConfigurationsResponse
-> Const
     (First [DomainConfigurationSummary])
     ListDomainConfigurationsResponse
Lens'
  ListDomainConfigurationsResponse
  (Maybe [DomainConfigurationSummary])
listDomainConfigurationsResponse_domainConfigurations
              ((Maybe [DomainConfigurationSummary]
  -> Const
       (First [DomainConfigurationSummary])
       (Maybe [DomainConfigurationSummary]))
 -> ListDomainConfigurationsResponse
 -> Const
      (First [DomainConfigurationSummary])
      ListDomainConfigurationsResponse)
-> (([DomainConfigurationSummary]
     -> Const
          (First [DomainConfigurationSummary]) [DomainConfigurationSummary])
    -> Maybe [DomainConfigurationSummary]
    -> Const
         (First [DomainConfigurationSummary])
         (Maybe [DomainConfigurationSummary]))
-> Getting
     (First [DomainConfigurationSummary])
     ListDomainConfigurationsResponse
     [DomainConfigurationSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DomainConfigurationSummary]
 -> Const
      (First [DomainConfigurationSummary]) [DomainConfigurationSummary])
-> Maybe [DomainConfigurationSummary]
-> Const
     (First [DomainConfigurationSummary])
     (Maybe [DomainConfigurationSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDomainConfigurations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDomainConfigurations -> Maybe ListDomainConfigurations
forall a. a -> Maybe a
Prelude.Just (ListDomainConfigurations -> Maybe ListDomainConfigurations)
-> ListDomainConfigurations -> Maybe ListDomainConfigurations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDomainConfigurations
rq
          ListDomainConfigurations
-> (ListDomainConfigurations -> ListDomainConfigurations)
-> ListDomainConfigurations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDomainConfigurations -> Identity ListDomainConfigurations
Lens
  ListDomainConfigurations
  ListDomainConfigurations
  (Maybe Text)
  (Maybe Text)
listDomainConfigurations_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDomainConfigurations -> Identity ListDomainConfigurations)
-> Maybe Text
-> ListDomainConfigurations
-> ListDomainConfigurations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDomainConfigurations
ListDomainConfigurationsResponse
rs
          ListDomainConfigurationsResponse
-> Getting (First Text) ListDomainConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainConfigurationsResponse
-> Const (First Text) ListDomainConfigurationsResponse
Lens' ListDomainConfigurationsResponse (Maybe Text)
listDomainConfigurationsResponse_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainConfigurationsResponse
 -> Const (First Text) ListDomainConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainConfigurationsResponse 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 ListDomainConfigurations where
  type
    AWSResponse ListDomainConfigurations =
      ListDomainConfigurationsResponse
  request :: ListDomainConfigurations -> Request ListDomainConfigurations
request = Service
-> ListDomainConfigurations -> Request ListDomainConfigurations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDomainConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDomainConfigurations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDomainConfigurations))
-> Logger
-> Service
-> Proxy ListDomainConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDomainConfigurations)))
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 [DomainConfigurationSummary]
-> Maybe Text -> Int -> ListDomainConfigurationsResponse
ListDomainConfigurationsResponse'
            (Maybe [DomainConfigurationSummary]
 -> Maybe Text -> Int -> ListDomainConfigurationsResponse)
-> Either String (Maybe [DomainConfigurationSummary])
-> Either
     String (Maybe Text -> Int -> ListDomainConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [DomainConfigurationSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"domainConfigurations"
                            Either String (Maybe (Maybe [DomainConfigurationSummary]))
-> Maybe [DomainConfigurationSummary]
-> Either String (Maybe [DomainConfigurationSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DomainConfigurationSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> ListDomainConfigurationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDomainConfigurationsResponse)
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
"nextMarker")
            Either String (Int -> ListDomainConfigurationsResponse)
-> Either String Int
-> Either String ListDomainConfigurationsResponse
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 ListDomainConfigurations

instance Prelude.NFData ListDomainConfigurations

instance Core.ToHeaders ListDomainConfigurations where
  toHeaders :: ListDomainConfigurations -> ResponseHeaders
toHeaders = ResponseHeaders -> ListDomainConfigurations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery ListDomainConfigurations where
  toQuery :: ListDomainConfigurations -> QueryString
toQuery ListDomainConfigurations' {Maybe Natural
Maybe Text
Maybe ServiceType
pageSize :: Maybe Natural
serviceType :: Maybe ServiceType
marker :: Maybe Text
$sel:pageSize:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe Natural
$sel:serviceType:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe ServiceType
$sel:marker:ListDomainConfigurations' :: ListDomainConfigurations -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"serviceType" ByteString -> Maybe ServiceType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ServiceType
serviceType,
        ByteString
"pageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize
      ]

-- | /See:/ 'newListDomainConfigurationsResponse' smart constructor.
data ListDomainConfigurationsResponse = ListDomainConfigurationsResponse'
  { -- | A list of objects that contain summary information about the user\'s
    -- domain configurations.
    ListDomainConfigurationsResponse
-> Maybe [DomainConfigurationSummary]
domainConfigurations :: Prelude.Maybe [DomainConfigurationSummary],
    -- | The marker for the next set of results.
    ListDomainConfigurationsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDomainConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDomainConfigurationsResponse
-> ListDomainConfigurationsResponse -> Bool
(ListDomainConfigurationsResponse
 -> ListDomainConfigurationsResponse -> Bool)
-> (ListDomainConfigurationsResponse
    -> ListDomainConfigurationsResponse -> Bool)
-> Eq ListDomainConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomainConfigurationsResponse
-> ListDomainConfigurationsResponse -> Bool
$c/= :: ListDomainConfigurationsResponse
-> ListDomainConfigurationsResponse -> Bool
== :: ListDomainConfigurationsResponse
-> ListDomainConfigurationsResponse -> Bool
$c== :: ListDomainConfigurationsResponse
-> ListDomainConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListDomainConfigurationsResponse]
ReadPrec ListDomainConfigurationsResponse
Int -> ReadS ListDomainConfigurationsResponse
ReadS [ListDomainConfigurationsResponse]
(Int -> ReadS ListDomainConfigurationsResponse)
-> ReadS [ListDomainConfigurationsResponse]
-> ReadPrec ListDomainConfigurationsResponse
-> ReadPrec [ListDomainConfigurationsResponse]
-> Read ListDomainConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomainConfigurationsResponse]
$creadListPrec :: ReadPrec [ListDomainConfigurationsResponse]
readPrec :: ReadPrec ListDomainConfigurationsResponse
$creadPrec :: ReadPrec ListDomainConfigurationsResponse
readList :: ReadS [ListDomainConfigurationsResponse]
$creadList :: ReadS [ListDomainConfigurationsResponse]
readsPrec :: Int -> ReadS ListDomainConfigurationsResponse
$creadsPrec :: Int -> ReadS ListDomainConfigurationsResponse
Prelude.Read, Int -> ListDomainConfigurationsResponse -> ShowS
[ListDomainConfigurationsResponse] -> ShowS
ListDomainConfigurationsResponse -> String
(Int -> ListDomainConfigurationsResponse -> ShowS)
-> (ListDomainConfigurationsResponse -> String)
-> ([ListDomainConfigurationsResponse] -> ShowS)
-> Show ListDomainConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomainConfigurationsResponse] -> ShowS
$cshowList :: [ListDomainConfigurationsResponse] -> ShowS
show :: ListDomainConfigurationsResponse -> String
$cshow :: ListDomainConfigurationsResponse -> String
showsPrec :: Int -> ListDomainConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListDomainConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
 ListDomainConfigurationsResponse
 -> Rep ListDomainConfigurationsResponse x)
-> (forall x.
    Rep ListDomainConfigurationsResponse x
    -> ListDomainConfigurationsResponse)
-> Generic ListDomainConfigurationsResponse
forall x.
Rep ListDomainConfigurationsResponse x
-> ListDomainConfigurationsResponse
forall x.
ListDomainConfigurationsResponse
-> Rep ListDomainConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDomainConfigurationsResponse x
-> ListDomainConfigurationsResponse
$cfrom :: forall x.
ListDomainConfigurationsResponse
-> Rep ListDomainConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDomainConfigurationsResponse' 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:
--
-- 'domainConfigurations', 'listDomainConfigurationsResponse_domainConfigurations' - A list of objects that contain summary information about the user\'s
-- domain configurations.
--
-- 'nextMarker', 'listDomainConfigurationsResponse_nextMarker' - The marker for the next set of results.
--
-- 'httpStatus', 'listDomainConfigurationsResponse_httpStatus' - The response's http status code.
newListDomainConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDomainConfigurationsResponse
newListDomainConfigurationsResponse :: Int -> ListDomainConfigurationsResponse
newListDomainConfigurationsResponse Int
pHttpStatus_ =
  ListDomainConfigurationsResponse' :: Maybe [DomainConfigurationSummary]
-> Maybe Text -> Int -> ListDomainConfigurationsResponse
ListDomainConfigurationsResponse'
    { $sel:domainConfigurations:ListDomainConfigurationsResponse' :: Maybe [DomainConfigurationSummary]
domainConfigurations =
        Maybe [DomainConfigurationSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListDomainConfigurationsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDomainConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of objects that contain summary information about the user\'s
-- domain configurations.
listDomainConfigurationsResponse_domainConfigurations :: Lens.Lens' ListDomainConfigurationsResponse (Prelude.Maybe [DomainConfigurationSummary])
listDomainConfigurationsResponse_domainConfigurations :: (Maybe [DomainConfigurationSummary]
 -> f (Maybe [DomainConfigurationSummary]))
-> ListDomainConfigurationsResponse
-> f ListDomainConfigurationsResponse
listDomainConfigurationsResponse_domainConfigurations = (ListDomainConfigurationsResponse
 -> Maybe [DomainConfigurationSummary])
-> (ListDomainConfigurationsResponse
    -> Maybe [DomainConfigurationSummary]
    -> ListDomainConfigurationsResponse)
-> Lens'
     ListDomainConfigurationsResponse
     (Maybe [DomainConfigurationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainConfigurationsResponse' {Maybe [DomainConfigurationSummary]
domainConfigurations :: Maybe [DomainConfigurationSummary]
$sel:domainConfigurations:ListDomainConfigurationsResponse' :: ListDomainConfigurationsResponse
-> Maybe [DomainConfigurationSummary]
domainConfigurations} -> Maybe [DomainConfigurationSummary]
domainConfigurations) (\s :: ListDomainConfigurationsResponse
s@ListDomainConfigurationsResponse' {} Maybe [DomainConfigurationSummary]
a -> ListDomainConfigurationsResponse
s {$sel:domainConfigurations:ListDomainConfigurationsResponse' :: Maybe [DomainConfigurationSummary]
domainConfigurations = Maybe [DomainConfigurationSummary]
a} :: ListDomainConfigurationsResponse) ((Maybe [DomainConfigurationSummary]
  -> f (Maybe [DomainConfigurationSummary]))
 -> ListDomainConfigurationsResponse
 -> f ListDomainConfigurationsResponse)
-> ((Maybe [DomainConfigurationSummary]
     -> f (Maybe [DomainConfigurationSummary]))
    -> Maybe [DomainConfigurationSummary]
    -> f (Maybe [DomainConfigurationSummary]))
-> (Maybe [DomainConfigurationSummary]
    -> f (Maybe [DomainConfigurationSummary]))
-> ListDomainConfigurationsResponse
-> f ListDomainConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
-> Iso
     (Maybe [DomainConfigurationSummary])
     (Maybe [DomainConfigurationSummary])
     (Maybe [DomainConfigurationSummary])
     (Maybe [DomainConfigurationSummary])
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
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
  [DomainConfigurationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The marker for the next set of results.
listDomainConfigurationsResponse_nextMarker :: Lens.Lens' ListDomainConfigurationsResponse (Prelude.Maybe Prelude.Text)
listDomainConfigurationsResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListDomainConfigurationsResponse
-> f ListDomainConfigurationsResponse
listDomainConfigurationsResponse_nextMarker = (ListDomainConfigurationsResponse -> Maybe Text)
-> (ListDomainConfigurationsResponse
    -> Maybe Text -> ListDomainConfigurationsResponse)
-> Lens' ListDomainConfigurationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainConfigurationsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListDomainConfigurationsResponse' :: ListDomainConfigurationsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListDomainConfigurationsResponse
s@ListDomainConfigurationsResponse' {} Maybe Text
a -> ListDomainConfigurationsResponse
s {$sel:nextMarker:ListDomainConfigurationsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListDomainConfigurationsResponse)

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

instance
  Prelude.NFData
    ListDomainConfigurationsResponse