{-# 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.Connect.ListInstanceStorageConfigs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This API is in preview release for Amazon Connect and is subject to
-- change.
--
-- Returns a paginated list of storage configs for the identified instance
-- and resource type.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListInstanceStorageConfigs
  ( -- * Creating a Request
    ListInstanceStorageConfigs (..),
    newListInstanceStorageConfigs,

    -- * Request Lenses
    listInstanceStorageConfigs_maxResults,
    listInstanceStorageConfigs_nextToken,
    listInstanceStorageConfigs_instanceId,
    listInstanceStorageConfigs_resourceType,

    -- * Destructuring the Response
    ListInstanceStorageConfigsResponse (..),
    newListInstanceStorageConfigsResponse,

    -- * Response Lenses
    listInstanceStorageConfigsResponse_nextToken,
    listInstanceStorageConfigsResponse_storageConfigs,
    listInstanceStorageConfigsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListInstanceStorageConfigs' smart constructor.
data ListInstanceStorageConfigs = ListInstanceStorageConfigs'
  { -- | The maximum number of results to return per page.
    ListInstanceStorageConfigs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListInstanceStorageConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListInstanceStorageConfigs -> Text
instanceId :: Prelude.Text,
    -- | A valid resource type.
    ListInstanceStorageConfigs -> InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
  }
  deriving (ListInstanceStorageConfigs -> ListInstanceStorageConfigs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceStorageConfigs -> ListInstanceStorageConfigs -> Bool
$c/= :: ListInstanceStorageConfigs -> ListInstanceStorageConfigs -> Bool
== :: ListInstanceStorageConfigs -> ListInstanceStorageConfigs -> Bool
$c== :: ListInstanceStorageConfigs -> ListInstanceStorageConfigs -> Bool
Prelude.Eq, ReadPrec [ListInstanceStorageConfigs]
ReadPrec ListInstanceStorageConfigs
Int -> ReadS ListInstanceStorageConfigs
ReadS [ListInstanceStorageConfigs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceStorageConfigs]
$creadListPrec :: ReadPrec [ListInstanceStorageConfigs]
readPrec :: ReadPrec ListInstanceStorageConfigs
$creadPrec :: ReadPrec ListInstanceStorageConfigs
readList :: ReadS [ListInstanceStorageConfigs]
$creadList :: ReadS [ListInstanceStorageConfigs]
readsPrec :: Int -> ReadS ListInstanceStorageConfigs
$creadsPrec :: Int -> ReadS ListInstanceStorageConfigs
Prelude.Read, Int -> ListInstanceStorageConfigs -> ShowS
[ListInstanceStorageConfigs] -> ShowS
ListInstanceStorageConfigs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceStorageConfigs] -> ShowS
$cshowList :: [ListInstanceStorageConfigs] -> ShowS
show :: ListInstanceStorageConfigs -> String
$cshow :: ListInstanceStorageConfigs -> String
showsPrec :: Int -> ListInstanceStorageConfigs -> ShowS
$cshowsPrec :: Int -> ListInstanceStorageConfigs -> ShowS
Prelude.Show, forall x.
Rep ListInstanceStorageConfigs x -> ListInstanceStorageConfigs
forall x.
ListInstanceStorageConfigs -> Rep ListInstanceStorageConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInstanceStorageConfigs x -> ListInstanceStorageConfigs
$cfrom :: forall x.
ListInstanceStorageConfigs -> Rep ListInstanceStorageConfigs x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceStorageConfigs' 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', 'listInstanceStorageConfigs_maxResults' - The maximum number of results to return per page.
--
-- 'nextToken', 'listInstanceStorageConfigs_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'instanceId', 'listInstanceStorageConfigs_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'resourceType', 'listInstanceStorageConfigs_resourceType' - A valid resource type.
newListInstanceStorageConfigs ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'resourceType'
  InstanceStorageResourceType ->
  ListInstanceStorageConfigs
newListInstanceStorageConfigs :: Text -> InstanceStorageResourceType -> ListInstanceStorageConfigs
newListInstanceStorageConfigs
  Text
pInstanceId_
  InstanceStorageResourceType
pResourceType_ =
    ListInstanceStorageConfigs'
      { $sel:maxResults:ListInstanceStorageConfigs' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListInstanceStorageConfigs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:ListInstanceStorageConfigs' :: Text
instanceId = Text
pInstanceId_,
        $sel:resourceType:ListInstanceStorageConfigs' :: InstanceStorageResourceType
resourceType = InstanceStorageResourceType
pResourceType_
      }

-- | The maximum number of results to return per page.
listInstanceStorageConfigs_maxResults :: Lens.Lens' ListInstanceStorageConfigs (Prelude.Maybe Prelude.Natural)
listInstanceStorageConfigs_maxResults :: Lens' ListInstanceStorageConfigs (Maybe Natural)
listInstanceStorageConfigs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListInstanceStorageConfigs
s@ListInstanceStorageConfigs' {} Maybe Natural
a -> ListInstanceStorageConfigs
s {$sel:maxResults:ListInstanceStorageConfigs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListInstanceStorageConfigs)

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listInstanceStorageConfigs_nextToken :: Lens.Lens' ListInstanceStorageConfigs (Prelude.Maybe Prelude.Text)
listInstanceStorageConfigs_nextToken :: Lens' ListInstanceStorageConfigs (Maybe Text)
listInstanceStorageConfigs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInstanceStorageConfigs
s@ListInstanceStorageConfigs' {} Maybe Text
a -> ListInstanceStorageConfigs
s {$sel:nextToken:ListInstanceStorageConfigs' :: Maybe Text
nextToken = Maybe Text
a} :: ListInstanceStorageConfigs)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
listInstanceStorageConfigs_instanceId :: Lens.Lens' ListInstanceStorageConfigs Prelude.Text
listInstanceStorageConfigs_instanceId :: Lens' ListInstanceStorageConfigs Text
listInstanceStorageConfigs_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigs' {Text
instanceId :: Text
$sel:instanceId:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Text
instanceId} -> Text
instanceId) (\s :: ListInstanceStorageConfigs
s@ListInstanceStorageConfigs' {} Text
a -> ListInstanceStorageConfigs
s {$sel:instanceId:ListInstanceStorageConfigs' :: Text
instanceId = Text
a} :: ListInstanceStorageConfigs)

-- | A valid resource type.
listInstanceStorageConfigs_resourceType :: Lens.Lens' ListInstanceStorageConfigs InstanceStorageResourceType
listInstanceStorageConfigs_resourceType :: Lens' ListInstanceStorageConfigs InstanceStorageResourceType
listInstanceStorageConfigs_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigs' {InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
$sel:resourceType:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> InstanceStorageResourceType
resourceType} -> InstanceStorageResourceType
resourceType) (\s :: ListInstanceStorageConfigs
s@ListInstanceStorageConfigs' {} InstanceStorageResourceType
a -> ListInstanceStorageConfigs
s {$sel:resourceType:ListInstanceStorageConfigs' :: InstanceStorageResourceType
resourceType = InstanceStorageResourceType
a} :: ListInstanceStorageConfigs)

instance Core.AWSPager ListInstanceStorageConfigs where
  page :: ListInstanceStorageConfigs
-> AWSResponse ListInstanceStorageConfigs
-> Maybe ListInstanceStorageConfigs
page ListInstanceStorageConfigs
rq AWSResponse ListInstanceStorageConfigs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInstanceStorageConfigs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListInstanceStorageConfigsResponse (Maybe Text)
listInstanceStorageConfigsResponse_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 ListInstanceStorageConfigs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListInstanceStorageConfigsResponse (Maybe [InstanceStorageConfig])
listInstanceStorageConfigsResponse_storageConfigs
            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.$ ListInstanceStorageConfigs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListInstanceStorageConfigs (Maybe Text)
listInstanceStorageConfigs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListInstanceStorageConfigs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListInstanceStorageConfigsResponse (Maybe Text)
listInstanceStorageConfigsResponse_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 ListInstanceStorageConfigs where
  type
    AWSResponse ListInstanceStorageConfigs =
      ListInstanceStorageConfigsResponse
  request :: (Service -> Service)
-> ListInstanceStorageConfigs -> Request ListInstanceStorageConfigs
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 ListInstanceStorageConfigs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceStorageConfigs)))
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 [InstanceStorageConfig]
-> Int
-> ListInstanceStorageConfigsResponse
ListInstanceStorageConfigsResponse'
            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
"StorageConfigs" 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 ListInstanceStorageConfigs where
  hashWithSalt :: Int -> ListInstanceStorageConfigs -> Int
hashWithSalt Int
_salt ListInstanceStorageConfigs' {Maybe Natural
Maybe Text
Text
InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
instanceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceType:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> InstanceStorageResourceType
$sel:instanceId:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Text
$sel:nextToken:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Text
$sel:maxResults:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> 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` Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InstanceStorageResourceType
resourceType

instance Prelude.NFData ListInstanceStorageConfigs where
  rnf :: ListInstanceStorageConfigs -> ()
rnf ListInstanceStorageConfigs' {Maybe Natural
Maybe Text
Text
InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
instanceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceType:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> InstanceStorageResourceType
$sel:instanceId:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Text
$sel:nextToken:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Text
$sel:maxResults:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> 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 Text
instanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InstanceStorageResourceType
resourceType

instance Data.ToHeaders ListInstanceStorageConfigs where
  toHeaders :: ListInstanceStorageConfigs -> 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 ListInstanceStorageConfigs where
  toPath :: ListInstanceStorageConfigs -> ByteString
toPath ListInstanceStorageConfigs' {Maybe Natural
Maybe Text
Text
InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
instanceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceType:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> InstanceStorageResourceType
$sel:instanceId:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Text
$sel:nextToken:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Text
$sel:maxResults:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/instance/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
instanceId,
        ByteString
"/storage-configs"
      ]

instance Data.ToQuery ListInstanceStorageConfigs where
  toQuery :: ListInstanceStorageConfigs -> QueryString
toQuery ListInstanceStorageConfigs' {Maybe Natural
Maybe Text
Text
InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
instanceId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceType:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> InstanceStorageResourceType
$sel:instanceId:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Text
$sel:nextToken:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> Maybe Text
$sel:maxResults:ListInstanceStorageConfigs' :: ListInstanceStorageConfigs -> 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
"resourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: InstanceStorageResourceType
resourceType
      ]

-- | /See:/ 'newListInstanceStorageConfigsResponse' smart constructor.
data ListInstanceStorageConfigsResponse = ListInstanceStorageConfigsResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    ListInstanceStorageConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A valid storage type.
    ListInstanceStorageConfigsResponse -> Maybe [InstanceStorageConfig]
storageConfigs :: Prelude.Maybe [InstanceStorageConfig],
    -- | The response's http status code.
    ListInstanceStorageConfigsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListInstanceStorageConfigsResponse
-> ListInstanceStorageConfigsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceStorageConfigsResponse
-> ListInstanceStorageConfigsResponse -> Bool
$c/= :: ListInstanceStorageConfigsResponse
-> ListInstanceStorageConfigsResponse -> Bool
== :: ListInstanceStorageConfigsResponse
-> ListInstanceStorageConfigsResponse -> Bool
$c== :: ListInstanceStorageConfigsResponse
-> ListInstanceStorageConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListInstanceStorageConfigsResponse]
ReadPrec ListInstanceStorageConfigsResponse
Int -> ReadS ListInstanceStorageConfigsResponse
ReadS [ListInstanceStorageConfigsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceStorageConfigsResponse]
$creadListPrec :: ReadPrec [ListInstanceStorageConfigsResponse]
readPrec :: ReadPrec ListInstanceStorageConfigsResponse
$creadPrec :: ReadPrec ListInstanceStorageConfigsResponse
readList :: ReadS [ListInstanceStorageConfigsResponse]
$creadList :: ReadS [ListInstanceStorageConfigsResponse]
readsPrec :: Int -> ReadS ListInstanceStorageConfigsResponse
$creadsPrec :: Int -> ReadS ListInstanceStorageConfigsResponse
Prelude.Read, Int -> ListInstanceStorageConfigsResponse -> ShowS
[ListInstanceStorageConfigsResponse] -> ShowS
ListInstanceStorageConfigsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceStorageConfigsResponse] -> ShowS
$cshowList :: [ListInstanceStorageConfigsResponse] -> ShowS
show :: ListInstanceStorageConfigsResponse -> String
$cshow :: ListInstanceStorageConfigsResponse -> String
showsPrec :: Int -> ListInstanceStorageConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListInstanceStorageConfigsResponse -> ShowS
Prelude.Show, forall x.
Rep ListInstanceStorageConfigsResponse x
-> ListInstanceStorageConfigsResponse
forall x.
ListInstanceStorageConfigsResponse
-> Rep ListInstanceStorageConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInstanceStorageConfigsResponse x
-> ListInstanceStorageConfigsResponse
$cfrom :: forall x.
ListInstanceStorageConfigsResponse
-> Rep ListInstanceStorageConfigsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceStorageConfigsResponse' 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', 'listInstanceStorageConfigsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'storageConfigs', 'listInstanceStorageConfigsResponse_storageConfigs' - A valid storage type.
--
-- 'httpStatus', 'listInstanceStorageConfigsResponse_httpStatus' - The response's http status code.
newListInstanceStorageConfigsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInstanceStorageConfigsResponse
newListInstanceStorageConfigsResponse :: Int -> ListInstanceStorageConfigsResponse
newListInstanceStorageConfigsResponse Int
pHttpStatus_ =
  ListInstanceStorageConfigsResponse'
    { $sel:nextToken:ListInstanceStorageConfigsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:storageConfigs:ListInstanceStorageConfigsResponse' :: Maybe [InstanceStorageConfig]
storageConfigs = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInstanceStorageConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If there are additional results, this is the token for the next set of
-- results.
listInstanceStorageConfigsResponse_nextToken :: Lens.Lens' ListInstanceStorageConfigsResponse (Prelude.Maybe Prelude.Text)
listInstanceStorageConfigsResponse_nextToken :: Lens' ListInstanceStorageConfigsResponse (Maybe Text)
listInstanceStorageConfigsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInstanceStorageConfigsResponse' :: ListInstanceStorageConfigsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInstanceStorageConfigsResponse
s@ListInstanceStorageConfigsResponse' {} Maybe Text
a -> ListInstanceStorageConfigsResponse
s {$sel:nextToken:ListInstanceStorageConfigsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListInstanceStorageConfigsResponse)

-- | A valid storage type.
listInstanceStorageConfigsResponse_storageConfigs :: Lens.Lens' ListInstanceStorageConfigsResponse (Prelude.Maybe [InstanceStorageConfig])
listInstanceStorageConfigsResponse_storageConfigs :: Lens'
  ListInstanceStorageConfigsResponse (Maybe [InstanceStorageConfig])
listInstanceStorageConfigsResponse_storageConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigsResponse' {Maybe [InstanceStorageConfig]
storageConfigs :: Maybe [InstanceStorageConfig]
$sel:storageConfigs:ListInstanceStorageConfigsResponse' :: ListInstanceStorageConfigsResponse -> Maybe [InstanceStorageConfig]
storageConfigs} -> Maybe [InstanceStorageConfig]
storageConfigs) (\s :: ListInstanceStorageConfigsResponse
s@ListInstanceStorageConfigsResponse' {} Maybe [InstanceStorageConfig]
a -> ListInstanceStorageConfigsResponse
s {$sel:storageConfigs:ListInstanceStorageConfigsResponse' :: Maybe [InstanceStorageConfig]
storageConfigs = Maybe [InstanceStorageConfig]
a} :: ListInstanceStorageConfigsResponse) 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.
listInstanceStorageConfigsResponse_httpStatus :: Lens.Lens' ListInstanceStorageConfigsResponse Prelude.Int
listInstanceStorageConfigsResponse_httpStatus :: Lens' ListInstanceStorageConfigsResponse Int
listInstanceStorageConfigsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceStorageConfigsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListInstanceStorageConfigsResponse' :: ListInstanceStorageConfigsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListInstanceStorageConfigsResponse
s@ListInstanceStorageConfigsResponse' {} Int
a -> ListInstanceStorageConfigsResponse
s {$sel:httpStatus:ListInstanceStorageConfigsResponse' :: Int
httpStatus = Int
a} :: ListInstanceStorageConfigsResponse)

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