{-# 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.Nimble.ListStudioComponents
-- 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 the @StudioComponents@ in a studio.
--
-- This operation returns paginated results.
module Amazonka.Nimble.ListStudioComponents
  ( -- * Creating a Request
    ListStudioComponents (..),
    newListStudioComponents,

    -- * Request Lenses
    listStudioComponents_maxResults,
    listStudioComponents_nextToken,
    listStudioComponents_states,
    listStudioComponents_types,
    listStudioComponents_studioId,

    -- * Destructuring the Response
    ListStudioComponentsResponse (..),
    newListStudioComponentsResponse,

    -- * Response Lenses
    listStudioComponentsResponse_nextToken,
    listStudioComponentsResponse_studioComponents,
    listStudioComponentsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListStudioComponents' smart constructor.
data ListStudioComponents = ListStudioComponents'
  { -- | The max number of results to return in the response.
    ListStudioComponents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListStudioComponents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Filters the request to studio components that are in one of the given
    -- states.
    ListStudioComponents -> Maybe [StudioComponentState]
states :: Prelude.Maybe [StudioComponentState],
    -- | Filters the request to studio components that are of one of the given
    -- types.
    ListStudioComponents -> Maybe [StudioComponentType]
types :: Prelude.Maybe [StudioComponentType],
    -- | The studio ID.
    ListStudioComponents -> Text
studioId :: Prelude.Text
  }
  deriving (ListStudioComponents -> ListStudioComponents -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStudioComponents -> ListStudioComponents -> Bool
$c/= :: ListStudioComponents -> ListStudioComponents -> Bool
== :: ListStudioComponents -> ListStudioComponents -> Bool
$c== :: ListStudioComponents -> ListStudioComponents -> Bool
Prelude.Eq, ReadPrec [ListStudioComponents]
ReadPrec ListStudioComponents
Int -> ReadS ListStudioComponents
ReadS [ListStudioComponents]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStudioComponents]
$creadListPrec :: ReadPrec [ListStudioComponents]
readPrec :: ReadPrec ListStudioComponents
$creadPrec :: ReadPrec ListStudioComponents
readList :: ReadS [ListStudioComponents]
$creadList :: ReadS [ListStudioComponents]
readsPrec :: Int -> ReadS ListStudioComponents
$creadsPrec :: Int -> ReadS ListStudioComponents
Prelude.Read, Int -> ListStudioComponents -> ShowS
[ListStudioComponents] -> ShowS
ListStudioComponents -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStudioComponents] -> ShowS
$cshowList :: [ListStudioComponents] -> ShowS
show :: ListStudioComponents -> String
$cshow :: ListStudioComponents -> String
showsPrec :: Int -> ListStudioComponents -> ShowS
$cshowsPrec :: Int -> ListStudioComponents -> ShowS
Prelude.Show, forall x. Rep ListStudioComponents x -> ListStudioComponents
forall x. ListStudioComponents -> Rep ListStudioComponents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStudioComponents x -> ListStudioComponents
$cfrom :: forall x. ListStudioComponents -> Rep ListStudioComponents x
Prelude.Generic)

-- |
-- Create a value of 'ListStudioComponents' 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', 'listStudioComponents_maxResults' - The max number of results to return in the response.
--
-- 'nextToken', 'listStudioComponents_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'states', 'listStudioComponents_states' - Filters the request to studio components that are in one of the given
-- states.
--
-- 'types', 'listStudioComponents_types' - Filters the request to studio components that are of one of the given
-- types.
--
-- 'studioId', 'listStudioComponents_studioId' - The studio ID.
newListStudioComponents ::
  -- | 'studioId'
  Prelude.Text ->
  ListStudioComponents
newListStudioComponents :: Text -> ListStudioComponents
newListStudioComponents Text
pStudioId_ =
  ListStudioComponents'
    { $sel:maxResults:ListStudioComponents' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListStudioComponents' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:states:ListStudioComponents' :: Maybe [StudioComponentState]
states = forall a. Maybe a
Prelude.Nothing,
      $sel:types:ListStudioComponents' :: Maybe [StudioComponentType]
types = forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:ListStudioComponents' :: Text
studioId = Text
pStudioId_
    }

-- | The max number of results to return in the response.
listStudioComponents_maxResults :: Lens.Lens' ListStudioComponents (Prelude.Maybe Prelude.Natural)
listStudioComponents_maxResults :: Lens' ListStudioComponents (Maybe Natural)
listStudioComponents_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListStudioComponents' :: ListStudioComponents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListStudioComponents
s@ListStudioComponents' {} Maybe Natural
a -> ListStudioComponents
s {$sel:maxResults:ListStudioComponents' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListStudioComponents)

-- | The token for the next set of results, or null if there are no more
-- results.
listStudioComponents_nextToken :: Lens.Lens' ListStudioComponents (Prelude.Maybe Prelude.Text)
listStudioComponents_nextToken :: Lens' ListStudioComponents (Maybe Text)
listStudioComponents_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStudioComponents' :: ListStudioComponents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStudioComponents
s@ListStudioComponents' {} Maybe Text
a -> ListStudioComponents
s {$sel:nextToken:ListStudioComponents' :: Maybe Text
nextToken = Maybe Text
a} :: ListStudioComponents)

-- | Filters the request to studio components that are in one of the given
-- states.
listStudioComponents_states :: Lens.Lens' ListStudioComponents (Prelude.Maybe [StudioComponentState])
listStudioComponents_states :: Lens' ListStudioComponents (Maybe [StudioComponentState])
listStudioComponents_states = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponents' {Maybe [StudioComponentState]
states :: Maybe [StudioComponentState]
$sel:states:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentState]
states} -> Maybe [StudioComponentState]
states) (\s :: ListStudioComponents
s@ListStudioComponents' {} Maybe [StudioComponentState]
a -> ListStudioComponents
s {$sel:states:ListStudioComponents' :: Maybe [StudioComponentState]
states = Maybe [StudioComponentState]
a} :: ListStudioComponents) 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

-- | Filters the request to studio components that are of one of the given
-- types.
listStudioComponents_types :: Lens.Lens' ListStudioComponents (Prelude.Maybe [StudioComponentType])
listStudioComponents_types :: Lens' ListStudioComponents (Maybe [StudioComponentType])
listStudioComponents_types = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponents' {Maybe [StudioComponentType]
types :: Maybe [StudioComponentType]
$sel:types:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentType]
types} -> Maybe [StudioComponentType]
types) (\s :: ListStudioComponents
s@ListStudioComponents' {} Maybe [StudioComponentType]
a -> ListStudioComponents
s {$sel:types:ListStudioComponents' :: Maybe [StudioComponentType]
types = Maybe [StudioComponentType]
a} :: ListStudioComponents) 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 studio ID.
listStudioComponents_studioId :: Lens.Lens' ListStudioComponents Prelude.Text
listStudioComponents_studioId :: Lens' ListStudioComponents Text
listStudioComponents_studioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponents' {Text
studioId :: Text
$sel:studioId:ListStudioComponents' :: ListStudioComponents -> Text
studioId} -> Text
studioId) (\s :: ListStudioComponents
s@ListStudioComponents' {} Text
a -> ListStudioComponents
s {$sel:studioId:ListStudioComponents' :: Text
studioId = Text
a} :: ListStudioComponents)

instance Core.AWSPager ListStudioComponents where
  page :: ListStudioComponents
-> AWSResponse ListStudioComponents -> Maybe ListStudioComponents
page ListStudioComponents
rq AWSResponse ListStudioComponents
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListStudioComponents
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStudioComponentsResponse (Maybe Text)
listStudioComponentsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListStudioComponents
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStudioComponentsResponse (Maybe [StudioComponent])
listStudioComponentsResponse_studioComponents
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListStudioComponents
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListStudioComponents (Maybe Text)
listStudioComponents_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStudioComponents
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStudioComponentsResponse (Maybe Text)
listStudioComponentsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListStudioComponents where
  type
    AWSResponse ListStudioComponents =
      ListStudioComponentsResponse
  request :: (Service -> Service)
-> ListStudioComponents -> Request ListStudioComponents
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListStudioComponents
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListStudioComponents)))
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 Text
-> Maybe [StudioComponent] -> Int -> ListStudioComponentsResponse
ListStudioComponentsResponse'
            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
"nextToken")
            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
"studioComponents"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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))
      )

instance Prelude.Hashable ListStudioComponents where
  hashWithSalt :: Int -> ListStudioComponents -> Int
hashWithSalt Int
_salt ListStudioComponents' {Maybe Natural
Maybe [StudioComponentState]
Maybe [StudioComponentType]
Maybe Text
Text
studioId :: Text
types :: Maybe [StudioComponentType]
states :: Maybe [StudioComponentState]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListStudioComponents' :: ListStudioComponents -> Text
$sel:types:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentType]
$sel:states:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentState]
$sel:nextToken:ListStudioComponents' :: ListStudioComponents -> Maybe Text
$sel:maxResults:ListStudioComponents' :: ListStudioComponents -> Maybe Natural
..} =
    Int
_salt
      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` Maybe [StudioComponentState]
states
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [StudioComponentType]
types
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId

instance Prelude.NFData ListStudioComponents where
  rnf :: ListStudioComponents -> ()
rnf ListStudioComponents' {Maybe Natural
Maybe [StudioComponentState]
Maybe [StudioComponentType]
Maybe Text
Text
studioId :: Text
types :: Maybe [StudioComponentType]
states :: Maybe [StudioComponentState]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListStudioComponents' :: ListStudioComponents -> Text
$sel:types:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentType]
$sel:states:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentState]
$sel:nextToken:ListStudioComponents' :: ListStudioComponents -> Maybe Text
$sel:maxResults:ListStudioComponents' :: ListStudioComponents -> 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 Maybe [StudioComponentState]
states
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StudioComponentType]
types
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId

instance Data.ToHeaders ListStudioComponents where
  toHeaders :: ListStudioComponents -> 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.ToPath ListStudioComponents where
  toPath :: ListStudioComponents -> ByteString
toPath ListStudioComponents' {Maybe Natural
Maybe [StudioComponentState]
Maybe [StudioComponentType]
Maybe Text
Text
studioId :: Text
types :: Maybe [StudioComponentType]
states :: Maybe [StudioComponentState]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListStudioComponents' :: ListStudioComponents -> Text
$sel:types:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentType]
$sel:states:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentState]
$sel:nextToken:ListStudioComponents' :: ListStudioComponents -> Maybe Text
$sel:maxResults:ListStudioComponents' :: ListStudioComponents -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-08-01/studios/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
studioId,
        ByteString
"/studio-components"
      ]

instance Data.ToQuery ListStudioComponents where
  toQuery :: ListStudioComponents -> QueryString
toQuery ListStudioComponents' {Maybe Natural
Maybe [StudioComponentState]
Maybe [StudioComponentType]
Maybe Text
Text
studioId :: Text
types :: Maybe [StudioComponentType]
states :: Maybe [StudioComponentState]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListStudioComponents' :: ListStudioComponents -> Text
$sel:types:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentType]
$sel:states:ListStudioComponents' :: ListStudioComponents -> Maybe [StudioComponentState]
$sel:nextToken:ListStudioComponents' :: ListStudioComponents -> Maybe Text
$sel:maxResults:ListStudioComponents' :: ListStudioComponents -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"states"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StudioComponentState]
states),
        ByteString
"types"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StudioComponentType]
types)
      ]

-- | /See:/ 'newListStudioComponentsResponse' smart constructor.
data ListStudioComponentsResponse = ListStudioComponentsResponse'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListStudioComponentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A collection of studio components.
    ListStudioComponentsResponse -> Maybe [StudioComponent]
studioComponents :: Prelude.Maybe [StudioComponent],
    -- | The response's http status code.
    ListStudioComponentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListStudioComponentsResponse
-> ListStudioComponentsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStudioComponentsResponse
-> ListStudioComponentsResponse -> Bool
$c/= :: ListStudioComponentsResponse
-> ListStudioComponentsResponse -> Bool
== :: ListStudioComponentsResponse
-> ListStudioComponentsResponse -> Bool
$c== :: ListStudioComponentsResponse
-> ListStudioComponentsResponse -> Bool
Prelude.Eq, Int -> ListStudioComponentsResponse -> ShowS
[ListStudioComponentsResponse] -> ShowS
ListStudioComponentsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStudioComponentsResponse] -> ShowS
$cshowList :: [ListStudioComponentsResponse] -> ShowS
show :: ListStudioComponentsResponse -> String
$cshow :: ListStudioComponentsResponse -> String
showsPrec :: Int -> ListStudioComponentsResponse -> ShowS
$cshowsPrec :: Int -> ListStudioComponentsResponse -> ShowS
Prelude.Show, forall x.
Rep ListStudioComponentsResponse x -> ListStudioComponentsResponse
forall x.
ListStudioComponentsResponse -> Rep ListStudioComponentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListStudioComponentsResponse x -> ListStudioComponentsResponse
$cfrom :: forall x.
ListStudioComponentsResponse -> Rep ListStudioComponentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListStudioComponentsResponse' 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:
--
-- 'nextToken', 'listStudioComponentsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'studioComponents', 'listStudioComponentsResponse_studioComponents' - A collection of studio components.
--
-- 'httpStatus', 'listStudioComponentsResponse_httpStatus' - The response's http status code.
newListStudioComponentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListStudioComponentsResponse
newListStudioComponentsResponse :: Int -> ListStudioComponentsResponse
newListStudioComponentsResponse Int
pHttpStatus_ =
  ListStudioComponentsResponse'
    { $sel:nextToken:ListStudioComponentsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:studioComponents:ListStudioComponentsResponse' :: Maybe [StudioComponent]
studioComponents = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListStudioComponentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token for the next set of results, or null if there are no more
-- results.
listStudioComponentsResponse_nextToken :: Lens.Lens' ListStudioComponentsResponse (Prelude.Maybe Prelude.Text)
listStudioComponentsResponse_nextToken :: Lens' ListStudioComponentsResponse (Maybe Text)
listStudioComponentsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStudioComponentsResponse
s@ListStudioComponentsResponse' {} Maybe Text
a -> ListStudioComponentsResponse
s {$sel:nextToken:ListStudioComponentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListStudioComponentsResponse)

-- | A collection of studio components.
listStudioComponentsResponse_studioComponents :: Lens.Lens' ListStudioComponentsResponse (Prelude.Maybe [StudioComponent])
listStudioComponentsResponse_studioComponents :: Lens' ListStudioComponentsResponse (Maybe [StudioComponent])
listStudioComponentsResponse_studioComponents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponentsResponse' {Maybe [StudioComponent]
studioComponents :: Maybe [StudioComponent]
$sel:studioComponents:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Maybe [StudioComponent]
studioComponents} -> Maybe [StudioComponent]
studioComponents) (\s :: ListStudioComponentsResponse
s@ListStudioComponentsResponse' {} Maybe [StudioComponent]
a -> ListStudioComponentsResponse
s {$sel:studioComponents:ListStudioComponentsResponse' :: Maybe [StudioComponent]
studioComponents = Maybe [StudioComponent]
a} :: ListStudioComponentsResponse) 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 response's http status code.
listStudioComponentsResponse_httpStatus :: Lens.Lens' ListStudioComponentsResponse Prelude.Int
listStudioComponentsResponse_httpStatus :: Lens' ListStudioComponentsResponse Int
listStudioComponentsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStudioComponentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListStudioComponentsResponse
s@ListStudioComponentsResponse' {} Int
a -> ListStudioComponentsResponse
s {$sel:httpStatus:ListStudioComponentsResponse' :: Int
httpStatus = Int
a} :: ListStudioComponentsResponse)

instance Prelude.NFData ListStudioComponentsResponse where
  rnf :: ListStudioComponentsResponse -> ()
rnf ListStudioComponentsResponse' {Int
Maybe [StudioComponent]
Maybe Text
httpStatus :: Int
studioComponents :: Maybe [StudioComponent]
nextToken :: Maybe Text
$sel:httpStatus:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Int
$sel:studioComponents:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Maybe [StudioComponent]
$sel:nextToken:ListStudioComponentsResponse' :: ListStudioComponentsResponse -> Maybe Text
..} =
    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 Maybe [StudioComponent]
studioComponents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus