{-# 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.RAM.UpdateResourceShare
-- 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 the specified resource share that you own.
module Amazonka.RAM.UpdateResourceShare
  ( -- * Creating a Request
    UpdateResourceShare (..),
    newUpdateResourceShare,

    -- * Request Lenses
    updateResourceShare_clientToken,
    updateResourceShare_allowExternalPrincipals,
    updateResourceShare_name,
    updateResourceShare_resourceShareArn,

    -- * Destructuring the Response
    UpdateResourceShareResponse (..),
    newUpdateResourceShareResponse,

    -- * Response Lenses
    updateResourceShareResponse_clientToken,
    updateResourceShareResponse_resourceShare,
    updateResourceShareResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateResourceShare' smart constructor.
data UpdateResourceShare = UpdateResourceShare'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    UpdateResourceShare -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether principals outside your organization in Organizations
    -- can be associated with a resource share.
    UpdateResourceShare -> Maybe Bool
allowExternalPrincipals :: Prelude.Maybe Prelude.Bool,
    -- | The name of the resource share.
    UpdateResourceShare -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the resource share.
    UpdateResourceShare -> Text
resourceShareArn :: Prelude.Text
  }
  deriving (UpdateResourceShare -> UpdateResourceShare -> Bool
(UpdateResourceShare -> UpdateResourceShare -> Bool)
-> (UpdateResourceShare -> UpdateResourceShare -> Bool)
-> Eq UpdateResourceShare
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceShare -> UpdateResourceShare -> Bool
$c/= :: UpdateResourceShare -> UpdateResourceShare -> Bool
== :: UpdateResourceShare -> UpdateResourceShare -> Bool
$c== :: UpdateResourceShare -> UpdateResourceShare -> Bool
Prelude.Eq, ReadPrec [UpdateResourceShare]
ReadPrec UpdateResourceShare
Int -> ReadS UpdateResourceShare
ReadS [UpdateResourceShare]
(Int -> ReadS UpdateResourceShare)
-> ReadS [UpdateResourceShare]
-> ReadPrec UpdateResourceShare
-> ReadPrec [UpdateResourceShare]
-> Read UpdateResourceShare
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceShare]
$creadListPrec :: ReadPrec [UpdateResourceShare]
readPrec :: ReadPrec UpdateResourceShare
$creadPrec :: ReadPrec UpdateResourceShare
readList :: ReadS [UpdateResourceShare]
$creadList :: ReadS [UpdateResourceShare]
readsPrec :: Int -> ReadS UpdateResourceShare
$creadsPrec :: Int -> ReadS UpdateResourceShare
Prelude.Read, Int -> UpdateResourceShare -> ShowS
[UpdateResourceShare] -> ShowS
UpdateResourceShare -> String
(Int -> UpdateResourceShare -> ShowS)
-> (UpdateResourceShare -> String)
-> ([UpdateResourceShare] -> ShowS)
-> Show UpdateResourceShare
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceShare] -> ShowS
$cshowList :: [UpdateResourceShare] -> ShowS
show :: UpdateResourceShare -> String
$cshow :: UpdateResourceShare -> String
showsPrec :: Int -> UpdateResourceShare -> ShowS
$cshowsPrec :: Int -> UpdateResourceShare -> ShowS
Prelude.Show, (forall x. UpdateResourceShare -> Rep UpdateResourceShare x)
-> (forall x. Rep UpdateResourceShare x -> UpdateResourceShare)
-> Generic UpdateResourceShare
forall x. Rep UpdateResourceShare x -> UpdateResourceShare
forall x. UpdateResourceShare -> Rep UpdateResourceShare x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateResourceShare x -> UpdateResourceShare
$cfrom :: forall x. UpdateResourceShare -> Rep UpdateResourceShare x
Prelude.Generic)

-- |
-- Create a value of 'UpdateResourceShare' 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', 'updateResourceShare_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'allowExternalPrincipals', 'updateResourceShare_allowExternalPrincipals' - Indicates whether principals outside your organization in Organizations
-- can be associated with a resource share.
--
-- 'name', 'updateResourceShare_name' - The name of the resource share.
--
-- 'resourceShareArn', 'updateResourceShare_resourceShareArn' - The Amazon Resource Name (ARN) of the resource share.
newUpdateResourceShare ::
  -- | 'resourceShareArn'
  Prelude.Text ->
  UpdateResourceShare
newUpdateResourceShare :: Text -> UpdateResourceShare
newUpdateResourceShare Text
pResourceShareArn_ =
  UpdateResourceShare' :: Maybe Text
-> Maybe Bool -> Maybe Text -> Text -> UpdateResourceShare
UpdateResourceShare'
    { $sel:clientToken:UpdateResourceShare' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:allowExternalPrincipals:UpdateResourceShare' :: Maybe Bool
allowExternalPrincipals = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateResourceShare' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceShareArn:UpdateResourceShare' :: Text
resourceShareArn = Text
pResourceShareArn_
    }

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
updateResourceShare_clientToken :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Text)
updateResourceShare_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceShare -> f UpdateResourceShare
updateResourceShare_clientToken = (UpdateResourceShare -> Maybe Text)
-> (UpdateResourceShare -> Maybe Text -> UpdateResourceShare)
-> Lens
     UpdateResourceShare UpdateResourceShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShare' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateResourceShare' :: UpdateResourceShare -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateResourceShare
s@UpdateResourceShare' {} Maybe Text
a -> UpdateResourceShare
s {$sel:clientToken:UpdateResourceShare' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateResourceShare)

-- | Indicates whether principals outside your organization in Organizations
-- can be associated with a resource share.
updateResourceShare_allowExternalPrincipals :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Bool)
updateResourceShare_allowExternalPrincipals :: (Maybe Bool -> f (Maybe Bool))
-> UpdateResourceShare -> f UpdateResourceShare
updateResourceShare_allowExternalPrincipals = (UpdateResourceShare -> Maybe Bool)
-> (UpdateResourceShare -> Maybe Bool -> UpdateResourceShare)
-> Lens
     UpdateResourceShare UpdateResourceShare (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShare' {Maybe Bool
allowExternalPrincipals :: Maybe Bool
$sel:allowExternalPrincipals:UpdateResourceShare' :: UpdateResourceShare -> Maybe Bool
allowExternalPrincipals} -> Maybe Bool
allowExternalPrincipals) (\s :: UpdateResourceShare
s@UpdateResourceShare' {} Maybe Bool
a -> UpdateResourceShare
s {$sel:allowExternalPrincipals:UpdateResourceShare' :: Maybe Bool
allowExternalPrincipals = Maybe Bool
a} :: UpdateResourceShare)

-- | The name of the resource share.
updateResourceShare_name :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Text)
updateResourceShare_name :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceShare -> f UpdateResourceShare
updateResourceShare_name = (UpdateResourceShare -> Maybe Text)
-> (UpdateResourceShare -> Maybe Text -> UpdateResourceShare)
-> Lens
     UpdateResourceShare UpdateResourceShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShare' {Maybe Text
name :: Maybe Text
$sel:name:UpdateResourceShare' :: UpdateResourceShare -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateResourceShare
s@UpdateResourceShare' {} Maybe Text
a -> UpdateResourceShare
s {$sel:name:UpdateResourceShare' :: Maybe Text
name = Maybe Text
a} :: UpdateResourceShare)

-- | The Amazon Resource Name (ARN) of the resource share.
updateResourceShare_resourceShareArn :: Lens.Lens' UpdateResourceShare Prelude.Text
updateResourceShare_resourceShareArn :: (Text -> f Text) -> UpdateResourceShare -> f UpdateResourceShare
updateResourceShare_resourceShareArn = (UpdateResourceShare -> Text)
-> (UpdateResourceShare -> Text -> UpdateResourceShare)
-> Lens UpdateResourceShare UpdateResourceShare Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShare' {Text
resourceShareArn :: Text
$sel:resourceShareArn:UpdateResourceShare' :: UpdateResourceShare -> Text
resourceShareArn} -> Text
resourceShareArn) (\s :: UpdateResourceShare
s@UpdateResourceShare' {} Text
a -> UpdateResourceShare
s {$sel:resourceShareArn:UpdateResourceShare' :: Text
resourceShareArn = Text
a} :: UpdateResourceShare)

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

instance Prelude.NFData UpdateResourceShare

instance Core.ToHeaders UpdateResourceShare where
  toHeaders :: UpdateResourceShare -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateResourceShare -> 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 UpdateResourceShare where
  toJSON :: UpdateResourceShare -> Value
toJSON UpdateResourceShare' {Maybe Bool
Maybe Text
Text
resourceShareArn :: Text
name :: Maybe Text
allowExternalPrincipals :: Maybe Bool
clientToken :: Maybe Text
$sel:resourceShareArn:UpdateResourceShare' :: UpdateResourceShare -> Text
$sel:name:UpdateResourceShare' :: UpdateResourceShare -> Maybe Text
$sel:allowExternalPrincipals:UpdateResourceShare' :: UpdateResourceShare -> Maybe Bool
$sel:clientToken:UpdateResourceShare' :: UpdateResourceShare -> 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,
            (Text
"allowExternalPrincipals" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
allowExternalPrincipals,
            (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
"resourceShareArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceShareArn)
          ]
      )

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

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

-- | /See:/ 'newUpdateResourceShareResponse' smart constructor.
data UpdateResourceShareResponse = UpdateResourceShareResponse'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    UpdateResourceShareResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the resource share.
    UpdateResourceShareResponse -> Maybe ResourceShare
resourceShare :: Prelude.Maybe ResourceShare,
    -- | The response's http status code.
    UpdateResourceShareResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateResourceShareResponse -> UpdateResourceShareResponse -> Bool
(UpdateResourceShareResponse
 -> UpdateResourceShareResponse -> Bool)
-> (UpdateResourceShareResponse
    -> UpdateResourceShareResponse -> Bool)
-> Eq UpdateResourceShareResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceShareResponse -> UpdateResourceShareResponse -> Bool
$c/= :: UpdateResourceShareResponse -> UpdateResourceShareResponse -> Bool
== :: UpdateResourceShareResponse -> UpdateResourceShareResponse -> Bool
$c== :: UpdateResourceShareResponse -> UpdateResourceShareResponse -> Bool
Prelude.Eq, ReadPrec [UpdateResourceShareResponse]
ReadPrec UpdateResourceShareResponse
Int -> ReadS UpdateResourceShareResponse
ReadS [UpdateResourceShareResponse]
(Int -> ReadS UpdateResourceShareResponse)
-> ReadS [UpdateResourceShareResponse]
-> ReadPrec UpdateResourceShareResponse
-> ReadPrec [UpdateResourceShareResponse]
-> Read UpdateResourceShareResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceShareResponse]
$creadListPrec :: ReadPrec [UpdateResourceShareResponse]
readPrec :: ReadPrec UpdateResourceShareResponse
$creadPrec :: ReadPrec UpdateResourceShareResponse
readList :: ReadS [UpdateResourceShareResponse]
$creadList :: ReadS [UpdateResourceShareResponse]
readsPrec :: Int -> ReadS UpdateResourceShareResponse
$creadsPrec :: Int -> ReadS UpdateResourceShareResponse
Prelude.Read, Int -> UpdateResourceShareResponse -> ShowS
[UpdateResourceShareResponse] -> ShowS
UpdateResourceShareResponse -> String
(Int -> UpdateResourceShareResponse -> ShowS)
-> (UpdateResourceShareResponse -> String)
-> ([UpdateResourceShareResponse] -> ShowS)
-> Show UpdateResourceShareResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceShareResponse] -> ShowS
$cshowList :: [UpdateResourceShareResponse] -> ShowS
show :: UpdateResourceShareResponse -> String
$cshow :: UpdateResourceShareResponse -> String
showsPrec :: Int -> UpdateResourceShareResponse -> ShowS
$cshowsPrec :: Int -> UpdateResourceShareResponse -> ShowS
Prelude.Show, (forall x.
 UpdateResourceShareResponse -> Rep UpdateResourceShareResponse x)
-> (forall x.
    Rep UpdateResourceShareResponse x -> UpdateResourceShareResponse)
-> Generic UpdateResourceShareResponse
forall x.
Rep UpdateResourceShareResponse x -> UpdateResourceShareResponse
forall x.
UpdateResourceShareResponse -> Rep UpdateResourceShareResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateResourceShareResponse x -> UpdateResourceShareResponse
$cfrom :: forall x.
UpdateResourceShareResponse -> Rep UpdateResourceShareResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateResourceShareResponse' 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', 'updateResourceShareResponse_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'resourceShare', 'updateResourceShareResponse_resourceShare' - Information about the resource share.
--
-- 'httpStatus', 'updateResourceShareResponse_httpStatus' - The response's http status code.
newUpdateResourceShareResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateResourceShareResponse
newUpdateResourceShareResponse :: Int -> UpdateResourceShareResponse
newUpdateResourceShareResponse Int
pHttpStatus_ =
  UpdateResourceShareResponse' :: Maybe Text
-> Maybe ResourceShare -> Int -> UpdateResourceShareResponse
UpdateResourceShareResponse'
    { $sel:clientToken:UpdateResourceShareResponse' :: Maybe Text
clientToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceShare:UpdateResourceShareResponse' :: Maybe ResourceShare
resourceShare = Maybe ResourceShare
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateResourceShareResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
updateResourceShareResponse_clientToken :: Lens.Lens' UpdateResourceShareResponse (Prelude.Maybe Prelude.Text)
updateResourceShareResponse_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceShareResponse -> f UpdateResourceShareResponse
updateResourceShareResponse_clientToken = (UpdateResourceShareResponse -> Maybe Text)
-> (UpdateResourceShareResponse
    -> Maybe Text -> UpdateResourceShareResponse)
-> Lens
     UpdateResourceShareResponse
     UpdateResourceShareResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShareResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateResourceShareResponse' :: UpdateResourceShareResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateResourceShareResponse
s@UpdateResourceShareResponse' {} Maybe Text
a -> UpdateResourceShareResponse
s {$sel:clientToken:UpdateResourceShareResponse' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateResourceShareResponse)

-- | Information about the resource share.
updateResourceShareResponse_resourceShare :: Lens.Lens' UpdateResourceShareResponse (Prelude.Maybe ResourceShare)
updateResourceShareResponse_resourceShare :: (Maybe ResourceShare -> f (Maybe ResourceShare))
-> UpdateResourceShareResponse -> f UpdateResourceShareResponse
updateResourceShareResponse_resourceShare = (UpdateResourceShareResponse -> Maybe ResourceShare)
-> (UpdateResourceShareResponse
    -> Maybe ResourceShare -> UpdateResourceShareResponse)
-> Lens
     UpdateResourceShareResponse
     UpdateResourceShareResponse
     (Maybe ResourceShare)
     (Maybe ResourceShare)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceShareResponse' {Maybe ResourceShare
resourceShare :: Maybe ResourceShare
$sel:resourceShare:UpdateResourceShareResponse' :: UpdateResourceShareResponse -> Maybe ResourceShare
resourceShare} -> Maybe ResourceShare
resourceShare) (\s :: UpdateResourceShareResponse
s@UpdateResourceShareResponse' {} Maybe ResourceShare
a -> UpdateResourceShareResponse
s {$sel:resourceShare:UpdateResourceShareResponse' :: Maybe ResourceShare
resourceShare = Maybe ResourceShare
a} :: UpdateResourceShareResponse)

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

instance Prelude.NFData UpdateResourceShareResponse