{-# 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.CloudDirectory.ListTypedLinkFacetAttributes
-- 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 paginated list of all attribute definitions for a particular
-- TypedLinkFacet. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
--
-- This operation returns paginated results.
module Amazonka.CloudDirectory.ListTypedLinkFacetAttributes
  ( -- * Creating a Request
    ListTypedLinkFacetAttributes (..),
    newListTypedLinkFacetAttributes,

    -- * Request Lenses
    listTypedLinkFacetAttributes_maxResults,
    listTypedLinkFacetAttributes_nextToken,
    listTypedLinkFacetAttributes_schemaArn,
    listTypedLinkFacetAttributes_name,

    -- * Destructuring the Response
    ListTypedLinkFacetAttributesResponse (..),
    newListTypedLinkFacetAttributesResponse,

    -- * Response Lenses
    listTypedLinkFacetAttributesResponse_attributes,
    listTypedLinkFacetAttributesResponse_nextToken,
    listTypedLinkFacetAttributesResponse_httpStatus,
  )
where

import Amazonka.CloudDirectory.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:/ 'newListTypedLinkFacetAttributes' smart constructor.
data ListTypedLinkFacetAttributes = ListTypedLinkFacetAttributes'
  { -- | The maximum number of results to retrieve.
    ListTypedLinkFacetAttributes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The pagination token.
    ListTypedLinkFacetAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) that is associated with the schema. For
    -- more information, see arns.
    ListTypedLinkFacetAttributes -> Text
schemaArn :: Prelude.Text,
    -- | The unique name of the typed link facet.
    ListTypedLinkFacetAttributes -> Text
name :: Prelude.Text
  }
  deriving (ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
$c/= :: ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
== :: ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
$c== :: ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
Prelude.Eq, ReadPrec [ListTypedLinkFacetAttributes]
ReadPrec ListTypedLinkFacetAttributes
Int -> ReadS ListTypedLinkFacetAttributes
ReadS [ListTypedLinkFacetAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTypedLinkFacetAttributes]
$creadListPrec :: ReadPrec [ListTypedLinkFacetAttributes]
readPrec :: ReadPrec ListTypedLinkFacetAttributes
$creadPrec :: ReadPrec ListTypedLinkFacetAttributes
readList :: ReadS [ListTypedLinkFacetAttributes]
$creadList :: ReadS [ListTypedLinkFacetAttributes]
readsPrec :: Int -> ReadS ListTypedLinkFacetAttributes
$creadsPrec :: Int -> ReadS ListTypedLinkFacetAttributes
Prelude.Read, Int -> ListTypedLinkFacetAttributes -> ShowS
[ListTypedLinkFacetAttributes] -> ShowS
ListTypedLinkFacetAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTypedLinkFacetAttributes] -> ShowS
$cshowList :: [ListTypedLinkFacetAttributes] -> ShowS
show :: ListTypedLinkFacetAttributes -> String
$cshow :: ListTypedLinkFacetAttributes -> String
showsPrec :: Int -> ListTypedLinkFacetAttributes -> ShowS
$cshowsPrec :: Int -> ListTypedLinkFacetAttributes -> ShowS
Prelude.Show, forall x.
Rep ListTypedLinkFacetAttributes x -> ListTypedLinkFacetAttributes
forall x.
ListTypedLinkFacetAttributes -> Rep ListTypedLinkFacetAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTypedLinkFacetAttributes x -> ListTypedLinkFacetAttributes
$cfrom :: forall x.
ListTypedLinkFacetAttributes -> Rep ListTypedLinkFacetAttributes x
Prelude.Generic)

-- |
-- Create a value of 'ListTypedLinkFacetAttributes' 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', 'listTypedLinkFacetAttributes_maxResults' - The maximum number of results to retrieve.
--
-- 'nextToken', 'listTypedLinkFacetAttributes_nextToken' - The pagination token.
--
-- 'schemaArn', 'listTypedLinkFacetAttributes_schemaArn' - The Amazon Resource Name (ARN) that is associated with the schema. For
-- more information, see arns.
--
-- 'name', 'listTypedLinkFacetAttributes_name' - The unique name of the typed link facet.
newListTypedLinkFacetAttributes ::
  -- | 'schemaArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  ListTypedLinkFacetAttributes
newListTypedLinkFacetAttributes :: Text -> Text -> ListTypedLinkFacetAttributes
newListTypedLinkFacetAttributes Text
pSchemaArn_ Text
pName_ =
  ListTypedLinkFacetAttributes'
    { $sel:maxResults:ListTypedLinkFacetAttributes' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTypedLinkFacetAttributes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:ListTypedLinkFacetAttributes' :: Text
schemaArn = Text
pSchemaArn_,
      $sel:name:ListTypedLinkFacetAttributes' :: Text
name = Text
pName_
    }

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

-- | The pagination token.
listTypedLinkFacetAttributes_nextToken :: Lens.Lens' ListTypedLinkFacetAttributes (Prelude.Maybe Prelude.Text)
listTypedLinkFacetAttributes_nextToken :: Lens' ListTypedLinkFacetAttributes (Maybe Text)
listTypedLinkFacetAttributes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypedLinkFacetAttributes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTypedLinkFacetAttributes
s@ListTypedLinkFacetAttributes' {} Maybe Text
a -> ListTypedLinkFacetAttributes
s {$sel:nextToken:ListTypedLinkFacetAttributes' :: Maybe Text
nextToken = Maybe Text
a} :: ListTypedLinkFacetAttributes)

-- | The Amazon Resource Name (ARN) that is associated with the schema. For
-- more information, see arns.
listTypedLinkFacetAttributes_schemaArn :: Lens.Lens' ListTypedLinkFacetAttributes Prelude.Text
listTypedLinkFacetAttributes_schemaArn :: Lens' ListTypedLinkFacetAttributes Text
listTypedLinkFacetAttributes_schemaArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypedLinkFacetAttributes' {Text
schemaArn :: Text
$sel:schemaArn:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
schemaArn} -> Text
schemaArn) (\s :: ListTypedLinkFacetAttributes
s@ListTypedLinkFacetAttributes' {} Text
a -> ListTypedLinkFacetAttributes
s {$sel:schemaArn:ListTypedLinkFacetAttributes' :: Text
schemaArn = Text
a} :: ListTypedLinkFacetAttributes)

-- | The unique name of the typed link facet.
listTypedLinkFacetAttributes_name :: Lens.Lens' ListTypedLinkFacetAttributes Prelude.Text
listTypedLinkFacetAttributes_name :: Lens' ListTypedLinkFacetAttributes Text
listTypedLinkFacetAttributes_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypedLinkFacetAttributes' {Text
name :: Text
$sel:name:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
name} -> Text
name) (\s :: ListTypedLinkFacetAttributes
s@ListTypedLinkFacetAttributes' {} Text
a -> ListTypedLinkFacetAttributes
s {$sel:name:ListTypedLinkFacetAttributes' :: Text
name = Text
a} :: ListTypedLinkFacetAttributes)

instance Core.AWSPager ListTypedLinkFacetAttributes where
  page :: ListTypedLinkFacetAttributes
-> AWSResponse ListTypedLinkFacetAttributes
-> Maybe ListTypedLinkFacetAttributes
page ListTypedLinkFacetAttributes
rq AWSResponse ListTypedLinkFacetAttributes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListTypedLinkFacetAttributes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
listTypedLinkFacetAttributesResponse_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 ListTypedLinkFacetAttributes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListTypedLinkFacetAttributesResponse
  (Maybe [TypedLinkAttributeDefinition])
listTypedLinkFacetAttributesResponse_attributes
            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.$ ListTypedLinkFacetAttributes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListTypedLinkFacetAttributes (Maybe Text)
listTypedLinkFacetAttributes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTypedLinkFacetAttributes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
listTypedLinkFacetAttributesResponse_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 ListTypedLinkFacetAttributes where
  type
    AWSResponse ListTypedLinkFacetAttributes =
      ListTypedLinkFacetAttributesResponse
  request :: (Service -> Service)
-> ListTypedLinkFacetAttributes
-> Request ListTypedLinkFacetAttributes
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 ListTypedLinkFacetAttributes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTypedLinkFacetAttributes)))
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 [TypedLinkAttributeDefinition]
-> Maybe Text -> Int -> ListTypedLinkFacetAttributesResponse
ListTypedLinkFacetAttributesResponse'
            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
"Attributes" 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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListTypedLinkFacetAttributes
  where
  hashWithSalt :: Int -> ListTypedLinkFacetAttributes -> Int
hashWithSalt Int
_salt ListTypedLinkFacetAttributes' {Maybe Natural
Maybe Text
Text
name :: Text
schemaArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:schemaArn:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:nextToken:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Text
$sel:maxResults:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> 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
schemaArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

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

instance Data.ToHeaders ListTypedLinkFacetAttributes where
  toHeaders :: ListTypedLinkFacetAttributes -> ResponseHeaders
toHeaders ListTypedLinkFacetAttributes' {Maybe Natural
Maybe Text
Text
name :: Text
schemaArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:schemaArn:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:nextToken:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Text
$sel:maxResults:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [HeaderName
"x-amz-data-partition" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Text
schemaArn]

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

instance Data.ToPath ListTypedLinkFacetAttributes where
  toPath :: ListTypedLinkFacetAttributes -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/amazonclouddirectory/2017-01-11/typedlink/facet/attributes"

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

-- | /See:/ 'newListTypedLinkFacetAttributesResponse' smart constructor.
data ListTypedLinkFacetAttributesResponse = ListTypedLinkFacetAttributesResponse'
  { -- | An ordered set of attributes associate with the typed link.
    ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition]
attributes :: Prelude.Maybe [TypedLinkAttributeDefinition],
    -- | The pagination token.
    ListTypedLinkFacetAttributesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTypedLinkFacetAttributesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
$c/= :: ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
== :: ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
$c== :: ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
Prelude.Eq, ReadPrec [ListTypedLinkFacetAttributesResponse]
ReadPrec ListTypedLinkFacetAttributesResponse
Int -> ReadS ListTypedLinkFacetAttributesResponse
ReadS [ListTypedLinkFacetAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTypedLinkFacetAttributesResponse]
$creadListPrec :: ReadPrec [ListTypedLinkFacetAttributesResponse]
readPrec :: ReadPrec ListTypedLinkFacetAttributesResponse
$creadPrec :: ReadPrec ListTypedLinkFacetAttributesResponse
readList :: ReadS [ListTypedLinkFacetAttributesResponse]
$creadList :: ReadS [ListTypedLinkFacetAttributesResponse]
readsPrec :: Int -> ReadS ListTypedLinkFacetAttributesResponse
$creadsPrec :: Int -> ReadS ListTypedLinkFacetAttributesResponse
Prelude.Read, Int -> ListTypedLinkFacetAttributesResponse -> ShowS
[ListTypedLinkFacetAttributesResponse] -> ShowS
ListTypedLinkFacetAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTypedLinkFacetAttributesResponse] -> ShowS
$cshowList :: [ListTypedLinkFacetAttributesResponse] -> ShowS
show :: ListTypedLinkFacetAttributesResponse -> String
$cshow :: ListTypedLinkFacetAttributesResponse -> String
showsPrec :: Int -> ListTypedLinkFacetAttributesResponse -> ShowS
$cshowsPrec :: Int -> ListTypedLinkFacetAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep ListTypedLinkFacetAttributesResponse x
-> ListTypedLinkFacetAttributesResponse
forall x.
ListTypedLinkFacetAttributesResponse
-> Rep ListTypedLinkFacetAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTypedLinkFacetAttributesResponse x
-> ListTypedLinkFacetAttributesResponse
$cfrom :: forall x.
ListTypedLinkFacetAttributesResponse
-> Rep ListTypedLinkFacetAttributesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTypedLinkFacetAttributesResponse' 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:
--
-- 'attributes', 'listTypedLinkFacetAttributesResponse_attributes' - An ordered set of attributes associate with the typed link.
--
-- 'nextToken', 'listTypedLinkFacetAttributesResponse_nextToken' - The pagination token.
--
-- 'httpStatus', 'listTypedLinkFacetAttributesResponse_httpStatus' - The response's http status code.
newListTypedLinkFacetAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTypedLinkFacetAttributesResponse
newListTypedLinkFacetAttributesResponse :: Int -> ListTypedLinkFacetAttributesResponse
newListTypedLinkFacetAttributesResponse Int
pHttpStatus_ =
  ListTypedLinkFacetAttributesResponse'
    { $sel:attributes:ListTypedLinkFacetAttributesResponse' :: Maybe [TypedLinkAttributeDefinition]
attributes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTypedLinkFacetAttributesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTypedLinkFacetAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An ordered set of attributes associate with the typed link.
listTypedLinkFacetAttributesResponse_attributes :: Lens.Lens' ListTypedLinkFacetAttributesResponse (Prelude.Maybe [TypedLinkAttributeDefinition])
listTypedLinkFacetAttributesResponse_attributes :: Lens'
  ListTypedLinkFacetAttributesResponse
  (Maybe [TypedLinkAttributeDefinition])
listTypedLinkFacetAttributesResponse_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypedLinkFacetAttributesResponse' {Maybe [TypedLinkAttributeDefinition]
attributes :: Maybe [TypedLinkAttributeDefinition]
$sel:attributes:ListTypedLinkFacetAttributesResponse' :: ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition]
attributes} -> Maybe [TypedLinkAttributeDefinition]
attributes) (\s :: ListTypedLinkFacetAttributesResponse
s@ListTypedLinkFacetAttributesResponse' {} Maybe [TypedLinkAttributeDefinition]
a -> ListTypedLinkFacetAttributesResponse
s {$sel:attributes:ListTypedLinkFacetAttributesResponse' :: Maybe [TypedLinkAttributeDefinition]
attributes = Maybe [TypedLinkAttributeDefinition]
a} :: ListTypedLinkFacetAttributesResponse) 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 pagination token.
listTypedLinkFacetAttributesResponse_nextToken :: Lens.Lens' ListTypedLinkFacetAttributesResponse (Prelude.Maybe Prelude.Text)
listTypedLinkFacetAttributesResponse_nextToken :: Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
listTypedLinkFacetAttributesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTypedLinkFacetAttributesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTypedLinkFacetAttributesResponse' :: ListTypedLinkFacetAttributesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTypedLinkFacetAttributesResponse
s@ListTypedLinkFacetAttributesResponse' {} Maybe Text
a -> ListTypedLinkFacetAttributesResponse
s {$sel:nextToken:ListTypedLinkFacetAttributesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTypedLinkFacetAttributesResponse)

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

instance
  Prelude.NFData
    ListTypedLinkFacetAttributesResponse
  where
  rnf :: ListTypedLinkFacetAttributesResponse -> ()
rnf ListTypedLinkFacetAttributesResponse' {Int
Maybe [TypedLinkAttributeDefinition]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
attributes :: Maybe [TypedLinkAttributeDefinition]
$sel:httpStatus:ListTypedLinkFacetAttributesResponse' :: ListTypedLinkFacetAttributesResponse -> Int
$sel:nextToken:ListTypedLinkFacetAttributesResponse' :: ListTypedLinkFacetAttributesResponse -> Maybe Text
$sel:attributes:ListTypedLinkFacetAttributesResponse' :: ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [TypedLinkAttributeDefinition]
attributes
      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 Int
httpStatus