{-# 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.DeviceFarm.ListUploads
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about uploads, given an AWS Device Farm project ARN.
--
-- This operation returns paginated results.
module Amazonka.DeviceFarm.ListUploads
  ( -- * Creating a Request
    ListUploads (..),
    newListUploads,

    -- * Request Lenses
    listUploads_nextToken,
    listUploads_type,
    listUploads_arn,

    -- * Destructuring the Response
    ListUploadsResponse (..),
    newListUploadsResponse,

    -- * Response Lenses
    listUploadsResponse_nextToken,
    listUploadsResponse_uploads,
    listUploadsResponse_httpStatus,
  )
where

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

-- | Represents a request to the list uploads operation.
--
-- /See:/ 'newListUploads' smart constructor.
data ListUploads = ListUploads'
  { -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListUploads -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of upload.
    --
    -- Must be one of the following values:
    --
    -- -   ANDROID_APP
    --
    -- -   IOS_APP
    --
    -- -   WEB_APP
    --
    -- -   EXTERNAL_DATA
    --
    -- -   APPIUM_JAVA_JUNIT_TEST_PACKAGE
    --
    -- -   APPIUM_JAVA_TESTNG_TEST_PACKAGE
    --
    -- -   APPIUM_PYTHON_TEST_PACKAGE
    --
    -- -   APPIUM_NODE_TEST_PACKAGE
    --
    -- -   APPIUM_RUBY_TEST_PACKAGE
    --
    -- -   APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE
    --
    -- -   APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE
    --
    -- -   APPIUM_WEB_PYTHON_TEST_PACKAGE
    --
    -- -   APPIUM_WEB_NODE_TEST_PACKAGE
    --
    -- -   APPIUM_WEB_RUBY_TEST_PACKAGE
    --
    -- -   CALABASH_TEST_PACKAGE
    --
    -- -   INSTRUMENTATION_TEST_PACKAGE
    --
    -- -   UIAUTOMATION_TEST_PACKAGE
    --
    -- -   UIAUTOMATOR_TEST_PACKAGE
    --
    -- -   XCTEST_TEST_PACKAGE
    --
    -- -   XCTEST_UI_TEST_PACKAGE
    --
    -- -   APPIUM_JAVA_JUNIT_TEST_SPEC
    --
    -- -   APPIUM_JAVA_TESTNG_TEST_SPEC
    --
    -- -   APPIUM_PYTHON_TEST_SPEC
    --
    -- -   APPIUM_NODE_TEST_SPEC
    --
    -- -   APPIUM_RUBY_TEST_SPEC
    --
    -- -   APPIUM_WEB_JAVA_JUNIT_TEST_SPEC
    --
    -- -   APPIUM_WEB_JAVA_TESTNG_TEST_SPEC
    --
    -- -   APPIUM_WEB_PYTHON_TEST_SPEC
    --
    -- -   APPIUM_WEB_NODE_TEST_SPEC
    --
    -- -   APPIUM_WEB_RUBY_TEST_SPEC
    --
    -- -   INSTRUMENTATION_TEST_SPEC
    --
    -- -   XCTEST_UI_TEST_SPEC
    ListUploads -> Maybe UploadType
type' :: Prelude.Maybe UploadType,
    -- | The Amazon Resource Name (ARN) of the project for which you want to list
    -- uploads.
    ListUploads -> Text
arn :: Prelude.Text
  }
  deriving (ListUploads -> ListUploads -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUploads -> ListUploads -> Bool
$c/= :: ListUploads -> ListUploads -> Bool
== :: ListUploads -> ListUploads -> Bool
$c== :: ListUploads -> ListUploads -> Bool
Prelude.Eq, ReadPrec [ListUploads]
ReadPrec ListUploads
Int -> ReadS ListUploads
ReadS [ListUploads]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUploads]
$creadListPrec :: ReadPrec [ListUploads]
readPrec :: ReadPrec ListUploads
$creadPrec :: ReadPrec ListUploads
readList :: ReadS [ListUploads]
$creadList :: ReadS [ListUploads]
readsPrec :: Int -> ReadS ListUploads
$creadsPrec :: Int -> ReadS ListUploads
Prelude.Read, Int -> ListUploads -> ShowS
[ListUploads] -> ShowS
ListUploads -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUploads] -> ShowS
$cshowList :: [ListUploads] -> ShowS
show :: ListUploads -> String
$cshow :: ListUploads -> String
showsPrec :: Int -> ListUploads -> ShowS
$cshowsPrec :: Int -> ListUploads -> ShowS
Prelude.Show, forall x. Rep ListUploads x -> ListUploads
forall x. ListUploads -> Rep ListUploads x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUploads x -> ListUploads
$cfrom :: forall x. ListUploads -> Rep ListUploads x
Prelude.Generic)

-- |
-- Create a value of 'ListUploads' 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', 'listUploads_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'type'', 'listUploads_type' - The type of upload.
--
-- Must be one of the following values:
--
-- -   ANDROID_APP
--
-- -   IOS_APP
--
-- -   WEB_APP
--
-- -   EXTERNAL_DATA
--
-- -   APPIUM_JAVA_JUNIT_TEST_PACKAGE
--
-- -   APPIUM_JAVA_TESTNG_TEST_PACKAGE
--
-- -   APPIUM_PYTHON_TEST_PACKAGE
--
-- -   APPIUM_NODE_TEST_PACKAGE
--
-- -   APPIUM_RUBY_TEST_PACKAGE
--
-- -   APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE
--
-- -   APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE
--
-- -   APPIUM_WEB_PYTHON_TEST_PACKAGE
--
-- -   APPIUM_WEB_NODE_TEST_PACKAGE
--
-- -   APPIUM_WEB_RUBY_TEST_PACKAGE
--
-- -   CALABASH_TEST_PACKAGE
--
-- -   INSTRUMENTATION_TEST_PACKAGE
--
-- -   UIAUTOMATION_TEST_PACKAGE
--
-- -   UIAUTOMATOR_TEST_PACKAGE
--
-- -   XCTEST_TEST_PACKAGE
--
-- -   XCTEST_UI_TEST_PACKAGE
--
-- -   APPIUM_JAVA_JUNIT_TEST_SPEC
--
-- -   APPIUM_JAVA_TESTNG_TEST_SPEC
--
-- -   APPIUM_PYTHON_TEST_SPEC
--
-- -   APPIUM_NODE_TEST_SPEC
--
-- -   APPIUM_RUBY_TEST_SPEC
--
-- -   APPIUM_WEB_JAVA_JUNIT_TEST_SPEC
--
-- -   APPIUM_WEB_JAVA_TESTNG_TEST_SPEC
--
-- -   APPIUM_WEB_PYTHON_TEST_SPEC
--
-- -   APPIUM_WEB_NODE_TEST_SPEC
--
-- -   APPIUM_WEB_RUBY_TEST_SPEC
--
-- -   INSTRUMENTATION_TEST_SPEC
--
-- -   XCTEST_UI_TEST_SPEC
--
-- 'arn', 'listUploads_arn' - The Amazon Resource Name (ARN) of the project for which you want to list
-- uploads.
newListUploads ::
  -- | 'arn'
  Prelude.Text ->
  ListUploads
newListUploads :: Text -> ListUploads
newListUploads Text
pArn_ =
  ListUploads'
    { $sel:nextToken:ListUploads' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:type':ListUploads' :: Maybe UploadType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ListUploads' :: Text
arn = Text
pArn_
    }

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listUploads_nextToken :: Lens.Lens' ListUploads (Prelude.Maybe Prelude.Text)
listUploads_nextToken :: Lens' ListUploads (Maybe Text)
listUploads_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploads' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUploads' :: ListUploads -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUploads
s@ListUploads' {} Maybe Text
a -> ListUploads
s {$sel:nextToken:ListUploads' :: Maybe Text
nextToken = Maybe Text
a} :: ListUploads)

-- | The type of upload.
--
-- Must be one of the following values:
--
-- -   ANDROID_APP
--
-- -   IOS_APP
--
-- -   WEB_APP
--
-- -   EXTERNAL_DATA
--
-- -   APPIUM_JAVA_JUNIT_TEST_PACKAGE
--
-- -   APPIUM_JAVA_TESTNG_TEST_PACKAGE
--
-- -   APPIUM_PYTHON_TEST_PACKAGE
--
-- -   APPIUM_NODE_TEST_PACKAGE
--
-- -   APPIUM_RUBY_TEST_PACKAGE
--
-- -   APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE
--
-- -   APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE
--
-- -   APPIUM_WEB_PYTHON_TEST_PACKAGE
--
-- -   APPIUM_WEB_NODE_TEST_PACKAGE
--
-- -   APPIUM_WEB_RUBY_TEST_PACKAGE
--
-- -   CALABASH_TEST_PACKAGE
--
-- -   INSTRUMENTATION_TEST_PACKAGE
--
-- -   UIAUTOMATION_TEST_PACKAGE
--
-- -   UIAUTOMATOR_TEST_PACKAGE
--
-- -   XCTEST_TEST_PACKAGE
--
-- -   XCTEST_UI_TEST_PACKAGE
--
-- -   APPIUM_JAVA_JUNIT_TEST_SPEC
--
-- -   APPIUM_JAVA_TESTNG_TEST_SPEC
--
-- -   APPIUM_PYTHON_TEST_SPEC
--
-- -   APPIUM_NODE_TEST_SPEC
--
-- -   APPIUM_RUBY_TEST_SPEC
--
-- -   APPIUM_WEB_JAVA_JUNIT_TEST_SPEC
--
-- -   APPIUM_WEB_JAVA_TESTNG_TEST_SPEC
--
-- -   APPIUM_WEB_PYTHON_TEST_SPEC
--
-- -   APPIUM_WEB_NODE_TEST_SPEC
--
-- -   APPIUM_WEB_RUBY_TEST_SPEC
--
-- -   INSTRUMENTATION_TEST_SPEC
--
-- -   XCTEST_UI_TEST_SPEC
listUploads_type :: Lens.Lens' ListUploads (Prelude.Maybe UploadType)
listUploads_type :: Lens' ListUploads (Maybe UploadType)
listUploads_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploads' {Maybe UploadType
type' :: Maybe UploadType
$sel:type':ListUploads' :: ListUploads -> Maybe UploadType
type'} -> Maybe UploadType
type') (\s :: ListUploads
s@ListUploads' {} Maybe UploadType
a -> ListUploads
s {$sel:type':ListUploads' :: Maybe UploadType
type' = Maybe UploadType
a} :: ListUploads)

-- | The Amazon Resource Name (ARN) of the project for which you want to list
-- uploads.
listUploads_arn :: Lens.Lens' ListUploads Prelude.Text
listUploads_arn :: Lens' ListUploads Text
listUploads_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploads' {Text
arn :: Text
$sel:arn:ListUploads' :: ListUploads -> Text
arn} -> Text
arn) (\s :: ListUploads
s@ListUploads' {} Text
a -> ListUploads
s {$sel:arn:ListUploads' :: Text
arn = Text
a} :: ListUploads)

instance Core.AWSPager ListUploads where
  page :: ListUploads -> AWSResponse ListUploads -> Maybe ListUploads
page ListUploads
rq AWSResponse ListUploads
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListUploads
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUploadsResponse (Maybe Text)
listUploadsResponse_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 ListUploads
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUploadsResponse (Maybe [Upload])
listUploadsResponse_uploads
            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.$ ListUploads
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListUploads (Maybe Text)
listUploads_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListUploads
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUploadsResponse (Maybe Text)
listUploadsResponse_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 ListUploads where
  type AWSResponse ListUploads = ListUploadsResponse
  request :: (Service -> Service) -> ListUploads -> Request ListUploads
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 ListUploads
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUploads)))
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 [Upload] -> Int -> ListUploadsResponse
ListUploadsResponse'
            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
"uploads" 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 ListUploads where
  hashWithSalt :: Int -> ListUploads -> Int
hashWithSalt Int
_salt ListUploads' {Maybe Text
Maybe UploadType
Text
arn :: Text
type' :: Maybe UploadType
nextToken :: Maybe Text
$sel:arn:ListUploads' :: ListUploads -> Text
$sel:type':ListUploads' :: ListUploads -> Maybe UploadType
$sel:nextToken:ListUploads' :: ListUploads -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UploadType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn

instance Prelude.NFData ListUploads where
  rnf :: ListUploads -> ()
rnf ListUploads' {Maybe Text
Maybe UploadType
Text
arn :: Text
type' :: Maybe UploadType
nextToken :: Maybe Text
$sel:arn:ListUploads' :: ListUploads -> Text
$sel:type':ListUploads' :: ListUploads -> Maybe UploadType
$sel:nextToken:ListUploads' :: ListUploads -> 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 UploadType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn

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

instance Data.ToJSON ListUploads where
  toJSON :: ListUploads -> Value
toJSON ListUploads' {Maybe Text
Maybe UploadType
Text
arn :: Text
type' :: Maybe UploadType
nextToken :: Maybe Text
$sel:arn:ListUploads' :: ListUploads -> Text
$sel:type':ListUploads' :: ListUploads -> Maybe UploadType
$sel:nextToken:ListUploads' :: ListUploads -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"type" 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 UploadType
type',
            forall a. a -> Maybe a
Prelude.Just (Key
"arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)
          ]
      )

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

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

-- | Represents the result of a list uploads request.
--
-- /See:/ 'newListUploadsResponse' smart constructor.
data ListUploadsResponse = ListUploadsResponse'
  { -- | If the number of items that are returned is significantly large, this is
    -- an identifier that is also returned. It can be used in a subsequent call
    -- to this operation to return the next set of items in the list.
    ListUploadsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the uploads.
    ListUploadsResponse -> Maybe [Upload]
uploads :: Prelude.Maybe [Upload],
    -- | The response's http status code.
    ListUploadsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListUploadsResponse -> ListUploadsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUploadsResponse -> ListUploadsResponse -> Bool
$c/= :: ListUploadsResponse -> ListUploadsResponse -> Bool
== :: ListUploadsResponse -> ListUploadsResponse -> Bool
$c== :: ListUploadsResponse -> ListUploadsResponse -> Bool
Prelude.Eq, Int -> ListUploadsResponse -> ShowS
[ListUploadsResponse] -> ShowS
ListUploadsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUploadsResponse] -> ShowS
$cshowList :: [ListUploadsResponse] -> ShowS
show :: ListUploadsResponse -> String
$cshow :: ListUploadsResponse -> String
showsPrec :: Int -> ListUploadsResponse -> ShowS
$cshowsPrec :: Int -> ListUploadsResponse -> ShowS
Prelude.Show, forall x. Rep ListUploadsResponse x -> ListUploadsResponse
forall x. ListUploadsResponse -> Rep ListUploadsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUploadsResponse x -> ListUploadsResponse
$cfrom :: forall x. ListUploadsResponse -> Rep ListUploadsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListUploadsResponse' 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', 'listUploadsResponse_nextToken' - If the number of items that are returned is significantly large, this is
-- an identifier that is also returned. It can be used in a subsequent call
-- to this operation to return the next set of items in the list.
--
-- 'uploads', 'listUploadsResponse_uploads' - Information about the uploads.
--
-- 'httpStatus', 'listUploadsResponse_httpStatus' - The response's http status code.
newListUploadsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListUploadsResponse
newListUploadsResponse :: Int -> ListUploadsResponse
newListUploadsResponse Int
pHttpStatus_ =
  ListUploadsResponse'
    { $sel:nextToken:ListUploadsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:uploads:ListUploadsResponse' :: Maybe [Upload]
uploads = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListUploadsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the number of items that are returned is significantly large, this is
-- an identifier that is also returned. It can be used in a subsequent call
-- to this operation to return the next set of items in the list.
listUploadsResponse_nextToken :: Lens.Lens' ListUploadsResponse (Prelude.Maybe Prelude.Text)
listUploadsResponse_nextToken :: Lens' ListUploadsResponse (Maybe Text)
listUploadsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploadsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUploadsResponse' :: ListUploadsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUploadsResponse
s@ListUploadsResponse' {} Maybe Text
a -> ListUploadsResponse
s {$sel:nextToken:ListUploadsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListUploadsResponse)

-- | Information about the uploads.
listUploadsResponse_uploads :: Lens.Lens' ListUploadsResponse (Prelude.Maybe [Upload])
listUploadsResponse_uploads :: Lens' ListUploadsResponse (Maybe [Upload])
listUploadsResponse_uploads = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploadsResponse' {Maybe [Upload]
uploads :: Maybe [Upload]
$sel:uploads:ListUploadsResponse' :: ListUploadsResponse -> Maybe [Upload]
uploads} -> Maybe [Upload]
uploads) (\s :: ListUploadsResponse
s@ListUploadsResponse' {} Maybe [Upload]
a -> ListUploadsResponse
s {$sel:uploads:ListUploadsResponse' :: Maybe [Upload]
uploads = Maybe [Upload]
a} :: ListUploadsResponse) 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.
listUploadsResponse_httpStatus :: Lens.Lens' ListUploadsResponse Prelude.Int
listUploadsResponse_httpStatus :: Lens' ListUploadsResponse Int
listUploadsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUploadsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListUploadsResponse' :: ListUploadsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListUploadsResponse
s@ListUploadsResponse' {} Int
a -> ListUploadsResponse
s {$sel:httpStatus:ListUploadsResponse' :: Int
httpStatus = Int
a} :: ListUploadsResponse)

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