{-# 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 #-}
module Amazonka.CloudDirectory.ListTypedLinkFacetAttributes
(
ListTypedLinkFacetAttributes (..),
newListTypedLinkFacetAttributes,
listTypedLinkFacetAttributes_nextToken,
listTypedLinkFacetAttributes_maxResults,
listTypedLinkFacetAttributes_schemaArn,
listTypedLinkFacetAttributes_name,
ListTypedLinkFacetAttributesResponse (..),
newListTypedLinkFacetAttributesResponse,
listTypedLinkFacetAttributesResponse_nextToken,
listTypedLinkFacetAttributesResponse_attributes,
listTypedLinkFacetAttributesResponse_httpStatus,
)
where
import Amazonka.CloudDirectory.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
data ListTypedLinkFacetAttributes = ListTypedLinkFacetAttributes'
{
ListTypedLinkFacetAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTypedLinkFacetAttributes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTypedLinkFacetAttributes -> Text
schemaArn :: Prelude.Text,
ListTypedLinkFacetAttributes -> Text
name :: Prelude.Text
}
deriving (ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool
(ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool)
-> (ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes -> Bool)
-> Eq ListTypedLinkFacetAttributes
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]
(Int -> ReadS ListTypedLinkFacetAttributes)
-> ReadS [ListTypedLinkFacetAttributes]
-> ReadPrec ListTypedLinkFacetAttributes
-> ReadPrec [ListTypedLinkFacetAttributes]
-> Read 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
(Int -> ListTypedLinkFacetAttributes -> ShowS)
-> (ListTypedLinkFacetAttributes -> String)
-> ([ListTypedLinkFacetAttributes] -> ShowS)
-> Show ListTypedLinkFacetAttributes
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.
ListTypedLinkFacetAttributes -> Rep ListTypedLinkFacetAttributes x)
-> (forall x.
Rep ListTypedLinkFacetAttributes x -> ListTypedLinkFacetAttributes)
-> Generic ListTypedLinkFacetAttributes
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)
newListTypedLinkFacetAttributes ::
Prelude.Text ->
Prelude.Text ->
ListTypedLinkFacetAttributes
newListTypedLinkFacetAttributes :: Text -> Text -> ListTypedLinkFacetAttributes
newListTypedLinkFacetAttributes Text
pSchemaArn_ Text
pName_ =
ListTypedLinkFacetAttributes' :: Maybe Text
-> Maybe Natural -> Text -> Text -> ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributes'
{ $sel:nextToken:ListTypedLinkFacetAttributes' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTypedLinkFacetAttributes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:schemaArn:ListTypedLinkFacetAttributes' :: Text
schemaArn = Text
pSchemaArn_,
$sel:name:ListTypedLinkFacetAttributes' :: Text
name = Text
pName_
}
listTypedLinkFacetAttributes_nextToken :: Lens.Lens' ListTypedLinkFacetAttributes (Prelude.Maybe Prelude.Text)
listTypedLinkFacetAttributes_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTypedLinkFacetAttributes -> f ListTypedLinkFacetAttributes
listTypedLinkFacetAttributes_nextToken = (ListTypedLinkFacetAttributes -> Maybe Text)
-> (ListTypedLinkFacetAttributes
-> Maybe Text -> ListTypedLinkFacetAttributes)
-> Lens
ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributes
(Maybe Text)
(Maybe Text)
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)
listTypedLinkFacetAttributes_maxResults :: Lens.Lens' ListTypedLinkFacetAttributes (Prelude.Maybe Prelude.Natural)
listTypedLinkFacetAttributes_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTypedLinkFacetAttributes -> f ListTypedLinkFacetAttributes
listTypedLinkFacetAttributes_maxResults = (ListTypedLinkFacetAttributes -> Maybe Natural)
-> (ListTypedLinkFacetAttributes
-> Maybe Natural -> ListTypedLinkFacetAttributes)
-> Lens
ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributes
(Maybe Natural)
(Maybe Natural)
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)
listTypedLinkFacetAttributes_schemaArn :: Lens.Lens' ListTypedLinkFacetAttributes Prelude.Text
listTypedLinkFacetAttributes_schemaArn :: (Text -> f Text)
-> ListTypedLinkFacetAttributes -> f ListTypedLinkFacetAttributes
listTypedLinkFacetAttributes_schemaArn = (ListTypedLinkFacetAttributes -> Text)
-> (ListTypedLinkFacetAttributes
-> Text -> ListTypedLinkFacetAttributes)
-> Lens
ListTypedLinkFacetAttributes ListTypedLinkFacetAttributes Text Text
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)
listTypedLinkFacetAttributes_name :: Lens.Lens' ListTypedLinkFacetAttributes Prelude.Text
listTypedLinkFacetAttributes_name :: (Text -> f Text)
-> ListTypedLinkFacetAttributes -> f ListTypedLinkFacetAttributes
listTypedLinkFacetAttributes_name = (ListTypedLinkFacetAttributes -> Text)
-> (ListTypedLinkFacetAttributes
-> Text -> ListTypedLinkFacetAttributes)
-> Lens
ListTypedLinkFacetAttributes ListTypedLinkFacetAttributes Text Text
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
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributesResponse
rs
ListTypedLinkFacetAttributesResponse
-> Getting (First Text) ListTypedLinkFacetAttributesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTypedLinkFacetAttributesResponse
-> Const (First Text) ListTypedLinkFacetAttributesResponse
Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
listTypedLinkFacetAttributesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTypedLinkFacetAttributesResponse
-> Const (First Text) ListTypedLinkFacetAttributesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTypedLinkFacetAttributesResponse 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 ListTypedLinkFacetAttributes
forall a. Maybe a
Prelude.Nothing
| Maybe [TypedLinkAttributeDefinition] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributesResponse
rs
ListTypedLinkFacetAttributesResponse
-> Getting
(First [TypedLinkAttributeDefinition])
ListTypedLinkFacetAttributesResponse
[TypedLinkAttributeDefinition]
-> Maybe [TypedLinkAttributeDefinition]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition]))
-> ListTypedLinkFacetAttributesResponse
-> Const
(First [TypedLinkAttributeDefinition])
ListTypedLinkFacetAttributesResponse
Lens'
ListTypedLinkFacetAttributesResponse
(Maybe [TypedLinkAttributeDefinition])
listTypedLinkFacetAttributesResponse_attributes
((Maybe [TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition]))
-> ListTypedLinkFacetAttributesResponse
-> Const
(First [TypedLinkAttributeDefinition])
ListTypedLinkFacetAttributesResponse)
-> (([TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
[TypedLinkAttributeDefinition])
-> Maybe [TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition]))
-> Getting
(First [TypedLinkAttributeDefinition])
ListTypedLinkFacetAttributesResponse
[TypedLinkAttributeDefinition]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
[TypedLinkAttributeDefinition])
-> Maybe [TypedLinkAttributeDefinition]
-> Const
(First [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListTypedLinkFacetAttributes
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTypedLinkFacetAttributes -> Maybe ListTypedLinkFacetAttributes
forall a. a -> Maybe a
Prelude.Just (ListTypedLinkFacetAttributes
-> Maybe ListTypedLinkFacetAttributes)
-> ListTypedLinkFacetAttributes
-> Maybe ListTypedLinkFacetAttributes
forall a b. (a -> b) -> a -> b
Prelude.$
ListTypedLinkFacetAttributes
rq
ListTypedLinkFacetAttributes
-> (ListTypedLinkFacetAttributes -> ListTypedLinkFacetAttributes)
-> ListTypedLinkFacetAttributes
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTypedLinkFacetAttributes
-> Identity ListTypedLinkFacetAttributes
Lens
ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributes
(Maybe Text)
(Maybe Text)
listTypedLinkFacetAttributes_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTypedLinkFacetAttributes
-> Identity ListTypedLinkFacetAttributes)
-> Maybe Text
-> ListTypedLinkFacetAttributes
-> ListTypedLinkFacetAttributes
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTypedLinkFacetAttributes
ListTypedLinkFacetAttributesResponse
rs
ListTypedLinkFacetAttributesResponse
-> Getting (First Text) ListTypedLinkFacetAttributesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTypedLinkFacetAttributesResponse
-> Const (First Text) ListTypedLinkFacetAttributesResponse
Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
listTypedLinkFacetAttributesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTypedLinkFacetAttributesResponse
-> Const (First Text) ListTypedLinkFacetAttributesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTypedLinkFacetAttributesResponse 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 ListTypedLinkFacetAttributes where
type
AWSResponse ListTypedLinkFacetAttributes =
ListTypedLinkFacetAttributesResponse
request :: ListTypedLinkFacetAttributes
-> Request ListTypedLinkFacetAttributes
request = Service
-> ListTypedLinkFacetAttributes
-> Request ListTypedLinkFacetAttributes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTypedLinkFacetAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTypedLinkFacetAttributes)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTypedLinkFacetAttributes))
-> Logger
-> Service
-> Proxy ListTypedLinkFacetAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTypedLinkFacetAttributes)))
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 [TypedLinkAttributeDefinition]
-> Int
-> ListTypedLinkFacetAttributesResponse
ListTypedLinkFacetAttributesResponse'
(Maybe Text
-> Maybe [TypedLinkAttributeDefinition]
-> Int
-> ListTypedLinkFacetAttributesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [TypedLinkAttributeDefinition]
-> Int -> ListTypedLinkFacetAttributesResponse)
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 [TypedLinkAttributeDefinition]
-> Int -> ListTypedLinkFacetAttributesResponse)
-> Either String (Maybe [TypedLinkAttributeDefinition])
-> Either String (Int -> ListTypedLinkFacetAttributesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [TypedLinkAttributeDefinition]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Attributes" Either String (Maybe (Maybe [TypedLinkAttributeDefinition]))
-> Maybe [TypedLinkAttributeDefinition]
-> Either String (Maybe [TypedLinkAttributeDefinition])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TypedLinkAttributeDefinition]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListTypedLinkFacetAttributesResponse)
-> Either String Int
-> Either String ListTypedLinkFacetAttributesResponse
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
ListTypedLinkFacetAttributes
instance Prelude.NFData ListTypedLinkFacetAttributes
instance Core.ToHeaders ListTypedLinkFacetAttributes where
toHeaders :: ListTypedLinkFacetAttributes -> ResponseHeaders
toHeaders ListTypedLinkFacetAttributes' {Maybe Natural
Maybe Text
Text
name :: Text
schemaArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:name:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:schemaArn:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:maxResults:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Natural
$sel:nextToken:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-data-partition" HeaderName -> Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Text
schemaArn]
instance Core.ToJSON ListTypedLinkFacetAttributes where
toJSON :: ListTypedLinkFacetAttributes -> Value
toJSON ListTypedLinkFacetAttributes' {Maybe Natural
Maybe Text
Text
name :: Text
schemaArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:name:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:schemaArn:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Text
$sel:maxResults:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Natural
$sel:nextToken:ListTypedLinkFacetAttributes' :: ListTypedLinkFacetAttributes -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath ListTypedLinkFacetAttributes where
toPath :: ListTypedLinkFacetAttributes -> ByteString
toPath =
ByteString -> ListTypedLinkFacetAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/amazonclouddirectory/2017-01-11/typedlink/facet/attributes"
instance Core.ToQuery ListTypedLinkFacetAttributes where
toQuery :: ListTypedLinkFacetAttributes -> QueryString
toQuery = QueryString -> ListTypedLinkFacetAttributes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTypedLinkFacetAttributesResponse = ListTypedLinkFacetAttributesResponse'
{
ListTypedLinkFacetAttributesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition]
attributes :: Prelude.Maybe [TypedLinkAttributeDefinition],
ListTypedLinkFacetAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool
(ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool)
-> (ListTypedLinkFacetAttributesResponse
-> ListTypedLinkFacetAttributesResponse -> Bool)
-> Eq ListTypedLinkFacetAttributesResponse
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]
(Int -> ReadS ListTypedLinkFacetAttributesResponse)
-> ReadS [ListTypedLinkFacetAttributesResponse]
-> ReadPrec ListTypedLinkFacetAttributesResponse
-> ReadPrec [ListTypedLinkFacetAttributesResponse]
-> Read 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
(Int -> ListTypedLinkFacetAttributesResponse -> ShowS)
-> (ListTypedLinkFacetAttributesResponse -> String)
-> ([ListTypedLinkFacetAttributesResponse] -> ShowS)
-> Show ListTypedLinkFacetAttributesResponse
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.
ListTypedLinkFacetAttributesResponse
-> Rep ListTypedLinkFacetAttributesResponse x)
-> (forall x.
Rep ListTypedLinkFacetAttributesResponse x
-> ListTypedLinkFacetAttributesResponse)
-> Generic ListTypedLinkFacetAttributesResponse
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)
newListTypedLinkFacetAttributesResponse ::
Prelude.Int ->
ListTypedLinkFacetAttributesResponse
newListTypedLinkFacetAttributesResponse :: Int -> ListTypedLinkFacetAttributesResponse
newListTypedLinkFacetAttributesResponse Int
pHttpStatus_ =
ListTypedLinkFacetAttributesResponse' :: Maybe Text
-> Maybe [TypedLinkAttributeDefinition]
-> Int
-> ListTypedLinkFacetAttributesResponse
ListTypedLinkFacetAttributesResponse'
{ $sel:nextToken:ListTypedLinkFacetAttributesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:ListTypedLinkFacetAttributesResponse' :: Maybe [TypedLinkAttributeDefinition]
attributes = Maybe [TypedLinkAttributeDefinition]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTypedLinkFacetAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listTypedLinkFacetAttributesResponse_nextToken :: Lens.Lens' ListTypedLinkFacetAttributesResponse (Prelude.Maybe Prelude.Text)
listTypedLinkFacetAttributesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTypedLinkFacetAttributesResponse
-> f ListTypedLinkFacetAttributesResponse
listTypedLinkFacetAttributesResponse_nextToken = (ListTypedLinkFacetAttributesResponse -> Maybe Text)
-> (ListTypedLinkFacetAttributesResponse
-> Maybe Text -> ListTypedLinkFacetAttributesResponse)
-> Lens' ListTypedLinkFacetAttributesResponse (Maybe Text)
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)
listTypedLinkFacetAttributesResponse_attributes :: Lens.Lens' ListTypedLinkFacetAttributesResponse (Prelude.Maybe [TypedLinkAttributeDefinition])
listTypedLinkFacetAttributesResponse_attributes :: (Maybe [TypedLinkAttributeDefinition]
-> f (Maybe [TypedLinkAttributeDefinition]))
-> ListTypedLinkFacetAttributesResponse
-> f ListTypedLinkFacetAttributesResponse
listTypedLinkFacetAttributesResponse_attributes = (ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition])
-> (ListTypedLinkFacetAttributesResponse
-> Maybe [TypedLinkAttributeDefinition]
-> ListTypedLinkFacetAttributesResponse)
-> Lens'
ListTypedLinkFacetAttributesResponse
(Maybe [TypedLinkAttributeDefinition])
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) ((Maybe [TypedLinkAttributeDefinition]
-> f (Maybe [TypedLinkAttributeDefinition]))
-> ListTypedLinkFacetAttributesResponse
-> f ListTypedLinkFacetAttributesResponse)
-> ((Maybe [TypedLinkAttributeDefinition]
-> f (Maybe [TypedLinkAttributeDefinition]))
-> Maybe [TypedLinkAttributeDefinition]
-> f (Maybe [TypedLinkAttributeDefinition]))
-> (Maybe [TypedLinkAttributeDefinition]
-> f (Maybe [TypedLinkAttributeDefinition]))
-> ListTypedLinkFacetAttributesResponse
-> f ListTypedLinkFacetAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
-> Iso
(Maybe [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition])
(Maybe [TypedLinkAttributeDefinition])
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
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
[TypedLinkAttributeDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTypedLinkFacetAttributesResponse_httpStatus :: Lens.Lens' ListTypedLinkFacetAttributesResponse Prelude.Int
listTypedLinkFacetAttributesResponse_httpStatus :: (Int -> f Int)
-> ListTypedLinkFacetAttributesResponse
-> f ListTypedLinkFacetAttributesResponse
listTypedLinkFacetAttributesResponse_httpStatus = (ListTypedLinkFacetAttributesResponse -> Int)
-> (ListTypedLinkFacetAttributesResponse
-> Int -> ListTypedLinkFacetAttributesResponse)
-> Lens
ListTypedLinkFacetAttributesResponse
ListTypedLinkFacetAttributesResponse
Int
Int
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