{-# 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.CloudFormation.ListTypeRegistrations
-- 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 registration tokens for the specified extension(s).
module Amazonka.CloudFormation.ListTypeRegistrations
  ( -- * Creating a Request
    ListTypeRegistrations (..),
    newListTypeRegistrations,

    -- * Request Lenses
    listTypeRegistrations_typeName,
    listTypeRegistrations_registrationStatusFilter,
    listTypeRegistrations_nextToken,
    listTypeRegistrations_typeArn,
    listTypeRegistrations_type,
    listTypeRegistrations_maxResults,

    -- * Destructuring the Response
    ListTypeRegistrationsResponse (..),
    newListTypeRegistrationsResponse,

    -- * Response Lenses
    listTypeRegistrationsResponse_registrationTokenList,
    listTypeRegistrationsResponse_nextToken,
    listTypeRegistrationsResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
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

-- | /See:/ 'newListTypeRegistrations' smart constructor.
data ListTypeRegistrations = ListTypeRegistrations'
  { -- | The name of the extension.
    --
    -- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
    ListTypeRegistrations -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | The current status of the extension registration request.
    --
    -- The default is @IN_PROGRESS@.
    ListTypeRegistrations -> Maybe RegistrationStatus
registrationStatusFilter :: Prelude.Maybe RegistrationStatus,
    -- | If the previous paginated request didn\'t return all of the remaining
    -- results, the response object\'s @NextToken@ parameter value is set to a
    -- token. To retrieve the next set of results, call this action again and
    -- assign that token to the request object\'s @NextToken@ parameter. If
    -- there are no remaining results, the previous response object\'s
    -- @NextToken@ parameter is set to @null@.
    ListTypeRegistrations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the extension.
    --
    -- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
    ListTypeRegistrations -> Maybe Text
typeArn :: Prelude.Maybe Prelude.Text,
    -- | The kind of extension.
    --
    -- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
    ListTypeRegistrations -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
    -- | The maximum number of results to be returned with a single call. If the
    -- number of available results exceeds this maximum, the response includes
    -- a @NextToken@ value that you can assign to the @NextToken@ request
    -- parameter to get the next set of results.
    ListTypeRegistrations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListTypeRegistrations -> ListTypeRegistrations -> Bool
(ListTypeRegistrations -> ListTypeRegistrations -> Bool)
-> (ListTypeRegistrations -> ListTypeRegistrations -> Bool)
-> Eq ListTypeRegistrations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTypeRegistrations -> ListTypeRegistrations -> Bool
$c/= :: ListTypeRegistrations -> ListTypeRegistrations -> Bool
== :: ListTypeRegistrations -> ListTypeRegistrations -> Bool
$c== :: ListTypeRegistrations -> ListTypeRegistrations -> Bool
Prelude.Eq, ReadPrec [ListTypeRegistrations]
ReadPrec ListTypeRegistrations
Int -> ReadS ListTypeRegistrations
ReadS [ListTypeRegistrations]
(Int -> ReadS ListTypeRegistrations)
-> ReadS [ListTypeRegistrations]
-> ReadPrec ListTypeRegistrations
-> ReadPrec [ListTypeRegistrations]
-> Read ListTypeRegistrations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTypeRegistrations]
$creadListPrec :: ReadPrec [ListTypeRegistrations]
readPrec :: ReadPrec ListTypeRegistrations
$creadPrec :: ReadPrec ListTypeRegistrations
readList :: ReadS [ListTypeRegistrations]
$creadList :: ReadS [ListTypeRegistrations]
readsPrec :: Int -> ReadS ListTypeRegistrations
$creadsPrec :: Int -> ReadS ListTypeRegistrations
Prelude.Read, Int -> ListTypeRegistrations -> ShowS
[ListTypeRegistrations] -> ShowS
ListTypeRegistrations -> String
(Int -> ListTypeRegistrations -> ShowS)
-> (ListTypeRegistrations -> String)
-> ([ListTypeRegistrations] -> ShowS)
-> Show ListTypeRegistrations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTypeRegistrations] -> ShowS
$cshowList :: [ListTypeRegistrations] -> ShowS
show :: ListTypeRegistrations -> String
$cshow :: ListTypeRegistrations -> String
showsPrec :: Int -> ListTypeRegistrations -> ShowS
$cshowsPrec :: Int -> ListTypeRegistrations -> ShowS
Prelude.Show, (forall x. ListTypeRegistrations -> Rep ListTypeRegistrations x)
-> (forall x. Rep ListTypeRegistrations x -> ListTypeRegistrations)
-> Generic ListTypeRegistrations
forall x. Rep ListTypeRegistrations x -> ListTypeRegistrations
forall x. ListTypeRegistrations -> Rep ListTypeRegistrations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTypeRegistrations x -> ListTypeRegistrations
$cfrom :: forall x. ListTypeRegistrations -> Rep ListTypeRegistrations x
Prelude.Generic)

-- |
-- Create a value of 'ListTypeRegistrations' 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:
--
-- 'typeName', 'listTypeRegistrations_typeName' - The name of the extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
--
-- 'registrationStatusFilter', 'listTypeRegistrations_registrationStatusFilter' - The current status of the extension registration request.
--
-- The default is @IN_PROGRESS@.
--
-- 'nextToken', 'listTypeRegistrations_nextToken' - If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call this action again and
-- assign that token to the request object\'s @NextToken@ parameter. If
-- there are no remaining results, the previous response object\'s
-- @NextToken@ parameter is set to @null@.
--
-- 'typeArn', 'listTypeRegistrations_typeArn' - The Amazon Resource Name (ARN) of the extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
--
-- 'type'', 'listTypeRegistrations_type' - The kind of extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
--
-- 'maxResults', 'listTypeRegistrations_maxResults' - The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
newListTypeRegistrations ::
  ListTypeRegistrations
newListTypeRegistrations :: ListTypeRegistrations
newListTypeRegistrations =
  ListTypeRegistrations' :: Maybe Text
-> Maybe RegistrationStatus
-> Maybe Text
-> Maybe Text
-> Maybe RegistryType
-> Maybe Natural
-> ListTypeRegistrations
ListTypeRegistrations'
    { $sel:typeName:ListTypeRegistrations' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:registrationStatusFilter:ListTypeRegistrations' :: Maybe RegistrationStatus
registrationStatusFilter = Maybe RegistrationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTypeRegistrations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:typeArn:ListTypeRegistrations' :: Maybe Text
typeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ListTypeRegistrations' :: Maybe RegistryType
type' = Maybe RegistryType
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTypeRegistrations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
listTypeRegistrations_typeName :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe Prelude.Text)
listTypeRegistrations_typeName :: (Maybe Text -> f (Maybe Text))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_typeName = (ListTypeRegistrations -> Maybe Text)
-> (ListTypeRegistrations -> Maybe Text -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe Text
typeName :: Maybe Text
$sel:typeName:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe Text
a -> ListTypeRegistrations
s {$sel:typeName:ListTypeRegistrations' :: Maybe Text
typeName = Maybe Text
a} :: ListTypeRegistrations)

-- | The current status of the extension registration request.
--
-- The default is @IN_PROGRESS@.
listTypeRegistrations_registrationStatusFilter :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe RegistrationStatus)
listTypeRegistrations_registrationStatusFilter :: (Maybe RegistrationStatus -> f (Maybe RegistrationStatus))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_registrationStatusFilter = (ListTypeRegistrations -> Maybe RegistrationStatus)
-> (ListTypeRegistrations
    -> Maybe RegistrationStatus -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe RegistrationStatus)
     (Maybe RegistrationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe RegistrationStatus
registrationStatusFilter :: Maybe RegistrationStatus
$sel:registrationStatusFilter:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe RegistrationStatus
registrationStatusFilter} -> Maybe RegistrationStatus
registrationStatusFilter) (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe RegistrationStatus
a -> ListTypeRegistrations
s {$sel:registrationStatusFilter:ListTypeRegistrations' :: Maybe RegistrationStatus
registrationStatusFilter = Maybe RegistrationStatus
a} :: ListTypeRegistrations)

-- | If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call this action again and
-- assign that token to the request object\'s @NextToken@ parameter. If
-- there are no remaining results, the previous response object\'s
-- @NextToken@ parameter is set to @null@.
listTypeRegistrations_nextToken :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe Prelude.Text)
listTypeRegistrations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_nextToken = (ListTypeRegistrations -> Maybe Text)
-> (ListTypeRegistrations -> Maybe Text -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe Text
a -> ListTypeRegistrations
s {$sel:nextToken:ListTypeRegistrations' :: Maybe Text
nextToken = Maybe Text
a} :: ListTypeRegistrations)

-- | The Amazon Resource Name (ARN) of the extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
listTypeRegistrations_typeArn :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe Prelude.Text)
listTypeRegistrations_typeArn :: (Maybe Text -> f (Maybe Text))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_typeArn = (ListTypeRegistrations -> Maybe Text)
-> (ListTypeRegistrations -> Maybe Text -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe Text
typeArn :: Maybe Text
$sel:typeArn:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
typeArn} -> Maybe Text
typeArn) (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe Text
a -> ListTypeRegistrations
s {$sel:typeArn:ListTypeRegistrations' :: Maybe Text
typeArn = Maybe Text
a} :: ListTypeRegistrations)

-- | The kind of extension.
--
-- Conditional: You must specify either @TypeName@ and @Type@, or @Arn@.
listTypeRegistrations_type :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe RegistryType)
listTypeRegistrations_type :: (Maybe RegistryType -> f (Maybe RegistryType))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_type = (ListTypeRegistrations -> Maybe RegistryType)
-> (ListTypeRegistrations
    -> Maybe RegistryType -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe RegistryType)
     (Maybe RegistryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe RegistryType
type' :: Maybe RegistryType
$sel:type':ListTypeRegistrations' :: ListTypeRegistrations -> Maybe RegistryType
type'} -> Maybe RegistryType
type') (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe RegistryType
a -> ListTypeRegistrations
s {$sel:type':ListTypeRegistrations' :: Maybe RegistryType
type' = Maybe RegistryType
a} :: ListTypeRegistrations)

-- | The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
listTypeRegistrations_maxResults :: Lens.Lens' ListTypeRegistrations (Prelude.Maybe Prelude.Natural)
listTypeRegistrations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTypeRegistrations -> f ListTypeRegistrations
listTypeRegistrations_maxResults = (ListTypeRegistrations -> Maybe Natural)
-> (ListTypeRegistrations
    -> Maybe Natural -> ListTypeRegistrations)
-> Lens
     ListTypeRegistrations
     ListTypeRegistrations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTypeRegistrations
s@ListTypeRegistrations' {} Maybe Natural
a -> ListTypeRegistrations
s {$sel:maxResults:ListTypeRegistrations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTypeRegistrations)

instance Core.AWSRequest ListTypeRegistrations where
  type
    AWSResponse ListTypeRegistrations =
      ListTypeRegistrationsResponse
  request :: ListTypeRegistrations -> Request ListTypeRegistrations
request = Service -> ListTypeRegistrations -> Request ListTypeRegistrations
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListTypeRegistrations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTypeRegistrations)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListTypeRegistrations))
-> Logger
-> Service
-> Proxy ListTypeRegistrations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTypeRegistrations)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListTypeRegistrationsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text] -> Maybe Text -> Int -> ListTypeRegistrationsResponse
ListTypeRegistrationsResponse'
            (Maybe [Text]
 -> Maybe Text -> Int -> ListTypeRegistrationsResponse)
-> Either String (Maybe [Text])
-> Either
     String (Maybe Text -> Int -> ListTypeRegistrationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RegistrationTokenList"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Maybe Text -> Int -> ListTypeRegistrationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListTypeRegistrationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either String (Int -> ListTypeRegistrationsResponse)
-> Either String Int -> Either String ListTypeRegistrationsResponse
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 ListTypeRegistrations

instance Prelude.NFData ListTypeRegistrations

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

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

instance Core.ToQuery ListTypeRegistrations where
  toQuery :: ListTypeRegistrations -> QueryString
toQuery ListTypeRegistrations' {Maybe Natural
Maybe Text
Maybe RegistrationStatus
Maybe RegistryType
maxResults :: Maybe Natural
type' :: Maybe RegistryType
typeArn :: Maybe Text
nextToken :: Maybe Text
registrationStatusFilter :: Maybe RegistrationStatus
typeName :: Maybe Text
$sel:maxResults:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Natural
$sel:type':ListTypeRegistrations' :: ListTypeRegistrations -> Maybe RegistryType
$sel:typeArn:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
$sel:nextToken:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
$sel:registrationStatusFilter:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe RegistrationStatus
$sel:typeName:ListTypeRegistrations' :: ListTypeRegistrations -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListTypeRegistrations" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"TypeName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
typeName,
        ByteString
"RegistrationStatusFilter"
          ByteString -> Maybe RegistrationStatus -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RegistrationStatus
registrationStatusFilter,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"TypeArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
typeArn,
        ByteString
"Type" ByteString -> Maybe RegistryType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RegistryType
type',
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListTypeRegistrationsResponse' smart constructor.
data ListTypeRegistrationsResponse = ListTypeRegistrationsResponse'
  { -- | A list of extension registration tokens.
    --
    -- Use @ DescribeTypeRegistration @ to return detailed information about a
    -- type registration request.
    ListTypeRegistrationsResponse -> Maybe [Text]
registrationTokenList :: Prelude.Maybe [Prelude.Text],
    -- | If the request doesn\'t return all of the remaining results, @NextToken@
    -- is set to a token. To retrieve the next set of results, call this action
    -- again and assign that token to the request object\'s @NextToken@
    -- parameter. If the request returns all results, @NextToken@ is set to
    -- @null@.
    ListTypeRegistrationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTypeRegistrationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTypeRegistrationsResponse
-> ListTypeRegistrationsResponse -> Bool
(ListTypeRegistrationsResponse
 -> ListTypeRegistrationsResponse -> Bool)
-> (ListTypeRegistrationsResponse
    -> ListTypeRegistrationsResponse -> Bool)
-> Eq ListTypeRegistrationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTypeRegistrationsResponse
-> ListTypeRegistrationsResponse -> Bool
$c/= :: ListTypeRegistrationsResponse
-> ListTypeRegistrationsResponse -> Bool
== :: ListTypeRegistrationsResponse
-> ListTypeRegistrationsResponse -> Bool
$c== :: ListTypeRegistrationsResponse
-> ListTypeRegistrationsResponse -> Bool
Prelude.Eq, ReadPrec [ListTypeRegistrationsResponse]
ReadPrec ListTypeRegistrationsResponse
Int -> ReadS ListTypeRegistrationsResponse
ReadS [ListTypeRegistrationsResponse]
(Int -> ReadS ListTypeRegistrationsResponse)
-> ReadS [ListTypeRegistrationsResponse]
-> ReadPrec ListTypeRegistrationsResponse
-> ReadPrec [ListTypeRegistrationsResponse]
-> Read ListTypeRegistrationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTypeRegistrationsResponse]
$creadListPrec :: ReadPrec [ListTypeRegistrationsResponse]
readPrec :: ReadPrec ListTypeRegistrationsResponse
$creadPrec :: ReadPrec ListTypeRegistrationsResponse
readList :: ReadS [ListTypeRegistrationsResponse]
$creadList :: ReadS [ListTypeRegistrationsResponse]
readsPrec :: Int -> ReadS ListTypeRegistrationsResponse
$creadsPrec :: Int -> ReadS ListTypeRegistrationsResponse
Prelude.Read, Int -> ListTypeRegistrationsResponse -> ShowS
[ListTypeRegistrationsResponse] -> ShowS
ListTypeRegistrationsResponse -> String
(Int -> ListTypeRegistrationsResponse -> ShowS)
-> (ListTypeRegistrationsResponse -> String)
-> ([ListTypeRegistrationsResponse] -> ShowS)
-> Show ListTypeRegistrationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTypeRegistrationsResponse] -> ShowS
$cshowList :: [ListTypeRegistrationsResponse] -> ShowS
show :: ListTypeRegistrationsResponse -> String
$cshow :: ListTypeRegistrationsResponse -> String
showsPrec :: Int -> ListTypeRegistrationsResponse -> ShowS
$cshowsPrec :: Int -> ListTypeRegistrationsResponse -> ShowS
Prelude.Show, (forall x.
 ListTypeRegistrationsResponse
 -> Rep ListTypeRegistrationsResponse x)
-> (forall x.
    Rep ListTypeRegistrationsResponse x
    -> ListTypeRegistrationsResponse)
-> Generic ListTypeRegistrationsResponse
forall x.
Rep ListTypeRegistrationsResponse x
-> ListTypeRegistrationsResponse
forall x.
ListTypeRegistrationsResponse
-> Rep ListTypeRegistrationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTypeRegistrationsResponse x
-> ListTypeRegistrationsResponse
$cfrom :: forall x.
ListTypeRegistrationsResponse
-> Rep ListTypeRegistrationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTypeRegistrationsResponse' 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:
--
-- 'registrationTokenList', 'listTypeRegistrationsResponse_registrationTokenList' - A list of extension registration tokens.
--
-- Use @ DescribeTypeRegistration @ to return detailed information about a
-- type registration request.
--
-- 'nextToken', 'listTypeRegistrationsResponse_nextToken' - If the request doesn\'t return all of the remaining results, @NextToken@
-- is set to a token. To retrieve the next set of results, call this action
-- again and assign that token to the request object\'s @NextToken@
-- parameter. If the request returns all results, @NextToken@ is set to
-- @null@.
--
-- 'httpStatus', 'listTypeRegistrationsResponse_httpStatus' - The response's http status code.
newListTypeRegistrationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTypeRegistrationsResponse
newListTypeRegistrationsResponse :: Int -> ListTypeRegistrationsResponse
newListTypeRegistrationsResponse Int
pHttpStatus_ =
  ListTypeRegistrationsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListTypeRegistrationsResponse
ListTypeRegistrationsResponse'
    { $sel:registrationTokenList:ListTypeRegistrationsResponse' :: Maybe [Text]
registrationTokenList =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTypeRegistrationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTypeRegistrationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of extension registration tokens.
--
-- Use @ DescribeTypeRegistration @ to return detailed information about a
-- type registration request.
listTypeRegistrationsResponse_registrationTokenList :: Lens.Lens' ListTypeRegistrationsResponse (Prelude.Maybe [Prelude.Text])
listTypeRegistrationsResponse_registrationTokenList :: (Maybe [Text] -> f (Maybe [Text]))
-> ListTypeRegistrationsResponse -> f ListTypeRegistrationsResponse
listTypeRegistrationsResponse_registrationTokenList = (ListTypeRegistrationsResponse -> Maybe [Text])
-> (ListTypeRegistrationsResponse
    -> Maybe [Text] -> ListTypeRegistrationsResponse)
-> Lens
     ListTypeRegistrationsResponse
     ListTypeRegistrationsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrationsResponse' {Maybe [Text]
registrationTokenList :: Maybe [Text]
$sel:registrationTokenList:ListTypeRegistrationsResponse' :: ListTypeRegistrationsResponse -> Maybe [Text]
registrationTokenList} -> Maybe [Text]
registrationTokenList) (\s :: ListTypeRegistrationsResponse
s@ListTypeRegistrationsResponse' {} Maybe [Text]
a -> ListTypeRegistrationsResponse
s {$sel:registrationTokenList:ListTypeRegistrationsResponse' :: Maybe [Text]
registrationTokenList = Maybe [Text]
a} :: ListTypeRegistrationsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListTypeRegistrationsResponse
 -> f ListTypeRegistrationsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListTypeRegistrationsResponse
-> f ListTypeRegistrationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the request doesn\'t return all of the remaining results, @NextToken@
-- is set to a token. To retrieve the next set of results, call this action
-- again and assign that token to the request object\'s @NextToken@
-- parameter. If the request returns all results, @NextToken@ is set to
-- @null@.
listTypeRegistrationsResponse_nextToken :: Lens.Lens' ListTypeRegistrationsResponse (Prelude.Maybe Prelude.Text)
listTypeRegistrationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTypeRegistrationsResponse -> f ListTypeRegistrationsResponse
listTypeRegistrationsResponse_nextToken = (ListTypeRegistrationsResponse -> Maybe Text)
-> (ListTypeRegistrationsResponse
    -> Maybe Text -> ListTypeRegistrationsResponse)
-> Lens
     ListTypeRegistrationsResponse
     ListTypeRegistrationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypeRegistrationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTypeRegistrationsResponse' :: ListTypeRegistrationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTypeRegistrationsResponse
s@ListTypeRegistrationsResponse' {} Maybe Text
a -> ListTypeRegistrationsResponse
s {$sel:nextToken:ListTypeRegistrationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTypeRegistrationsResponse)

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

instance Prelude.NFData ListTypeRegistrationsResponse