{-# 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.AcceptResourceShareInvitation
-- 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)
--
-- Accepts an invitation to a resource share from another Amazon Web
-- Services account.
module Amazonka.RAM.AcceptResourceShareInvitation
  ( -- * Creating a Request
    AcceptResourceShareInvitation (..),
    newAcceptResourceShareInvitation,

    -- * Request Lenses
    acceptResourceShareInvitation_clientToken,
    acceptResourceShareInvitation_resourceShareInvitationArn,

    -- * Destructuring the Response
    AcceptResourceShareInvitationResponse (..),
    newAcceptResourceShareInvitationResponse,

    -- * Response Lenses
    acceptResourceShareInvitationResponse_clientToken,
    acceptResourceShareInvitationResponse_resourceShareInvitation,
    acceptResourceShareInvitationResponse_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:/ 'newAcceptResourceShareInvitation' smart constructor.
data AcceptResourceShareInvitation = AcceptResourceShareInvitation'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    AcceptResourceShareInvitation -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the invitation.
    AcceptResourceShareInvitation -> Text
resourceShareInvitationArn :: Prelude.Text
  }
  deriving (AcceptResourceShareInvitation
-> AcceptResourceShareInvitation -> Bool
(AcceptResourceShareInvitation
 -> AcceptResourceShareInvitation -> Bool)
-> (AcceptResourceShareInvitation
    -> AcceptResourceShareInvitation -> Bool)
-> Eq AcceptResourceShareInvitation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceptResourceShareInvitation
-> AcceptResourceShareInvitation -> Bool
$c/= :: AcceptResourceShareInvitation
-> AcceptResourceShareInvitation -> Bool
== :: AcceptResourceShareInvitation
-> AcceptResourceShareInvitation -> Bool
$c== :: AcceptResourceShareInvitation
-> AcceptResourceShareInvitation -> Bool
Prelude.Eq, ReadPrec [AcceptResourceShareInvitation]
ReadPrec AcceptResourceShareInvitation
Int -> ReadS AcceptResourceShareInvitation
ReadS [AcceptResourceShareInvitation]
(Int -> ReadS AcceptResourceShareInvitation)
-> ReadS [AcceptResourceShareInvitation]
-> ReadPrec AcceptResourceShareInvitation
-> ReadPrec [AcceptResourceShareInvitation]
-> Read AcceptResourceShareInvitation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AcceptResourceShareInvitation]
$creadListPrec :: ReadPrec [AcceptResourceShareInvitation]
readPrec :: ReadPrec AcceptResourceShareInvitation
$creadPrec :: ReadPrec AcceptResourceShareInvitation
readList :: ReadS [AcceptResourceShareInvitation]
$creadList :: ReadS [AcceptResourceShareInvitation]
readsPrec :: Int -> ReadS AcceptResourceShareInvitation
$creadsPrec :: Int -> ReadS AcceptResourceShareInvitation
Prelude.Read, Int -> AcceptResourceShareInvitation -> ShowS
[AcceptResourceShareInvitation] -> ShowS
AcceptResourceShareInvitation -> String
(Int -> AcceptResourceShareInvitation -> ShowS)
-> (AcceptResourceShareInvitation -> String)
-> ([AcceptResourceShareInvitation] -> ShowS)
-> Show AcceptResourceShareInvitation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceptResourceShareInvitation] -> ShowS
$cshowList :: [AcceptResourceShareInvitation] -> ShowS
show :: AcceptResourceShareInvitation -> String
$cshow :: AcceptResourceShareInvitation -> String
showsPrec :: Int -> AcceptResourceShareInvitation -> ShowS
$cshowsPrec :: Int -> AcceptResourceShareInvitation -> ShowS
Prelude.Show, (forall x.
 AcceptResourceShareInvitation
 -> Rep AcceptResourceShareInvitation x)
-> (forall x.
    Rep AcceptResourceShareInvitation x
    -> AcceptResourceShareInvitation)
-> Generic AcceptResourceShareInvitation
forall x.
Rep AcceptResourceShareInvitation x
-> AcceptResourceShareInvitation
forall x.
AcceptResourceShareInvitation
-> Rep AcceptResourceShareInvitation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AcceptResourceShareInvitation x
-> AcceptResourceShareInvitation
$cfrom :: forall x.
AcceptResourceShareInvitation
-> Rep AcceptResourceShareInvitation x
Prelude.Generic)

-- |
-- Create a value of 'AcceptResourceShareInvitation' 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', 'acceptResourceShareInvitation_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'resourceShareInvitationArn', 'acceptResourceShareInvitation_resourceShareInvitationArn' - The Amazon Resource Name (ARN) of the invitation.
newAcceptResourceShareInvitation ::
  -- | 'resourceShareInvitationArn'
  Prelude.Text ->
  AcceptResourceShareInvitation
newAcceptResourceShareInvitation :: Text -> AcceptResourceShareInvitation
newAcceptResourceShareInvitation
  Text
pResourceShareInvitationArn_ =
    AcceptResourceShareInvitation' :: Maybe Text -> Text -> AcceptResourceShareInvitation
AcceptResourceShareInvitation'
      { $sel:clientToken:AcceptResourceShareInvitation' :: Maybe Text
clientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceShareInvitationArn:AcceptResourceShareInvitation' :: Text
resourceShareInvitationArn =
          Text
pResourceShareInvitationArn_
      }

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

-- | The Amazon Resource Name (ARN) of the invitation.
acceptResourceShareInvitation_resourceShareInvitationArn :: Lens.Lens' AcceptResourceShareInvitation Prelude.Text
acceptResourceShareInvitation_resourceShareInvitationArn :: (Text -> f Text)
-> AcceptResourceShareInvitation -> f AcceptResourceShareInvitation
acceptResourceShareInvitation_resourceShareInvitationArn = (AcceptResourceShareInvitation -> Text)
-> (AcceptResourceShareInvitation
    -> Text -> AcceptResourceShareInvitation)
-> Lens
     AcceptResourceShareInvitation
     AcceptResourceShareInvitation
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptResourceShareInvitation' {Text
resourceShareInvitationArn :: Text
$sel:resourceShareInvitationArn:AcceptResourceShareInvitation' :: AcceptResourceShareInvitation -> Text
resourceShareInvitationArn} -> Text
resourceShareInvitationArn) (\s :: AcceptResourceShareInvitation
s@AcceptResourceShareInvitation' {} Text
a -> AcceptResourceShareInvitation
s {$sel:resourceShareInvitationArn:AcceptResourceShareInvitation' :: Text
resourceShareInvitationArn = Text
a} :: AcceptResourceShareInvitation)

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

instance Prelude.NFData AcceptResourceShareInvitation

instance Core.ToHeaders AcceptResourceShareInvitation where
  toHeaders :: AcceptResourceShareInvitation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AcceptResourceShareInvitation -> 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 AcceptResourceShareInvitation where
  toJSON :: AcceptResourceShareInvitation -> Value
toJSON AcceptResourceShareInvitation' {Maybe Text
Text
resourceShareInvitationArn :: Text
clientToken :: Maybe Text
$sel:resourceShareInvitationArn:AcceptResourceShareInvitation' :: AcceptResourceShareInvitation -> Text
$sel:clientToken:AcceptResourceShareInvitation' :: AcceptResourceShareInvitation -> 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
"resourceShareInvitationArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceShareInvitationArn
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'AcceptResourceShareInvitationResponse' 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', 'acceptResourceShareInvitationResponse_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'resourceShareInvitation', 'acceptResourceShareInvitationResponse_resourceShareInvitation' - Information about the invitation.
--
-- 'httpStatus', 'acceptResourceShareInvitationResponse_httpStatus' - The response's http status code.
newAcceptResourceShareInvitationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AcceptResourceShareInvitationResponse
newAcceptResourceShareInvitationResponse :: Int -> AcceptResourceShareInvitationResponse
newAcceptResourceShareInvitationResponse Int
pHttpStatus_ =
  AcceptResourceShareInvitationResponse' :: Maybe Text
-> Maybe ResourceShareInvitation
-> Int
-> AcceptResourceShareInvitationResponse
AcceptResourceShareInvitationResponse'
    { $sel:clientToken:AcceptResourceShareInvitationResponse' :: Maybe Text
clientToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceShareInvitation:AcceptResourceShareInvitationResponse' :: Maybe ResourceShareInvitation
resourceShareInvitation =
        Maybe ResourceShareInvitation
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AcceptResourceShareInvitationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | Information about the invitation.
acceptResourceShareInvitationResponse_resourceShareInvitation :: Lens.Lens' AcceptResourceShareInvitationResponse (Prelude.Maybe ResourceShareInvitation)
acceptResourceShareInvitationResponse_resourceShareInvitation :: (Maybe ResourceShareInvitation
 -> f (Maybe ResourceShareInvitation))
-> AcceptResourceShareInvitationResponse
-> f AcceptResourceShareInvitationResponse
acceptResourceShareInvitationResponse_resourceShareInvitation = (AcceptResourceShareInvitationResponse
 -> Maybe ResourceShareInvitation)
-> (AcceptResourceShareInvitationResponse
    -> Maybe ResourceShareInvitation
    -> AcceptResourceShareInvitationResponse)
-> Lens
     AcceptResourceShareInvitationResponse
     AcceptResourceShareInvitationResponse
     (Maybe ResourceShareInvitation)
     (Maybe ResourceShareInvitation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceptResourceShareInvitationResponse' {Maybe ResourceShareInvitation
resourceShareInvitation :: Maybe ResourceShareInvitation
$sel:resourceShareInvitation:AcceptResourceShareInvitationResponse' :: AcceptResourceShareInvitationResponse
-> Maybe ResourceShareInvitation
resourceShareInvitation} -> Maybe ResourceShareInvitation
resourceShareInvitation) (\s :: AcceptResourceShareInvitationResponse
s@AcceptResourceShareInvitationResponse' {} Maybe ResourceShareInvitation
a -> AcceptResourceShareInvitationResponse
s {$sel:resourceShareInvitation:AcceptResourceShareInvitationResponse' :: Maybe ResourceShareInvitation
resourceShareInvitation = Maybe ResourceShareInvitation
a} :: AcceptResourceShareInvitationResponse)

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

instance
  Prelude.NFData
    AcceptResourceShareInvitationResponse