module Network.AWS.SDB.DomainMetadata
(
domainMetadata
, DomainMetadata
, dmDomainName
, domainMetadataResponse
, DomainMetadataResponse
, dmrsItemNamesSizeBytes
, dmrsAttributeValuesSizeBytes
, dmrsAttributeNameCount
, dmrsAttributeNamesSizeBytes
, dmrsAttributeValueCount
, dmrsItemCount
, dmrsTimestamp
, dmrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SDB.Types
import Network.AWS.SDB.Types.Product
newtype DomainMetadata = DomainMetadata'
{ _dmDomainName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
domainMetadata
:: Text
-> DomainMetadata
domainMetadata pDomainName_ =
DomainMetadata'
{ _dmDomainName = pDomainName_
}
dmDomainName :: Lens' DomainMetadata Text
dmDomainName = lens _dmDomainName (\ s a -> s{_dmDomainName = a});
instance AWSRequest DomainMetadata where
type Rs DomainMetadata = DomainMetadataResponse
request = postQuery sDB
response
= receiveXMLWrapper "DomainMetadataResult"
(\ s h x ->
DomainMetadataResponse' <$>
(x .@? "ItemNamesSizeBytes") <*>
(x .@? "AttributeValuesSizeBytes")
<*> (x .@? "AttributeNameCount")
<*> (x .@? "AttributeNamesSizeBytes")
<*> (x .@? "AttributeValueCount")
<*> (x .@? "ItemCount")
<*> (x .@? "Timestamp")
<*> (pure (fromEnum s)))
instance ToHeaders DomainMetadata where
toHeaders = const mempty
instance ToPath DomainMetadata where
toPath = const "/"
instance ToQuery DomainMetadata where
toQuery DomainMetadata'{..}
= mconcat
["Action" =: ("DomainMetadata" :: ByteString),
"Version" =: ("2009-04-15" :: ByteString),
"DomainName" =: _dmDomainName]
data DomainMetadataResponse = DomainMetadataResponse'
{ _dmrsItemNamesSizeBytes :: !(Maybe Integer)
, _dmrsAttributeValuesSizeBytes :: !(Maybe Integer)
, _dmrsAttributeNameCount :: !(Maybe Int)
, _dmrsAttributeNamesSizeBytes :: !(Maybe Integer)
, _dmrsAttributeValueCount :: !(Maybe Int)
, _dmrsItemCount :: !(Maybe Int)
, _dmrsTimestamp :: !(Maybe Int)
, _dmrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
domainMetadataResponse
:: Int
-> DomainMetadataResponse
domainMetadataResponse pResponseStatus_ =
DomainMetadataResponse'
{ _dmrsItemNamesSizeBytes = Nothing
, _dmrsAttributeValuesSizeBytes = Nothing
, _dmrsAttributeNameCount = Nothing
, _dmrsAttributeNamesSizeBytes = Nothing
, _dmrsAttributeValueCount = Nothing
, _dmrsItemCount = Nothing
, _dmrsTimestamp = Nothing
, _dmrsResponseStatus = pResponseStatus_
}
dmrsItemNamesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)
dmrsItemNamesSizeBytes = lens _dmrsItemNamesSizeBytes (\ s a -> s{_dmrsItemNamesSizeBytes = a});
dmrsAttributeValuesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)
dmrsAttributeValuesSizeBytes = lens _dmrsAttributeValuesSizeBytes (\ s a -> s{_dmrsAttributeValuesSizeBytes = a});
dmrsAttributeNameCount :: Lens' DomainMetadataResponse (Maybe Int)
dmrsAttributeNameCount = lens _dmrsAttributeNameCount (\ s a -> s{_dmrsAttributeNameCount = a});
dmrsAttributeNamesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)
dmrsAttributeNamesSizeBytes = lens _dmrsAttributeNamesSizeBytes (\ s a -> s{_dmrsAttributeNamesSizeBytes = a});
dmrsAttributeValueCount :: Lens' DomainMetadataResponse (Maybe Int)
dmrsAttributeValueCount = lens _dmrsAttributeValueCount (\ s a -> s{_dmrsAttributeValueCount = a});
dmrsItemCount :: Lens' DomainMetadataResponse (Maybe Int)
dmrsItemCount = lens _dmrsItemCount (\ s a -> s{_dmrsItemCount = a});
dmrsTimestamp :: Lens' DomainMetadataResponse (Maybe Int)
dmrsTimestamp = lens _dmrsTimestamp (\ s a -> s{_dmrsTimestamp = a});
dmrsResponseStatus :: Lens' DomainMetadataResponse Int
dmrsResponseStatus = lens _dmrsResponseStatus (\ s a -> s{_dmrsResponseStatus = a});