{-# 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.Organizations.DescribeEffectivePolicy
-- 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)
--
-- Returns the contents of the effective policy for specified policy type
-- and account. The effective policy is the aggregation of any policies of
-- the specified type that the account inherits, plus any policy of that
-- type that is directly attached to the account.
--
-- This operation applies only to policy types /other/ than service control
-- policies (SCPs).
--
-- For more information about policy inheritance, see
-- <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies-inheritance.html How Policy Inheritance Works>
-- in the /AWS Organizations User Guide/.
--
-- This operation can be called only from the organization\'s management
-- account or by a member account that is a delegated administrator for an
-- AWS service.
module Amazonka.Organizations.DescribeEffectivePolicy
  ( -- * Creating a Request
    DescribeEffectivePolicy (..),
    newDescribeEffectivePolicy,

    -- * Request Lenses
    describeEffectivePolicy_targetId,
    describeEffectivePolicy_policyType,

    -- * Destructuring the Response
    DescribeEffectivePolicyResponse (..),
    newDescribeEffectivePolicyResponse,

    -- * Response Lenses
    describeEffectivePolicyResponse_effectivePolicy,
    describeEffectivePolicyResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeEffectivePolicy' smart constructor.
data DescribeEffectivePolicy = DescribeEffectivePolicy'
  { -- | When you\'re signed in as the management account, specify the ID of the
    -- account that you want details about. Specifying an organization root or
    -- organizational unit (OU) as the target is not supported.
    DescribeEffectivePolicy -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
    -- | The type of policy that you want information about. You can specify one
    -- of the following values:
    --
    -- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html AISERVICES_OPT_OUT_POLICY>
    --
    -- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html BACKUP_POLICY>
    --
    -- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html TAG_POLICY>
    DescribeEffectivePolicy -> EffectivePolicyType
policyType :: EffectivePolicyType
  }
  deriving (DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool
(DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool)
-> (DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool)
-> Eq DescribeEffectivePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool
$c/= :: DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool
== :: DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool
$c== :: DescribeEffectivePolicy -> DescribeEffectivePolicy -> Bool
Prelude.Eq, ReadPrec [DescribeEffectivePolicy]
ReadPrec DescribeEffectivePolicy
Int -> ReadS DescribeEffectivePolicy
ReadS [DescribeEffectivePolicy]
(Int -> ReadS DescribeEffectivePolicy)
-> ReadS [DescribeEffectivePolicy]
-> ReadPrec DescribeEffectivePolicy
-> ReadPrec [DescribeEffectivePolicy]
-> Read DescribeEffectivePolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEffectivePolicy]
$creadListPrec :: ReadPrec [DescribeEffectivePolicy]
readPrec :: ReadPrec DescribeEffectivePolicy
$creadPrec :: ReadPrec DescribeEffectivePolicy
readList :: ReadS [DescribeEffectivePolicy]
$creadList :: ReadS [DescribeEffectivePolicy]
readsPrec :: Int -> ReadS DescribeEffectivePolicy
$creadsPrec :: Int -> ReadS DescribeEffectivePolicy
Prelude.Read, Int -> DescribeEffectivePolicy -> ShowS
[DescribeEffectivePolicy] -> ShowS
DescribeEffectivePolicy -> String
(Int -> DescribeEffectivePolicy -> ShowS)
-> (DescribeEffectivePolicy -> String)
-> ([DescribeEffectivePolicy] -> ShowS)
-> Show DescribeEffectivePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEffectivePolicy] -> ShowS
$cshowList :: [DescribeEffectivePolicy] -> ShowS
show :: DescribeEffectivePolicy -> String
$cshow :: DescribeEffectivePolicy -> String
showsPrec :: Int -> DescribeEffectivePolicy -> ShowS
$cshowsPrec :: Int -> DescribeEffectivePolicy -> ShowS
Prelude.Show, (forall x.
 DescribeEffectivePolicy -> Rep DescribeEffectivePolicy x)
-> (forall x.
    Rep DescribeEffectivePolicy x -> DescribeEffectivePolicy)
-> Generic DescribeEffectivePolicy
forall x. Rep DescribeEffectivePolicy x -> DescribeEffectivePolicy
forall x. DescribeEffectivePolicy -> Rep DescribeEffectivePolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEffectivePolicy x -> DescribeEffectivePolicy
$cfrom :: forall x. DescribeEffectivePolicy -> Rep DescribeEffectivePolicy x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEffectivePolicy' 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:
--
-- 'targetId', 'describeEffectivePolicy_targetId' - When you\'re signed in as the management account, specify the ID of the
-- account that you want details about. Specifying an organization root or
-- organizational unit (OU) as the target is not supported.
--
-- 'policyType', 'describeEffectivePolicy_policyType' - The type of policy that you want information about. You can specify one
-- of the following values:
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html AISERVICES_OPT_OUT_POLICY>
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html BACKUP_POLICY>
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html TAG_POLICY>
newDescribeEffectivePolicy ::
  -- | 'policyType'
  EffectivePolicyType ->
  DescribeEffectivePolicy
newDescribeEffectivePolicy :: EffectivePolicyType -> DescribeEffectivePolicy
newDescribeEffectivePolicy EffectivePolicyType
pPolicyType_ =
  DescribeEffectivePolicy' :: Maybe Text -> EffectivePolicyType -> DescribeEffectivePolicy
DescribeEffectivePolicy'
    { $sel:targetId:DescribeEffectivePolicy' :: Maybe Text
targetId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policyType:DescribeEffectivePolicy' :: EffectivePolicyType
policyType = EffectivePolicyType
pPolicyType_
    }

-- | When you\'re signed in as the management account, specify the ID of the
-- account that you want details about. Specifying an organization root or
-- organizational unit (OU) as the target is not supported.
describeEffectivePolicy_targetId :: Lens.Lens' DescribeEffectivePolicy (Prelude.Maybe Prelude.Text)
describeEffectivePolicy_targetId :: (Maybe Text -> f (Maybe Text))
-> DescribeEffectivePolicy -> f DescribeEffectivePolicy
describeEffectivePolicy_targetId = (DescribeEffectivePolicy -> Maybe Text)
-> (DescribeEffectivePolicy
    -> Maybe Text -> DescribeEffectivePolicy)
-> Lens
     DescribeEffectivePolicy
     DescribeEffectivePolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEffectivePolicy' {Maybe Text
targetId :: Maybe Text
$sel:targetId:DescribeEffectivePolicy' :: DescribeEffectivePolicy -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: DescribeEffectivePolicy
s@DescribeEffectivePolicy' {} Maybe Text
a -> DescribeEffectivePolicy
s {$sel:targetId:DescribeEffectivePolicy' :: Maybe Text
targetId = Maybe Text
a} :: DescribeEffectivePolicy)

-- | The type of policy that you want information about. You can specify one
-- of the following values:
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html AISERVICES_OPT_OUT_POLICY>
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html BACKUP_POLICY>
--
-- -   <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html TAG_POLICY>
describeEffectivePolicy_policyType :: Lens.Lens' DescribeEffectivePolicy EffectivePolicyType
describeEffectivePolicy_policyType :: (EffectivePolicyType -> f EffectivePolicyType)
-> DescribeEffectivePolicy -> f DescribeEffectivePolicy
describeEffectivePolicy_policyType = (DescribeEffectivePolicy -> EffectivePolicyType)
-> (DescribeEffectivePolicy
    -> EffectivePolicyType -> DescribeEffectivePolicy)
-> Lens
     DescribeEffectivePolicy
     DescribeEffectivePolicy
     EffectivePolicyType
     EffectivePolicyType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEffectivePolicy' {EffectivePolicyType
policyType :: EffectivePolicyType
$sel:policyType:DescribeEffectivePolicy' :: DescribeEffectivePolicy -> EffectivePolicyType
policyType} -> EffectivePolicyType
policyType) (\s :: DescribeEffectivePolicy
s@DescribeEffectivePolicy' {} EffectivePolicyType
a -> DescribeEffectivePolicy
s {$sel:policyType:DescribeEffectivePolicy' :: EffectivePolicyType
policyType = EffectivePolicyType
a} :: DescribeEffectivePolicy)

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

instance Prelude.NFData DescribeEffectivePolicy

instance Core.ToHeaders DescribeEffectivePolicy where
  toHeaders :: DescribeEffectivePolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeEffectivePolicy -> 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
"AWSOrganizationsV20161128.DescribeEffectivePolicy" ::
                          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 DescribeEffectivePolicy where
  toJSON :: DescribeEffectivePolicy -> Value
toJSON DescribeEffectivePolicy' {Maybe Text
EffectivePolicyType
policyType :: EffectivePolicyType
targetId :: Maybe Text
$sel:policyType:DescribeEffectivePolicy' :: DescribeEffectivePolicy -> EffectivePolicyType
$sel:targetId:DescribeEffectivePolicy' :: DescribeEffectivePolicy -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TargetId" 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
targetId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PolicyType" Text -> EffectivePolicyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EffectivePolicyType
policyType)
          ]
      )

instance Core.ToPath DescribeEffectivePolicy where
  toPath :: DescribeEffectivePolicy -> ByteString
toPath = ByteString -> DescribeEffectivePolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeEffectivePolicyResponse' smart constructor.
data DescribeEffectivePolicyResponse = DescribeEffectivePolicyResponse'
  { -- | The contents of the effective policy.
    DescribeEffectivePolicyResponse -> Maybe EffectivePolicy
effectivePolicy :: Prelude.Maybe EffectivePolicy,
    -- | The response's http status code.
    DescribeEffectivePolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeEffectivePolicyResponse
-> DescribeEffectivePolicyResponse -> Bool
(DescribeEffectivePolicyResponse
 -> DescribeEffectivePolicyResponse -> Bool)
-> (DescribeEffectivePolicyResponse
    -> DescribeEffectivePolicyResponse -> Bool)
-> Eq DescribeEffectivePolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEffectivePolicyResponse
-> DescribeEffectivePolicyResponse -> Bool
$c/= :: DescribeEffectivePolicyResponse
-> DescribeEffectivePolicyResponse -> Bool
== :: DescribeEffectivePolicyResponse
-> DescribeEffectivePolicyResponse -> Bool
$c== :: DescribeEffectivePolicyResponse
-> DescribeEffectivePolicyResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEffectivePolicyResponse]
ReadPrec DescribeEffectivePolicyResponse
Int -> ReadS DescribeEffectivePolicyResponse
ReadS [DescribeEffectivePolicyResponse]
(Int -> ReadS DescribeEffectivePolicyResponse)
-> ReadS [DescribeEffectivePolicyResponse]
-> ReadPrec DescribeEffectivePolicyResponse
-> ReadPrec [DescribeEffectivePolicyResponse]
-> Read DescribeEffectivePolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEffectivePolicyResponse]
$creadListPrec :: ReadPrec [DescribeEffectivePolicyResponse]
readPrec :: ReadPrec DescribeEffectivePolicyResponse
$creadPrec :: ReadPrec DescribeEffectivePolicyResponse
readList :: ReadS [DescribeEffectivePolicyResponse]
$creadList :: ReadS [DescribeEffectivePolicyResponse]
readsPrec :: Int -> ReadS DescribeEffectivePolicyResponse
$creadsPrec :: Int -> ReadS DescribeEffectivePolicyResponse
Prelude.Read, Int -> DescribeEffectivePolicyResponse -> ShowS
[DescribeEffectivePolicyResponse] -> ShowS
DescribeEffectivePolicyResponse -> String
(Int -> DescribeEffectivePolicyResponse -> ShowS)
-> (DescribeEffectivePolicyResponse -> String)
-> ([DescribeEffectivePolicyResponse] -> ShowS)
-> Show DescribeEffectivePolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEffectivePolicyResponse] -> ShowS
$cshowList :: [DescribeEffectivePolicyResponse] -> ShowS
show :: DescribeEffectivePolicyResponse -> String
$cshow :: DescribeEffectivePolicyResponse -> String
showsPrec :: Int -> DescribeEffectivePolicyResponse -> ShowS
$cshowsPrec :: Int -> DescribeEffectivePolicyResponse -> ShowS
Prelude.Show, (forall x.
 DescribeEffectivePolicyResponse
 -> Rep DescribeEffectivePolicyResponse x)
-> (forall x.
    Rep DescribeEffectivePolicyResponse x
    -> DescribeEffectivePolicyResponse)
-> Generic DescribeEffectivePolicyResponse
forall x.
Rep DescribeEffectivePolicyResponse x
-> DescribeEffectivePolicyResponse
forall x.
DescribeEffectivePolicyResponse
-> Rep DescribeEffectivePolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEffectivePolicyResponse x
-> DescribeEffectivePolicyResponse
$cfrom :: forall x.
DescribeEffectivePolicyResponse
-> Rep DescribeEffectivePolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEffectivePolicyResponse' 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:
--
-- 'effectivePolicy', 'describeEffectivePolicyResponse_effectivePolicy' - The contents of the effective policy.
--
-- 'httpStatus', 'describeEffectivePolicyResponse_httpStatus' - The response's http status code.
newDescribeEffectivePolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeEffectivePolicyResponse
newDescribeEffectivePolicyResponse :: Int -> DescribeEffectivePolicyResponse
newDescribeEffectivePolicyResponse Int
pHttpStatus_ =
  DescribeEffectivePolicyResponse' :: Maybe EffectivePolicy -> Int -> DescribeEffectivePolicyResponse
DescribeEffectivePolicyResponse'
    { $sel:effectivePolicy:DescribeEffectivePolicyResponse' :: Maybe EffectivePolicy
effectivePolicy =
        Maybe EffectivePolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeEffectivePolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The contents of the effective policy.
describeEffectivePolicyResponse_effectivePolicy :: Lens.Lens' DescribeEffectivePolicyResponse (Prelude.Maybe EffectivePolicy)
describeEffectivePolicyResponse_effectivePolicy :: (Maybe EffectivePolicy -> f (Maybe EffectivePolicy))
-> DescribeEffectivePolicyResponse
-> f DescribeEffectivePolicyResponse
describeEffectivePolicyResponse_effectivePolicy = (DescribeEffectivePolicyResponse -> Maybe EffectivePolicy)
-> (DescribeEffectivePolicyResponse
    -> Maybe EffectivePolicy -> DescribeEffectivePolicyResponse)
-> Lens
     DescribeEffectivePolicyResponse
     DescribeEffectivePolicyResponse
     (Maybe EffectivePolicy)
     (Maybe EffectivePolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEffectivePolicyResponse' {Maybe EffectivePolicy
effectivePolicy :: Maybe EffectivePolicy
$sel:effectivePolicy:DescribeEffectivePolicyResponse' :: DescribeEffectivePolicyResponse -> Maybe EffectivePolicy
effectivePolicy} -> Maybe EffectivePolicy
effectivePolicy) (\s :: DescribeEffectivePolicyResponse
s@DescribeEffectivePolicyResponse' {} Maybe EffectivePolicy
a -> DescribeEffectivePolicyResponse
s {$sel:effectivePolicy:DescribeEffectivePolicyResponse' :: Maybe EffectivePolicy
effectivePolicy = Maybe EffectivePolicy
a} :: DescribeEffectivePolicyResponse)

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

instance
  Prelude.NFData
    DescribeEffectivePolicyResponse