{-# 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.DescribeIpRestriction
-- 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)
--
-- Provides a summary and status of IP Rules.
module Amazonka.QuickSight.DescribeIpRestriction
  ( -- * Creating a Request
    DescribeIpRestriction (..),
    newDescribeIpRestriction,

    -- * Request Lenses
    describeIpRestriction_awsAccountId,

    -- * Destructuring the Response
    DescribeIpRestrictionResponse (..),
    newDescribeIpRestrictionResponse,

    -- * Response Lenses
    describeIpRestrictionResponse_requestId,
    describeIpRestrictionResponse_ipRestrictionRuleMap,
    describeIpRestrictionResponse_enabled,
    describeIpRestrictionResponse_awsAccountId,
    describeIpRestrictionResponse_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:/ 'newDescribeIpRestriction' smart constructor.
data DescribeIpRestriction = DescribeIpRestriction'
  { -- | Your AWS account ID.
    DescribeIpRestriction -> Text
awsAccountId :: Prelude.Text
  }
  deriving (DescribeIpRestriction -> DescribeIpRestriction -> Bool
(DescribeIpRestriction -> DescribeIpRestriction -> Bool)
-> (DescribeIpRestriction -> DescribeIpRestriction -> Bool)
-> Eq DescribeIpRestriction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIpRestriction -> DescribeIpRestriction -> Bool
$c/= :: DescribeIpRestriction -> DescribeIpRestriction -> Bool
== :: DescribeIpRestriction -> DescribeIpRestriction -> Bool
$c== :: DescribeIpRestriction -> DescribeIpRestriction -> Bool
Prelude.Eq, ReadPrec [DescribeIpRestriction]
ReadPrec DescribeIpRestriction
Int -> ReadS DescribeIpRestriction
ReadS [DescribeIpRestriction]
(Int -> ReadS DescribeIpRestriction)
-> ReadS [DescribeIpRestriction]
-> ReadPrec DescribeIpRestriction
-> ReadPrec [DescribeIpRestriction]
-> Read DescribeIpRestriction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIpRestriction]
$creadListPrec :: ReadPrec [DescribeIpRestriction]
readPrec :: ReadPrec DescribeIpRestriction
$creadPrec :: ReadPrec DescribeIpRestriction
readList :: ReadS [DescribeIpRestriction]
$creadList :: ReadS [DescribeIpRestriction]
readsPrec :: Int -> ReadS DescribeIpRestriction
$creadsPrec :: Int -> ReadS DescribeIpRestriction
Prelude.Read, Int -> DescribeIpRestriction -> ShowS
[DescribeIpRestriction] -> ShowS
DescribeIpRestriction -> String
(Int -> DescribeIpRestriction -> ShowS)
-> (DescribeIpRestriction -> String)
-> ([DescribeIpRestriction] -> ShowS)
-> Show DescribeIpRestriction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIpRestriction] -> ShowS
$cshowList :: [DescribeIpRestriction] -> ShowS
show :: DescribeIpRestriction -> String
$cshow :: DescribeIpRestriction -> String
showsPrec :: Int -> DescribeIpRestriction -> ShowS
$cshowsPrec :: Int -> DescribeIpRestriction -> ShowS
Prelude.Show, (forall x. DescribeIpRestriction -> Rep DescribeIpRestriction x)
-> (forall x. Rep DescribeIpRestriction x -> DescribeIpRestriction)
-> Generic DescribeIpRestriction
forall x. Rep DescribeIpRestriction x -> DescribeIpRestriction
forall x. DescribeIpRestriction -> Rep DescribeIpRestriction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeIpRestriction x -> DescribeIpRestriction
$cfrom :: forall x. DescribeIpRestriction -> Rep DescribeIpRestriction x
Prelude.Generic)

-- |
-- Create a value of 'DescribeIpRestriction' 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:
--
-- 'awsAccountId', 'describeIpRestriction_awsAccountId' - Your AWS account ID.
newDescribeIpRestriction ::
  -- | 'awsAccountId'
  Prelude.Text ->
  DescribeIpRestriction
newDescribeIpRestriction :: Text -> DescribeIpRestriction
newDescribeIpRestriction Text
pAwsAccountId_ =
  DescribeIpRestriction' :: Text -> DescribeIpRestriction
DescribeIpRestriction'
    { $sel:awsAccountId:DescribeIpRestriction' :: Text
awsAccountId =
        Text
pAwsAccountId_
    }

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

instance Core.AWSRequest DescribeIpRestriction where
  type
    AWSResponse DescribeIpRestriction =
      DescribeIpRestrictionResponse
  request :: DescribeIpRestriction -> Request DescribeIpRestriction
request = Service -> DescribeIpRestriction -> Request DescribeIpRestriction
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeIpRestriction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeIpRestriction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeIpRestriction))
-> Logger
-> Service
-> Proxy DescribeIpRestriction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeIpRestriction)))
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 (HashMap Text Text)
-> Maybe Bool
-> Maybe Text
-> Int
-> DescribeIpRestrictionResponse
DescribeIpRestrictionResponse'
            (Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Bool
 -> Maybe Text
 -> Int
 -> DescribeIpRestrictionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe Text
      -> Int
      -> DescribeIpRestrictionResponse)
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 (HashMap Text Text)
   -> Maybe Bool
   -> Maybe Text
   -> Int
   -> DescribeIpRestrictionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe Bool -> Maybe Text -> Int -> DescribeIpRestrictionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IpRestrictionRuleMap"
                            Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Bool -> Maybe Text -> Int -> DescribeIpRestrictionResponse)
-> Either String (Maybe Bool)
-> Either
     String (Maybe Text -> Int -> DescribeIpRestrictionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Enabled")
            Either String (Maybe Text -> Int -> DescribeIpRestrictionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeIpRestrictionResponse)
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 -> DescribeIpRestrictionResponse)
-> Either String Int -> Either String DescribeIpRestrictionResponse
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 DescribeIpRestriction

instance Prelude.NFData DescribeIpRestriction

instance Core.ToHeaders DescribeIpRestriction where
  toHeaders :: DescribeIpRestriction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeIpRestriction -> 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.ToPath DescribeIpRestriction where
  toPath :: DescribeIpRestriction -> ByteString
toPath DescribeIpRestriction' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeIpRestriction' :: DescribeIpRestriction -> 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 DescribeIpRestriction where
  toQuery :: DescribeIpRestriction -> QueryString
toQuery = QueryString -> DescribeIpRestriction -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeIpRestrictionResponse' smart constructor.
data DescribeIpRestrictionResponse = DescribeIpRestrictionResponse'
  { -- | The ID of the describe request.
    DescribeIpRestrictionResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | Describes the IP rules with CIDR range and description.
    DescribeIpRestrictionResponse -> Maybe (HashMap Text Text)
ipRestrictionRuleMap :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Whether or not IP rules are enabled.
    DescribeIpRestrictionResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Your AWS account ID.
    DescribeIpRestrictionResponse -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The status of a set of IP restrictions. A successful request returns a
    -- 200 status code.
    DescribeIpRestrictionResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeIpRestrictionResponse
-> DescribeIpRestrictionResponse -> Bool
(DescribeIpRestrictionResponse
 -> DescribeIpRestrictionResponse -> Bool)
-> (DescribeIpRestrictionResponse
    -> DescribeIpRestrictionResponse -> Bool)
-> Eq DescribeIpRestrictionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeIpRestrictionResponse
-> DescribeIpRestrictionResponse -> Bool
$c/= :: DescribeIpRestrictionResponse
-> DescribeIpRestrictionResponse -> Bool
== :: DescribeIpRestrictionResponse
-> DescribeIpRestrictionResponse -> Bool
$c== :: DescribeIpRestrictionResponse
-> DescribeIpRestrictionResponse -> Bool
Prelude.Eq, ReadPrec [DescribeIpRestrictionResponse]
ReadPrec DescribeIpRestrictionResponse
Int -> ReadS DescribeIpRestrictionResponse
ReadS [DescribeIpRestrictionResponse]
(Int -> ReadS DescribeIpRestrictionResponse)
-> ReadS [DescribeIpRestrictionResponse]
-> ReadPrec DescribeIpRestrictionResponse
-> ReadPrec [DescribeIpRestrictionResponse]
-> Read DescribeIpRestrictionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeIpRestrictionResponse]
$creadListPrec :: ReadPrec [DescribeIpRestrictionResponse]
readPrec :: ReadPrec DescribeIpRestrictionResponse
$creadPrec :: ReadPrec DescribeIpRestrictionResponse
readList :: ReadS [DescribeIpRestrictionResponse]
$creadList :: ReadS [DescribeIpRestrictionResponse]
readsPrec :: Int -> ReadS DescribeIpRestrictionResponse
$creadsPrec :: Int -> ReadS DescribeIpRestrictionResponse
Prelude.Read, Int -> DescribeIpRestrictionResponse -> ShowS
[DescribeIpRestrictionResponse] -> ShowS
DescribeIpRestrictionResponse -> String
(Int -> DescribeIpRestrictionResponse -> ShowS)
-> (DescribeIpRestrictionResponse -> String)
-> ([DescribeIpRestrictionResponse] -> ShowS)
-> Show DescribeIpRestrictionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeIpRestrictionResponse] -> ShowS
$cshowList :: [DescribeIpRestrictionResponse] -> ShowS
show :: DescribeIpRestrictionResponse -> String
$cshow :: DescribeIpRestrictionResponse -> String
showsPrec :: Int -> DescribeIpRestrictionResponse -> ShowS
$cshowsPrec :: Int -> DescribeIpRestrictionResponse -> ShowS
Prelude.Show, (forall x.
 DescribeIpRestrictionResponse
 -> Rep DescribeIpRestrictionResponse x)
-> (forall x.
    Rep DescribeIpRestrictionResponse x
    -> DescribeIpRestrictionResponse)
-> Generic DescribeIpRestrictionResponse
forall x.
Rep DescribeIpRestrictionResponse x
-> DescribeIpRestrictionResponse
forall x.
DescribeIpRestrictionResponse
-> Rep DescribeIpRestrictionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeIpRestrictionResponse x
-> DescribeIpRestrictionResponse
$cfrom :: forall x.
DescribeIpRestrictionResponse
-> Rep DescribeIpRestrictionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeIpRestrictionResponse' 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', 'describeIpRestrictionResponse_requestId' - The ID of the describe request.
--
-- 'ipRestrictionRuleMap', 'describeIpRestrictionResponse_ipRestrictionRuleMap' - Describes the IP rules with CIDR range and description.
--
-- 'enabled', 'describeIpRestrictionResponse_enabled' - Whether or not IP rules are enabled.
--
-- 'awsAccountId', 'describeIpRestrictionResponse_awsAccountId' - Your AWS account ID.
--
-- 'status', 'describeIpRestrictionResponse_status' - The status of a set of IP restrictions. A successful request returns a
-- 200 status code.
newDescribeIpRestrictionResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeIpRestrictionResponse
newDescribeIpRestrictionResponse :: Int -> DescribeIpRestrictionResponse
newDescribeIpRestrictionResponse Int
pStatus_ =
  DescribeIpRestrictionResponse' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe Text
-> Int
-> DescribeIpRestrictionResponse
DescribeIpRestrictionResponse'
    { $sel:requestId:DescribeIpRestrictionResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ipRestrictionRuleMap:DescribeIpRestrictionResponse' :: Maybe (HashMap Text Text)
ipRestrictionRuleMap = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:DescribeIpRestrictionResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:DescribeIpRestrictionResponse' :: Maybe Text
awsAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeIpRestrictionResponse' :: Int
status = Int
pStatus_
    }

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

-- | Describes the IP rules with CIDR range and description.
describeIpRestrictionResponse_ipRestrictionRuleMap :: Lens.Lens' DescribeIpRestrictionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeIpRestrictionResponse_ipRestrictionRuleMap :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeIpRestrictionResponse -> f DescribeIpRestrictionResponse
describeIpRestrictionResponse_ipRestrictionRuleMap = (DescribeIpRestrictionResponse -> Maybe (HashMap Text Text))
-> (DescribeIpRestrictionResponse
    -> Maybe (HashMap Text Text) -> DescribeIpRestrictionResponse)
-> Lens
     DescribeIpRestrictionResponse
     DescribeIpRestrictionResponse
     (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 (\DescribeIpRestrictionResponse' {Maybe (HashMap Text Text)
ipRestrictionRuleMap :: Maybe (HashMap Text Text)
$sel:ipRestrictionRuleMap:DescribeIpRestrictionResponse' :: DescribeIpRestrictionResponse -> Maybe (HashMap Text Text)
ipRestrictionRuleMap} -> Maybe (HashMap Text Text)
ipRestrictionRuleMap) (\s :: DescribeIpRestrictionResponse
s@DescribeIpRestrictionResponse' {} Maybe (HashMap Text Text)
a -> DescribeIpRestrictionResponse
s {$sel:ipRestrictionRuleMap:DescribeIpRestrictionResponse' :: Maybe (HashMap Text Text)
ipRestrictionRuleMap = Maybe (HashMap Text Text)
a} :: DescribeIpRestrictionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeIpRestrictionResponse
 -> f DescribeIpRestrictionResponse)
-> ((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)))
-> DescribeIpRestrictionResponse
-> f DescribeIpRestrictionResponse
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.
describeIpRestrictionResponse_enabled :: Lens.Lens' DescribeIpRestrictionResponse (Prelude.Maybe Prelude.Bool)
describeIpRestrictionResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> DescribeIpRestrictionResponse -> f DescribeIpRestrictionResponse
describeIpRestrictionResponse_enabled = (DescribeIpRestrictionResponse -> Maybe Bool)
-> (DescribeIpRestrictionResponse
    -> Maybe Bool -> DescribeIpRestrictionResponse)
-> Lens
     DescribeIpRestrictionResponse
     DescribeIpRestrictionResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIpRestrictionResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:DescribeIpRestrictionResponse' :: DescribeIpRestrictionResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: DescribeIpRestrictionResponse
s@DescribeIpRestrictionResponse' {} Maybe Bool
a -> DescribeIpRestrictionResponse
s {$sel:enabled:DescribeIpRestrictionResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: DescribeIpRestrictionResponse)

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

-- | The status of a set of IP restrictions. A successful request returns a
-- 200 status code.
describeIpRestrictionResponse_status :: Lens.Lens' DescribeIpRestrictionResponse Prelude.Int
describeIpRestrictionResponse_status :: (Int -> f Int)
-> DescribeIpRestrictionResponse -> f DescribeIpRestrictionResponse
describeIpRestrictionResponse_status = (DescribeIpRestrictionResponse -> Int)
-> (DescribeIpRestrictionResponse
    -> Int -> DescribeIpRestrictionResponse)
-> Lens
     DescribeIpRestrictionResponse DescribeIpRestrictionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeIpRestrictionResponse' {Int
status :: Int
$sel:status:DescribeIpRestrictionResponse' :: DescribeIpRestrictionResponse -> Int
status} -> Int
status) (\s :: DescribeIpRestrictionResponse
s@DescribeIpRestrictionResponse' {} Int
a -> DescribeIpRestrictionResponse
s {$sel:status:DescribeIpRestrictionResponse' :: Int
status = Int
a} :: DescribeIpRestrictionResponse)

instance Prelude.NFData DescribeIpRestrictionResponse