{-# 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.UpdateOrganizationalUnit
-- 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)
--
-- Renames the specified organizational unit (OU). The ID and ARN don\'t
-- change. The child OUs and accounts remain in place, and any attached
-- policies of the OU remain attached.
--
-- This operation can be called only from the organization\'s management
-- account.
module Amazonka.Organizations.UpdateOrganizationalUnit
  ( -- * Creating a Request
    UpdateOrganizationalUnit (..),
    newUpdateOrganizationalUnit,

    -- * Request Lenses
    updateOrganizationalUnit_name,
    updateOrganizationalUnit_organizationalUnitId,

    -- * Destructuring the Response
    UpdateOrganizationalUnitResponse (..),
    newUpdateOrganizationalUnitResponse,

    -- * Response Lenses
    updateOrganizationalUnitResponse_organizationalUnit,
    updateOrganizationalUnitResponse_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:/ 'newUpdateOrganizationalUnit' smart constructor.
data UpdateOrganizationalUnit = UpdateOrganizationalUnit'
  { -- | The new name that you want to assign to the OU.
    --
    -- The <http://wikipedia.org/wiki/regex regex pattern> that is used to
    -- validate this parameter is a string of any of the characters in the
    -- ASCII character range.
    UpdateOrganizationalUnit -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier (ID) of the OU that you want to rename. You can
    -- get the ID from the ListOrganizationalUnitsForParent operation.
    --
    -- The <http://wikipedia.org/wiki/regex regex pattern> for an
    -- organizational unit ID string requires \"ou-\" followed by from 4 to 32
    -- lowercase letters or digits (the ID of the root that contains the OU).
    -- This string is followed by a second \"-\" dash and from 8 to 32
    -- additional lowercase letters or digits.
    UpdateOrganizationalUnit -> Text
organizationalUnitId :: Prelude.Text
  }
  deriving (UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool
(UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool)
-> (UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool)
-> Eq UpdateOrganizationalUnit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool
$c/= :: UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool
== :: UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool
$c== :: UpdateOrganizationalUnit -> UpdateOrganizationalUnit -> Bool
Prelude.Eq, ReadPrec [UpdateOrganizationalUnit]
ReadPrec UpdateOrganizationalUnit
Int -> ReadS UpdateOrganizationalUnit
ReadS [UpdateOrganizationalUnit]
(Int -> ReadS UpdateOrganizationalUnit)
-> ReadS [UpdateOrganizationalUnit]
-> ReadPrec UpdateOrganizationalUnit
-> ReadPrec [UpdateOrganizationalUnit]
-> Read UpdateOrganizationalUnit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateOrganizationalUnit]
$creadListPrec :: ReadPrec [UpdateOrganizationalUnit]
readPrec :: ReadPrec UpdateOrganizationalUnit
$creadPrec :: ReadPrec UpdateOrganizationalUnit
readList :: ReadS [UpdateOrganizationalUnit]
$creadList :: ReadS [UpdateOrganizationalUnit]
readsPrec :: Int -> ReadS UpdateOrganizationalUnit
$creadsPrec :: Int -> ReadS UpdateOrganizationalUnit
Prelude.Read, Int -> UpdateOrganizationalUnit -> ShowS
[UpdateOrganizationalUnit] -> ShowS
UpdateOrganizationalUnit -> String
(Int -> UpdateOrganizationalUnit -> ShowS)
-> (UpdateOrganizationalUnit -> String)
-> ([UpdateOrganizationalUnit] -> ShowS)
-> Show UpdateOrganizationalUnit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateOrganizationalUnit] -> ShowS
$cshowList :: [UpdateOrganizationalUnit] -> ShowS
show :: UpdateOrganizationalUnit -> String
$cshow :: UpdateOrganizationalUnit -> String
showsPrec :: Int -> UpdateOrganizationalUnit -> ShowS
$cshowsPrec :: Int -> UpdateOrganizationalUnit -> ShowS
Prelude.Show, (forall x.
 UpdateOrganizationalUnit -> Rep UpdateOrganizationalUnit x)
-> (forall x.
    Rep UpdateOrganizationalUnit x -> UpdateOrganizationalUnit)
-> Generic UpdateOrganizationalUnit
forall x.
Rep UpdateOrganizationalUnit x -> UpdateOrganizationalUnit
forall x.
UpdateOrganizationalUnit -> Rep UpdateOrganizationalUnit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateOrganizationalUnit x -> UpdateOrganizationalUnit
$cfrom :: forall x.
UpdateOrganizationalUnit -> Rep UpdateOrganizationalUnit x
Prelude.Generic)

-- |
-- Create a value of 'UpdateOrganizationalUnit' 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:
--
-- 'name', 'updateOrganizationalUnit_name' - The new name that you want to assign to the OU.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> that is used to
-- validate this parameter is a string of any of the characters in the
-- ASCII character range.
--
-- 'organizationalUnitId', 'updateOrganizationalUnit_organizationalUnitId' - The unique identifier (ID) of the OU that you want to rename. You can
-- get the ID from the ListOrganizationalUnitsForParent operation.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> for an
-- organizational unit ID string requires \"ou-\" followed by from 4 to 32
-- lowercase letters or digits (the ID of the root that contains the OU).
-- This string is followed by a second \"-\" dash and from 8 to 32
-- additional lowercase letters or digits.
newUpdateOrganizationalUnit ::
  -- | 'organizationalUnitId'
  Prelude.Text ->
  UpdateOrganizationalUnit
newUpdateOrganizationalUnit :: Text -> UpdateOrganizationalUnit
newUpdateOrganizationalUnit Text
pOrganizationalUnitId_ =
  UpdateOrganizationalUnit' :: Maybe Text -> Text -> UpdateOrganizationalUnit
UpdateOrganizationalUnit'
    { $sel:name:UpdateOrganizationalUnit' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationalUnitId:UpdateOrganizationalUnit' :: Text
organizationalUnitId = Text
pOrganizationalUnitId_
    }

-- | The new name that you want to assign to the OU.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> that is used to
-- validate this parameter is a string of any of the characters in the
-- ASCII character range.
updateOrganizationalUnit_name :: Lens.Lens' UpdateOrganizationalUnit (Prelude.Maybe Prelude.Text)
updateOrganizationalUnit_name :: (Maybe Text -> f (Maybe Text))
-> UpdateOrganizationalUnit -> f UpdateOrganizationalUnit
updateOrganizationalUnit_name = (UpdateOrganizationalUnit -> Maybe Text)
-> (UpdateOrganizationalUnit
    -> Maybe Text -> UpdateOrganizationalUnit)
-> Lens
     UpdateOrganizationalUnit
     UpdateOrganizationalUnit
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOrganizationalUnit' {Maybe Text
name :: Maybe Text
$sel:name:UpdateOrganizationalUnit' :: UpdateOrganizationalUnit -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateOrganizationalUnit
s@UpdateOrganizationalUnit' {} Maybe Text
a -> UpdateOrganizationalUnit
s {$sel:name:UpdateOrganizationalUnit' :: Maybe Text
name = Maybe Text
a} :: UpdateOrganizationalUnit)

-- | The unique identifier (ID) of the OU that you want to rename. You can
-- get the ID from the ListOrganizationalUnitsForParent operation.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> for an
-- organizational unit ID string requires \"ou-\" followed by from 4 to 32
-- lowercase letters or digits (the ID of the root that contains the OU).
-- This string is followed by a second \"-\" dash and from 8 to 32
-- additional lowercase letters or digits.
updateOrganizationalUnit_organizationalUnitId :: Lens.Lens' UpdateOrganizationalUnit Prelude.Text
updateOrganizationalUnit_organizationalUnitId :: (Text -> f Text)
-> UpdateOrganizationalUnit -> f UpdateOrganizationalUnit
updateOrganizationalUnit_organizationalUnitId = (UpdateOrganizationalUnit -> Text)
-> (UpdateOrganizationalUnit -> Text -> UpdateOrganizationalUnit)
-> Lens UpdateOrganizationalUnit UpdateOrganizationalUnit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOrganizationalUnit' {Text
organizationalUnitId :: Text
$sel:organizationalUnitId:UpdateOrganizationalUnit' :: UpdateOrganizationalUnit -> Text
organizationalUnitId} -> Text
organizationalUnitId) (\s :: UpdateOrganizationalUnit
s@UpdateOrganizationalUnit' {} Text
a -> UpdateOrganizationalUnit
s {$sel:organizationalUnitId:UpdateOrganizationalUnit' :: Text
organizationalUnitId = Text
a} :: UpdateOrganizationalUnit)

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

instance Prelude.NFData UpdateOrganizationalUnit

instance Core.ToHeaders UpdateOrganizationalUnit where
  toHeaders :: UpdateOrganizationalUnit -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateOrganizationalUnit -> 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.UpdateOrganizationalUnit" ::
                          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 UpdateOrganizationalUnit where
  toJSON :: UpdateOrganizationalUnit -> Value
toJSON UpdateOrganizationalUnit' {Maybe Text
Text
organizationalUnitId :: Text
name :: Maybe Text
$sel:organizationalUnitId:UpdateOrganizationalUnit' :: UpdateOrganizationalUnit -> Text
$sel:name:UpdateOrganizationalUnit' :: UpdateOrganizationalUnit -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Name" 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
name,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"OrganizationalUnitId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationalUnitId
              )
          ]
      )

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

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

-- | /See:/ 'newUpdateOrganizationalUnitResponse' smart constructor.
data UpdateOrganizationalUnitResponse = UpdateOrganizationalUnitResponse'
  { -- | A structure that contains the details about the specified OU, including
    -- its new name.
    UpdateOrganizationalUnitResponse -> Maybe OrganizationalUnit
organizationalUnit :: Prelude.Maybe OrganizationalUnit,
    -- | The response's http status code.
    UpdateOrganizationalUnitResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateOrganizationalUnitResponse
-> UpdateOrganizationalUnitResponse -> Bool
(UpdateOrganizationalUnitResponse
 -> UpdateOrganizationalUnitResponse -> Bool)
-> (UpdateOrganizationalUnitResponse
    -> UpdateOrganizationalUnitResponse -> Bool)
-> Eq UpdateOrganizationalUnitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateOrganizationalUnitResponse
-> UpdateOrganizationalUnitResponse -> Bool
$c/= :: UpdateOrganizationalUnitResponse
-> UpdateOrganizationalUnitResponse -> Bool
== :: UpdateOrganizationalUnitResponse
-> UpdateOrganizationalUnitResponse -> Bool
$c== :: UpdateOrganizationalUnitResponse
-> UpdateOrganizationalUnitResponse -> Bool
Prelude.Eq, ReadPrec [UpdateOrganizationalUnitResponse]
ReadPrec UpdateOrganizationalUnitResponse
Int -> ReadS UpdateOrganizationalUnitResponse
ReadS [UpdateOrganizationalUnitResponse]
(Int -> ReadS UpdateOrganizationalUnitResponse)
-> ReadS [UpdateOrganizationalUnitResponse]
-> ReadPrec UpdateOrganizationalUnitResponse
-> ReadPrec [UpdateOrganizationalUnitResponse]
-> Read UpdateOrganizationalUnitResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateOrganizationalUnitResponse]
$creadListPrec :: ReadPrec [UpdateOrganizationalUnitResponse]
readPrec :: ReadPrec UpdateOrganizationalUnitResponse
$creadPrec :: ReadPrec UpdateOrganizationalUnitResponse
readList :: ReadS [UpdateOrganizationalUnitResponse]
$creadList :: ReadS [UpdateOrganizationalUnitResponse]
readsPrec :: Int -> ReadS UpdateOrganizationalUnitResponse
$creadsPrec :: Int -> ReadS UpdateOrganizationalUnitResponse
Prelude.Read, Int -> UpdateOrganizationalUnitResponse -> ShowS
[UpdateOrganizationalUnitResponse] -> ShowS
UpdateOrganizationalUnitResponse -> String
(Int -> UpdateOrganizationalUnitResponse -> ShowS)
-> (UpdateOrganizationalUnitResponse -> String)
-> ([UpdateOrganizationalUnitResponse] -> ShowS)
-> Show UpdateOrganizationalUnitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateOrganizationalUnitResponse] -> ShowS
$cshowList :: [UpdateOrganizationalUnitResponse] -> ShowS
show :: UpdateOrganizationalUnitResponse -> String
$cshow :: UpdateOrganizationalUnitResponse -> String
showsPrec :: Int -> UpdateOrganizationalUnitResponse -> ShowS
$cshowsPrec :: Int -> UpdateOrganizationalUnitResponse -> ShowS
Prelude.Show, (forall x.
 UpdateOrganizationalUnitResponse
 -> Rep UpdateOrganizationalUnitResponse x)
-> (forall x.
    Rep UpdateOrganizationalUnitResponse x
    -> UpdateOrganizationalUnitResponse)
-> Generic UpdateOrganizationalUnitResponse
forall x.
Rep UpdateOrganizationalUnitResponse x
-> UpdateOrganizationalUnitResponse
forall x.
UpdateOrganizationalUnitResponse
-> Rep UpdateOrganizationalUnitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateOrganizationalUnitResponse x
-> UpdateOrganizationalUnitResponse
$cfrom :: forall x.
UpdateOrganizationalUnitResponse
-> Rep UpdateOrganizationalUnitResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateOrganizationalUnitResponse' 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:
--
-- 'organizationalUnit', 'updateOrganizationalUnitResponse_organizationalUnit' - A structure that contains the details about the specified OU, including
-- its new name.
--
-- 'httpStatus', 'updateOrganizationalUnitResponse_httpStatus' - The response's http status code.
newUpdateOrganizationalUnitResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateOrganizationalUnitResponse
newUpdateOrganizationalUnitResponse :: Int -> UpdateOrganizationalUnitResponse
newUpdateOrganizationalUnitResponse Int
pHttpStatus_ =
  UpdateOrganizationalUnitResponse' :: Maybe OrganizationalUnit -> Int -> UpdateOrganizationalUnitResponse
UpdateOrganizationalUnitResponse'
    { $sel:organizationalUnit:UpdateOrganizationalUnitResponse' :: Maybe OrganizationalUnit
organizationalUnit =
        Maybe OrganizationalUnit
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateOrganizationalUnitResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A structure that contains the details about the specified OU, including
-- its new name.
updateOrganizationalUnitResponse_organizationalUnit :: Lens.Lens' UpdateOrganizationalUnitResponse (Prelude.Maybe OrganizationalUnit)
updateOrganizationalUnitResponse_organizationalUnit :: (Maybe OrganizationalUnit -> f (Maybe OrganizationalUnit))
-> UpdateOrganizationalUnitResponse
-> f UpdateOrganizationalUnitResponse
updateOrganizationalUnitResponse_organizationalUnit = (UpdateOrganizationalUnitResponse -> Maybe OrganizationalUnit)
-> (UpdateOrganizationalUnitResponse
    -> Maybe OrganizationalUnit -> UpdateOrganizationalUnitResponse)
-> Lens
     UpdateOrganizationalUnitResponse
     UpdateOrganizationalUnitResponse
     (Maybe OrganizationalUnit)
     (Maybe OrganizationalUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateOrganizationalUnitResponse' {Maybe OrganizationalUnit
organizationalUnit :: Maybe OrganizationalUnit
$sel:organizationalUnit:UpdateOrganizationalUnitResponse' :: UpdateOrganizationalUnitResponse -> Maybe OrganizationalUnit
organizationalUnit} -> Maybe OrganizationalUnit
organizationalUnit) (\s :: UpdateOrganizationalUnitResponse
s@UpdateOrganizationalUnitResponse' {} Maybe OrganizationalUnit
a -> UpdateOrganizationalUnitResponse
s {$sel:organizationalUnit:UpdateOrganizationalUnitResponse' :: Maybe OrganizationalUnit
organizationalUnit = Maybe OrganizationalUnit
a} :: UpdateOrganizationalUnitResponse)

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

instance
  Prelude.NFData
    UpdateOrganizationalUnitResponse