{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Chime.UpdateSipRule
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the details of the specified SIP rule.
module Amazonka.Chime.UpdateSipRule
  ( -- * Creating a Request
    UpdateSipRule (..),
    newUpdateSipRule,

    -- * Request Lenses
    updateSipRule_disabled,
    updateSipRule_targetApplications,
    updateSipRule_sipRuleId,
    updateSipRule_name,

    -- * Destructuring the Response
    UpdateSipRuleResponse (..),
    newUpdateSipRuleResponse,

    -- * Response Lenses
    updateSipRuleResponse_sipRule,
    updateSipRuleResponse_httpStatus,
  )
where

import Amazonka.Chime.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

-- | /See:/ 'newUpdateSipRule' smart constructor.
data UpdateSipRule = UpdateSipRule'
  { -- | The new value specified to indicate whether the rule is disabled.
    UpdateSipRule -> Maybe Bool
disabled :: Prelude.Maybe Prelude.Bool,
    -- | The new value of the list of target applications.
    UpdateSipRule -> Maybe (NonEmpty SipRuleTargetApplication)
targetApplications :: Prelude.Maybe (Prelude.NonEmpty SipRuleTargetApplication),
    -- | The SIP rule ID.
    UpdateSipRule -> Text
sipRuleId :: Prelude.Text,
    -- | The new name for the specified SIP rule.
    UpdateSipRule -> Text
name :: Prelude.Text
  }
  deriving (UpdateSipRule -> UpdateSipRule -> Bool
(UpdateSipRule -> UpdateSipRule -> Bool)
-> (UpdateSipRule -> UpdateSipRule -> Bool) -> Eq UpdateSipRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSipRule -> UpdateSipRule -> Bool
$c/= :: UpdateSipRule -> UpdateSipRule -> Bool
== :: UpdateSipRule -> UpdateSipRule -> Bool
$c== :: UpdateSipRule -> UpdateSipRule -> Bool
Prelude.Eq, ReadPrec [UpdateSipRule]
ReadPrec UpdateSipRule
Int -> ReadS UpdateSipRule
ReadS [UpdateSipRule]
(Int -> ReadS UpdateSipRule)
-> ReadS [UpdateSipRule]
-> ReadPrec UpdateSipRule
-> ReadPrec [UpdateSipRule]
-> Read UpdateSipRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSipRule]
$creadListPrec :: ReadPrec [UpdateSipRule]
readPrec :: ReadPrec UpdateSipRule
$creadPrec :: ReadPrec UpdateSipRule
readList :: ReadS [UpdateSipRule]
$creadList :: ReadS [UpdateSipRule]
readsPrec :: Int -> ReadS UpdateSipRule
$creadsPrec :: Int -> ReadS UpdateSipRule
Prelude.Read, Int -> UpdateSipRule -> ShowS
[UpdateSipRule] -> ShowS
UpdateSipRule -> String
(Int -> UpdateSipRule -> ShowS)
-> (UpdateSipRule -> String)
-> ([UpdateSipRule] -> ShowS)
-> Show UpdateSipRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSipRule] -> ShowS
$cshowList :: [UpdateSipRule] -> ShowS
show :: UpdateSipRule -> String
$cshow :: UpdateSipRule -> String
showsPrec :: Int -> UpdateSipRule -> ShowS
$cshowsPrec :: Int -> UpdateSipRule -> ShowS
Prelude.Show, (forall x. UpdateSipRule -> Rep UpdateSipRule x)
-> (forall x. Rep UpdateSipRule x -> UpdateSipRule)
-> Generic UpdateSipRule
forall x. Rep UpdateSipRule x -> UpdateSipRule
forall x. UpdateSipRule -> Rep UpdateSipRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSipRule x -> UpdateSipRule
$cfrom :: forall x. UpdateSipRule -> Rep UpdateSipRule x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSipRule' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'disabled', 'updateSipRule_disabled' - The new value specified to indicate whether the rule is disabled.
--
-- 'targetApplications', 'updateSipRule_targetApplications' - The new value of the list of target applications.
--
-- 'sipRuleId', 'updateSipRule_sipRuleId' - The SIP rule ID.
--
-- 'name', 'updateSipRule_name' - The new name for the specified SIP rule.
newUpdateSipRule ::
  -- | 'sipRuleId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  UpdateSipRule
newUpdateSipRule :: Text -> Text -> UpdateSipRule
newUpdateSipRule Text
pSipRuleId_ Text
pName_ =
  UpdateSipRule' :: Maybe Bool
-> Maybe (NonEmpty SipRuleTargetApplication)
-> Text
-> Text
-> UpdateSipRule
UpdateSipRule'
    { $sel:disabled:UpdateSipRule' :: Maybe Bool
disabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:targetApplications:UpdateSipRule' :: Maybe (NonEmpty SipRuleTargetApplication)
targetApplications = Maybe (NonEmpty SipRuleTargetApplication)
forall a. Maybe a
Prelude.Nothing,
      $sel:sipRuleId:UpdateSipRule' :: Text
sipRuleId = Text
pSipRuleId_,
      $sel:name:UpdateSipRule' :: Text
name = Text
pName_
    }

-- | The new value specified to indicate whether the rule is disabled.
updateSipRule_disabled :: Lens.Lens' UpdateSipRule (Prelude.Maybe Prelude.Bool)
updateSipRule_disabled :: (Maybe Bool -> f (Maybe Bool)) -> UpdateSipRule -> f UpdateSipRule
updateSipRule_disabled = (UpdateSipRule -> Maybe Bool)
-> (UpdateSipRule -> Maybe Bool -> UpdateSipRule)
-> Lens UpdateSipRule UpdateSipRule (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRule' {Maybe Bool
disabled :: Maybe Bool
$sel:disabled:UpdateSipRule' :: UpdateSipRule -> Maybe Bool
disabled} -> Maybe Bool
disabled) (\s :: UpdateSipRule
s@UpdateSipRule' {} Maybe Bool
a -> UpdateSipRule
s {$sel:disabled:UpdateSipRule' :: Maybe Bool
disabled = Maybe Bool
a} :: UpdateSipRule)

-- | The new value of the list of target applications.
updateSipRule_targetApplications :: Lens.Lens' UpdateSipRule (Prelude.Maybe (Prelude.NonEmpty SipRuleTargetApplication))
updateSipRule_targetApplications :: (Maybe (NonEmpty SipRuleTargetApplication)
 -> f (Maybe (NonEmpty SipRuleTargetApplication)))
-> UpdateSipRule -> f UpdateSipRule
updateSipRule_targetApplications = (UpdateSipRule -> Maybe (NonEmpty SipRuleTargetApplication))
-> (UpdateSipRule
    -> Maybe (NonEmpty SipRuleTargetApplication) -> UpdateSipRule)
-> Lens
     UpdateSipRule
     UpdateSipRule
     (Maybe (NonEmpty SipRuleTargetApplication))
     (Maybe (NonEmpty SipRuleTargetApplication))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRule' {Maybe (NonEmpty SipRuleTargetApplication)
targetApplications :: Maybe (NonEmpty SipRuleTargetApplication)
$sel:targetApplications:UpdateSipRule' :: UpdateSipRule -> Maybe (NonEmpty SipRuleTargetApplication)
targetApplications} -> Maybe (NonEmpty SipRuleTargetApplication)
targetApplications) (\s :: UpdateSipRule
s@UpdateSipRule' {} Maybe (NonEmpty SipRuleTargetApplication)
a -> UpdateSipRule
s {$sel:targetApplications:UpdateSipRule' :: Maybe (NonEmpty SipRuleTargetApplication)
targetApplications = Maybe (NonEmpty SipRuleTargetApplication)
a} :: UpdateSipRule) ((Maybe (NonEmpty SipRuleTargetApplication)
  -> f (Maybe (NonEmpty SipRuleTargetApplication)))
 -> UpdateSipRule -> f UpdateSipRule)
-> ((Maybe (NonEmpty SipRuleTargetApplication)
     -> f (Maybe (NonEmpty SipRuleTargetApplication)))
    -> Maybe (NonEmpty SipRuleTargetApplication)
    -> f (Maybe (NonEmpty SipRuleTargetApplication)))
-> (Maybe (NonEmpty SipRuleTargetApplication)
    -> f (Maybe (NonEmpty SipRuleTargetApplication)))
-> UpdateSipRule
-> f UpdateSipRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
-> Iso
     (Maybe (NonEmpty SipRuleTargetApplication))
     (Maybe (NonEmpty SipRuleTargetApplication))
     (Maybe (NonEmpty SipRuleTargetApplication))
     (Maybe (NonEmpty SipRuleTargetApplication))
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 SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
  (NonEmpty SipRuleTargetApplication)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The SIP rule ID.
updateSipRule_sipRuleId :: Lens.Lens' UpdateSipRule Prelude.Text
updateSipRule_sipRuleId :: (Text -> f Text) -> UpdateSipRule -> f UpdateSipRule
updateSipRule_sipRuleId = (UpdateSipRule -> Text)
-> (UpdateSipRule -> Text -> UpdateSipRule)
-> Lens UpdateSipRule UpdateSipRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRule' {Text
sipRuleId :: Text
$sel:sipRuleId:UpdateSipRule' :: UpdateSipRule -> Text
sipRuleId} -> Text
sipRuleId) (\s :: UpdateSipRule
s@UpdateSipRule' {} Text
a -> UpdateSipRule
s {$sel:sipRuleId:UpdateSipRule' :: Text
sipRuleId = Text
a} :: UpdateSipRule)

-- | The new name for the specified SIP rule.
updateSipRule_name :: Lens.Lens' UpdateSipRule Prelude.Text
updateSipRule_name :: (Text -> f Text) -> UpdateSipRule -> f UpdateSipRule
updateSipRule_name = (UpdateSipRule -> Text)
-> (UpdateSipRule -> Text -> UpdateSipRule)
-> Lens UpdateSipRule UpdateSipRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRule' {Text
name :: Text
$sel:name:UpdateSipRule' :: UpdateSipRule -> Text
name} -> Text
name) (\s :: UpdateSipRule
s@UpdateSipRule' {} Text
a -> UpdateSipRule
s {$sel:name:UpdateSipRule' :: Text
name = Text
a} :: UpdateSipRule)

instance Core.AWSRequest UpdateSipRule where
  type
    AWSResponse UpdateSipRule =
      UpdateSipRuleResponse
  request :: UpdateSipRule -> Request UpdateSipRule
request = Service -> UpdateSipRule -> Request UpdateSipRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateSipRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSipRule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateSipRule))
-> Logger
-> Service
-> Proxy UpdateSipRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSipRule)))
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 SipRule -> Int -> UpdateSipRuleResponse
UpdateSipRuleResponse'
            (Maybe SipRule -> Int -> UpdateSipRuleResponse)
-> Either String (Maybe SipRule)
-> Either String (Int -> UpdateSipRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SipRule)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SipRule")
            Either String (Int -> UpdateSipRuleResponse)
-> Either String Int -> Either String UpdateSipRuleResponse
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 UpdateSipRule

instance Prelude.NFData UpdateSipRule

instance Core.ToHeaders UpdateSipRule where
  toHeaders :: UpdateSipRule -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateSipRule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON UpdateSipRule where
  toJSON :: UpdateSipRule -> Value
toJSON UpdateSipRule' {Maybe Bool
Maybe (NonEmpty SipRuleTargetApplication)
Text
name :: Text
sipRuleId :: Text
targetApplications :: Maybe (NonEmpty SipRuleTargetApplication)
disabled :: Maybe Bool
$sel:name:UpdateSipRule' :: UpdateSipRule -> Text
$sel:sipRuleId:UpdateSipRule' :: UpdateSipRule -> Text
$sel:targetApplications:UpdateSipRule' :: UpdateSipRule -> Maybe (NonEmpty SipRuleTargetApplication)
$sel:disabled:UpdateSipRule' :: UpdateSipRule -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Disabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disabled,
            (Text
"TargetApplications" Text -> NonEmpty SipRuleTargetApplication -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty SipRuleTargetApplication -> Pair)
-> Maybe (NonEmpty SipRuleTargetApplication) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty SipRuleTargetApplication)
targetApplications,
            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 UpdateSipRule where
  toPath :: UpdateSipRule -> ByteString
toPath UpdateSipRule' {Maybe Bool
Maybe (NonEmpty SipRuleTargetApplication)
Text
name :: Text
sipRuleId :: Text
targetApplications :: Maybe (NonEmpty SipRuleTargetApplication)
disabled :: Maybe Bool
$sel:name:UpdateSipRule' :: UpdateSipRule -> Text
$sel:sipRuleId:UpdateSipRule' :: UpdateSipRule -> Text
$sel:targetApplications:UpdateSipRule' :: UpdateSipRule -> Maybe (NonEmpty SipRuleTargetApplication)
$sel:disabled:UpdateSipRule' :: UpdateSipRule -> Maybe Bool
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/sip-rules/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sipRuleId]

instance Core.ToQuery UpdateSipRule where
  toQuery :: UpdateSipRule -> QueryString
toQuery = QueryString -> UpdateSipRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateSipRuleResponse' smart constructor.
data UpdateSipRuleResponse = UpdateSipRuleResponse'
  { -- | Updated SIP rule details.
    UpdateSipRuleResponse -> Maybe SipRule
sipRule :: Prelude.Maybe SipRule,
    -- | The response's http status code.
    UpdateSipRuleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool
(UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool)
-> (UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool)
-> Eq UpdateSipRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool
$c/= :: UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool
== :: UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool
$c== :: UpdateSipRuleResponse -> UpdateSipRuleResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSipRuleResponse]
ReadPrec UpdateSipRuleResponse
Int -> ReadS UpdateSipRuleResponse
ReadS [UpdateSipRuleResponse]
(Int -> ReadS UpdateSipRuleResponse)
-> ReadS [UpdateSipRuleResponse]
-> ReadPrec UpdateSipRuleResponse
-> ReadPrec [UpdateSipRuleResponse]
-> Read UpdateSipRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSipRuleResponse]
$creadListPrec :: ReadPrec [UpdateSipRuleResponse]
readPrec :: ReadPrec UpdateSipRuleResponse
$creadPrec :: ReadPrec UpdateSipRuleResponse
readList :: ReadS [UpdateSipRuleResponse]
$creadList :: ReadS [UpdateSipRuleResponse]
readsPrec :: Int -> ReadS UpdateSipRuleResponse
$creadsPrec :: Int -> ReadS UpdateSipRuleResponse
Prelude.Read, Int -> UpdateSipRuleResponse -> ShowS
[UpdateSipRuleResponse] -> ShowS
UpdateSipRuleResponse -> String
(Int -> UpdateSipRuleResponse -> ShowS)
-> (UpdateSipRuleResponse -> String)
-> ([UpdateSipRuleResponse] -> ShowS)
-> Show UpdateSipRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSipRuleResponse] -> ShowS
$cshowList :: [UpdateSipRuleResponse] -> ShowS
show :: UpdateSipRuleResponse -> String
$cshow :: UpdateSipRuleResponse -> String
showsPrec :: Int -> UpdateSipRuleResponse -> ShowS
$cshowsPrec :: Int -> UpdateSipRuleResponse -> ShowS
Prelude.Show, (forall x. UpdateSipRuleResponse -> Rep UpdateSipRuleResponse x)
-> (forall x. Rep UpdateSipRuleResponse x -> UpdateSipRuleResponse)
-> Generic UpdateSipRuleResponse
forall x. Rep UpdateSipRuleResponse x -> UpdateSipRuleResponse
forall x. UpdateSipRuleResponse -> Rep UpdateSipRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSipRuleResponse x -> UpdateSipRuleResponse
$cfrom :: forall x. UpdateSipRuleResponse -> Rep UpdateSipRuleResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSipRuleResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'sipRule', 'updateSipRuleResponse_sipRule' - Updated SIP rule details.
--
-- 'httpStatus', 'updateSipRuleResponse_httpStatus' - The response's http status code.
newUpdateSipRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateSipRuleResponse
newUpdateSipRuleResponse :: Int -> UpdateSipRuleResponse
newUpdateSipRuleResponse Int
pHttpStatus_ =
  UpdateSipRuleResponse' :: Maybe SipRule -> Int -> UpdateSipRuleResponse
UpdateSipRuleResponse'
    { $sel:sipRule:UpdateSipRuleResponse' :: Maybe SipRule
sipRule = Maybe SipRule
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateSipRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Updated SIP rule details.
updateSipRuleResponse_sipRule :: Lens.Lens' UpdateSipRuleResponse (Prelude.Maybe SipRule)
updateSipRuleResponse_sipRule :: (Maybe SipRule -> f (Maybe SipRule))
-> UpdateSipRuleResponse -> f UpdateSipRuleResponse
updateSipRuleResponse_sipRule = (UpdateSipRuleResponse -> Maybe SipRule)
-> (UpdateSipRuleResponse
    -> Maybe SipRule -> UpdateSipRuleResponse)
-> Lens
     UpdateSipRuleResponse
     UpdateSipRuleResponse
     (Maybe SipRule)
     (Maybe SipRule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRuleResponse' {Maybe SipRule
sipRule :: Maybe SipRule
$sel:sipRule:UpdateSipRuleResponse' :: UpdateSipRuleResponse -> Maybe SipRule
sipRule} -> Maybe SipRule
sipRule) (\s :: UpdateSipRuleResponse
s@UpdateSipRuleResponse' {} Maybe SipRule
a -> UpdateSipRuleResponse
s {$sel:sipRule:UpdateSipRuleResponse' :: Maybe SipRule
sipRule = Maybe SipRule
a} :: UpdateSipRuleResponse)

-- | The response's http status code.
updateSipRuleResponse_httpStatus :: Lens.Lens' UpdateSipRuleResponse Prelude.Int
updateSipRuleResponse_httpStatus :: (Int -> f Int) -> UpdateSipRuleResponse -> f UpdateSipRuleResponse
updateSipRuleResponse_httpStatus = (UpdateSipRuleResponse -> Int)
-> (UpdateSipRuleResponse -> Int -> UpdateSipRuleResponse)
-> Lens UpdateSipRuleResponse UpdateSipRuleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSipRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateSipRuleResponse' :: UpdateSipRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateSipRuleResponse
s@UpdateSipRuleResponse' {} Int
a -> UpdateSipRuleResponse
s {$sel:httpStatus:UpdateSipRuleResponse' :: Int
httpStatus = Int
a} :: UpdateSipRuleResponse)

instance Prelude.NFData UpdateSipRuleResponse