module Network.AWS.Route53Domains.GetDomainDetail
(
getDomainDetail
, GetDomainDetail
, gddDomainName
, getDomainDetailResponse
, GetDomainDetailResponse
, gddrsTechPrivacy
, gddrsDNSSec
, gddrsWhoIsServer
, gddrsRegistryDomainId
, gddrsRegistrantPrivacy
, gddrsUpdatedDate
, gddrsAdminPrivacy
, gddrsAutoRenew
, gddrsAbuseContactPhone
, gddrsRegistrarURL
, gddrsAbuseContactEmail
, gddrsExpirationDate
, gddrsCreationDate
, gddrsRegistrarName
, gddrsReseller
, gddrsStatusList
, gddrsResponseStatus
, gddrsDomainName
, gddrsNameservers
, gddrsAdminContact
, gddrsRegistrantContact
, gddrsTechContact
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53Domains.Types
import Network.AWS.Route53Domains.Types.Product
newtype GetDomainDetail = GetDomainDetail'
{ _gddDomainName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getDomainDetail
:: Text
-> GetDomainDetail
getDomainDetail pDomainName_ =
GetDomainDetail'
{ _gddDomainName = pDomainName_
}
gddDomainName :: Lens' GetDomainDetail Text
gddDomainName = lens _gddDomainName (\ s a -> s{_gddDomainName = a});
instance AWSRequest GetDomainDetail where
type Rs GetDomainDetail = GetDomainDetailResponse
request = postJSON route53Domains
response
= receiveJSON
(\ s h x ->
GetDomainDetailResponse' <$>
(x .?> "TechPrivacy") <*> (x .?> "DnsSec") <*>
(x .?> "WhoIsServer")
<*> (x .?> "RegistryDomainId")
<*> (x .?> "RegistrantPrivacy")
<*> (x .?> "UpdatedDate")
<*> (x .?> "AdminPrivacy")
<*> (x .?> "AutoRenew")
<*> (x .?> "AbuseContactPhone")
<*> (x .?> "RegistrarUrl")
<*> (x .?> "AbuseContactEmail")
<*> (x .?> "ExpirationDate")
<*> (x .?> "CreationDate")
<*> (x .?> "RegistrarName")
<*> (x .?> "Reseller")
<*> (x .?> "StatusList" .!@ mempty)
<*> (pure (fromEnum s))
<*> (x .:> "DomainName")
<*> (x .?> "Nameservers" .!@ mempty)
<*> (x .:> "AdminContact")
<*> (x .:> "RegistrantContact")
<*> (x .:> "TechContact"))
instance ToHeaders GetDomainDetail where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53Domains_v20140515.GetDomainDetail" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetDomainDetail where
toJSON GetDomainDetail'{..}
= object
(catMaybes [Just ("DomainName" .= _gddDomainName)])
instance ToPath GetDomainDetail where
toPath = const "/"
instance ToQuery GetDomainDetail where
toQuery = const mempty
data GetDomainDetailResponse = GetDomainDetailResponse'
{ _gddrsTechPrivacy :: !(Maybe Bool)
, _gddrsDNSSec :: !(Maybe Text)
, _gddrsWhoIsServer :: !(Maybe Text)
, _gddrsRegistryDomainId :: !(Maybe Text)
, _gddrsRegistrantPrivacy :: !(Maybe Bool)
, _gddrsUpdatedDate :: !(Maybe POSIX)
, _gddrsAdminPrivacy :: !(Maybe Bool)
, _gddrsAutoRenew :: !(Maybe Bool)
, _gddrsAbuseContactPhone :: !(Maybe Text)
, _gddrsRegistrarURL :: !(Maybe Text)
, _gddrsAbuseContactEmail :: !(Maybe Text)
, _gddrsExpirationDate :: !(Maybe POSIX)
, _gddrsCreationDate :: !(Maybe POSIX)
, _gddrsRegistrarName :: !(Maybe Text)
, _gddrsReseller :: !(Maybe Text)
, _gddrsStatusList :: !(Maybe [Text])
, _gddrsResponseStatus :: !Int
, _gddrsDomainName :: !Text
, _gddrsNameservers :: ![Nameserver]
, _gddrsAdminContact :: !(Sensitive ContactDetail)
, _gddrsRegistrantContact :: !(Sensitive ContactDetail)
, _gddrsTechContact :: !(Sensitive ContactDetail)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getDomainDetailResponse
:: Int
-> Text
-> ContactDetail
-> ContactDetail
-> ContactDetail
-> GetDomainDetailResponse
getDomainDetailResponse pResponseStatus_ pDomainName_ pAdminContact_ pRegistrantContact_ pTechContact_ =
GetDomainDetailResponse'
{ _gddrsTechPrivacy = Nothing
, _gddrsDNSSec = Nothing
, _gddrsWhoIsServer = Nothing
, _gddrsRegistryDomainId = Nothing
, _gddrsRegistrantPrivacy = Nothing
, _gddrsUpdatedDate = Nothing
, _gddrsAdminPrivacy = Nothing
, _gddrsAutoRenew = Nothing
, _gddrsAbuseContactPhone = Nothing
, _gddrsRegistrarURL = Nothing
, _gddrsAbuseContactEmail = Nothing
, _gddrsExpirationDate = Nothing
, _gddrsCreationDate = Nothing
, _gddrsRegistrarName = Nothing
, _gddrsReseller = Nothing
, _gddrsStatusList = Nothing
, _gddrsResponseStatus = pResponseStatus_
, _gddrsDomainName = pDomainName_
, _gddrsNameservers = mempty
, _gddrsAdminContact = _Sensitive # pAdminContact_
, _gddrsRegistrantContact = _Sensitive # pRegistrantContact_
, _gddrsTechContact = _Sensitive # pTechContact_
}
gddrsTechPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrsTechPrivacy = lens _gddrsTechPrivacy (\ s a -> s{_gddrsTechPrivacy = a});
gddrsDNSSec :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsDNSSec = lens _gddrsDNSSec (\ s a -> s{_gddrsDNSSec = a});
gddrsWhoIsServer :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsWhoIsServer = lens _gddrsWhoIsServer (\ s a -> s{_gddrsWhoIsServer = a});
gddrsRegistryDomainId :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsRegistryDomainId = lens _gddrsRegistryDomainId (\ s a -> s{_gddrsRegistryDomainId = a});
gddrsRegistrantPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrsRegistrantPrivacy = lens _gddrsRegistrantPrivacy (\ s a -> s{_gddrsRegistrantPrivacy = a});
gddrsUpdatedDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrsUpdatedDate = lens _gddrsUpdatedDate (\ s a -> s{_gddrsUpdatedDate = a}) . mapping _Time;
gddrsAdminPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrsAdminPrivacy = lens _gddrsAdminPrivacy (\ s a -> s{_gddrsAdminPrivacy = a});
gddrsAutoRenew :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrsAutoRenew = lens _gddrsAutoRenew (\ s a -> s{_gddrsAutoRenew = a});
gddrsAbuseContactPhone :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsAbuseContactPhone = lens _gddrsAbuseContactPhone (\ s a -> s{_gddrsAbuseContactPhone = a});
gddrsRegistrarURL :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsRegistrarURL = lens _gddrsRegistrarURL (\ s a -> s{_gddrsRegistrarURL = a});
gddrsAbuseContactEmail :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsAbuseContactEmail = lens _gddrsAbuseContactEmail (\ s a -> s{_gddrsAbuseContactEmail = a});
gddrsExpirationDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrsExpirationDate = lens _gddrsExpirationDate (\ s a -> s{_gddrsExpirationDate = a}) . mapping _Time;
gddrsCreationDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrsCreationDate = lens _gddrsCreationDate (\ s a -> s{_gddrsCreationDate = a}) . mapping _Time;
gddrsRegistrarName :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsRegistrarName = lens _gddrsRegistrarName (\ s a -> s{_gddrsRegistrarName = a});
gddrsReseller :: Lens' GetDomainDetailResponse (Maybe Text)
gddrsReseller = lens _gddrsReseller (\ s a -> s{_gddrsReseller = a});
gddrsStatusList :: Lens' GetDomainDetailResponse [Text]
gddrsStatusList = lens _gddrsStatusList (\ s a -> s{_gddrsStatusList = a}) . _Default . _Coerce;
gddrsResponseStatus :: Lens' GetDomainDetailResponse Int
gddrsResponseStatus = lens _gddrsResponseStatus (\ s a -> s{_gddrsResponseStatus = a});
gddrsDomainName :: Lens' GetDomainDetailResponse Text
gddrsDomainName = lens _gddrsDomainName (\ s a -> s{_gddrsDomainName = a});
gddrsNameservers :: Lens' GetDomainDetailResponse [Nameserver]
gddrsNameservers = lens _gddrsNameservers (\ s a -> s{_gddrsNameservers = a}) . _Coerce;
gddrsAdminContact :: Lens' GetDomainDetailResponse ContactDetail
gddrsAdminContact = lens _gddrsAdminContact (\ s a -> s{_gddrsAdminContact = a}) . _Sensitive;
gddrsRegistrantContact :: Lens' GetDomainDetailResponse ContactDetail
gddrsRegistrantContact = lens _gddrsRegistrantContact (\ s a -> s{_gddrsRegistrantContact = a}) . _Sensitive;
gddrsTechContact :: Lens' GetDomainDetailResponse ContactDetail
gddrsTechContact = lens _gddrsTechContact (\ s a -> s{_gddrsTechContact = a}) . _Sensitive;