{-# 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.QuickSight.UpdateIpRestriction
-- 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 content and status of IP Rules.
module Amazonka.QuickSight.UpdateIpRestriction
  ( -- * Creating a Request
    UpdateIpRestriction (..),
    newUpdateIpRestriction,

    -- * Request Lenses
    updateIpRestriction_ipRestrictionRuleMap,
    updateIpRestriction_enabled,
    updateIpRestriction_awsAccountId,

    -- * Destructuring the Response
    UpdateIpRestrictionResponse (..),
    newUpdateIpRestrictionResponse,

    -- * Response Lenses
    updateIpRestrictionResponse_requestId,
    updateIpRestrictionResponse_awsAccountId,
    updateIpRestrictionResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateIpRestriction' smart constructor.
data UpdateIpRestriction = UpdateIpRestriction'
  { -- | Describes updated IP rules.
    UpdateIpRestriction -> Maybe (HashMap Text Text)
ipRestrictionRuleMap :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Whether or not IP rules are enabled.
    UpdateIpRestriction -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Your AWS account ID.
    UpdateIpRestriction -> Text
awsAccountId :: Prelude.Text
  }
  deriving (UpdateIpRestriction -> UpdateIpRestriction -> Bool
(UpdateIpRestriction -> UpdateIpRestriction -> Bool)
-> (UpdateIpRestriction -> UpdateIpRestriction -> Bool)
-> Eq UpdateIpRestriction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateIpRestriction -> UpdateIpRestriction -> Bool
$c/= :: UpdateIpRestriction -> UpdateIpRestriction -> Bool
== :: UpdateIpRestriction -> UpdateIpRestriction -> Bool
$c== :: UpdateIpRestriction -> UpdateIpRestriction -> Bool
Prelude.Eq, ReadPrec [UpdateIpRestriction]
ReadPrec UpdateIpRestriction
Int -> ReadS UpdateIpRestriction
ReadS [UpdateIpRestriction]
(Int -> ReadS UpdateIpRestriction)
-> ReadS [UpdateIpRestriction]
-> ReadPrec UpdateIpRestriction
-> ReadPrec [UpdateIpRestriction]
-> Read UpdateIpRestriction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateIpRestriction]
$creadListPrec :: ReadPrec [UpdateIpRestriction]
readPrec :: ReadPrec UpdateIpRestriction
$creadPrec :: ReadPrec UpdateIpRestriction
readList :: ReadS [UpdateIpRestriction]
$creadList :: ReadS [UpdateIpRestriction]
readsPrec :: Int -> ReadS UpdateIpRestriction
$creadsPrec :: Int -> ReadS UpdateIpRestriction
Prelude.Read, Int -> UpdateIpRestriction -> ShowS
[UpdateIpRestriction] -> ShowS
UpdateIpRestriction -> String
(Int -> UpdateIpRestriction -> ShowS)
-> (UpdateIpRestriction -> String)
-> ([UpdateIpRestriction] -> ShowS)
-> Show UpdateIpRestriction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateIpRestriction] -> ShowS
$cshowList :: [UpdateIpRestriction] -> ShowS
show :: UpdateIpRestriction -> String
$cshow :: UpdateIpRestriction -> String
showsPrec :: Int -> UpdateIpRestriction -> ShowS
$cshowsPrec :: Int -> UpdateIpRestriction -> ShowS
Prelude.Show, (forall x. UpdateIpRestriction -> Rep UpdateIpRestriction x)
-> (forall x. Rep UpdateIpRestriction x -> UpdateIpRestriction)
-> Generic UpdateIpRestriction
forall x. Rep UpdateIpRestriction x -> UpdateIpRestriction
forall x. UpdateIpRestriction -> Rep UpdateIpRestriction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateIpRestriction x -> UpdateIpRestriction
$cfrom :: forall x. UpdateIpRestriction -> Rep UpdateIpRestriction x
Prelude.Generic)

-- |
-- Create a value of 'UpdateIpRestriction' 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:
--
-- 'ipRestrictionRuleMap', 'updateIpRestriction_ipRestrictionRuleMap' - Describes updated IP rules.
--
-- 'enabled', 'updateIpRestriction_enabled' - Whether or not IP rules are enabled.
--
-- 'awsAccountId', 'updateIpRestriction_awsAccountId' - Your AWS account ID.
newUpdateIpRestriction ::
  -- | 'awsAccountId'
  Prelude.Text ->
  UpdateIpRestriction
newUpdateIpRestriction :: Text -> UpdateIpRestriction
newUpdateIpRestriction Text
pAwsAccountId_ =
  UpdateIpRestriction' :: Maybe (HashMap Text Text)
-> Maybe Bool -> Text -> UpdateIpRestriction
UpdateIpRestriction'
    { $sel:ipRestrictionRuleMap:UpdateIpRestriction' :: Maybe (HashMap Text Text)
ipRestrictionRuleMap =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:UpdateIpRestriction' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:UpdateIpRestriction' :: Text
awsAccountId = Text
pAwsAccountId_
    }

-- | Describes updated IP rules.
updateIpRestriction_ipRestrictionRuleMap :: Lens.Lens' UpdateIpRestriction (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateIpRestriction_ipRestrictionRuleMap :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateIpRestriction -> f UpdateIpRestriction
updateIpRestriction_ipRestrictionRuleMap = (UpdateIpRestriction -> Maybe (HashMap Text Text))
-> (UpdateIpRestriction
    -> Maybe (HashMap Text Text) -> UpdateIpRestriction)
-> Lens
     UpdateIpRestriction
     UpdateIpRestriction
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestriction' {Maybe (HashMap Text Text)
ipRestrictionRuleMap :: Maybe (HashMap Text Text)
$sel:ipRestrictionRuleMap:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe (HashMap Text Text)
ipRestrictionRuleMap} -> Maybe (HashMap Text Text)
ipRestrictionRuleMap) (\s :: UpdateIpRestriction
s@UpdateIpRestriction' {} Maybe (HashMap Text Text)
a -> UpdateIpRestriction
s {$sel:ipRestrictionRuleMap:UpdateIpRestriction' :: Maybe (HashMap Text Text)
ipRestrictionRuleMap = Maybe (HashMap Text Text)
a} :: UpdateIpRestriction) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateIpRestriction -> f UpdateIpRestriction)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateIpRestriction
-> f UpdateIpRestriction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Whether or not IP rules are enabled.
updateIpRestriction_enabled :: Lens.Lens' UpdateIpRestriction (Prelude.Maybe Prelude.Bool)
updateIpRestriction_enabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateIpRestriction -> f UpdateIpRestriction
updateIpRestriction_enabled = (UpdateIpRestriction -> Maybe Bool)
-> (UpdateIpRestriction -> Maybe Bool -> UpdateIpRestriction)
-> Lens
     UpdateIpRestriction UpdateIpRestriction (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestriction' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: UpdateIpRestriction
s@UpdateIpRestriction' {} Maybe Bool
a -> UpdateIpRestriction
s {$sel:enabled:UpdateIpRestriction' :: Maybe Bool
enabled = Maybe Bool
a} :: UpdateIpRestriction)

-- | Your AWS account ID.
updateIpRestriction_awsAccountId :: Lens.Lens' UpdateIpRestriction Prelude.Text
updateIpRestriction_awsAccountId :: (Text -> f Text) -> UpdateIpRestriction -> f UpdateIpRestriction
updateIpRestriction_awsAccountId = (UpdateIpRestriction -> Text)
-> (UpdateIpRestriction -> Text -> UpdateIpRestriction)
-> Lens UpdateIpRestriction UpdateIpRestriction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestriction' {Text
awsAccountId :: Text
$sel:awsAccountId:UpdateIpRestriction' :: UpdateIpRestriction -> Text
awsAccountId} -> Text
awsAccountId) (\s :: UpdateIpRestriction
s@UpdateIpRestriction' {} Text
a -> UpdateIpRestriction
s {$sel:awsAccountId:UpdateIpRestriction' :: Text
awsAccountId = Text
a} :: UpdateIpRestriction)

instance Core.AWSRequest UpdateIpRestriction where
  type
    AWSResponse UpdateIpRestriction =
      UpdateIpRestrictionResponse
  request :: UpdateIpRestriction -> Request UpdateIpRestriction
request = Service -> UpdateIpRestriction -> Request UpdateIpRestriction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateIpRestriction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateIpRestriction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateIpRestriction))
-> Logger
-> Service
-> Proxy UpdateIpRestriction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateIpRestriction)))
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 -> Maybe Text -> Int -> UpdateIpRestrictionResponse
UpdateIpRestrictionResponse'
            (Maybe Text -> Maybe Text -> Int -> UpdateIpRestrictionResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateIpRestrictionResponse)
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
"RequestId")
            Either String (Maybe Text -> Int -> UpdateIpRestrictionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateIpRestrictionResponse)
forall (f :: * -> *) a b. Applicative f => 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
"AwsAccountId")
            Either String (Int -> UpdateIpRestrictionResponse)
-> Either String Int -> Either String UpdateIpRestrictionResponse
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 UpdateIpRestriction

instance Prelude.NFData UpdateIpRestriction

instance Core.ToHeaders UpdateIpRestriction where
  toHeaders :: UpdateIpRestriction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateIpRestriction -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateIpRestriction where
  toJSON :: UpdateIpRestriction -> Value
toJSON UpdateIpRestriction' {Maybe Bool
Maybe (HashMap Text Text)
Text
awsAccountId :: Text
enabled :: Maybe Bool
ipRestrictionRuleMap :: Maybe (HashMap Text Text)
$sel:awsAccountId:UpdateIpRestriction' :: UpdateIpRestriction -> Text
$sel:enabled:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe Bool
$sel:ipRestrictionRuleMap:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IpRestrictionRuleMap" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
ipRestrictionRuleMap,
            (Text
"Enabled" 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
enabled
          ]
      )

instance Core.ToPath UpdateIpRestriction where
  toPath :: UpdateIpRestriction -> ByteString
toPath UpdateIpRestriction' {Maybe Bool
Maybe (HashMap Text Text)
Text
awsAccountId :: Text
enabled :: Maybe Bool
ipRestrictionRuleMap :: Maybe (HashMap Text Text)
$sel:awsAccountId:UpdateIpRestriction' :: UpdateIpRestriction -> Text
$sel:enabled:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe Bool
$sel:ipRestrictionRuleMap:UpdateIpRestriction' :: UpdateIpRestriction -> Maybe (HashMap Text Text)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/ip-restriction"
      ]

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

-- | /See:/ 'newUpdateIpRestrictionResponse' smart constructor.
data UpdateIpRestrictionResponse = UpdateIpRestrictionResponse'
  { -- | The ID of the update request.
    UpdateIpRestrictionResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | Your AWS account ID.
    UpdateIpRestrictionResponse -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The status of the updated IP rules. A successful request returns a 200
    -- code.
    UpdateIpRestrictionResponse -> Int
status :: Prelude.Int
  }
  deriving (UpdateIpRestrictionResponse -> UpdateIpRestrictionResponse -> Bool
(UpdateIpRestrictionResponse
 -> UpdateIpRestrictionResponse -> Bool)
-> (UpdateIpRestrictionResponse
    -> UpdateIpRestrictionResponse -> Bool)
-> Eq UpdateIpRestrictionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateIpRestrictionResponse -> UpdateIpRestrictionResponse -> Bool
$c/= :: UpdateIpRestrictionResponse -> UpdateIpRestrictionResponse -> Bool
== :: UpdateIpRestrictionResponse -> UpdateIpRestrictionResponse -> Bool
$c== :: UpdateIpRestrictionResponse -> UpdateIpRestrictionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateIpRestrictionResponse]
ReadPrec UpdateIpRestrictionResponse
Int -> ReadS UpdateIpRestrictionResponse
ReadS [UpdateIpRestrictionResponse]
(Int -> ReadS UpdateIpRestrictionResponse)
-> ReadS [UpdateIpRestrictionResponse]
-> ReadPrec UpdateIpRestrictionResponse
-> ReadPrec [UpdateIpRestrictionResponse]
-> Read UpdateIpRestrictionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateIpRestrictionResponse]
$creadListPrec :: ReadPrec [UpdateIpRestrictionResponse]
readPrec :: ReadPrec UpdateIpRestrictionResponse
$creadPrec :: ReadPrec UpdateIpRestrictionResponse
readList :: ReadS [UpdateIpRestrictionResponse]
$creadList :: ReadS [UpdateIpRestrictionResponse]
readsPrec :: Int -> ReadS UpdateIpRestrictionResponse
$creadsPrec :: Int -> ReadS UpdateIpRestrictionResponse
Prelude.Read, Int -> UpdateIpRestrictionResponse -> ShowS
[UpdateIpRestrictionResponse] -> ShowS
UpdateIpRestrictionResponse -> String
(Int -> UpdateIpRestrictionResponse -> ShowS)
-> (UpdateIpRestrictionResponse -> String)
-> ([UpdateIpRestrictionResponse] -> ShowS)
-> Show UpdateIpRestrictionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateIpRestrictionResponse] -> ShowS
$cshowList :: [UpdateIpRestrictionResponse] -> ShowS
show :: UpdateIpRestrictionResponse -> String
$cshow :: UpdateIpRestrictionResponse -> String
showsPrec :: Int -> UpdateIpRestrictionResponse -> ShowS
$cshowsPrec :: Int -> UpdateIpRestrictionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateIpRestrictionResponse -> Rep UpdateIpRestrictionResponse x)
-> (forall x.
    Rep UpdateIpRestrictionResponse x -> UpdateIpRestrictionResponse)
-> Generic UpdateIpRestrictionResponse
forall x.
Rep UpdateIpRestrictionResponse x -> UpdateIpRestrictionResponse
forall x.
UpdateIpRestrictionResponse -> Rep UpdateIpRestrictionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateIpRestrictionResponse x -> UpdateIpRestrictionResponse
$cfrom :: forall x.
UpdateIpRestrictionResponse -> Rep UpdateIpRestrictionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateIpRestrictionResponse' 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:
--
-- 'requestId', 'updateIpRestrictionResponse_requestId' - The ID of the update request.
--
-- 'awsAccountId', 'updateIpRestrictionResponse_awsAccountId' - Your AWS account ID.
--
-- 'status', 'updateIpRestrictionResponse_status' - The status of the updated IP rules. A successful request returns a 200
-- code.
newUpdateIpRestrictionResponse ::
  -- | 'status'
  Prelude.Int ->
  UpdateIpRestrictionResponse
newUpdateIpRestrictionResponse :: Int -> UpdateIpRestrictionResponse
newUpdateIpRestrictionResponse Int
pStatus_ =
  UpdateIpRestrictionResponse' :: Maybe Text -> Maybe Text -> Int -> UpdateIpRestrictionResponse
UpdateIpRestrictionResponse'
    { $sel:requestId:UpdateIpRestrictionResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:UpdateIpRestrictionResponse' :: Maybe Text
awsAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateIpRestrictionResponse' :: Int
status = Int
pStatus_
    }

-- | The ID of the update request.
updateIpRestrictionResponse_requestId :: Lens.Lens' UpdateIpRestrictionResponse (Prelude.Maybe Prelude.Text)
updateIpRestrictionResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> UpdateIpRestrictionResponse -> f UpdateIpRestrictionResponse
updateIpRestrictionResponse_requestId = (UpdateIpRestrictionResponse -> Maybe Text)
-> (UpdateIpRestrictionResponse
    -> Maybe Text -> UpdateIpRestrictionResponse)
-> Lens
     UpdateIpRestrictionResponse
     UpdateIpRestrictionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestrictionResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateIpRestrictionResponse' :: UpdateIpRestrictionResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateIpRestrictionResponse
s@UpdateIpRestrictionResponse' {} Maybe Text
a -> UpdateIpRestrictionResponse
s {$sel:requestId:UpdateIpRestrictionResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateIpRestrictionResponse)

-- | Your AWS account ID.
updateIpRestrictionResponse_awsAccountId :: Lens.Lens' UpdateIpRestrictionResponse (Prelude.Maybe Prelude.Text)
updateIpRestrictionResponse_awsAccountId :: (Maybe Text -> f (Maybe Text))
-> UpdateIpRestrictionResponse -> f UpdateIpRestrictionResponse
updateIpRestrictionResponse_awsAccountId = (UpdateIpRestrictionResponse -> Maybe Text)
-> (UpdateIpRestrictionResponse
    -> Maybe Text -> UpdateIpRestrictionResponse)
-> Lens
     UpdateIpRestrictionResponse
     UpdateIpRestrictionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestrictionResponse' {Maybe Text
awsAccountId :: Maybe Text
$sel:awsAccountId:UpdateIpRestrictionResponse' :: UpdateIpRestrictionResponse -> Maybe Text
awsAccountId} -> Maybe Text
awsAccountId) (\s :: UpdateIpRestrictionResponse
s@UpdateIpRestrictionResponse' {} Maybe Text
a -> UpdateIpRestrictionResponse
s {$sel:awsAccountId:UpdateIpRestrictionResponse' :: Maybe Text
awsAccountId = Maybe Text
a} :: UpdateIpRestrictionResponse)

-- | The status of the updated IP rules. A successful request returns a 200
-- code.
updateIpRestrictionResponse_status :: Lens.Lens' UpdateIpRestrictionResponse Prelude.Int
updateIpRestrictionResponse_status :: (Int -> f Int)
-> UpdateIpRestrictionResponse -> f UpdateIpRestrictionResponse
updateIpRestrictionResponse_status = (UpdateIpRestrictionResponse -> Int)
-> (UpdateIpRestrictionResponse
    -> Int -> UpdateIpRestrictionResponse)
-> Lens
     UpdateIpRestrictionResponse UpdateIpRestrictionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIpRestrictionResponse' {Int
status :: Int
$sel:status:UpdateIpRestrictionResponse' :: UpdateIpRestrictionResponse -> Int
status} -> Int
status) (\s :: UpdateIpRestrictionResponse
s@UpdateIpRestrictionResponse' {} Int
a -> UpdateIpRestrictionResponse
s {$sel:status:UpdateIpRestrictionResponse' :: Int
status = Int
a} :: UpdateIpRestrictionResponse)

instance Prelude.NFData UpdateIpRestrictionResponse