{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53.TestDNSAnswer
(
TestDNSAnswer (..),
newTestDNSAnswer,
testDNSAnswer_resolverIP,
testDNSAnswer_eDNS0ClientSubnetIP,
testDNSAnswer_eDNS0ClientSubnetMask,
testDNSAnswer_hostedZoneId,
testDNSAnswer_recordName,
testDNSAnswer_recordType,
TestDNSAnswerResponse (..),
newTestDNSAnswerResponse,
testDNSAnswerResponse_httpStatus,
testDNSAnswerResponse_nameserver,
testDNSAnswerResponse_recordName,
testDNSAnswerResponse_recordType,
testDNSAnswerResponse_recordData,
testDNSAnswerResponse_responseCode,
testDNSAnswerResponse_protocol,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53.Types
data TestDNSAnswer = TestDNSAnswer'
{
TestDNSAnswer -> Maybe Text
resolverIP :: Prelude.Maybe Prelude.Text,
TestDNSAnswer -> Maybe Text
eDNS0ClientSubnetIP :: Prelude.Maybe Prelude.Text,
TestDNSAnswer -> Maybe Text
eDNS0ClientSubnetMask :: Prelude.Maybe Prelude.Text,
TestDNSAnswer -> ResourceId
hostedZoneId :: ResourceId,
TestDNSAnswer -> Text
recordName :: Prelude.Text,
TestDNSAnswer -> RRType
recordType :: RRType
}
deriving (TestDNSAnswer -> TestDNSAnswer -> Bool
(TestDNSAnswer -> TestDNSAnswer -> Bool)
-> (TestDNSAnswer -> TestDNSAnswer -> Bool) -> Eq TestDNSAnswer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestDNSAnswer -> TestDNSAnswer -> Bool
$c/= :: TestDNSAnswer -> TestDNSAnswer -> Bool
== :: TestDNSAnswer -> TestDNSAnswer -> Bool
$c== :: TestDNSAnswer -> TestDNSAnswer -> Bool
Prelude.Eq, ReadPrec [TestDNSAnswer]
ReadPrec TestDNSAnswer
Int -> ReadS TestDNSAnswer
ReadS [TestDNSAnswer]
(Int -> ReadS TestDNSAnswer)
-> ReadS [TestDNSAnswer]
-> ReadPrec TestDNSAnswer
-> ReadPrec [TestDNSAnswer]
-> Read TestDNSAnswer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestDNSAnswer]
$creadListPrec :: ReadPrec [TestDNSAnswer]
readPrec :: ReadPrec TestDNSAnswer
$creadPrec :: ReadPrec TestDNSAnswer
readList :: ReadS [TestDNSAnswer]
$creadList :: ReadS [TestDNSAnswer]
readsPrec :: Int -> ReadS TestDNSAnswer
$creadsPrec :: Int -> ReadS TestDNSAnswer
Prelude.Read, Int -> TestDNSAnswer -> ShowS
[TestDNSAnswer] -> ShowS
TestDNSAnswer -> String
(Int -> TestDNSAnswer -> ShowS)
-> (TestDNSAnswer -> String)
-> ([TestDNSAnswer] -> ShowS)
-> Show TestDNSAnswer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestDNSAnswer] -> ShowS
$cshowList :: [TestDNSAnswer] -> ShowS
show :: TestDNSAnswer -> String
$cshow :: TestDNSAnswer -> String
showsPrec :: Int -> TestDNSAnswer -> ShowS
$cshowsPrec :: Int -> TestDNSAnswer -> ShowS
Prelude.Show, (forall x. TestDNSAnswer -> Rep TestDNSAnswer x)
-> (forall x. Rep TestDNSAnswer x -> TestDNSAnswer)
-> Generic TestDNSAnswer
forall x. Rep TestDNSAnswer x -> TestDNSAnswer
forall x. TestDNSAnswer -> Rep TestDNSAnswer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestDNSAnswer x -> TestDNSAnswer
$cfrom :: forall x. TestDNSAnswer -> Rep TestDNSAnswer x
Prelude.Generic)
newTestDNSAnswer ::
ResourceId ->
Prelude.Text ->
RRType ->
TestDNSAnswer
newTestDNSAnswer :: ResourceId -> Text -> RRType -> TestDNSAnswer
newTestDNSAnswer
ResourceId
pHostedZoneId_
Text
pRecordName_
RRType
pRecordType_ =
TestDNSAnswer' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceId
-> Text
-> RRType
-> TestDNSAnswer
TestDNSAnswer'
{ $sel:resolverIP:TestDNSAnswer' :: Maybe Text
resolverIP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eDNS0ClientSubnetIP:TestDNSAnswer' :: Maybe Text
eDNS0ClientSubnetIP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eDNS0ClientSubnetMask:TestDNSAnswer' :: Maybe Text
eDNS0ClientSubnetMask = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hostedZoneId:TestDNSAnswer' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_,
$sel:recordName:TestDNSAnswer' :: Text
recordName = Text
pRecordName_,
$sel:recordType:TestDNSAnswer' :: RRType
recordType = RRType
pRecordType_
}
testDNSAnswer_resolverIP :: Lens.Lens' TestDNSAnswer (Prelude.Maybe Prelude.Text)
testDNSAnswer_resolverIP :: (Maybe Text -> f (Maybe Text)) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_resolverIP = (TestDNSAnswer -> Maybe Text)
-> (TestDNSAnswer -> Maybe Text -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {Maybe Text
resolverIP :: Maybe Text
$sel:resolverIP:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
resolverIP} -> Maybe Text
resolverIP) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} Maybe Text
a -> TestDNSAnswer
s {$sel:resolverIP:TestDNSAnswer' :: Maybe Text
resolverIP = Maybe Text
a} :: TestDNSAnswer)
testDNSAnswer_eDNS0ClientSubnetIP :: Lens.Lens' TestDNSAnswer (Prelude.Maybe Prelude.Text)
testDNSAnswer_eDNS0ClientSubnetIP :: (Maybe Text -> f (Maybe Text)) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_eDNS0ClientSubnetIP = (TestDNSAnswer -> Maybe Text)
-> (TestDNSAnswer -> Maybe Text -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {Maybe Text
eDNS0ClientSubnetIP :: Maybe Text
$sel:eDNS0ClientSubnetIP:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
eDNS0ClientSubnetIP} -> Maybe Text
eDNS0ClientSubnetIP) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} Maybe Text
a -> TestDNSAnswer
s {$sel:eDNS0ClientSubnetIP:TestDNSAnswer' :: Maybe Text
eDNS0ClientSubnetIP = Maybe Text
a} :: TestDNSAnswer)
testDNSAnswer_eDNS0ClientSubnetMask :: Lens.Lens' TestDNSAnswer (Prelude.Maybe Prelude.Text)
testDNSAnswer_eDNS0ClientSubnetMask :: (Maybe Text -> f (Maybe Text)) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_eDNS0ClientSubnetMask = (TestDNSAnswer -> Maybe Text)
-> (TestDNSAnswer -> Maybe Text -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {Maybe Text
eDNS0ClientSubnetMask :: Maybe Text
$sel:eDNS0ClientSubnetMask:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
eDNS0ClientSubnetMask} -> Maybe Text
eDNS0ClientSubnetMask) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} Maybe Text
a -> TestDNSAnswer
s {$sel:eDNS0ClientSubnetMask:TestDNSAnswer' :: Maybe Text
eDNS0ClientSubnetMask = Maybe Text
a} :: TestDNSAnswer)
testDNSAnswer_hostedZoneId :: Lens.Lens' TestDNSAnswer ResourceId
testDNSAnswer_hostedZoneId :: (ResourceId -> f ResourceId) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_hostedZoneId = (TestDNSAnswer -> ResourceId)
-> (TestDNSAnswer -> ResourceId -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer ResourceId ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:TestDNSAnswer' :: TestDNSAnswer -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} ResourceId
a -> TestDNSAnswer
s {$sel:hostedZoneId:TestDNSAnswer' :: ResourceId
hostedZoneId = ResourceId
a} :: TestDNSAnswer)
testDNSAnswer_recordName :: Lens.Lens' TestDNSAnswer Prelude.Text
testDNSAnswer_recordName :: (Text -> f Text) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_recordName = (TestDNSAnswer -> Text)
-> (TestDNSAnswer -> Text -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {Text
recordName :: Text
$sel:recordName:TestDNSAnswer' :: TestDNSAnswer -> Text
recordName} -> Text
recordName) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} Text
a -> TestDNSAnswer
s {$sel:recordName:TestDNSAnswer' :: Text
recordName = Text
a} :: TestDNSAnswer)
testDNSAnswer_recordType :: Lens.Lens' TestDNSAnswer RRType
testDNSAnswer_recordType :: (RRType -> f RRType) -> TestDNSAnswer -> f TestDNSAnswer
testDNSAnswer_recordType = (TestDNSAnswer -> RRType)
-> (TestDNSAnswer -> RRType -> TestDNSAnswer)
-> Lens TestDNSAnswer TestDNSAnswer RRType RRType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswer' {RRType
recordType :: RRType
$sel:recordType:TestDNSAnswer' :: TestDNSAnswer -> RRType
recordType} -> RRType
recordType) (\s :: TestDNSAnswer
s@TestDNSAnswer' {} RRType
a -> TestDNSAnswer
s {$sel:recordType:TestDNSAnswer' :: RRType
recordType = RRType
a} :: TestDNSAnswer)
instance Core.AWSRequest TestDNSAnswer where
type
AWSResponse TestDNSAnswer =
TestDNSAnswerResponse
request :: TestDNSAnswer -> Request TestDNSAnswer
request = Service -> TestDNSAnswer -> Request TestDNSAnswer
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy TestDNSAnswer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestDNSAnswer)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse TestDNSAnswer))
-> Logger
-> Service
-> Proxy TestDNSAnswer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestDNSAnswer)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> Text
-> Text
-> RRType
-> [Text]
-> Text
-> Text
-> TestDNSAnswerResponse
TestDNSAnswerResponse'
(Int
-> Text
-> Text
-> RRType
-> [Text]
-> Text
-> Text
-> TestDNSAnswerResponse)
-> Either String Int
-> Either
String
(Text
-> Text
-> RRType
-> [Text]
-> Text
-> Text
-> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either
String
(Text
-> Text
-> RRType
-> [Text]
-> Text
-> Text
-> TestDNSAnswerResponse)
-> Either String Text
-> Either
String
(Text -> RRType -> [Text] -> Text -> Text -> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Nameserver")
Either
String
(Text -> RRType -> [Text] -> Text -> Text -> TestDNSAnswerResponse)
-> Either String Text
-> Either
String (RRType -> [Text] -> Text -> Text -> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"RecordName")
Either
String (RRType -> [Text] -> Text -> Text -> TestDNSAnswerResponse)
-> Either String RRType
-> Either String ([Text] -> Text -> Text -> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String RRType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"RecordType")
Either String ([Text] -> Text -> Text -> TestDNSAnswerResponse)
-> Either String [Text]
-> Either String (Text -> Text -> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RecordData" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String [Text]) -> Either String [Text]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"RecordDataEntry"
)
Either String (Text -> Text -> TestDNSAnswerResponse)
-> Either String Text
-> Either String (Text -> TestDNSAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResponseCode")
Either String (Text -> TestDNSAnswerResponse)
-> Either String Text -> Either String TestDNSAnswerResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Protocol")
)
instance Prelude.Hashable TestDNSAnswer
instance Prelude.NFData TestDNSAnswer
instance Core.ToHeaders TestDNSAnswer where
toHeaders :: TestDNSAnswer -> ResponseHeaders
toHeaders = ResponseHeaders -> TestDNSAnswer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath TestDNSAnswer where
toPath :: TestDNSAnswer -> ByteString
toPath = ByteString -> TestDNSAnswer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/testdnsanswer"
instance Core.ToQuery TestDNSAnswer where
toQuery :: TestDNSAnswer -> QueryString
toQuery TestDNSAnswer' {Maybe Text
Text
ResourceId
RRType
recordType :: RRType
recordName :: Text
hostedZoneId :: ResourceId
eDNS0ClientSubnetMask :: Maybe Text
eDNS0ClientSubnetIP :: Maybe Text
resolverIP :: Maybe Text
$sel:recordType:TestDNSAnswer' :: TestDNSAnswer -> RRType
$sel:recordName:TestDNSAnswer' :: TestDNSAnswer -> Text
$sel:hostedZoneId:TestDNSAnswer' :: TestDNSAnswer -> ResourceId
$sel:eDNS0ClientSubnetMask:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
$sel:eDNS0ClientSubnetIP:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
$sel:resolverIP:TestDNSAnswer' :: TestDNSAnswer -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"resolverip" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
resolverIP,
ByteString
"edns0clientsubnetip" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eDNS0ClientSubnetIP,
ByteString
"edns0clientsubnetmask"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eDNS0ClientSubnetMask,
ByteString
"hostedzoneid" ByteString -> ResourceId -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ResourceId
hostedZoneId,
ByteString
"recordname" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
recordName,
ByteString
"recordtype" ByteString -> RRType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: RRType
recordType
]
data TestDNSAnswerResponse = TestDNSAnswerResponse'
{
TestDNSAnswerResponse -> Int
httpStatus :: Prelude.Int,
TestDNSAnswerResponse -> Text
nameserver :: Prelude.Text,
TestDNSAnswerResponse -> Text
recordName :: Prelude.Text,
TestDNSAnswerResponse -> RRType
recordType :: RRType,
TestDNSAnswerResponse -> [Text]
recordData :: [Prelude.Text],
TestDNSAnswerResponse -> Text
responseCode :: Prelude.Text,
TestDNSAnswerResponse -> Text
protocol :: Prelude.Text
}
deriving (TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool
(TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool)
-> (TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool)
-> Eq TestDNSAnswerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool
$c/= :: TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool
== :: TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool
$c== :: TestDNSAnswerResponse -> TestDNSAnswerResponse -> Bool
Prelude.Eq, ReadPrec [TestDNSAnswerResponse]
ReadPrec TestDNSAnswerResponse
Int -> ReadS TestDNSAnswerResponse
ReadS [TestDNSAnswerResponse]
(Int -> ReadS TestDNSAnswerResponse)
-> ReadS [TestDNSAnswerResponse]
-> ReadPrec TestDNSAnswerResponse
-> ReadPrec [TestDNSAnswerResponse]
-> Read TestDNSAnswerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestDNSAnswerResponse]
$creadListPrec :: ReadPrec [TestDNSAnswerResponse]
readPrec :: ReadPrec TestDNSAnswerResponse
$creadPrec :: ReadPrec TestDNSAnswerResponse
readList :: ReadS [TestDNSAnswerResponse]
$creadList :: ReadS [TestDNSAnswerResponse]
readsPrec :: Int -> ReadS TestDNSAnswerResponse
$creadsPrec :: Int -> ReadS TestDNSAnswerResponse
Prelude.Read, Int -> TestDNSAnswerResponse -> ShowS
[TestDNSAnswerResponse] -> ShowS
TestDNSAnswerResponse -> String
(Int -> TestDNSAnswerResponse -> ShowS)
-> (TestDNSAnswerResponse -> String)
-> ([TestDNSAnswerResponse] -> ShowS)
-> Show TestDNSAnswerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestDNSAnswerResponse] -> ShowS
$cshowList :: [TestDNSAnswerResponse] -> ShowS
show :: TestDNSAnswerResponse -> String
$cshow :: TestDNSAnswerResponse -> String
showsPrec :: Int -> TestDNSAnswerResponse -> ShowS
$cshowsPrec :: Int -> TestDNSAnswerResponse -> ShowS
Prelude.Show, (forall x. TestDNSAnswerResponse -> Rep TestDNSAnswerResponse x)
-> (forall x. Rep TestDNSAnswerResponse x -> TestDNSAnswerResponse)
-> Generic TestDNSAnswerResponse
forall x. Rep TestDNSAnswerResponse x -> TestDNSAnswerResponse
forall x. TestDNSAnswerResponse -> Rep TestDNSAnswerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestDNSAnswerResponse x -> TestDNSAnswerResponse
$cfrom :: forall x. TestDNSAnswerResponse -> Rep TestDNSAnswerResponse x
Prelude.Generic)
newTestDNSAnswerResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
RRType ->
Prelude.Text ->
Prelude.Text ->
TestDNSAnswerResponse
newTestDNSAnswerResponse :: Int
-> Text -> Text -> RRType -> Text -> Text -> TestDNSAnswerResponse
newTestDNSAnswerResponse
Int
pHttpStatus_
Text
pNameserver_
Text
pRecordName_
RRType
pRecordType_
Text
pResponseCode_
Text
pProtocol_ =
TestDNSAnswerResponse' :: Int
-> Text
-> Text
-> RRType
-> [Text]
-> Text
-> Text
-> TestDNSAnswerResponse
TestDNSAnswerResponse'
{ $sel:httpStatus:TestDNSAnswerResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:nameserver:TestDNSAnswerResponse' :: Text
nameserver = Text
pNameserver_,
$sel:recordName:TestDNSAnswerResponse' :: Text
recordName = Text
pRecordName_,
$sel:recordType:TestDNSAnswerResponse' :: RRType
recordType = RRType
pRecordType_,
$sel:recordData:TestDNSAnswerResponse' :: [Text]
recordData = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:responseCode:TestDNSAnswerResponse' :: Text
responseCode = Text
pResponseCode_,
$sel:protocol:TestDNSAnswerResponse' :: Text
protocol = Text
pProtocol_
}
testDNSAnswerResponse_httpStatus :: Lens.Lens' TestDNSAnswerResponse Prelude.Int
testDNSAnswerResponse_httpStatus :: (Int -> f Int) -> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_httpStatus = (TestDNSAnswerResponse -> Int)
-> (TestDNSAnswerResponse -> Int -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {Int
httpStatus :: Int
$sel:httpStatus:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} Int
a -> TestDNSAnswerResponse
s {$sel:httpStatus:TestDNSAnswerResponse' :: Int
httpStatus = Int
a} :: TestDNSAnswerResponse)
testDNSAnswerResponse_nameserver :: Lens.Lens' TestDNSAnswerResponse Prelude.Text
testDNSAnswerResponse_nameserver :: (Text -> f Text)
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_nameserver = (TestDNSAnswerResponse -> Text)
-> (TestDNSAnswerResponse -> Text -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {Text
nameserver :: Text
$sel:nameserver:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> Text
nameserver} -> Text
nameserver) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} Text
a -> TestDNSAnswerResponse
s {$sel:nameserver:TestDNSAnswerResponse' :: Text
nameserver = Text
a} :: TestDNSAnswerResponse)
testDNSAnswerResponse_recordName :: Lens.Lens' TestDNSAnswerResponse Prelude.Text
testDNSAnswerResponse_recordName :: (Text -> f Text)
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_recordName = (TestDNSAnswerResponse -> Text)
-> (TestDNSAnswerResponse -> Text -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {Text
recordName :: Text
$sel:recordName:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> Text
recordName} -> Text
recordName) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} Text
a -> TestDNSAnswerResponse
s {$sel:recordName:TestDNSAnswerResponse' :: Text
recordName = Text
a} :: TestDNSAnswerResponse)
testDNSAnswerResponse_recordType :: Lens.Lens' TestDNSAnswerResponse RRType
testDNSAnswerResponse_recordType :: (RRType -> f RRType)
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_recordType = (TestDNSAnswerResponse -> RRType)
-> (TestDNSAnswerResponse -> RRType -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse RRType RRType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {RRType
recordType :: RRType
$sel:recordType:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> RRType
recordType} -> RRType
recordType) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} RRType
a -> TestDNSAnswerResponse
s {$sel:recordType:TestDNSAnswerResponse' :: RRType
recordType = RRType
a} :: TestDNSAnswerResponse)
testDNSAnswerResponse_recordData :: Lens.Lens' TestDNSAnswerResponse [Prelude.Text]
testDNSAnswerResponse_recordData :: ([Text] -> f [Text])
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_recordData = (TestDNSAnswerResponse -> [Text])
-> (TestDNSAnswerResponse -> [Text] -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {[Text]
recordData :: [Text]
$sel:recordData:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> [Text]
recordData} -> [Text]
recordData) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} [Text]
a -> TestDNSAnswerResponse
s {$sel:recordData:TestDNSAnswerResponse' :: [Text]
recordData = [Text]
a} :: TestDNSAnswerResponse) (([Text] -> f [Text])
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> TestDNSAnswerResponse
-> f TestDNSAnswerResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
testDNSAnswerResponse_responseCode :: Lens.Lens' TestDNSAnswerResponse Prelude.Text
testDNSAnswerResponse_responseCode :: (Text -> f Text)
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_responseCode = (TestDNSAnswerResponse -> Text)
-> (TestDNSAnswerResponse -> Text -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {Text
responseCode :: Text
$sel:responseCode:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> Text
responseCode} -> Text
responseCode) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} Text
a -> TestDNSAnswerResponse
s {$sel:responseCode:TestDNSAnswerResponse' :: Text
responseCode = Text
a} :: TestDNSAnswerResponse)
testDNSAnswerResponse_protocol :: Lens.Lens' TestDNSAnswerResponse Prelude.Text
testDNSAnswerResponse_protocol :: (Text -> f Text)
-> TestDNSAnswerResponse -> f TestDNSAnswerResponse
testDNSAnswerResponse_protocol = (TestDNSAnswerResponse -> Text)
-> (TestDNSAnswerResponse -> Text -> TestDNSAnswerResponse)
-> Lens TestDNSAnswerResponse TestDNSAnswerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestDNSAnswerResponse' {Text
protocol :: Text
$sel:protocol:TestDNSAnswerResponse' :: TestDNSAnswerResponse -> Text
protocol} -> Text
protocol) (\s :: TestDNSAnswerResponse
s@TestDNSAnswerResponse' {} Text
a -> TestDNSAnswerResponse
s {$sel:protocol:TestDNSAnswerResponse' :: Text
protocol = Text
a} :: TestDNSAnswerResponse)
instance Prelude.NFData TestDNSAnswerResponse