{-# 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-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 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 Amazonka.IoTSiteWise.Types
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:/ '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 Amazon Web Services SSO
    -- user, an Amazon Web Services SSO 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
(UpdateAccessPolicy -> UpdateAccessPolicy -> Bool)
-> (UpdateAccessPolicy -> UpdateAccessPolicy -> Bool)
-> Eq UpdateAccessPolicy
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]
(Int -> ReadS UpdateAccessPolicy)
-> ReadS [UpdateAccessPolicy]
-> ReadPrec UpdateAccessPolicy
-> ReadPrec [UpdateAccessPolicy]
-> Read 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
(Int -> UpdateAccessPolicy -> ShowS)
-> (UpdateAccessPolicy -> String)
-> ([UpdateAccessPolicy] -> ShowS)
-> Show UpdateAccessPolicy
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. UpdateAccessPolicy -> Rep UpdateAccessPolicy x)
-> (forall x. Rep UpdateAccessPolicy x -> UpdateAccessPolicy)
-> Generic UpdateAccessPolicy
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 Amazon Web Services SSO
-- user, an Amazon Web Services SSO 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' :: Maybe Text
-> Text -> Identity -> Resource -> Permission -> UpdateAccessPolicy
UpdateAccessPolicy'
      { $sel:clientToken:UpdateAccessPolicy' :: Maybe Text
clientToken = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateAccessPolicy -> f UpdateAccessPolicy
updateAccessPolicy_clientToken = (UpdateAccessPolicy -> Maybe Text)
-> (UpdateAccessPolicy -> Maybe Text -> UpdateAccessPolicy)
-> Lens
     UpdateAccessPolicy UpdateAccessPolicy (Maybe Text) (Maybe Text)
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 :: (Text -> f Text) -> UpdateAccessPolicy -> f UpdateAccessPolicy
updateAccessPolicy_accessPolicyId = (UpdateAccessPolicy -> Text)
-> (UpdateAccessPolicy -> Text -> UpdateAccessPolicy)
-> Lens UpdateAccessPolicy UpdateAccessPolicy Text Text
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 Amazon Web Services SSO
-- user, an Amazon Web Services SSO group, or an IAM user.
updateAccessPolicy_accessPolicyIdentity :: Lens.Lens' UpdateAccessPolicy Identity
updateAccessPolicy_accessPolicyIdentity :: (Identity -> f Identity)
-> UpdateAccessPolicy -> f UpdateAccessPolicy
updateAccessPolicy_accessPolicyIdentity = (UpdateAccessPolicy -> Identity)
-> (UpdateAccessPolicy -> Identity -> UpdateAccessPolicy)
-> Lens UpdateAccessPolicy UpdateAccessPolicy Identity Identity
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 :: (Resource -> f Resource)
-> UpdateAccessPolicy -> f UpdateAccessPolicy
updateAccessPolicy_accessPolicyResource = (UpdateAccessPolicy -> Resource)
-> (UpdateAccessPolicy -> Resource -> UpdateAccessPolicy)
-> Lens UpdateAccessPolicy UpdateAccessPolicy Resource Resource
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 :: (Permission -> f Permission)
-> UpdateAccessPolicy -> f UpdateAccessPolicy
updateAccessPolicy_accessPolicyPermission = (UpdateAccessPolicy -> Permission)
-> (UpdateAccessPolicy -> Permission -> UpdateAccessPolicy)
-> Lens UpdateAccessPolicy UpdateAccessPolicy Permission Permission
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 :: UpdateAccessPolicy -> Request UpdateAccessPolicy
request = Service -> UpdateAccessPolicy -> Request UpdateAccessPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateAccessPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAccessPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateAccessPolicy))
-> Logger
-> Service
-> Proxy UpdateAccessPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAccessPolicy)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateAccessPolicyResponse
UpdateAccessPolicyResponse'
            (Int -> UpdateAccessPolicyResponse)
-> Either String Int -> Either String UpdateAccessPolicyResponse
forall (f :: * -> *) a b. Functor 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 UpdateAccessPolicy

instance Prelude.NFData UpdateAccessPolicy

instance Core.ToHeaders UpdateAccessPolicy where
  toHeaders :: UpdateAccessPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateAccessPolicy -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientToken" 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
clientToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"accessPolicyIdentity"
                  Text -> Identity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Identity
accessPolicyIdentity
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"accessPolicyResource"
                  Text -> Resource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Resource
accessPolicyResource
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"accessPolicyPermission"
                  Text -> Permission -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Permission
accessPolicyPermission
              )
          ]
      )

instance Core.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
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/access-policies/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
accessPolicyId]

instance Core.ToQuery UpdateAccessPolicy where
  toQuery :: UpdateAccessPolicy -> QueryString
toQuery = QueryString -> UpdateAccessPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(UpdateAccessPolicyResponse -> UpdateAccessPolicyResponse -> Bool)
-> (UpdateAccessPolicyResponse
    -> UpdateAccessPolicyResponse -> Bool)
-> Eq UpdateAccessPolicyResponse
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]
(Int -> ReadS UpdateAccessPolicyResponse)
-> ReadS [UpdateAccessPolicyResponse]
-> ReadPrec UpdateAccessPolicyResponse
-> ReadPrec [UpdateAccessPolicyResponse]
-> Read 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
(Int -> UpdateAccessPolicyResponse -> ShowS)
-> (UpdateAccessPolicyResponse -> String)
-> ([UpdateAccessPolicyResponse] -> ShowS)
-> Show UpdateAccessPolicyResponse
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.
 UpdateAccessPolicyResponse -> Rep UpdateAccessPolicyResponse x)
-> (forall x.
    Rep UpdateAccessPolicyResponse x -> UpdateAccessPolicyResponse)
-> Generic UpdateAccessPolicyResponse
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' :: Int -> UpdateAccessPolicyResponse
UpdateAccessPolicyResponse'
    { $sel:httpStatus:UpdateAccessPolicyResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
updateAccessPolicyResponse_httpStatus :: Lens.Lens' UpdateAccessPolicyResponse Prelude.Int
updateAccessPolicyResponse_httpStatus :: (Int -> f Int)
-> UpdateAccessPolicyResponse -> f UpdateAccessPolicyResponse
updateAccessPolicyResponse_httpStatus = (UpdateAccessPolicyResponse -> Int)
-> (UpdateAccessPolicyResponse
    -> Int -> UpdateAccessPolicyResponse)
-> Lens
     UpdateAccessPolicyResponse UpdateAccessPolicyResponse Int Int
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