{-# 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.Route53Resolver.CreateResolverRule
(
CreateResolverRule (..),
newCreateResolverRule,
createResolverRule_resolverEndpointId,
createResolverRule_targetIps,
createResolverRule_name,
createResolverRule_tags,
createResolverRule_creatorRequestId,
createResolverRule_ruleType,
createResolverRule_domainName,
CreateResolverRuleResponse (..),
newCreateResolverRuleResponse,
createResolverRuleResponse_resolverRule,
createResolverRuleResponse_httpStatus,
)
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.Route53Resolver.Types
data CreateResolverRule = CreateResolverRule'
{
CreateResolverRule -> Maybe Text
resolverEndpointId :: Prelude.Maybe Prelude.Text,
CreateResolverRule -> Maybe (NonEmpty TargetAddress)
targetIps :: Prelude.Maybe (Prelude.NonEmpty TargetAddress),
CreateResolverRule -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateResolverRule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateResolverRule -> Text
creatorRequestId :: Prelude.Text,
CreateResolverRule -> RuleTypeOption
ruleType :: RuleTypeOption,
CreateResolverRule -> Text
domainName :: Prelude.Text
}
deriving (CreateResolverRule -> CreateResolverRule -> Bool
(CreateResolverRule -> CreateResolverRule -> Bool)
-> (CreateResolverRule -> CreateResolverRule -> Bool)
-> Eq CreateResolverRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateResolverRule -> CreateResolverRule -> Bool
$c/= :: CreateResolverRule -> CreateResolverRule -> Bool
== :: CreateResolverRule -> CreateResolverRule -> Bool
$c== :: CreateResolverRule -> CreateResolverRule -> Bool
Prelude.Eq, ReadPrec [CreateResolverRule]
ReadPrec CreateResolverRule
Int -> ReadS CreateResolverRule
ReadS [CreateResolverRule]
(Int -> ReadS CreateResolverRule)
-> ReadS [CreateResolverRule]
-> ReadPrec CreateResolverRule
-> ReadPrec [CreateResolverRule]
-> Read CreateResolverRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateResolverRule]
$creadListPrec :: ReadPrec [CreateResolverRule]
readPrec :: ReadPrec CreateResolverRule
$creadPrec :: ReadPrec CreateResolverRule
readList :: ReadS [CreateResolverRule]
$creadList :: ReadS [CreateResolverRule]
readsPrec :: Int -> ReadS CreateResolverRule
$creadsPrec :: Int -> ReadS CreateResolverRule
Prelude.Read, Int -> CreateResolverRule -> ShowS
[CreateResolverRule] -> ShowS
CreateResolverRule -> String
(Int -> CreateResolverRule -> ShowS)
-> (CreateResolverRule -> String)
-> ([CreateResolverRule] -> ShowS)
-> Show CreateResolverRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateResolverRule] -> ShowS
$cshowList :: [CreateResolverRule] -> ShowS
show :: CreateResolverRule -> String
$cshow :: CreateResolverRule -> String
showsPrec :: Int -> CreateResolverRule -> ShowS
$cshowsPrec :: Int -> CreateResolverRule -> ShowS
Prelude.Show, (forall x. CreateResolverRule -> Rep CreateResolverRule x)
-> (forall x. Rep CreateResolverRule x -> CreateResolverRule)
-> Generic CreateResolverRule
forall x. Rep CreateResolverRule x -> CreateResolverRule
forall x. CreateResolverRule -> Rep CreateResolverRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateResolverRule x -> CreateResolverRule
$cfrom :: forall x. CreateResolverRule -> Rep CreateResolverRule x
Prelude.Generic)
newCreateResolverRule ::
Prelude.Text ->
RuleTypeOption ->
Prelude.Text ->
CreateResolverRule
newCreateResolverRule :: Text -> RuleTypeOption -> Text -> CreateResolverRule
newCreateResolverRule
Text
pCreatorRequestId_
RuleTypeOption
pRuleType_
Text
pDomainName_ =
CreateResolverRule' :: Maybe Text
-> Maybe (NonEmpty TargetAddress)
-> Maybe Text
-> Maybe [Tag]
-> Text
-> RuleTypeOption
-> Text
-> CreateResolverRule
CreateResolverRule'
{ $sel:resolverEndpointId:CreateResolverRule' :: Maybe Text
resolverEndpointId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetIps:CreateResolverRule' :: Maybe (NonEmpty TargetAddress)
targetIps = Maybe (NonEmpty TargetAddress)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateResolverRule' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateResolverRule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:creatorRequestId:CreateResolverRule' :: Text
creatorRequestId = Text
pCreatorRequestId_,
$sel:ruleType:CreateResolverRule' :: RuleTypeOption
ruleType = RuleTypeOption
pRuleType_,
$sel:domainName:CreateResolverRule' :: Text
domainName = Text
pDomainName_
}
createResolverRule_resolverEndpointId :: Lens.Lens' CreateResolverRule (Prelude.Maybe Prelude.Text)
createResolverRule_resolverEndpointId :: (Maybe Text -> f (Maybe Text))
-> CreateResolverRule -> f CreateResolverRule
createResolverRule_resolverEndpointId = (CreateResolverRule -> Maybe Text)
-> (CreateResolverRule -> Maybe Text -> CreateResolverRule)
-> Lens
CreateResolverRule CreateResolverRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Maybe Text
resolverEndpointId :: Maybe Text
$sel:resolverEndpointId:CreateResolverRule' :: CreateResolverRule -> Maybe Text
resolverEndpointId} -> Maybe Text
resolverEndpointId) (\s :: CreateResolverRule
s@CreateResolverRule' {} Maybe Text
a -> CreateResolverRule
s {$sel:resolverEndpointId:CreateResolverRule' :: Maybe Text
resolverEndpointId = Maybe Text
a} :: CreateResolverRule)
createResolverRule_targetIps :: Lens.Lens' CreateResolverRule (Prelude.Maybe (Prelude.NonEmpty TargetAddress))
createResolverRule_targetIps :: (Maybe (NonEmpty TargetAddress)
-> f (Maybe (NonEmpty TargetAddress)))
-> CreateResolverRule -> f CreateResolverRule
createResolverRule_targetIps = (CreateResolverRule -> Maybe (NonEmpty TargetAddress))
-> (CreateResolverRule
-> Maybe (NonEmpty TargetAddress) -> CreateResolverRule)
-> Lens
CreateResolverRule
CreateResolverRule
(Maybe (NonEmpty TargetAddress))
(Maybe (NonEmpty TargetAddress))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Maybe (NonEmpty TargetAddress)
targetIps :: Maybe (NonEmpty TargetAddress)
$sel:targetIps:CreateResolverRule' :: CreateResolverRule -> Maybe (NonEmpty TargetAddress)
targetIps} -> Maybe (NonEmpty TargetAddress)
targetIps) (\s :: CreateResolverRule
s@CreateResolverRule' {} Maybe (NonEmpty TargetAddress)
a -> CreateResolverRule
s {$sel:targetIps:CreateResolverRule' :: Maybe (NonEmpty TargetAddress)
targetIps = Maybe (NonEmpty TargetAddress)
a} :: CreateResolverRule) ((Maybe (NonEmpty TargetAddress)
-> f (Maybe (NonEmpty TargetAddress)))
-> CreateResolverRule -> f CreateResolverRule)
-> ((Maybe (NonEmpty TargetAddress)
-> f (Maybe (NonEmpty TargetAddress)))
-> Maybe (NonEmpty TargetAddress)
-> f (Maybe (NonEmpty TargetAddress)))
-> (Maybe (NonEmpty TargetAddress)
-> f (Maybe (NonEmpty TargetAddress)))
-> CreateResolverRule
-> f CreateResolverRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
-> Iso
(Maybe (NonEmpty TargetAddress))
(Maybe (NonEmpty TargetAddress))
(Maybe (NonEmpty TargetAddress))
(Maybe (NonEmpty TargetAddress))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
(NonEmpty TargetAddress)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createResolverRule_name :: Lens.Lens' CreateResolverRule (Prelude.Maybe Prelude.Text)
createResolverRule_name :: (Maybe Text -> f (Maybe Text))
-> CreateResolverRule -> f CreateResolverRule
createResolverRule_name = (CreateResolverRule -> Maybe Text)
-> (CreateResolverRule -> Maybe Text -> CreateResolverRule)
-> Lens
CreateResolverRule CreateResolverRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Maybe Text
name :: Maybe Text
$sel:name:CreateResolverRule' :: CreateResolverRule -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateResolverRule
s@CreateResolverRule' {} Maybe Text
a -> CreateResolverRule
s {$sel:name:CreateResolverRule' :: Maybe Text
name = Maybe Text
a} :: CreateResolverRule)
createResolverRule_tags :: Lens.Lens' CreateResolverRule (Prelude.Maybe [Tag])
createResolverRule_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateResolverRule -> f CreateResolverRule
createResolverRule_tags = (CreateResolverRule -> Maybe [Tag])
-> (CreateResolverRule -> Maybe [Tag] -> CreateResolverRule)
-> Lens
CreateResolverRule CreateResolverRule (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateResolverRule' :: CreateResolverRule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateResolverRule
s@CreateResolverRule' {} Maybe [Tag]
a -> CreateResolverRule
s {$sel:tags:CreateResolverRule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateResolverRule) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateResolverRule -> f CreateResolverRule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateResolverRule
-> f CreateResolverRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createResolverRule_creatorRequestId :: Lens.Lens' CreateResolverRule Prelude.Text
createResolverRule_creatorRequestId :: (Text -> f Text) -> CreateResolverRule -> f CreateResolverRule
createResolverRule_creatorRequestId = (CreateResolverRule -> Text)
-> (CreateResolverRule -> Text -> CreateResolverRule)
-> Lens CreateResolverRule CreateResolverRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Text
creatorRequestId :: Text
$sel:creatorRequestId:CreateResolverRule' :: CreateResolverRule -> Text
creatorRequestId} -> Text
creatorRequestId) (\s :: CreateResolverRule
s@CreateResolverRule' {} Text
a -> CreateResolverRule
s {$sel:creatorRequestId:CreateResolverRule' :: Text
creatorRequestId = Text
a} :: CreateResolverRule)
createResolverRule_ruleType :: Lens.Lens' CreateResolverRule RuleTypeOption
createResolverRule_ruleType :: (RuleTypeOption -> f RuleTypeOption)
-> CreateResolverRule -> f CreateResolverRule
createResolverRule_ruleType = (CreateResolverRule -> RuleTypeOption)
-> (CreateResolverRule -> RuleTypeOption -> CreateResolverRule)
-> Lens
CreateResolverRule CreateResolverRule RuleTypeOption RuleTypeOption
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {RuleTypeOption
ruleType :: RuleTypeOption
$sel:ruleType:CreateResolverRule' :: CreateResolverRule -> RuleTypeOption
ruleType} -> RuleTypeOption
ruleType) (\s :: CreateResolverRule
s@CreateResolverRule' {} RuleTypeOption
a -> CreateResolverRule
s {$sel:ruleType:CreateResolverRule' :: RuleTypeOption
ruleType = RuleTypeOption
a} :: CreateResolverRule)
createResolverRule_domainName :: Lens.Lens' CreateResolverRule Prelude.Text
createResolverRule_domainName :: (Text -> f Text) -> CreateResolverRule -> f CreateResolverRule
createResolverRule_domainName = (CreateResolverRule -> Text)
-> (CreateResolverRule -> Text -> CreateResolverRule)
-> Lens CreateResolverRule CreateResolverRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRule' {Text
domainName :: Text
$sel:domainName:CreateResolverRule' :: CreateResolverRule -> Text
domainName} -> Text
domainName) (\s :: CreateResolverRule
s@CreateResolverRule' {} Text
a -> CreateResolverRule
s {$sel:domainName:CreateResolverRule' :: Text
domainName = Text
a} :: CreateResolverRule)
instance Core.AWSRequest CreateResolverRule where
type
AWSResponse CreateResolverRule =
CreateResolverRuleResponse
request :: CreateResolverRule -> Request CreateResolverRule
request = Service -> CreateResolverRule -> Request CreateResolverRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateResolverRule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateResolverRule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateResolverRule))
-> Logger
-> Service
-> Proxy CreateResolverRule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateResolverRule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ResolverRule -> Int -> CreateResolverRuleResponse
CreateResolverRuleResponse'
(Maybe ResolverRule -> Int -> CreateResolverRuleResponse)
-> Either String (Maybe ResolverRule)
-> Either String (Int -> CreateResolverRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ResolverRule)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResolverRule")
Either String (Int -> CreateResolverRuleResponse)
-> Either String Int -> Either String CreateResolverRuleResponse
forall (f :: * -> *) a b. Applicative f => 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))
)
instance Prelude.Hashable CreateResolverRule
instance Prelude.NFData CreateResolverRule
instance Core.ToHeaders CreateResolverRule where
toHeaders :: CreateResolverRule -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateResolverRule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Resolver.CreateResolverRule" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateResolverRule where
toJSON :: CreateResolverRule -> Value
toJSON CreateResolverRule' {Maybe [Tag]
Maybe (NonEmpty TargetAddress)
Maybe Text
Text
RuleTypeOption
domainName :: Text
ruleType :: RuleTypeOption
creatorRequestId :: Text
tags :: Maybe [Tag]
name :: Maybe Text
targetIps :: Maybe (NonEmpty TargetAddress)
resolverEndpointId :: Maybe Text
$sel:domainName:CreateResolverRule' :: CreateResolverRule -> Text
$sel:ruleType:CreateResolverRule' :: CreateResolverRule -> RuleTypeOption
$sel:creatorRequestId:CreateResolverRule' :: CreateResolverRule -> Text
$sel:tags:CreateResolverRule' :: CreateResolverRule -> Maybe [Tag]
$sel:name:CreateResolverRule' :: CreateResolverRule -> Maybe Text
$sel:targetIps:CreateResolverRule' :: CreateResolverRule -> Maybe (NonEmpty TargetAddress)
$sel:resolverEndpointId:CreateResolverRule' :: CreateResolverRule -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ResolverEndpointId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resolverEndpointId,
(Text
"TargetIps" Text -> NonEmpty TargetAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty TargetAddress -> Pair)
-> Maybe (NonEmpty TargetAddress) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty TargetAddress)
targetIps,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CreatorRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
creatorRequestId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RuleType" Text -> RuleTypeOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RuleTypeOption
ruleType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
]
)
instance Core.ToPath CreateResolverRule where
toPath :: CreateResolverRule -> ByteString
toPath = ByteString -> CreateResolverRule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateResolverRule where
toQuery :: CreateResolverRule -> QueryString
toQuery = QueryString -> CreateResolverRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateResolverRuleResponse = CreateResolverRuleResponse'
{
CreateResolverRuleResponse -> Maybe ResolverRule
resolverRule :: Prelude.Maybe ResolverRule,
CreateResolverRuleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool
(CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool)
-> (CreateResolverRuleResponse
-> CreateResolverRuleResponse -> Bool)
-> Eq CreateResolverRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool
$c/= :: CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool
== :: CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool
$c== :: CreateResolverRuleResponse -> CreateResolverRuleResponse -> Bool
Prelude.Eq, ReadPrec [CreateResolverRuleResponse]
ReadPrec CreateResolverRuleResponse
Int -> ReadS CreateResolverRuleResponse
ReadS [CreateResolverRuleResponse]
(Int -> ReadS CreateResolverRuleResponse)
-> ReadS [CreateResolverRuleResponse]
-> ReadPrec CreateResolverRuleResponse
-> ReadPrec [CreateResolverRuleResponse]
-> Read CreateResolverRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateResolverRuleResponse]
$creadListPrec :: ReadPrec [CreateResolverRuleResponse]
readPrec :: ReadPrec CreateResolverRuleResponse
$creadPrec :: ReadPrec CreateResolverRuleResponse
readList :: ReadS [CreateResolverRuleResponse]
$creadList :: ReadS [CreateResolverRuleResponse]
readsPrec :: Int -> ReadS CreateResolverRuleResponse
$creadsPrec :: Int -> ReadS CreateResolverRuleResponse
Prelude.Read, Int -> CreateResolverRuleResponse -> ShowS
[CreateResolverRuleResponse] -> ShowS
CreateResolverRuleResponse -> String
(Int -> CreateResolverRuleResponse -> ShowS)
-> (CreateResolverRuleResponse -> String)
-> ([CreateResolverRuleResponse] -> ShowS)
-> Show CreateResolverRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateResolverRuleResponse] -> ShowS
$cshowList :: [CreateResolverRuleResponse] -> ShowS
show :: CreateResolverRuleResponse -> String
$cshow :: CreateResolverRuleResponse -> String
showsPrec :: Int -> CreateResolverRuleResponse -> ShowS
$cshowsPrec :: Int -> CreateResolverRuleResponse -> ShowS
Prelude.Show, (forall x.
CreateResolverRuleResponse -> Rep CreateResolverRuleResponse x)
-> (forall x.
Rep CreateResolverRuleResponse x -> CreateResolverRuleResponse)
-> Generic CreateResolverRuleResponse
forall x.
Rep CreateResolverRuleResponse x -> CreateResolverRuleResponse
forall x.
CreateResolverRuleResponse -> Rep CreateResolverRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateResolverRuleResponse x -> CreateResolverRuleResponse
$cfrom :: forall x.
CreateResolverRuleResponse -> Rep CreateResolverRuleResponse x
Prelude.Generic)
newCreateResolverRuleResponse ::
Prelude.Int ->
CreateResolverRuleResponse
newCreateResolverRuleResponse :: Int -> CreateResolverRuleResponse
newCreateResolverRuleResponse Int
pHttpStatus_ =
CreateResolverRuleResponse' :: Maybe ResolverRule -> Int -> CreateResolverRuleResponse
CreateResolverRuleResponse'
{ $sel:resolverRule:CreateResolverRuleResponse' :: Maybe ResolverRule
resolverRule =
Maybe ResolverRule
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateResolverRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createResolverRuleResponse_resolverRule :: Lens.Lens' CreateResolverRuleResponse (Prelude.Maybe ResolverRule)
createResolverRuleResponse_resolverRule :: (Maybe ResolverRule -> f (Maybe ResolverRule))
-> CreateResolverRuleResponse -> f CreateResolverRuleResponse
createResolverRuleResponse_resolverRule = (CreateResolverRuleResponse -> Maybe ResolverRule)
-> (CreateResolverRuleResponse
-> Maybe ResolverRule -> CreateResolverRuleResponse)
-> Lens
CreateResolverRuleResponse
CreateResolverRuleResponse
(Maybe ResolverRule)
(Maybe ResolverRule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRuleResponse' {Maybe ResolverRule
resolverRule :: Maybe ResolverRule
$sel:resolverRule:CreateResolverRuleResponse' :: CreateResolverRuleResponse -> Maybe ResolverRule
resolverRule} -> Maybe ResolverRule
resolverRule) (\s :: CreateResolverRuleResponse
s@CreateResolverRuleResponse' {} Maybe ResolverRule
a -> CreateResolverRuleResponse
s {$sel:resolverRule:CreateResolverRuleResponse' :: Maybe ResolverRule
resolverRule = Maybe ResolverRule
a} :: CreateResolverRuleResponse)
createResolverRuleResponse_httpStatus :: Lens.Lens' CreateResolverRuleResponse Prelude.Int
createResolverRuleResponse_httpStatus :: (Int -> f Int)
-> CreateResolverRuleResponse -> f CreateResolverRuleResponse
createResolverRuleResponse_httpStatus = (CreateResolverRuleResponse -> Int)
-> (CreateResolverRuleResponse
-> Int -> CreateResolverRuleResponse)
-> Lens
CreateResolverRuleResponse CreateResolverRuleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateResolverRuleResponse' :: CreateResolverRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateResolverRuleResponse
s@CreateResolverRuleResponse' {} Int
a -> CreateResolverRuleResponse
s {$sel:httpStatus:CreateResolverRuleResponse' :: Int
httpStatus = Int
a} :: CreateResolverRuleResponse)
instance Prelude.NFData CreateResolverRuleResponse