{-# 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.IoTSiteWise.UpdateAccessPolicy
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an existing access policy that specifies an identity\'s access
-- to an IoT SiteWise Monitor portal or project resource.
module Amazonka.IoTSiteWise.UpdateAccessPolicy
  ( -- * Creating a Request
    UpdateAccessPolicy (..),
    newUpdateAccessPolicy,

    -- * Request Lenses
    updateAccessPolicy_clientToken,
    updateAccessPolicy_accessPolicyId,
    updateAccessPolicy_accessPolicyIdentity,
    updateAccessPolicy_accessPolicyResource,
    updateAccessPolicy_accessPolicyPermission,

    -- * Destructuring the Response
    UpdateAccessPolicyResponse (..),
    newUpdateAccessPolicyResponse,

    -- * Response Lenses
    updateAccessPolicyResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateAccessPolicy' smart constructor.
data UpdateAccessPolicy = UpdateAccessPolicy'
  { -- | A unique case-sensitive identifier that you can provide to ensure the
    -- idempotency of the request. Don\'t reuse this client token if a new
    -- idempotent request is required.
    UpdateAccessPolicy -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the access policy.
    UpdateAccessPolicy -> Text
accessPolicyId :: Prelude.Text,
    -- | The identity for this access policy. Choose an IAM Identity Center user,
    -- an IAM Identity Center group, or an IAM user.
    UpdateAccessPolicy -> Identity
accessPolicyIdentity :: Identity,
    -- | The IoT SiteWise Monitor resource for this access policy. Choose either
    -- a portal or a project.
    UpdateAccessPolicy -> Resource
accessPolicyResource :: Resource,
    -- | The permission level for this access policy. Note that a project
    -- @ADMINISTRATOR@ is also known as a project owner.
    UpdateAccessPolicy -> Permission
accessPolicyPermission :: Permission
  }
  deriving (UpdateAccessPolicy -> UpdateAccessPolicy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAccessPolicy -> UpdateAccessPolicy -> Bool
$c/= :: UpdateAccessPolicy -> UpdateAccessPolicy -> Bool
== :: UpdateAccessPolicy -> UpdateAccessPolicy -> Bool
$c== :: UpdateAccessPolicy -> UpdateAccessPolicy -> Bool
Prelude.Eq, ReadPrec [UpdateAccessPolicy]
ReadPrec UpdateAccessPolicy
Int -> ReadS UpdateAccessPolicy
ReadS [UpdateAccessPolicy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAccessPolicy]
$creadListPrec :: ReadPrec [UpdateAccessPolicy]
readPrec :: ReadPrec UpdateAccessPolicy
$creadPrec :: ReadPrec UpdateAccessPolicy
readList :: ReadS [UpdateAccessPolicy]
$creadList :: ReadS [UpdateAccessPolicy]
readsPrec :: Int -> ReadS UpdateAccessPolicy
$creadsPrec :: Int -> ReadS UpdateAccessPolicy
Prelude.Read, Int -> UpdateAccessPolicy -> ShowS
[UpdateAccessPolicy] -> ShowS
UpdateAccessPolicy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAccessPolicy] -> ShowS
$cshowList :: [UpdateAccessPolicy] -> ShowS
show :: UpdateAccessPolicy -> String
$cshow :: UpdateAccessPolicy -> String
showsPrec :: Int -> UpdateAccessPolicy -> ShowS
$cshowsPrec :: Int -> UpdateAccessPolicy -> ShowS
Prelude.Show, forall x. Rep UpdateAccessPolicy x -> UpdateAccessPolicy
forall x. UpdateAccessPolicy -> Rep UpdateAccessPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAccessPolicy x -> UpdateAccessPolicy
$cfrom :: forall x. UpdateAccessPolicy -> Rep UpdateAccessPolicy x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAccessPolicy' 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:
--
-- 'clientToken', 'updateAccessPolicy_clientToken' - A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
--
-- 'accessPolicyId', 'updateAccessPolicy_accessPolicyId' - The ID of the access policy.
--
-- 'accessPolicyIdentity', 'updateAccessPolicy_accessPolicyIdentity' - The identity for this access policy. Choose an IAM Identity Center user,
-- an IAM Identity Center group, or an IAM user.
--
-- 'accessPolicyResource', 'updateAccessPolicy_accessPolicyResource' - The IoT SiteWise Monitor resource for this access policy. Choose either
-- a portal or a project.
--
-- 'accessPolicyPermission', 'updateAccessPolicy_accessPolicyPermission' - The permission level for this access policy. Note that a project
-- @ADMINISTRATOR@ is also known as a project owner.
newUpdateAccessPolicy ::
  -- | 'accessPolicyId'
  Prelude.Text ->
  -- | 'accessPolicyIdentity'
  Identity ->
  -- | 'accessPolicyResource'
  Resource ->
  -- | 'accessPolicyPermission'
  Permission ->
  UpdateAccessPolicy
newUpdateAccessPolicy :: Text -> Identity -> Resource -> Permission -> UpdateAccessPolicy
newUpdateAccessPolicy
  Text
pAccessPolicyId_
  Identity
pAccessPolicyIdentity_
  Resource
pAccessPolicyResource_
  Permission
pAccessPolicyPermission_ =
    UpdateAccessPolicy'
      { $sel:clientToken:UpdateAccessPolicy' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
        $sel:accessPolicyId:UpdateAccessPolicy' :: Text
accessPolicyId = Text
pAccessPolicyId_,
        $sel:accessPolicyIdentity:UpdateAccessPolicy' :: Identity
accessPolicyIdentity = Identity
pAccessPolicyIdentity_,
        $sel:accessPolicyResource:UpdateAccessPolicy' :: Resource
accessPolicyResource = Resource
pAccessPolicyResource_,
        $sel:accessPolicyPermission:UpdateAccessPolicy' :: Permission
accessPolicyPermission = Permission
pAccessPolicyPermission_
      }

-- | A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
updateAccessPolicy_clientToken :: Lens.Lens' UpdateAccessPolicy (Prelude.Maybe Prelude.Text)
updateAccessPolicy_clientToken :: Lens' UpdateAccessPolicy (Maybe Text)
updateAccessPolicy_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessPolicy' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateAccessPolicy' :: UpdateAccessPolicy -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateAccessPolicy
s@UpdateAccessPolicy' {} Maybe Text
a -> UpdateAccessPolicy
s {$sel:clientToken:UpdateAccessPolicy' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateAccessPolicy)

-- | The ID of the access policy.
updateAccessPolicy_accessPolicyId :: Lens.Lens' UpdateAccessPolicy Prelude.Text
updateAccessPolicy_accessPolicyId :: Lens' UpdateAccessPolicy Text
updateAccessPolicy_accessPolicyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessPolicy' {Text
accessPolicyId :: Text
$sel:accessPolicyId:UpdateAccessPolicy' :: UpdateAccessPolicy -> Text
accessPolicyId} -> Text
accessPolicyId) (\s :: UpdateAccessPolicy
s@UpdateAccessPolicy' {} Text
a -> UpdateAccessPolicy
s {$sel:accessPolicyId:UpdateAccessPolicy' :: Text
accessPolicyId = Text
a} :: UpdateAccessPolicy)

-- | The identity for this access policy. Choose an IAM Identity Center user,
-- an IAM Identity Center group, or an IAM user.
updateAccessPolicy_accessPolicyIdentity :: Lens.Lens' UpdateAccessPolicy Identity
updateAccessPolicy_accessPolicyIdentity :: Lens' UpdateAccessPolicy Identity
updateAccessPolicy_accessPolicyIdentity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessPolicy' {Identity
accessPolicyIdentity :: Identity
$sel:accessPolicyIdentity:UpdateAccessPolicy' :: UpdateAccessPolicy -> Identity
accessPolicyIdentity} -> Identity
accessPolicyIdentity) (\s :: UpdateAccessPolicy
s@UpdateAccessPolicy' {} Identity
a -> UpdateAccessPolicy
s {$sel:accessPolicyIdentity:UpdateAccessPolicy' :: Identity
accessPolicyIdentity = Identity
a} :: UpdateAccessPolicy)

-- | The IoT SiteWise Monitor resource for this access policy. Choose either
-- a portal or a project.
updateAccessPolicy_accessPolicyResource :: Lens.Lens' UpdateAccessPolicy Resource
updateAccessPolicy_accessPolicyResource :: Lens' UpdateAccessPolicy Resource
updateAccessPolicy_accessPolicyResource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessPolicy' {Resource
accessPolicyResource :: Resource
$sel:accessPolicyResource:UpdateAccessPolicy' :: UpdateAccessPolicy -> Resource
accessPolicyResource} -> Resource
accessPolicyResource) (\s :: UpdateAccessPolicy
s@UpdateAccessPolicy' {} Resource
a -> UpdateAccessPolicy
s {$sel:accessPolicyResource:UpdateAccessPolicy' :: Resource
accessPolicyResource = Resource
a} :: UpdateAccessPolicy)

-- | The permission level for this access policy. Note that a project
-- @ADMINISTRATOR@ is also known as a project owner.
updateAccessPolicy_accessPolicyPermission :: Lens.Lens' UpdateAccessPolicy Permission
updateAccessPolicy_accessPolicyPermission :: Lens' UpdateAccessPolicy Permission
updateAccessPolicy_accessPolicyPermission = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessPolicy' {Permission
accessPolicyPermission :: Permission
$sel:accessPolicyPermission:UpdateAccessPolicy' :: UpdateAccessPolicy -> Permission
accessPolicyPermission} -> Permission
accessPolicyPermission) (\s :: UpdateAccessPolicy
s@UpdateAccessPolicy' {} Permission
a -> UpdateAccessPolicy
s {$sel:accessPolicyPermission:UpdateAccessPolicy' :: Permission
accessPolicyPermission = Permission
a} :: UpdateAccessPolicy)

instance Core.AWSRequest UpdateAccessPolicy where
  type
    AWSResponse UpdateAccessPolicy =
      UpdateAccessPolicyResponse
  request :: (Service -> Service)
-> UpdateAccessPolicy -> Request UpdateAccessPolicy
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateAccessPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAccessPolicy)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateAccessPolicyResponse
UpdateAccessPolicyResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateAccessPolicy where
  hashWithSalt :: Int -> UpdateAccessPolicy -> Int
hashWithSalt Int
_salt UpdateAccessPolicy' {Maybe Text
Text
Permission
Resource
Identity
accessPolicyPermission :: Permission
accessPolicyResource :: Resource
accessPolicyIdentity :: Identity
accessPolicyId :: Text
clientToken :: Maybe Text
$sel:accessPolicyPermission:UpdateAccessPolicy' :: UpdateAccessPolicy -> Permission
$sel:accessPolicyResource:UpdateAccessPolicy' :: UpdateAccessPolicy -> Resource
$sel:accessPolicyIdentity:UpdateAccessPolicy' :: UpdateAccessPolicy -> Identity
$sel:accessPolicyId:UpdateAccessPolicy' :: UpdateAccessPolicy -> Text
$sel:clientToken:UpdateAccessPolicy' :: UpdateAccessPolicy -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accessPolicyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Identity
accessPolicyIdentity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Resource
accessPolicyResource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Permission
accessPolicyPermission

instance Prelude.NFData UpdateAccessPolicy where
  rnf :: UpdateAccessPolicy -> ()
rnf UpdateAccessPolicy' {Maybe Text
Text
Permission
Resource
Identity
accessPolicyPermission :: Permission
accessPolicyResource :: Resource
accessPolicyIdentity :: Identity
accessPolicyId :: Text
clientToken :: Maybe Text
$sel:accessPolicyPermission:UpdateAccessPolicy' :: UpdateAccessPolicy -> Permission
$sel:accessPolicyResource:UpdateAccessPolicy' :: UpdateAccessPolicy -> Resource
$sel:accessPolicyIdentity:UpdateAccessPolicy' :: UpdateAccessPolicy -> Identity
$sel:accessPolicyId:UpdateAccessPolicy' :: UpdateAccessPolicy -> Text
$sel:clientToken:UpdateAccessPolicy' :: UpdateAccessPolicy -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
accessPolicyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Identity
accessPolicyIdentity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Resource
accessPolicyResource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Permission
accessPolicyPermission

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

instance Data.ToJSON UpdateAccessPolicy where
  toJSON :: UpdateAccessPolicy -> Value
toJSON UpdateAccessPolicy' {Maybe Text
Text
Permission
Resource
Identity
accessPolicyPermission :: Permission
accessPolicyResource :: Resource
accessPolicyIdentity :: Identity
accessPolicyId :: Text
clientToken :: Maybe Text
$sel:accessPolicyPermission:UpdateAccessPolicy' :: UpdateAccessPolicy -> Permission
$sel:accessPolicyResource:UpdateAccessPolicy' :: UpdateAccessPolicy -> Resource
$sel:accessPolicyIdentity:UpdateAccessPolicy' :: UpdateAccessPolicy -> Identity
$sel:accessPolicyId:UpdateAccessPolicy' :: UpdateAccessPolicy -> Text
$sel:clientToken:UpdateAccessPolicy' :: UpdateAccessPolicy -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"accessPolicyIdentity"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Identity
accessPolicyIdentity
              ),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"accessPolicyResource"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Resource
accessPolicyResource
              ),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"accessPolicyPermission"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Permission
accessPolicyPermission
              )
          ]
      )

instance Data.ToPath UpdateAccessPolicy where
  toPath :: UpdateAccessPolicy -> ByteString
toPath UpdateAccessPolicy' {Maybe Text
Text
Permission
Resource
Identity
accessPolicyPermission :: Permission
accessPolicyResource :: Resource
accessPolicyIdentity :: Identity
accessPolicyId :: Text
clientToken :: Maybe Text
$sel:accessPolicyPermission:UpdateAccessPolicy' :: UpdateAccessPolicy -> Permission
$sel:accessPolicyResource:UpdateAccessPolicy' :: UpdateAccessPolicy -> Resource
$sel:accessPolicyIdentity:UpdateAccessPolicy' :: UpdateAccessPolicy -> Identity
$sel:accessPolicyId:UpdateAccessPolicy' :: UpdateAccessPolicy -> Text
$sel:clientToken:UpdateAccessPolicy' :: UpdateAccessPolicy -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/access-policies/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
accessPolicyId]

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

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

-- |
-- Create a value of 'UpdateAccessPolicyResponse' 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:
--
-- 'httpStatus', 'updateAccessPolicyResponse_httpStatus' - The response's http status code.
newUpdateAccessPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAccessPolicyResponse
newUpdateAccessPolicyResponse :: Int -> UpdateAccessPolicyResponse
newUpdateAccessPolicyResponse Int
pHttpStatus_ =
  UpdateAccessPolicyResponse'
    { $sel:httpStatus:UpdateAccessPolicyResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData UpdateAccessPolicyResponse where
  rnf :: UpdateAccessPolicyResponse -> ()
rnf UpdateAccessPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateAccessPolicyResponse' :: UpdateAccessPolicyResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus