module Network.AWS.Route53Domains.GetOperationDetail
(
GetOperationDetail
, getOperationDetail
, godOperationId
, GetOperationDetailResponse
, getOperationDetailResponse
, godrDomainName
, godrMessage
, godrOperationId
, godrStatus
, godrSubmittedDate
, godrType
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.Route53Domains.Types
import qualified GHC.Exts
newtype GetOperationDetail = GetOperationDetail
{ _godOperationId :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
getOperationDetail :: Text
-> GetOperationDetail
getOperationDetail p1 = GetOperationDetail
{ _godOperationId = p1
}
godOperationId :: Lens' GetOperationDetail Text
godOperationId = lens _godOperationId (\s a -> s { _godOperationId = a })
data GetOperationDetailResponse = GetOperationDetailResponse
{ _godrDomainName :: Maybe Text
, _godrMessage :: Maybe Text
, _godrOperationId :: Maybe Text
, _godrStatus :: Maybe OperationStatus
, _godrSubmittedDate :: Maybe POSIX
, _godrType :: Maybe OperationType
} deriving (Eq, Read, Show)
getOperationDetailResponse :: GetOperationDetailResponse
getOperationDetailResponse = GetOperationDetailResponse
{ _godrOperationId = Nothing
, _godrStatus = Nothing
, _godrMessage = Nothing
, _godrDomainName = Nothing
, _godrType = Nothing
, _godrSubmittedDate = Nothing
}
godrDomainName :: Lens' GetOperationDetailResponse (Maybe Text)
godrDomainName = lens _godrDomainName (\s a -> s { _godrDomainName = a })
godrMessage :: Lens' GetOperationDetailResponse (Maybe Text)
godrMessage = lens _godrMessage (\s a -> s { _godrMessage = a })
godrOperationId :: Lens' GetOperationDetailResponse (Maybe Text)
godrOperationId = lens _godrOperationId (\s a -> s { _godrOperationId = a })
godrStatus :: Lens' GetOperationDetailResponse (Maybe OperationStatus)
godrStatus = lens _godrStatus (\s a -> s { _godrStatus = a })
godrSubmittedDate :: Lens' GetOperationDetailResponse (Maybe UTCTime)
godrSubmittedDate =
lens _godrSubmittedDate (\s a -> s { _godrSubmittedDate = a })
. mapping _Time
godrType :: Lens' GetOperationDetailResponse (Maybe OperationType)
godrType = lens _godrType (\s a -> s { _godrType = a })
instance ToPath GetOperationDetail where
toPath = const "/"
instance ToQuery GetOperationDetail where
toQuery = const mempty
instance ToHeaders GetOperationDetail
instance ToJSON GetOperationDetail where
toJSON GetOperationDetail{..} = object
[ "OperationId" .= _godOperationId
]
instance AWSRequest GetOperationDetail where
type Sv GetOperationDetail = Route53Domains
type Rs GetOperationDetail = GetOperationDetailResponse
request = post "GetOperationDetail"
response = jsonResponse
instance FromJSON GetOperationDetailResponse where
parseJSON = withObject "GetOperationDetailResponse" $ \o -> GetOperationDetailResponse
<$> o .:? "DomainName"
<*> o .:? "Message"
<*> o .:? "OperationId"
<*> o .:? "Status"
<*> o .:? "SubmittedDate"
<*> o .:? "Type"