{-# 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.CloudWatchEvents.PutRule
(
PutRule (..),
newPutRule,
putRule_eventPattern,
putRule_state,
putRule_eventBusName,
putRule_scheduleExpression,
putRule_description,
putRule_tags,
putRule_roleArn,
putRule_name,
PutRuleResponse (..),
newPutRuleResponse,
putRuleResponse_ruleArn,
putRuleResponse_httpStatus,
)
where
import Amazonka.CloudWatchEvents.Types
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
data PutRule = PutRule'
{
PutRule -> Maybe Text
eventPattern :: Prelude.Maybe Prelude.Text,
PutRule -> Maybe RuleState
state :: Prelude.Maybe RuleState,
PutRule -> Maybe Text
eventBusName :: Prelude.Maybe Prelude.Text,
PutRule -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
PutRule -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PutRule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
PutRule -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
PutRule -> Text
name :: Prelude.Text
}
deriving (PutRule -> PutRule -> Bool
(PutRule -> PutRule -> Bool)
-> (PutRule -> PutRule -> Bool) -> Eq PutRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutRule -> PutRule -> Bool
$c/= :: PutRule -> PutRule -> Bool
== :: PutRule -> PutRule -> Bool
$c== :: PutRule -> PutRule -> Bool
Prelude.Eq, ReadPrec [PutRule]
ReadPrec PutRule
Int -> ReadS PutRule
ReadS [PutRule]
(Int -> ReadS PutRule)
-> ReadS [PutRule]
-> ReadPrec PutRule
-> ReadPrec [PutRule]
-> Read PutRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutRule]
$creadListPrec :: ReadPrec [PutRule]
readPrec :: ReadPrec PutRule
$creadPrec :: ReadPrec PutRule
readList :: ReadS [PutRule]
$creadList :: ReadS [PutRule]
readsPrec :: Int -> ReadS PutRule
$creadsPrec :: Int -> ReadS PutRule
Prelude.Read, Int -> PutRule -> ShowS
[PutRule] -> ShowS
PutRule -> String
(Int -> PutRule -> ShowS)
-> (PutRule -> String) -> ([PutRule] -> ShowS) -> Show PutRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutRule] -> ShowS
$cshowList :: [PutRule] -> ShowS
show :: PutRule -> String
$cshow :: PutRule -> String
showsPrec :: Int -> PutRule -> ShowS
$cshowsPrec :: Int -> PutRule -> ShowS
Prelude.Show, (forall x. PutRule -> Rep PutRule x)
-> (forall x. Rep PutRule x -> PutRule) -> Generic PutRule
forall x. Rep PutRule x -> PutRule
forall x. PutRule -> Rep PutRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutRule x -> PutRule
$cfrom :: forall x. PutRule -> Rep PutRule x
Prelude.Generic)
newPutRule ::
Prelude.Text ->
PutRule
newPutRule :: Text -> PutRule
newPutRule Text
pName_ =
PutRule' :: Maybe Text
-> Maybe RuleState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Text
-> PutRule
PutRule'
{ $sel:eventPattern:PutRule' :: Maybe Text
eventPattern = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:PutRule' :: Maybe RuleState
state = Maybe RuleState
forall a. Maybe a
Prelude.Nothing,
$sel:eventBusName:PutRule' :: Maybe Text
eventBusName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleExpression:PutRule' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:PutRule' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:PutRule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:PutRule' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:PutRule' :: Text
name = Text
pName_
}
putRule_eventPattern :: Lens.Lens' PutRule (Prelude.Maybe Prelude.Text)
putRule_eventPattern :: (Maybe Text -> f (Maybe Text)) -> PutRule -> f PutRule
putRule_eventPattern = (PutRule -> Maybe Text)
-> (PutRule -> Maybe Text -> PutRule)
-> Lens PutRule PutRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe Text
eventPattern :: Maybe Text
$sel:eventPattern:PutRule' :: PutRule -> Maybe Text
eventPattern} -> Maybe Text
eventPattern) (\s :: PutRule
s@PutRule' {} Maybe Text
a -> PutRule
s {$sel:eventPattern:PutRule' :: Maybe Text
eventPattern = Maybe Text
a} :: PutRule)
putRule_state :: Lens.Lens' PutRule (Prelude.Maybe RuleState)
putRule_state :: (Maybe RuleState -> f (Maybe RuleState)) -> PutRule -> f PutRule
putRule_state = (PutRule -> Maybe RuleState)
-> (PutRule -> Maybe RuleState -> PutRule)
-> Lens PutRule PutRule (Maybe RuleState) (Maybe RuleState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe RuleState
state :: Maybe RuleState
$sel:state:PutRule' :: PutRule -> Maybe RuleState
state} -> Maybe RuleState
state) (\s :: PutRule
s@PutRule' {} Maybe RuleState
a -> PutRule
s {$sel:state:PutRule' :: Maybe RuleState
state = Maybe RuleState
a} :: PutRule)
putRule_eventBusName :: Lens.Lens' PutRule (Prelude.Maybe Prelude.Text)
putRule_eventBusName :: (Maybe Text -> f (Maybe Text)) -> PutRule -> f PutRule
putRule_eventBusName = (PutRule -> Maybe Text)
-> (PutRule -> Maybe Text -> PutRule)
-> Lens PutRule PutRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe Text
eventBusName :: Maybe Text
$sel:eventBusName:PutRule' :: PutRule -> Maybe Text
eventBusName} -> Maybe Text
eventBusName) (\s :: PutRule
s@PutRule' {} Maybe Text
a -> PutRule
s {$sel:eventBusName:PutRule' :: Maybe Text
eventBusName = Maybe Text
a} :: PutRule)
putRule_scheduleExpression :: Lens.Lens' PutRule (Prelude.Maybe Prelude.Text)
putRule_scheduleExpression :: (Maybe Text -> f (Maybe Text)) -> PutRule -> f PutRule
putRule_scheduleExpression = (PutRule -> Maybe Text)
-> (PutRule -> Maybe Text -> PutRule)
-> Lens PutRule PutRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:PutRule' :: PutRule -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: PutRule
s@PutRule' {} Maybe Text
a -> PutRule
s {$sel:scheduleExpression:PutRule' :: Maybe Text
scheduleExpression = Maybe Text
a} :: PutRule)
putRule_description :: Lens.Lens' PutRule (Prelude.Maybe Prelude.Text)
putRule_description :: (Maybe Text -> f (Maybe Text)) -> PutRule -> f PutRule
putRule_description = (PutRule -> Maybe Text)
-> (PutRule -> Maybe Text -> PutRule)
-> Lens PutRule PutRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe Text
description :: Maybe Text
$sel:description:PutRule' :: PutRule -> Maybe Text
description} -> Maybe Text
description) (\s :: PutRule
s@PutRule' {} Maybe Text
a -> PutRule
s {$sel:description:PutRule' :: Maybe Text
description = Maybe Text
a} :: PutRule)
putRule_tags :: Lens.Lens' PutRule (Prelude.Maybe [Tag])
putRule_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> PutRule -> f PutRule
putRule_tags = (PutRule -> Maybe [Tag])
-> (PutRule -> Maybe [Tag] -> PutRule)
-> Lens PutRule PutRule (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutRule' :: PutRule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutRule
s@PutRule' {} Maybe [Tag]
a -> PutRule
s {$sel:tags:PutRule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutRule) ((Maybe [Tag] -> f (Maybe [Tag])) -> PutRule -> f PutRule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> PutRule
-> f PutRule
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
putRule_roleArn :: Lens.Lens' PutRule (Prelude.Maybe Prelude.Text)
putRule_roleArn :: (Maybe Text -> f (Maybe Text)) -> PutRule -> f PutRule
putRule_roleArn = (PutRule -> Maybe Text)
-> (PutRule -> Maybe Text -> PutRule)
-> Lens PutRule PutRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:PutRule' :: PutRule -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: PutRule
s@PutRule' {} Maybe Text
a -> PutRule
s {$sel:roleArn:PutRule' :: Maybe Text
roleArn = Maybe Text
a} :: PutRule)
putRule_name :: Lens.Lens' PutRule Prelude.Text
putRule_name :: (Text -> f Text) -> PutRule -> f PutRule
putRule_name = (PutRule -> Text)
-> (PutRule -> Text -> PutRule) -> Lens PutRule PutRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRule' {Text
name :: Text
$sel:name:PutRule' :: PutRule -> Text
name} -> Text
name) (\s :: PutRule
s@PutRule' {} Text
a -> PutRule
s {$sel:name:PutRule' :: Text
name = Text
a} :: PutRule)
instance Core.AWSRequest PutRule where
type AWSResponse PutRule = PutRuleResponse
request :: PutRule -> Request PutRule
request = Service -> PutRule -> Request PutRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutRule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PutRule))
-> Logger
-> Service
-> Proxy PutRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutRule)))
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 Text -> Int -> PutRuleResponse
PutRuleResponse'
(Maybe Text -> Int -> PutRuleResponse)
-> Either String (Maybe Text)
-> Either String (Int -> PutRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RuleArn")
Either String (Int -> PutRuleResponse)
-> Either String Int -> Either String PutRuleResponse
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 PutRule
instance Prelude.NFData PutRule
instance Core.ToHeaders PutRule where
toHeaders :: PutRule -> ResponseHeaders
toHeaders =
ResponseHeaders -> PutRule -> 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
"AWSEvents.PutRule" :: 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 PutRule where
toJSON :: PutRule -> Value
toJSON PutRule' {Maybe [Tag]
Maybe Text
Maybe RuleState
Text
name :: Text
roleArn :: Maybe Text
tags :: Maybe [Tag]
description :: Maybe Text
scheduleExpression :: Maybe Text
eventBusName :: Maybe Text
state :: Maybe RuleState
eventPattern :: Maybe Text
$sel:name:PutRule' :: PutRule -> Text
$sel:roleArn:PutRule' :: PutRule -> Maybe Text
$sel:tags:PutRule' :: PutRule -> Maybe [Tag]
$sel:description:PutRule' :: PutRule -> Maybe Text
$sel:scheduleExpression:PutRule' :: PutRule -> Maybe Text
$sel:eventBusName:PutRule' :: PutRule -> Maybe Text
$sel:state:PutRule' :: PutRule -> Maybe RuleState
$sel:eventPattern:PutRule' :: PutRule -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EventPattern" 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
eventPattern,
(Text
"State" Text -> RuleState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RuleState -> Pair) -> Maybe RuleState -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RuleState
state,
(Text
"EventBusName" 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
eventBusName,
(Text
"ScheduleExpression" 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
scheduleExpression,
(Text
"Description" 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
description,
(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,
(Text
"RoleArn" 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
roleArn,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath PutRule where
toPath :: PutRule -> ByteString
toPath = ByteString -> PutRule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PutRule where
toQuery :: PutRule -> QueryString
toQuery = QueryString -> PutRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutRuleResponse = PutRuleResponse'
{
PutRuleResponse -> Maybe Text
ruleArn :: Prelude.Maybe Prelude.Text,
PutRuleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutRuleResponse -> PutRuleResponse -> Bool
(PutRuleResponse -> PutRuleResponse -> Bool)
-> (PutRuleResponse -> PutRuleResponse -> Bool)
-> Eq PutRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutRuleResponse -> PutRuleResponse -> Bool
$c/= :: PutRuleResponse -> PutRuleResponse -> Bool
== :: PutRuleResponse -> PutRuleResponse -> Bool
$c== :: PutRuleResponse -> PutRuleResponse -> Bool
Prelude.Eq, ReadPrec [PutRuleResponse]
ReadPrec PutRuleResponse
Int -> ReadS PutRuleResponse
ReadS [PutRuleResponse]
(Int -> ReadS PutRuleResponse)
-> ReadS [PutRuleResponse]
-> ReadPrec PutRuleResponse
-> ReadPrec [PutRuleResponse]
-> Read PutRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutRuleResponse]
$creadListPrec :: ReadPrec [PutRuleResponse]
readPrec :: ReadPrec PutRuleResponse
$creadPrec :: ReadPrec PutRuleResponse
readList :: ReadS [PutRuleResponse]
$creadList :: ReadS [PutRuleResponse]
readsPrec :: Int -> ReadS PutRuleResponse
$creadsPrec :: Int -> ReadS PutRuleResponse
Prelude.Read, Int -> PutRuleResponse -> ShowS
[PutRuleResponse] -> ShowS
PutRuleResponse -> String
(Int -> PutRuleResponse -> ShowS)
-> (PutRuleResponse -> String)
-> ([PutRuleResponse] -> ShowS)
-> Show PutRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutRuleResponse] -> ShowS
$cshowList :: [PutRuleResponse] -> ShowS
show :: PutRuleResponse -> String
$cshow :: PutRuleResponse -> String
showsPrec :: Int -> PutRuleResponse -> ShowS
$cshowsPrec :: Int -> PutRuleResponse -> ShowS
Prelude.Show, (forall x. PutRuleResponse -> Rep PutRuleResponse x)
-> (forall x. Rep PutRuleResponse x -> PutRuleResponse)
-> Generic PutRuleResponse
forall x. Rep PutRuleResponse x -> PutRuleResponse
forall x. PutRuleResponse -> Rep PutRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutRuleResponse x -> PutRuleResponse
$cfrom :: forall x. PutRuleResponse -> Rep PutRuleResponse x
Prelude.Generic)
newPutRuleResponse ::
Prelude.Int ->
PutRuleResponse
newPutRuleResponse :: Int -> PutRuleResponse
newPutRuleResponse Int
pHttpStatus_ =
PutRuleResponse' :: Maybe Text -> Int -> PutRuleResponse
PutRuleResponse'
{ $sel:ruleArn:PutRuleResponse' :: Maybe Text
ruleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
putRuleResponse_ruleArn :: Lens.Lens' PutRuleResponse (Prelude.Maybe Prelude.Text)
putRuleResponse_ruleArn :: (Maybe Text -> f (Maybe Text))
-> PutRuleResponse -> f PutRuleResponse
putRuleResponse_ruleArn = (PutRuleResponse -> Maybe Text)
-> (PutRuleResponse -> Maybe Text -> PutRuleResponse)
-> Lens PutRuleResponse PutRuleResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRuleResponse' {Maybe Text
ruleArn :: Maybe Text
$sel:ruleArn:PutRuleResponse' :: PutRuleResponse -> Maybe Text
ruleArn} -> Maybe Text
ruleArn) (\s :: PutRuleResponse
s@PutRuleResponse' {} Maybe Text
a -> PutRuleResponse
s {$sel:ruleArn:PutRuleResponse' :: Maybe Text
ruleArn = Maybe Text
a} :: PutRuleResponse)
putRuleResponse_httpStatus :: Lens.Lens' PutRuleResponse Prelude.Int
putRuleResponse_httpStatus :: (Int -> f Int) -> PutRuleResponse -> f PutRuleResponse
putRuleResponse_httpStatus = (PutRuleResponse -> Int)
-> (PutRuleResponse -> Int -> PutRuleResponse)
-> Lens PutRuleResponse PutRuleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutRuleResponse' :: PutRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutRuleResponse
s@PutRuleResponse' {} Int
a -> PutRuleResponse
s {$sel:httpStatus:PutRuleResponse' :: Int
httpStatus = Int
a} :: PutRuleResponse)
instance Prelude.NFData PutRuleResponse