module Network.AWS.Route53Domains.GetDomainDetail
(
GetDomainDetail
, getDomainDetail
, gddDomainName
, GetDomainDetailResponse
, getDomainDetailResponse
, gddrAbuseContactEmail
, gddrAbuseContactPhone
, gddrAdminContact
, gddrAdminPrivacy
, gddrAutoRenew
, gddrCreationDate
, gddrDnsSec
, gddrDomainName
, gddrExpirationDate
, gddrNameservers
, gddrRegistrantContact
, gddrRegistrantPrivacy
, gddrRegistrarName
, gddrRegistrarUrl
, gddrRegistryDomainId
, gddrReseller
, gddrStatusList
, gddrTechContact
, gddrTechPrivacy
, gddrUpdatedDate
, gddrWhoIsServer
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.Route53Domains.Types
import qualified GHC.Exts
newtype GetDomainDetail = GetDomainDetail
{ _gddDomainName :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
getDomainDetail :: Text
-> GetDomainDetail
getDomainDetail p1 = GetDomainDetail
{ _gddDomainName = p1
}
gddDomainName :: Lens' GetDomainDetail Text
gddDomainName = lens _gddDomainName (\s a -> s { _gddDomainName = a })
data GetDomainDetailResponse = GetDomainDetailResponse
{ _gddrAbuseContactEmail :: Maybe Text
, _gddrAbuseContactPhone :: Maybe Text
, _gddrAdminContact :: ContactDetail
, _gddrAdminPrivacy :: Maybe Bool
, _gddrAutoRenew :: Maybe Bool
, _gddrCreationDate :: Maybe POSIX
, _gddrDnsSec :: Maybe Text
, _gddrDomainName :: Text
, _gddrExpirationDate :: Maybe POSIX
, _gddrNameservers :: List "Nameservers" Nameserver
, _gddrRegistrantContact :: ContactDetail
, _gddrRegistrantPrivacy :: Maybe Bool
, _gddrRegistrarName :: Maybe Text
, _gddrRegistrarUrl :: Maybe Text
, _gddrRegistryDomainId :: Maybe Text
, _gddrReseller :: Maybe Text
, _gddrStatusList :: List "StatusList" Text
, _gddrTechContact :: ContactDetail
, _gddrTechPrivacy :: Maybe Bool
, _gddrUpdatedDate :: Maybe POSIX
, _gddrWhoIsServer :: Maybe Text
} deriving (Eq, Show)
getDomainDetailResponse :: Text
-> ContactDetail
-> ContactDetail
-> ContactDetail
-> GetDomainDetailResponse
getDomainDetailResponse p1 p2 p3 p4 = GetDomainDetailResponse
{ _gddrDomainName = p1
, _gddrAdminContact = p2
, _gddrRegistrantContact = p3
, _gddrTechContact = p4
, _gddrNameservers = mempty
, _gddrAutoRenew = Nothing
, _gddrAdminPrivacy = Nothing
, _gddrRegistrantPrivacy = Nothing
, _gddrTechPrivacy = Nothing
, _gddrRegistrarName = Nothing
, _gddrWhoIsServer = Nothing
, _gddrRegistrarUrl = Nothing
, _gddrAbuseContactEmail = Nothing
, _gddrAbuseContactPhone = Nothing
, _gddrRegistryDomainId = Nothing
, _gddrCreationDate = Nothing
, _gddrUpdatedDate = Nothing
, _gddrExpirationDate = Nothing
, _gddrReseller = Nothing
, _gddrDnsSec = Nothing
, _gddrStatusList = mempty
}
gddrAbuseContactEmail :: Lens' GetDomainDetailResponse (Maybe Text)
gddrAbuseContactEmail =
lens _gddrAbuseContactEmail (\s a -> s { _gddrAbuseContactEmail = a })
gddrAbuseContactPhone :: Lens' GetDomainDetailResponse (Maybe Text)
gddrAbuseContactPhone =
lens _gddrAbuseContactPhone (\s a -> s { _gddrAbuseContactPhone = a })
gddrAdminContact :: Lens' GetDomainDetailResponse ContactDetail
gddrAdminContact = lens _gddrAdminContact (\s a -> s { _gddrAdminContact = a })
gddrAdminPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrAdminPrivacy = lens _gddrAdminPrivacy (\s a -> s { _gddrAdminPrivacy = a })
gddrAutoRenew :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrAutoRenew = lens _gddrAutoRenew (\s a -> s { _gddrAutoRenew = a })
gddrCreationDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrCreationDate = lens _gddrCreationDate (\s a -> s { _gddrCreationDate = a }) . mapping _Time
gddrDnsSec :: Lens' GetDomainDetailResponse (Maybe Text)
gddrDnsSec = lens _gddrDnsSec (\s a -> s { _gddrDnsSec = a })
gddrDomainName :: Lens' GetDomainDetailResponse Text
gddrDomainName = lens _gddrDomainName (\s a -> s { _gddrDomainName = a })
gddrExpirationDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrExpirationDate =
lens _gddrExpirationDate (\s a -> s { _gddrExpirationDate = a })
. mapping _Time
gddrNameservers :: Lens' GetDomainDetailResponse [Nameserver]
gddrNameservers = lens _gddrNameservers (\s a -> s { _gddrNameservers = a }) . _List
gddrRegistrantContact :: Lens' GetDomainDetailResponse ContactDetail
gddrRegistrantContact =
lens _gddrRegistrantContact (\s a -> s { _gddrRegistrantContact = a })
gddrRegistrantPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrRegistrantPrivacy =
lens _gddrRegistrantPrivacy (\s a -> s { _gddrRegistrantPrivacy = a })
gddrRegistrarName :: Lens' GetDomainDetailResponse (Maybe Text)
gddrRegistrarName =
lens _gddrRegistrarName (\s a -> s { _gddrRegistrarName = a })
gddrRegistrarUrl :: Lens' GetDomainDetailResponse (Maybe Text)
gddrRegistrarUrl = lens _gddrRegistrarUrl (\s a -> s { _gddrRegistrarUrl = a })
gddrRegistryDomainId :: Lens' GetDomainDetailResponse (Maybe Text)
gddrRegistryDomainId =
lens _gddrRegistryDomainId (\s a -> s { _gddrRegistryDomainId = a })
gddrReseller :: Lens' GetDomainDetailResponse (Maybe Text)
gddrReseller = lens _gddrReseller (\s a -> s { _gddrReseller = a })
gddrStatusList :: Lens' GetDomainDetailResponse [Text]
gddrStatusList = lens _gddrStatusList (\s a -> s { _gddrStatusList = a }) . _List
gddrTechContact :: Lens' GetDomainDetailResponse ContactDetail
gddrTechContact = lens _gddrTechContact (\s a -> s { _gddrTechContact = a })
gddrTechPrivacy :: Lens' GetDomainDetailResponse (Maybe Bool)
gddrTechPrivacy = lens _gddrTechPrivacy (\s a -> s { _gddrTechPrivacy = a })
gddrUpdatedDate :: Lens' GetDomainDetailResponse (Maybe UTCTime)
gddrUpdatedDate = lens _gddrUpdatedDate (\s a -> s { _gddrUpdatedDate = a }) . mapping _Time
gddrWhoIsServer :: Lens' GetDomainDetailResponse (Maybe Text)
gddrWhoIsServer = lens _gddrWhoIsServer (\s a -> s { _gddrWhoIsServer = a })
instance ToPath GetDomainDetail where
toPath = const "/"
instance ToQuery GetDomainDetail where
toQuery = const mempty
instance ToHeaders GetDomainDetail
instance ToJSON GetDomainDetail where
toJSON GetDomainDetail{..} = object
[ "DomainName" .= _gddDomainName
]
instance AWSRequest GetDomainDetail where
type Sv GetDomainDetail = Route53Domains
type Rs GetDomainDetail = GetDomainDetailResponse
request = post "GetDomainDetail"
response = jsonResponse
instance FromJSON GetDomainDetailResponse where
parseJSON = withObject "GetDomainDetailResponse" $ \o -> GetDomainDetailResponse
<$> o .:? "AbuseContactEmail"
<*> o .:? "AbuseContactPhone"
<*> o .: "AdminContact"
<*> o .:? "AdminPrivacy"
<*> o .:? "AutoRenew"
<*> o .:? "CreationDate"
<*> o .:? "DnsSec"
<*> o .: "DomainName"
<*> o .:? "ExpirationDate"
<*> o .:? "Nameservers" .!= mempty
<*> o .: "RegistrantContact"
<*> o .:? "RegistrantPrivacy"
<*> o .:? "RegistrarName"
<*> o .:? "RegistrarUrl"
<*> o .:? "RegistryDomainId"
<*> o .:? "Reseller"
<*> o .:? "StatusList" .!= mempty
<*> o .: "TechContact"
<*> o .:? "TechPrivacy"
<*> o .:? "UpdatedDate"
<*> o .:? "WhoIsServer"