{-# 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.RobOMaker.ListRobotApplications
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of robot application. You can optionally provide filters
-- to retrieve specific robot applications.
--
-- This operation returns paginated results.
module Amazonka.RobOMaker.ListRobotApplications
  ( -- * Creating a Request
    ListRobotApplications (..),
    newListRobotApplications,

    -- * Request Lenses
    listRobotApplications_filters,
    listRobotApplications_maxResults,
    listRobotApplications_nextToken,
    listRobotApplications_versionQualifier,

    -- * Destructuring the Response
    ListRobotApplicationsResponse (..),
    newListRobotApplicationsResponse,

    -- * Response Lenses
    listRobotApplicationsResponse_nextToken,
    listRobotApplicationsResponse_robotApplicationSummaries,
    listRobotApplicationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListRobotApplications' smart constructor.
data ListRobotApplications = ListRobotApplications'
  { -- | Optional filters to limit results.
    --
    -- The filter name @name@ is supported. When filtering, you must use the
    -- complete value of the filtered item. You can use up to three filters.
    ListRobotApplications -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | When this parameter is used, @ListRobotApplications@ only returns
    -- @maxResults@ results in a single page along with a @nextToken@ response
    -- element. The remaining results of the initial request can be seen by
    -- sending another @ListRobotApplications@ request with the returned
    -- @nextToken@ value. This value can be between 1 and 100. If this
    -- parameter is not used, then @ListRobotApplications@ returns up to 100
    -- results and a @nextToken@ value if applicable.
    ListRobotApplications -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | If the previous paginated request did not 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 @ListRobotApplications@
    -- 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.
    ListRobotApplications -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The version qualifier of the robot application.
    ListRobotApplications -> Maybe Text
versionQualifier :: Prelude.Maybe Prelude.Text
  }
  deriving (ListRobotApplications -> ListRobotApplications -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRobotApplications -> ListRobotApplications -> Bool
$c/= :: ListRobotApplications -> ListRobotApplications -> Bool
== :: ListRobotApplications -> ListRobotApplications -> Bool
$c== :: ListRobotApplications -> ListRobotApplications -> Bool
Prelude.Eq, ReadPrec [ListRobotApplications]
ReadPrec ListRobotApplications
Int -> ReadS ListRobotApplications
ReadS [ListRobotApplications]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRobotApplications]
$creadListPrec :: ReadPrec [ListRobotApplications]
readPrec :: ReadPrec ListRobotApplications
$creadPrec :: ReadPrec ListRobotApplications
readList :: ReadS [ListRobotApplications]
$creadList :: ReadS [ListRobotApplications]
readsPrec :: Int -> ReadS ListRobotApplications
$creadsPrec :: Int -> ReadS ListRobotApplications
Prelude.Read, Int -> ListRobotApplications -> ShowS
[ListRobotApplications] -> ShowS
ListRobotApplications -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRobotApplications] -> ShowS
$cshowList :: [ListRobotApplications] -> ShowS
show :: ListRobotApplications -> String
$cshow :: ListRobotApplications -> String
showsPrec :: Int -> ListRobotApplications -> ShowS
$cshowsPrec :: Int -> ListRobotApplications -> ShowS
Prelude.Show, forall x. Rep ListRobotApplications x -> ListRobotApplications
forall x. ListRobotApplications -> Rep ListRobotApplications x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRobotApplications x -> ListRobotApplications
$cfrom :: forall x. ListRobotApplications -> Rep ListRobotApplications x
Prelude.Generic)

-- |
-- Create a value of 'ListRobotApplications' 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', 'listRobotApplications_filters' - Optional filters to limit results.
--
-- The filter name @name@ is supported. When filtering, you must use the
-- complete value of the filtered item. You can use up to three filters.
--
-- 'maxResults', 'listRobotApplications_maxResults' - When this parameter is used, @ListRobotApplications@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @ListRobotApplications@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListRobotApplications@ returns up to 100
-- results and a @nextToken@ value if applicable.
--
-- 'nextToken', 'listRobotApplications_nextToken' - If the previous paginated request did not 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 @ListRobotApplications@
-- 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.
--
-- 'versionQualifier', 'listRobotApplications_versionQualifier' - The version qualifier of the robot application.
newListRobotApplications ::
  ListRobotApplications
newListRobotApplications :: ListRobotApplications
newListRobotApplications =
  ListRobotApplications'
    { $sel:filters:ListRobotApplications' :: Maybe (NonEmpty Filter)
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListRobotApplications' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRobotApplications' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:versionQualifier:ListRobotApplications' :: Maybe Text
versionQualifier = forall a. Maybe a
Prelude.Nothing
    }

-- | Optional filters to limit results.
--
-- The filter name @name@ is supported. When filtering, you must use the
-- complete value of the filtered item. You can use up to three filters.
listRobotApplications_filters :: Lens.Lens' ListRobotApplications (Prelude.Maybe (Prelude.NonEmpty Filter))
listRobotApplications_filters :: Lens' ListRobotApplications (Maybe (NonEmpty Filter))
listRobotApplications_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplications' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListRobotApplications' :: ListRobotApplications -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListRobotApplications
s@ListRobotApplications' {} Maybe (NonEmpty Filter)
a -> ListRobotApplications
s {$sel:filters:ListRobotApplications' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListRobotApplications) 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

-- | When this parameter is used, @ListRobotApplications@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @ListRobotApplications@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListRobotApplications@ returns up to 100
-- results and a @nextToken@ value if applicable.
listRobotApplications_maxResults :: Lens.Lens' ListRobotApplications (Prelude.Maybe Prelude.Int)
listRobotApplications_maxResults :: Lens' ListRobotApplications (Maybe Int)
listRobotApplications_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplications' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListRobotApplications' :: ListRobotApplications -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListRobotApplications
s@ListRobotApplications' {} Maybe Int
a -> ListRobotApplications
s {$sel:maxResults:ListRobotApplications' :: Maybe Int
maxResults = Maybe Int
a} :: ListRobotApplications)

-- | If the previous paginated request did not 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 @ListRobotApplications@
-- 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.
listRobotApplications_nextToken :: Lens.Lens' ListRobotApplications (Prelude.Maybe Prelude.Text)
listRobotApplications_nextToken :: Lens' ListRobotApplications (Maybe Text)
listRobotApplications_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplications' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRobotApplications' :: ListRobotApplications -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRobotApplications
s@ListRobotApplications' {} Maybe Text
a -> ListRobotApplications
s {$sel:nextToken:ListRobotApplications' :: Maybe Text
nextToken = Maybe Text
a} :: ListRobotApplications)

-- | The version qualifier of the robot application.
listRobotApplications_versionQualifier :: Lens.Lens' ListRobotApplications (Prelude.Maybe Prelude.Text)
listRobotApplications_versionQualifier :: Lens' ListRobotApplications (Maybe Text)
listRobotApplications_versionQualifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplications' {Maybe Text
versionQualifier :: Maybe Text
$sel:versionQualifier:ListRobotApplications' :: ListRobotApplications -> Maybe Text
versionQualifier} -> Maybe Text
versionQualifier) (\s :: ListRobotApplications
s@ListRobotApplications' {} Maybe Text
a -> ListRobotApplications
s {$sel:versionQualifier:ListRobotApplications' :: Maybe Text
versionQualifier = Maybe Text
a} :: ListRobotApplications)

instance Core.AWSPager ListRobotApplications where
  page :: ListRobotApplications
-> AWSResponse ListRobotApplications -> Maybe ListRobotApplications
page ListRobotApplications
rq AWSResponse ListRobotApplications
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRobotApplications
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRobotApplicationsResponse (Maybe Text)
listRobotApplicationsResponse_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 ListRobotApplications
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListRobotApplicationsResponse (Maybe [RobotApplicationSummary])
listRobotApplicationsResponse_robotApplicationSummaries
            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.$ ListRobotApplications
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListRobotApplications (Maybe Text)
listRobotApplications_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRobotApplications
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRobotApplicationsResponse (Maybe Text)
listRobotApplicationsResponse_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 ListRobotApplications where
  type
    AWSResponse ListRobotApplications =
      ListRobotApplicationsResponse
  request :: (Service -> Service)
-> ListRobotApplications -> Request ListRobotApplications
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 ListRobotApplications
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRobotApplications)))
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 [RobotApplicationSummary]
-> Int
-> ListRobotApplicationsResponse
ListRobotApplicationsResponse'
            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
"robotApplicationSummaries"
                            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 ListRobotApplications where
  hashWithSalt :: Int -> ListRobotApplications -> Int
hashWithSalt Int
_salt ListRobotApplications' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
versionQualifier :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:versionQualifier:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:nextToken:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:maxResults:ListRobotApplications' :: ListRobotApplications -> Maybe Int
$sel:filters:ListRobotApplications' :: ListRobotApplications -> Maybe (NonEmpty Filter)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Filter)
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionQualifier

instance Prelude.NFData ListRobotApplications where
  rnf :: ListRobotApplications -> ()
rnf ListRobotApplications' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
versionQualifier :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:versionQualifier:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:nextToken:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:maxResults:ListRobotApplications' :: ListRobotApplications -> Maybe Int
$sel:filters:ListRobotApplications' :: ListRobotApplications -> Maybe (NonEmpty Filter)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Filter)
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
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 Text
versionQualifier

instance Data.ToHeaders ListRobotApplications where
  toHeaders :: ListRobotApplications -> 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 ListRobotApplications where
  toJSON :: ListRobotApplications -> Value
toJSON ListRobotApplications' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
versionQualifier :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:versionQualifier:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:nextToken:ListRobotApplications' :: ListRobotApplications -> Maybe Text
$sel:maxResults:ListRobotApplications' :: ListRobotApplications -> Maybe Int
$sel:filters:ListRobotApplications' :: ListRobotApplications -> Maybe (NonEmpty Filter)
..} =
    [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 (NonEmpty Filter)
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 Int
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,
            (Key
"versionQualifier" 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
versionQualifier
          ]
      )

instance Data.ToPath ListRobotApplications where
  toPath :: ListRobotApplications -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/listRobotApplications"

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

-- | /See:/ 'newListRobotApplicationsResponse' smart constructor.
data ListRobotApplicationsResponse = ListRobotApplicationsResponse'
  { -- | If the previous paginated request did not 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 @ListRobotApplications@
    -- 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.
    ListRobotApplicationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of robot application summaries that meet the criteria of the
    -- request.
    ListRobotApplicationsResponse -> Maybe [RobotApplicationSummary]
robotApplicationSummaries :: Prelude.Maybe [RobotApplicationSummary],
    -- | The response's http status code.
    ListRobotApplicationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRobotApplicationsResponse
-> ListRobotApplicationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRobotApplicationsResponse
-> ListRobotApplicationsResponse -> Bool
$c/= :: ListRobotApplicationsResponse
-> ListRobotApplicationsResponse -> Bool
== :: ListRobotApplicationsResponse
-> ListRobotApplicationsResponse -> Bool
$c== :: ListRobotApplicationsResponse
-> ListRobotApplicationsResponse -> Bool
Prelude.Eq, ReadPrec [ListRobotApplicationsResponse]
ReadPrec ListRobotApplicationsResponse
Int -> ReadS ListRobotApplicationsResponse
ReadS [ListRobotApplicationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRobotApplicationsResponse]
$creadListPrec :: ReadPrec [ListRobotApplicationsResponse]
readPrec :: ReadPrec ListRobotApplicationsResponse
$creadPrec :: ReadPrec ListRobotApplicationsResponse
readList :: ReadS [ListRobotApplicationsResponse]
$creadList :: ReadS [ListRobotApplicationsResponse]
readsPrec :: Int -> ReadS ListRobotApplicationsResponse
$creadsPrec :: Int -> ReadS ListRobotApplicationsResponse
Prelude.Read, Int -> ListRobotApplicationsResponse -> ShowS
[ListRobotApplicationsResponse] -> ShowS
ListRobotApplicationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRobotApplicationsResponse] -> ShowS
$cshowList :: [ListRobotApplicationsResponse] -> ShowS
show :: ListRobotApplicationsResponse -> String
$cshow :: ListRobotApplicationsResponse -> String
showsPrec :: Int -> ListRobotApplicationsResponse -> ShowS
$cshowsPrec :: Int -> ListRobotApplicationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRobotApplicationsResponse x
-> ListRobotApplicationsResponse
forall x.
ListRobotApplicationsResponse
-> Rep ListRobotApplicationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRobotApplicationsResponse x
-> ListRobotApplicationsResponse
$cfrom :: forall x.
ListRobotApplicationsResponse
-> Rep ListRobotApplicationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRobotApplicationsResponse' 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', 'listRobotApplicationsResponse_nextToken' - If the previous paginated request did not 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 @ListRobotApplications@
-- 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.
--
-- 'robotApplicationSummaries', 'listRobotApplicationsResponse_robotApplicationSummaries' - A list of robot application summaries that meet the criteria of the
-- request.
--
-- 'httpStatus', 'listRobotApplicationsResponse_httpStatus' - The response's http status code.
newListRobotApplicationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRobotApplicationsResponse
newListRobotApplicationsResponse :: Int -> ListRobotApplicationsResponse
newListRobotApplicationsResponse Int
pHttpStatus_ =
  ListRobotApplicationsResponse'
    { $sel:nextToken:ListRobotApplicationsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:robotApplicationSummaries:ListRobotApplicationsResponse' :: Maybe [RobotApplicationSummary]
robotApplicationSummaries = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRobotApplicationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the previous paginated request did not 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 @ListRobotApplications@
-- 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.
listRobotApplicationsResponse_nextToken :: Lens.Lens' ListRobotApplicationsResponse (Prelude.Maybe Prelude.Text)
listRobotApplicationsResponse_nextToken :: Lens' ListRobotApplicationsResponse (Maybe Text)
listRobotApplicationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplicationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRobotApplicationsResponse' :: ListRobotApplicationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRobotApplicationsResponse
s@ListRobotApplicationsResponse' {} Maybe Text
a -> ListRobotApplicationsResponse
s {$sel:nextToken:ListRobotApplicationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRobotApplicationsResponse)

-- | A list of robot application summaries that meet the criteria of the
-- request.
listRobotApplicationsResponse_robotApplicationSummaries :: Lens.Lens' ListRobotApplicationsResponse (Prelude.Maybe [RobotApplicationSummary])
listRobotApplicationsResponse_robotApplicationSummaries :: Lens'
  ListRobotApplicationsResponse (Maybe [RobotApplicationSummary])
listRobotApplicationsResponse_robotApplicationSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplicationsResponse' {Maybe [RobotApplicationSummary]
robotApplicationSummaries :: Maybe [RobotApplicationSummary]
$sel:robotApplicationSummaries:ListRobotApplicationsResponse' :: ListRobotApplicationsResponse -> Maybe [RobotApplicationSummary]
robotApplicationSummaries} -> Maybe [RobotApplicationSummary]
robotApplicationSummaries) (\s :: ListRobotApplicationsResponse
s@ListRobotApplicationsResponse' {} Maybe [RobotApplicationSummary]
a -> ListRobotApplicationsResponse
s {$sel:robotApplicationSummaries:ListRobotApplicationsResponse' :: Maybe [RobotApplicationSummary]
robotApplicationSummaries = Maybe [RobotApplicationSummary]
a} :: ListRobotApplicationsResponse) 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.
listRobotApplicationsResponse_httpStatus :: Lens.Lens' ListRobotApplicationsResponse Prelude.Int
listRobotApplicationsResponse_httpStatus :: Lens' ListRobotApplicationsResponse Int
listRobotApplicationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRobotApplicationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRobotApplicationsResponse' :: ListRobotApplicationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRobotApplicationsResponse
s@ListRobotApplicationsResponse' {} Int
a -> ListRobotApplicationsResponse
s {$sel:httpStatus:ListRobotApplicationsResponse' :: Int
httpStatus = Int
a} :: ListRobotApplicationsResponse)

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