{-# 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.ListInstanceAttributes
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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 all attribute types for the given instance.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListInstanceAttributes
  ( -- * Creating a Request
    ListInstanceAttributes (..),
    newListInstanceAttributes,

    -- * Request Lenses
    listInstanceAttributes_nextToken,
    listInstanceAttributes_maxResults,
    listInstanceAttributes_instanceId,

    -- * Destructuring the Response
    ListInstanceAttributesResponse (..),
    newListInstanceAttributesResponse,

    -- * Response Lenses
    listInstanceAttributesResponse_nextToken,
    listInstanceAttributesResponse_attributes,
    listInstanceAttributesResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListInstanceAttributes' smart constructor.
data ListInstanceAttributes = ListInstanceAttributes'
  { -- | 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.
    ListInstanceAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListInstanceAttributes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListInstanceAttributes -> Text
instanceId :: Prelude.Text
  }
  deriving (ListInstanceAttributes -> ListInstanceAttributes -> Bool
(ListInstanceAttributes -> ListInstanceAttributes -> Bool)
-> (ListInstanceAttributes -> ListInstanceAttributes -> Bool)
-> Eq ListInstanceAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceAttributes -> ListInstanceAttributes -> Bool
$c/= :: ListInstanceAttributes -> ListInstanceAttributes -> Bool
== :: ListInstanceAttributes -> ListInstanceAttributes -> Bool
$c== :: ListInstanceAttributes -> ListInstanceAttributes -> Bool
Prelude.Eq, ReadPrec [ListInstanceAttributes]
ReadPrec ListInstanceAttributes
Int -> ReadS ListInstanceAttributes
ReadS [ListInstanceAttributes]
(Int -> ReadS ListInstanceAttributes)
-> ReadS [ListInstanceAttributes]
-> ReadPrec ListInstanceAttributes
-> ReadPrec [ListInstanceAttributes]
-> Read ListInstanceAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceAttributes]
$creadListPrec :: ReadPrec [ListInstanceAttributes]
readPrec :: ReadPrec ListInstanceAttributes
$creadPrec :: ReadPrec ListInstanceAttributes
readList :: ReadS [ListInstanceAttributes]
$creadList :: ReadS [ListInstanceAttributes]
readsPrec :: Int -> ReadS ListInstanceAttributes
$creadsPrec :: Int -> ReadS ListInstanceAttributes
Prelude.Read, Int -> ListInstanceAttributes -> ShowS
[ListInstanceAttributes] -> ShowS
ListInstanceAttributes -> String
(Int -> ListInstanceAttributes -> ShowS)
-> (ListInstanceAttributes -> String)
-> ([ListInstanceAttributes] -> ShowS)
-> Show ListInstanceAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceAttributes] -> ShowS
$cshowList :: [ListInstanceAttributes] -> ShowS
show :: ListInstanceAttributes -> String
$cshow :: ListInstanceAttributes -> String
showsPrec :: Int -> ListInstanceAttributes -> ShowS
$cshowsPrec :: Int -> ListInstanceAttributes -> ShowS
Prelude.Show, (forall x. ListInstanceAttributes -> Rep ListInstanceAttributes x)
-> (forall x.
    Rep ListInstanceAttributes x -> ListInstanceAttributes)
-> Generic ListInstanceAttributes
forall x. Rep ListInstanceAttributes x -> ListInstanceAttributes
forall x. ListInstanceAttributes -> Rep ListInstanceAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListInstanceAttributes x -> ListInstanceAttributes
$cfrom :: forall x. ListInstanceAttributes -> Rep ListInstanceAttributes x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceAttributes' 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', 'listInstanceAttributes_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.
--
-- 'maxResults', 'listInstanceAttributes_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listInstanceAttributes_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListInstanceAttributes ::
  -- | 'instanceId'
  Prelude.Text ->
  ListInstanceAttributes
newListInstanceAttributes :: Text -> ListInstanceAttributes
newListInstanceAttributes Text
pInstanceId_ =
  ListInstanceAttributes' :: Maybe Text -> Maybe Natural -> Text -> ListInstanceAttributes
ListInstanceAttributes'
    { $sel:nextToken:ListInstanceAttributes' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListInstanceAttributes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListInstanceAttributes' :: Text
instanceId = Text
pInstanceId_
    }

-- | 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.
listInstanceAttributes_nextToken :: Lens.Lens' ListInstanceAttributes (Prelude.Maybe Prelude.Text)
listInstanceAttributes_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListInstanceAttributes -> f ListInstanceAttributes
listInstanceAttributes_nextToken = (ListInstanceAttributes -> Maybe Text)
-> (ListInstanceAttributes -> Maybe Text -> ListInstanceAttributes)
-> Lens
     ListInstanceAttributes
     ListInstanceAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceAttributes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInstanceAttributes' :: ListInstanceAttributes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInstanceAttributes
s@ListInstanceAttributes' {} Maybe Text
a -> ListInstanceAttributes
s {$sel:nextToken:ListInstanceAttributes' :: Maybe Text
nextToken = Maybe Text
a} :: ListInstanceAttributes)

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

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

instance Core.AWSPager ListInstanceAttributes where
  page :: ListInstanceAttributes
-> AWSResponse ListInstanceAttributes
-> Maybe ListInstanceAttributes
page ListInstanceAttributes
rq AWSResponse ListInstanceAttributes
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInstanceAttributes
ListInstanceAttributesResponse
rs
            ListInstanceAttributesResponse
-> Getting (First Text) ListInstanceAttributesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListInstanceAttributesResponse
-> Const (First Text) ListInstanceAttributesResponse
Lens' ListInstanceAttributesResponse (Maybe Text)
listInstanceAttributesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListInstanceAttributesResponse
 -> Const (First Text) ListInstanceAttributesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListInstanceAttributesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListInstanceAttributes
forall a. Maybe a
Prelude.Nothing
    | Maybe [Attribute] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInstanceAttributes
ListInstanceAttributesResponse
rs
            ListInstanceAttributesResponse
-> Getting
     (First [Attribute]) ListInstanceAttributesResponse [Attribute]
-> Maybe [Attribute]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Attribute]
 -> Const (First [Attribute]) (Maybe [Attribute]))
-> ListInstanceAttributesResponse
-> Const (First [Attribute]) ListInstanceAttributesResponse
Lens' ListInstanceAttributesResponse (Maybe [Attribute])
listInstanceAttributesResponse_attributes
              ((Maybe [Attribute]
  -> Const (First [Attribute]) (Maybe [Attribute]))
 -> ListInstanceAttributesResponse
 -> Const (First [Attribute]) ListInstanceAttributesResponse)
-> (([Attribute] -> Const (First [Attribute]) [Attribute])
    -> Maybe [Attribute]
    -> Const (First [Attribute]) (Maybe [Attribute]))
-> Getting
     (First [Attribute]) ListInstanceAttributesResponse [Attribute]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Attribute] -> Const (First [Attribute]) [Attribute])
-> Maybe [Attribute]
-> Const (First [Attribute]) (Maybe [Attribute])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListInstanceAttributes
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListInstanceAttributes -> Maybe ListInstanceAttributes
forall a. a -> Maybe a
Prelude.Just (ListInstanceAttributes -> Maybe ListInstanceAttributes)
-> ListInstanceAttributes -> Maybe ListInstanceAttributes
forall a b. (a -> b) -> a -> b
Prelude.$
        ListInstanceAttributes
rq
          ListInstanceAttributes
-> (ListInstanceAttributes -> ListInstanceAttributes)
-> ListInstanceAttributes
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListInstanceAttributes -> Identity ListInstanceAttributes
Lens
  ListInstanceAttributes
  ListInstanceAttributes
  (Maybe Text)
  (Maybe Text)
listInstanceAttributes_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListInstanceAttributes -> Identity ListInstanceAttributes)
-> Maybe Text -> ListInstanceAttributes -> ListInstanceAttributes
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListInstanceAttributes
ListInstanceAttributesResponse
rs
          ListInstanceAttributesResponse
-> Getting (First Text) ListInstanceAttributesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListInstanceAttributesResponse
-> Const (First Text) ListInstanceAttributesResponse
Lens' ListInstanceAttributesResponse (Maybe Text)
listInstanceAttributesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListInstanceAttributesResponse
 -> Const (First Text) ListInstanceAttributesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListInstanceAttributesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListInstanceAttributes where
  type
    AWSResponse ListInstanceAttributes =
      ListInstanceAttributesResponse
  request :: ListInstanceAttributes -> Request ListInstanceAttributes
request = Service -> ListInstanceAttributes -> Request ListInstanceAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListInstanceAttributes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceAttributes)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListInstanceAttributes))
-> Logger
-> Service
-> Proxy ListInstanceAttributes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceAttributes)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [Attribute] -> Int -> ListInstanceAttributesResponse
ListInstanceAttributesResponse'
            (Maybe Text
 -> Maybe [Attribute] -> Int -> ListInstanceAttributesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [Attribute] -> Int -> ListInstanceAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String (Maybe [Attribute] -> Int -> ListInstanceAttributesResponse)
-> Either String (Maybe [Attribute])
-> Either String (Int -> ListInstanceAttributesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Attribute]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Attributes" Either String (Maybe (Maybe [Attribute]))
-> Maybe [Attribute] -> Either String (Maybe [Attribute])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Attribute]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListInstanceAttributesResponse)
-> Either String Int
-> Either String ListInstanceAttributesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListInstanceAttributes

instance Prelude.NFData ListInstanceAttributes

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

instance Core.ToPath ListInstanceAttributes where
  toPath :: ListInstanceAttributes -> ByteString
toPath ListInstanceAttributes' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListInstanceAttributes' :: ListInstanceAttributes -> Text
$sel:maxResults:ListInstanceAttributes' :: ListInstanceAttributes -> Maybe Natural
$sel:nextToken:ListInstanceAttributes' :: ListInstanceAttributes -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/instance/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId, ByteString
"/attributes"]

instance Core.ToQuery ListInstanceAttributes where
  toQuery :: ListInstanceAttributes -> QueryString
toQuery ListInstanceAttributes' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListInstanceAttributes' :: ListInstanceAttributes -> Text
$sel:maxResults:ListInstanceAttributes' :: ListInstanceAttributes -> Maybe Natural
$sel:nextToken:ListInstanceAttributes' :: ListInstanceAttributes -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

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

-- |
-- Create a value of 'ListInstanceAttributesResponse' 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', 'listInstanceAttributesResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'attributes', 'listInstanceAttributesResponse_attributes' - The attribute types.
--
-- 'httpStatus', 'listInstanceAttributesResponse_httpStatus' - The response's http status code.
newListInstanceAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInstanceAttributesResponse
newListInstanceAttributesResponse :: Int -> ListInstanceAttributesResponse
newListInstanceAttributesResponse Int
pHttpStatus_ =
  ListInstanceAttributesResponse' :: Maybe Text
-> Maybe [Attribute] -> Int -> ListInstanceAttributesResponse
ListInstanceAttributesResponse'
    { $sel:nextToken:ListInstanceAttributesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:ListInstanceAttributesResponse' :: Maybe [Attribute]
attributes = Maybe [Attribute]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInstanceAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The attribute types.
listInstanceAttributesResponse_attributes :: Lens.Lens' ListInstanceAttributesResponse (Prelude.Maybe [Attribute])
listInstanceAttributesResponse_attributes :: (Maybe [Attribute] -> f (Maybe [Attribute]))
-> ListInstanceAttributesResponse
-> f ListInstanceAttributesResponse
listInstanceAttributesResponse_attributes = (ListInstanceAttributesResponse -> Maybe [Attribute])
-> (ListInstanceAttributesResponse
    -> Maybe [Attribute] -> ListInstanceAttributesResponse)
-> Lens' ListInstanceAttributesResponse (Maybe [Attribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceAttributesResponse' {Maybe [Attribute]
attributes :: Maybe [Attribute]
$sel:attributes:ListInstanceAttributesResponse' :: ListInstanceAttributesResponse -> Maybe [Attribute]
attributes} -> Maybe [Attribute]
attributes) (\s :: ListInstanceAttributesResponse
s@ListInstanceAttributesResponse' {} Maybe [Attribute]
a -> ListInstanceAttributesResponse
s {$sel:attributes:ListInstanceAttributesResponse' :: Maybe [Attribute]
attributes = Maybe [Attribute]
a} :: ListInstanceAttributesResponse) ((Maybe [Attribute] -> f (Maybe [Attribute]))
 -> ListInstanceAttributesResponse
 -> f ListInstanceAttributesResponse)
-> ((Maybe [Attribute] -> f (Maybe [Attribute]))
    -> Maybe [Attribute] -> f (Maybe [Attribute]))
-> (Maybe [Attribute] -> f (Maybe [Attribute]))
-> ListInstanceAttributesResponse
-> f ListInstanceAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Attribute] [Attribute] [Attribute] [Attribute]
-> Iso
     (Maybe [Attribute])
     (Maybe [Attribute])
     (Maybe [Attribute])
     (Maybe [Attribute])
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 AnIso [Attribute] [Attribute] [Attribute] [Attribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListInstanceAttributesResponse