module Network.AWS.CloudDirectory.ListOutgoingTypedLinks
(
listOutgoingTypedLinks
, ListOutgoingTypedLinks
, lotlFilterAttributeRanges
, lotlConsistencyLevel
, lotlNextToken
, lotlFilterTypedLink
, lotlMaxResults
, lotlDirectoryARN
, lotlObjectReference
, listOutgoingTypedLinksResponse
, ListOutgoingTypedLinksResponse
, lotlrsTypedLinkSpecifiers
, lotlrsNextToken
, lotlrsResponseStatus
) where
import Network.AWS.CloudDirectory.Types
import Network.AWS.CloudDirectory.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ListOutgoingTypedLinks = ListOutgoingTypedLinks'
{ _lotlFilterAttributeRanges :: !(Maybe [TypedLinkAttributeRange])
, _lotlConsistencyLevel :: !(Maybe ConsistencyLevel)
, _lotlNextToken :: !(Maybe Text)
, _lotlFilterTypedLink :: !(Maybe TypedLinkSchemaAndFacetName)
, _lotlMaxResults :: !(Maybe Nat)
, _lotlDirectoryARN :: !Text
, _lotlObjectReference :: !ObjectReference
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listOutgoingTypedLinks
:: Text
-> ObjectReference
-> ListOutgoingTypedLinks
listOutgoingTypedLinks pDirectoryARN_ pObjectReference_ =
ListOutgoingTypedLinks'
{ _lotlFilterAttributeRanges = Nothing
, _lotlConsistencyLevel = Nothing
, _lotlNextToken = Nothing
, _lotlFilterTypedLink = Nothing
, _lotlMaxResults = Nothing
, _lotlDirectoryARN = pDirectoryARN_
, _lotlObjectReference = pObjectReference_
}
lotlFilterAttributeRanges :: Lens' ListOutgoingTypedLinks [TypedLinkAttributeRange]
lotlFilterAttributeRanges = lens _lotlFilterAttributeRanges (\ s a -> s{_lotlFilterAttributeRanges = a}) . _Default . _Coerce;
lotlConsistencyLevel :: Lens' ListOutgoingTypedLinks (Maybe ConsistencyLevel)
lotlConsistencyLevel = lens _lotlConsistencyLevel (\ s a -> s{_lotlConsistencyLevel = a});
lotlNextToken :: Lens' ListOutgoingTypedLinks (Maybe Text)
lotlNextToken = lens _lotlNextToken (\ s a -> s{_lotlNextToken = a});
lotlFilterTypedLink :: Lens' ListOutgoingTypedLinks (Maybe TypedLinkSchemaAndFacetName)
lotlFilterTypedLink = lens _lotlFilterTypedLink (\ s a -> s{_lotlFilterTypedLink = a});
lotlMaxResults :: Lens' ListOutgoingTypedLinks (Maybe Natural)
lotlMaxResults = lens _lotlMaxResults (\ s a -> s{_lotlMaxResults = a}) . mapping _Nat;
lotlDirectoryARN :: Lens' ListOutgoingTypedLinks Text
lotlDirectoryARN = lens _lotlDirectoryARN (\ s a -> s{_lotlDirectoryARN = a});
lotlObjectReference :: Lens' ListOutgoingTypedLinks ObjectReference
lotlObjectReference = lens _lotlObjectReference (\ s a -> s{_lotlObjectReference = a});
instance AWSRequest ListOutgoingTypedLinks where
type Rs ListOutgoingTypedLinks =
ListOutgoingTypedLinksResponse
request = postJSON cloudDirectory
response
= receiveJSON
(\ s h x ->
ListOutgoingTypedLinksResponse' <$>
(x .?> "TypedLinkSpecifiers" .!@ mempty) <*>
(x .?> "NextToken")
<*> (pure (fromEnum s)))
instance Hashable ListOutgoingTypedLinks where
instance NFData ListOutgoingTypedLinks where
instance ToHeaders ListOutgoingTypedLinks where
toHeaders ListOutgoingTypedLinks'{..}
= mconcat
["x-amz-data-partition" =# _lotlDirectoryARN]
instance ToJSON ListOutgoingTypedLinks where
toJSON ListOutgoingTypedLinks'{..}
= object
(catMaybes
[("FilterAttributeRanges" .=) <$>
_lotlFilterAttributeRanges,
("ConsistencyLevel" .=) <$> _lotlConsistencyLevel,
("NextToken" .=) <$> _lotlNextToken,
("FilterTypedLink" .=) <$> _lotlFilterTypedLink,
("MaxResults" .=) <$> _lotlMaxResults,
Just ("ObjectReference" .= _lotlObjectReference)])
instance ToPath ListOutgoingTypedLinks where
toPath
= const
"/amazonclouddirectory/2017-01-11/typedlink/outgoing"
instance ToQuery ListOutgoingTypedLinks where
toQuery = const mempty
data ListOutgoingTypedLinksResponse = ListOutgoingTypedLinksResponse'
{ _lotlrsTypedLinkSpecifiers :: !(Maybe [TypedLinkSpecifier])
, _lotlrsNextToken :: !(Maybe Text)
, _lotlrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listOutgoingTypedLinksResponse
:: Int
-> ListOutgoingTypedLinksResponse
listOutgoingTypedLinksResponse pResponseStatus_ =
ListOutgoingTypedLinksResponse'
{ _lotlrsTypedLinkSpecifiers = Nothing
, _lotlrsNextToken = Nothing
, _lotlrsResponseStatus = pResponseStatus_
}
lotlrsTypedLinkSpecifiers :: Lens' ListOutgoingTypedLinksResponse [TypedLinkSpecifier]
lotlrsTypedLinkSpecifiers = lens _lotlrsTypedLinkSpecifiers (\ s a -> s{_lotlrsTypedLinkSpecifiers = a}) . _Default . _Coerce;
lotlrsNextToken :: Lens' ListOutgoingTypedLinksResponse (Maybe Text)
lotlrsNextToken = lens _lotlrsNextToken (\ s a -> s{_lotlrsNextToken = a});
lotlrsResponseStatus :: Lens' ListOutgoingTypedLinksResponse Int
lotlrsResponseStatus = lens _lotlrsResponseStatus (\ s a -> s{_lotlrsResponseStatus = a});
instance NFData ListOutgoingTypedLinksResponse where