{-# 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.IotTwinMaker.ListComponentTypes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all component types in a workspace.
module Amazonka.IotTwinMaker.ListComponentTypes
  ( -- * Creating a Request
    ListComponentTypes (..),
    newListComponentTypes,

    -- * Request Lenses
    listComponentTypes_filters,
    listComponentTypes_maxResults,
    listComponentTypes_nextToken,
    listComponentTypes_workspaceId,

    -- * Destructuring the Response
    ListComponentTypesResponse (..),
    newListComponentTypesResponse,

    -- * Response Lenses
    listComponentTypesResponse_maxResults,
    listComponentTypesResponse_nextToken,
    listComponentTypesResponse_httpStatus,
    listComponentTypesResponse_workspaceId,
    listComponentTypesResponse_componentTypeSummaries,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IotTwinMaker.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListComponentTypes' smart constructor.
data ListComponentTypes = ListComponentTypes'
  { -- | A list of objects that filter the request.
    ListComponentTypes -> Maybe [ListComponentTypesFilter]
filters :: Prelude.Maybe [ListComponentTypesFilter],
    -- | The maximum number of results to return at one time. The default is 25.
    --
    -- Valid Range: Minimum value of 1. Maximum value of 250.
    ListComponentTypes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The string that specifies the next page of results.
    ListComponentTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the workspace.
    ListComponentTypes -> Text
workspaceId :: Prelude.Text
  }
  deriving (ListComponentTypes -> ListComponentTypes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListComponentTypes -> ListComponentTypes -> Bool
$c/= :: ListComponentTypes -> ListComponentTypes -> Bool
== :: ListComponentTypes -> ListComponentTypes -> Bool
$c== :: ListComponentTypes -> ListComponentTypes -> Bool
Prelude.Eq, ReadPrec [ListComponentTypes]
ReadPrec ListComponentTypes
Int -> ReadS ListComponentTypes
ReadS [ListComponentTypes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListComponentTypes]
$creadListPrec :: ReadPrec [ListComponentTypes]
readPrec :: ReadPrec ListComponentTypes
$creadPrec :: ReadPrec ListComponentTypes
readList :: ReadS [ListComponentTypes]
$creadList :: ReadS [ListComponentTypes]
readsPrec :: Int -> ReadS ListComponentTypes
$creadsPrec :: Int -> ReadS ListComponentTypes
Prelude.Read, Int -> ListComponentTypes -> ShowS
[ListComponentTypes] -> ShowS
ListComponentTypes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListComponentTypes] -> ShowS
$cshowList :: [ListComponentTypes] -> ShowS
show :: ListComponentTypes -> String
$cshow :: ListComponentTypes -> String
showsPrec :: Int -> ListComponentTypes -> ShowS
$cshowsPrec :: Int -> ListComponentTypes -> ShowS
Prelude.Show, forall x. Rep ListComponentTypes x -> ListComponentTypes
forall x. ListComponentTypes -> Rep ListComponentTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListComponentTypes x -> ListComponentTypes
$cfrom :: forall x. ListComponentTypes -> Rep ListComponentTypes x
Prelude.Generic)

-- |
-- Create a value of 'ListComponentTypes' 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:
--
-- 'filters', 'listComponentTypes_filters' - A list of objects that filter the request.
--
-- 'maxResults', 'listComponentTypes_maxResults' - The maximum number of results to return at one time. The default is 25.
--
-- Valid Range: Minimum value of 1. Maximum value of 250.
--
-- 'nextToken', 'listComponentTypes_nextToken' - The string that specifies the next page of results.
--
-- 'workspaceId', 'listComponentTypes_workspaceId' - The ID of the workspace.
newListComponentTypes ::
  -- | 'workspaceId'
  Prelude.Text ->
  ListComponentTypes
newListComponentTypes :: Text -> ListComponentTypes
newListComponentTypes Text
pWorkspaceId_ =
  ListComponentTypes'
    { $sel:filters:ListComponentTypes' :: Maybe [ListComponentTypesFilter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListComponentTypes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListComponentTypes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:workspaceId:ListComponentTypes' :: Text
workspaceId = Text
pWorkspaceId_
    }

-- | A list of objects that filter the request.
listComponentTypes_filters :: Lens.Lens' ListComponentTypes (Prelude.Maybe [ListComponentTypesFilter])
listComponentTypes_filters :: Lens' ListComponentTypes (Maybe [ListComponentTypesFilter])
listComponentTypes_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypes' {Maybe [ListComponentTypesFilter]
filters :: Maybe [ListComponentTypesFilter]
$sel:filters:ListComponentTypes' :: ListComponentTypes -> Maybe [ListComponentTypesFilter]
filters} -> Maybe [ListComponentTypesFilter]
filters) (\s :: ListComponentTypes
s@ListComponentTypes' {} Maybe [ListComponentTypesFilter]
a -> ListComponentTypes
s {$sel:filters:ListComponentTypes' :: Maybe [ListComponentTypesFilter]
filters = Maybe [ListComponentTypesFilter]
a} :: ListComponentTypes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return at one time. The default is 25.
--
-- Valid Range: Minimum value of 1. Maximum value of 250.
listComponentTypes_maxResults :: Lens.Lens' ListComponentTypes (Prelude.Maybe Prelude.Natural)
listComponentTypes_maxResults :: Lens' ListComponentTypes (Maybe Natural)
listComponentTypes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListComponentTypes' :: ListComponentTypes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListComponentTypes
s@ListComponentTypes' {} Maybe Natural
a -> ListComponentTypes
s {$sel:maxResults:ListComponentTypes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListComponentTypes)

-- | The string that specifies the next page of results.
listComponentTypes_nextToken :: Lens.Lens' ListComponentTypes (Prelude.Maybe Prelude.Text)
listComponentTypes_nextToken :: Lens' ListComponentTypes (Maybe Text)
listComponentTypes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListComponentTypes' :: ListComponentTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListComponentTypes
s@ListComponentTypes' {} Maybe Text
a -> ListComponentTypes
s {$sel:nextToken:ListComponentTypes' :: Maybe Text
nextToken = Maybe Text
a} :: ListComponentTypes)

-- | The ID of the workspace.
listComponentTypes_workspaceId :: Lens.Lens' ListComponentTypes Prelude.Text
listComponentTypes_workspaceId :: Lens' ListComponentTypes Text
listComponentTypes_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypes' {Text
workspaceId :: Text
$sel:workspaceId:ListComponentTypes' :: ListComponentTypes -> Text
workspaceId} -> Text
workspaceId) (\s :: ListComponentTypes
s@ListComponentTypes' {} Text
a -> ListComponentTypes
s {$sel:workspaceId:ListComponentTypes' :: Text
workspaceId = Text
a} :: ListComponentTypes)

instance Core.AWSRequest ListComponentTypes where
  type
    AWSResponse ListComponentTypes =
      ListComponentTypesResponse
  request :: (Service -> Service)
-> ListComponentTypes -> Request ListComponentTypes
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListComponentTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListComponentTypes)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Natural
-> Maybe Text
-> Int
-> Text
-> [ComponentTypeSummary]
-> ListComponentTypesResponse
ListComponentTypesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"maxResults")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"workspaceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"componentTypeSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListComponentTypes where
  hashWithSalt :: Int -> ListComponentTypes -> Int
hashWithSalt Int
_salt ListComponentTypes' {Maybe Natural
Maybe [ListComponentTypesFilter]
Maybe Text
Text
workspaceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ListComponentTypesFilter]
$sel:workspaceId:ListComponentTypes' :: ListComponentTypes -> Text
$sel:nextToken:ListComponentTypes' :: ListComponentTypes -> Maybe Text
$sel:maxResults:ListComponentTypes' :: ListComponentTypes -> Maybe Natural
$sel:filters:ListComponentTypes' :: ListComponentTypes -> Maybe [ListComponentTypesFilter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ListComponentTypesFilter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workspaceId

instance Prelude.NFData ListComponentTypes where
  rnf :: ListComponentTypes -> ()
rnf ListComponentTypes' {Maybe Natural
Maybe [ListComponentTypesFilter]
Maybe Text
Text
workspaceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ListComponentTypesFilter]
$sel:workspaceId:ListComponentTypes' :: ListComponentTypes -> Text
$sel:nextToken:ListComponentTypes' :: ListComponentTypes -> Maybe Text
$sel:maxResults:ListComponentTypes' :: ListComponentTypes -> Maybe Natural
$sel:filters:ListComponentTypes' :: ListComponentTypes -> Maybe [ListComponentTypesFilter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ListComponentTypesFilter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId

instance Data.ToHeaders ListComponentTypes where
  toHeaders :: ListComponentTypes -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListComponentTypes where
  toJSON :: ListComponentTypes -> Value
toJSON ListComponentTypes' {Maybe Natural
Maybe [ListComponentTypesFilter]
Maybe Text
Text
workspaceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ListComponentTypesFilter]
$sel:workspaceId:ListComponentTypes' :: ListComponentTypes -> Text
$sel:nextToken:ListComponentTypes' :: ListComponentTypes -> Maybe Text
$sel:maxResults:ListComponentTypes' :: ListComponentTypes -> Maybe Natural
$sel:filters:ListComponentTypes' :: ListComponentTypes -> Maybe [ListComponentTypesFilter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ListComponentTypesFilter]
filters,
            (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

instance Data.ToPath ListComponentTypes where
  toPath :: ListComponentTypes -> ByteString
toPath ListComponentTypes' {Maybe Natural
Maybe [ListComponentTypesFilter]
Maybe Text
Text
workspaceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ListComponentTypesFilter]
$sel:workspaceId:ListComponentTypes' :: ListComponentTypes -> Text
$sel:nextToken:ListComponentTypes' :: ListComponentTypes -> Maybe Text
$sel:maxResults:ListComponentTypes' :: ListComponentTypes -> Maybe Natural
$sel:filters:ListComponentTypes' :: ListComponentTypes -> Maybe [ListComponentTypesFilter]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/workspaces/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
workspaceId,
        ByteString
"/component-types-list"
      ]

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

-- | /See:/ 'newListComponentTypesResponse' smart constructor.
data ListComponentTypesResponse = ListComponentTypesResponse'
  { -- | Specifies the maximum number of results to display.
    ListComponentTypesResponse -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The string that specifies the next page of results.
    ListComponentTypesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListComponentTypesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the workspace.
    ListComponentTypesResponse -> Text
workspaceId :: Prelude.Text,
    -- | A list of objects that contain information about the component types.
    ListComponentTypesResponse -> [ComponentTypeSummary]
componentTypeSummaries :: [ComponentTypeSummary]
  }
  deriving (ListComponentTypesResponse -> ListComponentTypesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListComponentTypesResponse -> ListComponentTypesResponse -> Bool
$c/= :: ListComponentTypesResponse -> ListComponentTypesResponse -> Bool
== :: ListComponentTypesResponse -> ListComponentTypesResponse -> Bool
$c== :: ListComponentTypesResponse -> ListComponentTypesResponse -> Bool
Prelude.Eq, ReadPrec [ListComponentTypesResponse]
ReadPrec ListComponentTypesResponse
Int -> ReadS ListComponentTypesResponse
ReadS [ListComponentTypesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListComponentTypesResponse]
$creadListPrec :: ReadPrec [ListComponentTypesResponse]
readPrec :: ReadPrec ListComponentTypesResponse
$creadPrec :: ReadPrec ListComponentTypesResponse
readList :: ReadS [ListComponentTypesResponse]
$creadList :: ReadS [ListComponentTypesResponse]
readsPrec :: Int -> ReadS ListComponentTypesResponse
$creadsPrec :: Int -> ReadS ListComponentTypesResponse
Prelude.Read, Int -> ListComponentTypesResponse -> ShowS
[ListComponentTypesResponse] -> ShowS
ListComponentTypesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListComponentTypesResponse] -> ShowS
$cshowList :: [ListComponentTypesResponse] -> ShowS
show :: ListComponentTypesResponse -> String
$cshow :: ListComponentTypesResponse -> String
showsPrec :: Int -> ListComponentTypesResponse -> ShowS
$cshowsPrec :: Int -> ListComponentTypesResponse -> ShowS
Prelude.Show, forall x.
Rep ListComponentTypesResponse x -> ListComponentTypesResponse
forall x.
ListComponentTypesResponse -> Rep ListComponentTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListComponentTypesResponse x -> ListComponentTypesResponse
$cfrom :: forall x.
ListComponentTypesResponse -> Rep ListComponentTypesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListComponentTypesResponse' 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:
--
-- 'maxResults', 'listComponentTypesResponse_maxResults' - Specifies the maximum number of results to display.
--
-- 'nextToken', 'listComponentTypesResponse_nextToken' - The string that specifies the next page of results.
--
-- 'httpStatus', 'listComponentTypesResponse_httpStatus' - The response's http status code.
--
-- 'workspaceId', 'listComponentTypesResponse_workspaceId' - The ID of the workspace.
--
-- 'componentTypeSummaries', 'listComponentTypesResponse_componentTypeSummaries' - A list of objects that contain information about the component types.
newListComponentTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'workspaceId'
  Prelude.Text ->
  ListComponentTypesResponse
newListComponentTypesResponse :: Int -> Text -> ListComponentTypesResponse
newListComponentTypesResponse
  Int
pHttpStatus_
  Text
pWorkspaceId_ =
    ListComponentTypesResponse'
      { $sel:maxResults:ListComponentTypesResponse' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListComponentTypesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListComponentTypesResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:workspaceId:ListComponentTypesResponse' :: Text
workspaceId = Text
pWorkspaceId_,
        $sel:componentTypeSummaries:ListComponentTypesResponse' :: [ComponentTypeSummary]
componentTypeSummaries = forall a. Monoid a => a
Prelude.mempty
      }

-- | Specifies the maximum number of results to display.
listComponentTypesResponse_maxResults :: Lens.Lens' ListComponentTypesResponse (Prelude.Maybe Prelude.Natural)
listComponentTypesResponse_maxResults :: Lens' ListComponentTypesResponse (Maybe Natural)
listComponentTypesResponse_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypesResponse' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListComponentTypesResponse' :: ListComponentTypesResponse -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListComponentTypesResponse
s@ListComponentTypesResponse' {} Maybe Natural
a -> ListComponentTypesResponse
s {$sel:maxResults:ListComponentTypesResponse' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListComponentTypesResponse)

-- | The string that specifies the next page of results.
listComponentTypesResponse_nextToken :: Lens.Lens' ListComponentTypesResponse (Prelude.Maybe Prelude.Text)
listComponentTypesResponse_nextToken :: Lens' ListComponentTypesResponse (Maybe Text)
listComponentTypesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListComponentTypesResponse' :: ListComponentTypesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListComponentTypesResponse
s@ListComponentTypesResponse' {} Maybe Text
a -> ListComponentTypesResponse
s {$sel:nextToken:ListComponentTypesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListComponentTypesResponse)

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

-- | The ID of the workspace.
listComponentTypesResponse_workspaceId :: Lens.Lens' ListComponentTypesResponse Prelude.Text
listComponentTypesResponse_workspaceId :: Lens' ListComponentTypesResponse Text
listComponentTypesResponse_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypesResponse' {Text
workspaceId :: Text
$sel:workspaceId:ListComponentTypesResponse' :: ListComponentTypesResponse -> Text
workspaceId} -> Text
workspaceId) (\s :: ListComponentTypesResponse
s@ListComponentTypesResponse' {} Text
a -> ListComponentTypesResponse
s {$sel:workspaceId:ListComponentTypesResponse' :: Text
workspaceId = Text
a} :: ListComponentTypesResponse)

-- | A list of objects that contain information about the component types.
listComponentTypesResponse_componentTypeSummaries :: Lens.Lens' ListComponentTypesResponse [ComponentTypeSummary]
listComponentTypesResponse_componentTypeSummaries :: Lens' ListComponentTypesResponse [ComponentTypeSummary]
listComponentTypesResponse_componentTypeSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentTypesResponse' {[ComponentTypeSummary]
componentTypeSummaries :: [ComponentTypeSummary]
$sel:componentTypeSummaries:ListComponentTypesResponse' :: ListComponentTypesResponse -> [ComponentTypeSummary]
componentTypeSummaries} -> [ComponentTypeSummary]
componentTypeSummaries) (\s :: ListComponentTypesResponse
s@ListComponentTypesResponse' {} [ComponentTypeSummary]
a -> ListComponentTypesResponse
s {$sel:componentTypeSummaries:ListComponentTypesResponse' :: [ComponentTypeSummary]
componentTypeSummaries = [ComponentTypeSummary]
a} :: ListComponentTypesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListComponentTypesResponse where
  rnf :: ListComponentTypesResponse -> ()
rnf ListComponentTypesResponse' {Int
[ComponentTypeSummary]
Maybe Natural
Maybe Text
Text
componentTypeSummaries :: [ComponentTypeSummary]
workspaceId :: Text
httpStatus :: Int
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:componentTypeSummaries:ListComponentTypesResponse' :: ListComponentTypesResponse -> [ComponentTypeSummary]
$sel:workspaceId:ListComponentTypesResponse' :: ListComponentTypesResponse -> Text
$sel:httpStatus:ListComponentTypesResponse' :: ListComponentTypesResponse -> Int
$sel:nextToken:ListComponentTypesResponse' :: ListComponentTypesResponse -> Maybe Text
$sel:maxResults:ListComponentTypesResponse' :: ListComponentTypesResponse -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ComponentTypeSummary]
componentTypeSummaries