{-# 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.AuditManager.StartAssessmentFrameworkShare
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a share request for a custom framework in Audit Manager.
--
-- The share request specifies a recipient and notifies them that a custom
-- framework is available. Recipients have 120 days to accept or decline
-- the request. If no action is taken, the share request expires.
--
-- When you create a share request, Audit Manager stores a snapshot of your
-- custom framework in the US East (N. Virginia) Amazon Web Services
-- Region. Audit Manager also stores a backup of the same snapshot in the
-- US West (Oregon) Amazon Web Services Region.
--
-- Audit Manager deletes the snapshot and the backup snapshot when one of
-- the following events occurs:
--
-- -   The sender revokes the share request.
--
-- -   The recipient declines the share request.
--
-- -   The recipient encounters an error and doesn\'t successfully accept
--     the share request.
--
-- -   The share request expires before the recipient responds to the
--     request.
--
-- When a sender
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/framework-sharing.html#framework-sharing-resend resends a share request>,
-- the snapshot is replaced with an updated version that corresponds with
-- the latest version of the custom framework.
--
-- When a recipient accepts a share request, the snapshot is replicated
-- into their Amazon Web Services account under the Amazon Web Services
-- Region that was specified in the share request.
--
-- When you invoke the @StartAssessmentFrameworkShare@ API, you are about
-- to share a custom framework with another Amazon Web Services account.
-- You may not share a custom framework that is derived from a standard
-- framework if the standard framework is designated as not eligible for
-- sharing by Amazon Web Services, unless you have obtained permission to
-- do so from the owner of the standard framework. To learn more about
-- which standard frameworks are eligible for sharing, see
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/share-custom-framework-concepts-and-terminology.html#eligibility Framework sharing eligibility>
-- in the /Audit Manager User Guide/.
module Amazonka.AuditManager.StartAssessmentFrameworkShare
  ( -- * Creating a Request
    StartAssessmentFrameworkShare (..),
    newStartAssessmentFrameworkShare,

    -- * Request Lenses
    startAssessmentFrameworkShare_comment,
    startAssessmentFrameworkShare_frameworkId,
    startAssessmentFrameworkShare_destinationAccount,
    startAssessmentFrameworkShare_destinationRegion,

    -- * Destructuring the Response
    StartAssessmentFrameworkShareResponse (..),
    newStartAssessmentFrameworkShareResponse,

    -- * Response Lenses
    startAssessmentFrameworkShareResponse_assessmentFrameworkShareRequest,
    startAssessmentFrameworkShareResponse_httpStatus,
  )
where

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

-- | /See:/ 'newStartAssessmentFrameworkShare' smart constructor.
data StartAssessmentFrameworkShare = StartAssessmentFrameworkShare'
  { -- | An optional comment from the sender about the share request.
    StartAssessmentFrameworkShare -> Maybe Text
comment :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the custom framework to be shared.
    StartAssessmentFrameworkShare -> Text
frameworkId :: Prelude.Text,
    -- | The Amazon Web Services account of the recipient.
    StartAssessmentFrameworkShare -> Text
destinationAccount :: Prelude.Text,
    -- | The Amazon Web Services Region of the recipient.
    StartAssessmentFrameworkShare -> Text
destinationRegion :: Prelude.Text
  }
  deriving (StartAssessmentFrameworkShare
-> StartAssessmentFrameworkShare -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAssessmentFrameworkShare
-> StartAssessmentFrameworkShare -> Bool
$c/= :: StartAssessmentFrameworkShare
-> StartAssessmentFrameworkShare -> Bool
== :: StartAssessmentFrameworkShare
-> StartAssessmentFrameworkShare -> Bool
$c== :: StartAssessmentFrameworkShare
-> StartAssessmentFrameworkShare -> Bool
Prelude.Eq, ReadPrec [StartAssessmentFrameworkShare]
ReadPrec StartAssessmentFrameworkShare
Int -> ReadS StartAssessmentFrameworkShare
ReadS [StartAssessmentFrameworkShare]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAssessmentFrameworkShare]
$creadListPrec :: ReadPrec [StartAssessmentFrameworkShare]
readPrec :: ReadPrec StartAssessmentFrameworkShare
$creadPrec :: ReadPrec StartAssessmentFrameworkShare
readList :: ReadS [StartAssessmentFrameworkShare]
$creadList :: ReadS [StartAssessmentFrameworkShare]
readsPrec :: Int -> ReadS StartAssessmentFrameworkShare
$creadsPrec :: Int -> ReadS StartAssessmentFrameworkShare
Prelude.Read, Int -> StartAssessmentFrameworkShare -> ShowS
[StartAssessmentFrameworkShare] -> ShowS
StartAssessmentFrameworkShare -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAssessmentFrameworkShare] -> ShowS
$cshowList :: [StartAssessmentFrameworkShare] -> ShowS
show :: StartAssessmentFrameworkShare -> String
$cshow :: StartAssessmentFrameworkShare -> String
showsPrec :: Int -> StartAssessmentFrameworkShare -> ShowS
$cshowsPrec :: Int -> StartAssessmentFrameworkShare -> ShowS
Prelude.Show, forall x.
Rep StartAssessmentFrameworkShare x
-> StartAssessmentFrameworkShare
forall x.
StartAssessmentFrameworkShare
-> Rep StartAssessmentFrameworkShare x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAssessmentFrameworkShare x
-> StartAssessmentFrameworkShare
$cfrom :: forall x.
StartAssessmentFrameworkShare
-> Rep StartAssessmentFrameworkShare x
Prelude.Generic)

-- |
-- Create a value of 'StartAssessmentFrameworkShare' 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:
--
-- 'comment', 'startAssessmentFrameworkShare_comment' - An optional comment from the sender about the share request.
--
-- 'frameworkId', 'startAssessmentFrameworkShare_frameworkId' - The unique identifier for the custom framework to be shared.
--
-- 'destinationAccount', 'startAssessmentFrameworkShare_destinationAccount' - The Amazon Web Services account of the recipient.
--
-- 'destinationRegion', 'startAssessmentFrameworkShare_destinationRegion' - The Amazon Web Services Region of the recipient.
newStartAssessmentFrameworkShare ::
  -- | 'frameworkId'
  Prelude.Text ->
  -- | 'destinationAccount'
  Prelude.Text ->
  -- | 'destinationRegion'
  Prelude.Text ->
  StartAssessmentFrameworkShare
newStartAssessmentFrameworkShare :: Text -> Text -> Text -> StartAssessmentFrameworkShare
newStartAssessmentFrameworkShare
  Text
pFrameworkId_
  Text
pDestinationAccount_
  Text
pDestinationRegion_ =
    StartAssessmentFrameworkShare'
      { $sel:comment:StartAssessmentFrameworkShare' :: Maybe Text
comment =
          forall a. Maybe a
Prelude.Nothing,
        $sel:frameworkId:StartAssessmentFrameworkShare' :: Text
frameworkId = Text
pFrameworkId_,
        $sel:destinationAccount:StartAssessmentFrameworkShare' :: Text
destinationAccount = Text
pDestinationAccount_,
        $sel:destinationRegion:StartAssessmentFrameworkShare' :: Text
destinationRegion = Text
pDestinationRegion_
      }

-- | An optional comment from the sender about the share request.
startAssessmentFrameworkShare_comment :: Lens.Lens' StartAssessmentFrameworkShare (Prelude.Maybe Prelude.Text)
startAssessmentFrameworkShare_comment :: Lens' StartAssessmentFrameworkShare (Maybe Text)
startAssessmentFrameworkShare_comment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAssessmentFrameworkShare' {Maybe Text
comment :: Maybe Text
$sel:comment:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Maybe Text
comment} -> Maybe Text
comment) (\s :: StartAssessmentFrameworkShare
s@StartAssessmentFrameworkShare' {} Maybe Text
a -> StartAssessmentFrameworkShare
s {$sel:comment:StartAssessmentFrameworkShare' :: Maybe Text
comment = Maybe Text
a} :: StartAssessmentFrameworkShare)

-- | The unique identifier for the custom framework to be shared.
startAssessmentFrameworkShare_frameworkId :: Lens.Lens' StartAssessmentFrameworkShare Prelude.Text
startAssessmentFrameworkShare_frameworkId :: Lens' StartAssessmentFrameworkShare Text
startAssessmentFrameworkShare_frameworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAssessmentFrameworkShare' {Text
frameworkId :: Text
$sel:frameworkId:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
frameworkId} -> Text
frameworkId) (\s :: StartAssessmentFrameworkShare
s@StartAssessmentFrameworkShare' {} Text
a -> StartAssessmentFrameworkShare
s {$sel:frameworkId:StartAssessmentFrameworkShare' :: Text
frameworkId = Text
a} :: StartAssessmentFrameworkShare)

-- | The Amazon Web Services account of the recipient.
startAssessmentFrameworkShare_destinationAccount :: Lens.Lens' StartAssessmentFrameworkShare Prelude.Text
startAssessmentFrameworkShare_destinationAccount :: Lens' StartAssessmentFrameworkShare Text
startAssessmentFrameworkShare_destinationAccount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAssessmentFrameworkShare' {Text
destinationAccount :: Text
$sel:destinationAccount:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
destinationAccount} -> Text
destinationAccount) (\s :: StartAssessmentFrameworkShare
s@StartAssessmentFrameworkShare' {} Text
a -> StartAssessmentFrameworkShare
s {$sel:destinationAccount:StartAssessmentFrameworkShare' :: Text
destinationAccount = Text
a} :: StartAssessmentFrameworkShare)

-- | The Amazon Web Services Region of the recipient.
startAssessmentFrameworkShare_destinationRegion :: Lens.Lens' StartAssessmentFrameworkShare Prelude.Text
startAssessmentFrameworkShare_destinationRegion :: Lens' StartAssessmentFrameworkShare Text
startAssessmentFrameworkShare_destinationRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAssessmentFrameworkShare' {Text
destinationRegion :: Text
$sel:destinationRegion:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
destinationRegion} -> Text
destinationRegion) (\s :: StartAssessmentFrameworkShare
s@StartAssessmentFrameworkShare' {} Text
a -> StartAssessmentFrameworkShare
s {$sel:destinationRegion:StartAssessmentFrameworkShare' :: Text
destinationRegion = Text
a} :: StartAssessmentFrameworkShare)

instance
  Core.AWSRequest
    StartAssessmentFrameworkShare
  where
  type
    AWSResponse StartAssessmentFrameworkShare =
      StartAssessmentFrameworkShareResponse
  request :: (Service -> Service)
-> StartAssessmentFrameworkShare
-> Request StartAssessmentFrameworkShare
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartAssessmentFrameworkShare
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartAssessmentFrameworkShare)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AssessmentFrameworkShareRequest
-> Int -> StartAssessmentFrameworkShareResponse
StartAssessmentFrameworkShareResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"assessmentFrameworkShareRequest")
            forall (f :: * -> *) a b. Applicative f => 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
    StartAssessmentFrameworkShare
  where
  hashWithSalt :: Int -> StartAssessmentFrameworkShare -> Int
hashWithSalt Int
_salt StartAssessmentFrameworkShare' {Maybe Text
Text
destinationRegion :: Text
destinationAccount :: Text
frameworkId :: Text
comment :: Maybe Text
$sel:destinationRegion:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:destinationAccount:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:frameworkId:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:comment:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
comment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
frameworkId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationAccount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationRegion

instance Prelude.NFData StartAssessmentFrameworkShare where
  rnf :: StartAssessmentFrameworkShare -> ()
rnf StartAssessmentFrameworkShare' {Maybe Text
Text
destinationRegion :: Text
destinationAccount :: Text
frameworkId :: Text
comment :: Maybe Text
$sel:destinationRegion:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:destinationAccount:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:frameworkId:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:comment:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
comment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
frameworkId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationAccount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationRegion

instance Data.ToHeaders StartAssessmentFrameworkShare where
  toHeaders :: StartAssessmentFrameworkShare -> 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 StartAssessmentFrameworkShare where
  toJSON :: StartAssessmentFrameworkShare -> Value
toJSON StartAssessmentFrameworkShare' {Maybe Text
Text
destinationRegion :: Text
destinationAccount :: Text
frameworkId :: Text
comment :: Maybe Text
$sel:destinationRegion:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:destinationAccount:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:frameworkId:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:comment:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"comment" 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
comment,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"destinationAccount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destinationAccount),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"destinationRegion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destinationRegion)
          ]
      )

instance Data.ToPath StartAssessmentFrameworkShare where
  toPath :: StartAssessmentFrameworkShare -> ByteString
toPath StartAssessmentFrameworkShare' {Maybe Text
Text
destinationRegion :: Text
destinationAccount :: Text
frameworkId :: Text
comment :: Maybe Text
$sel:destinationRegion:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:destinationAccount:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:frameworkId:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Text
$sel:comment:StartAssessmentFrameworkShare' :: StartAssessmentFrameworkShare -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/assessmentFrameworks/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
frameworkId,
        ByteString
"/shareRequests"
      ]

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

-- | /See:/ 'newStartAssessmentFrameworkShareResponse' smart constructor.
data StartAssessmentFrameworkShareResponse = StartAssessmentFrameworkShareResponse'
  { -- | The share request that\'s created by the @StartAssessmentFrameworkShare@
    -- API.
    StartAssessmentFrameworkShareResponse
-> Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest :: Prelude.Maybe AssessmentFrameworkShareRequest,
    -- | The response's http status code.
    StartAssessmentFrameworkShareResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartAssessmentFrameworkShareResponse
-> StartAssessmentFrameworkShareResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAssessmentFrameworkShareResponse
-> StartAssessmentFrameworkShareResponse -> Bool
$c/= :: StartAssessmentFrameworkShareResponse
-> StartAssessmentFrameworkShareResponse -> Bool
== :: StartAssessmentFrameworkShareResponse
-> StartAssessmentFrameworkShareResponse -> Bool
$c== :: StartAssessmentFrameworkShareResponse
-> StartAssessmentFrameworkShareResponse -> Bool
Prelude.Eq, ReadPrec [StartAssessmentFrameworkShareResponse]
ReadPrec StartAssessmentFrameworkShareResponse
Int -> ReadS StartAssessmentFrameworkShareResponse
ReadS [StartAssessmentFrameworkShareResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAssessmentFrameworkShareResponse]
$creadListPrec :: ReadPrec [StartAssessmentFrameworkShareResponse]
readPrec :: ReadPrec StartAssessmentFrameworkShareResponse
$creadPrec :: ReadPrec StartAssessmentFrameworkShareResponse
readList :: ReadS [StartAssessmentFrameworkShareResponse]
$creadList :: ReadS [StartAssessmentFrameworkShareResponse]
readsPrec :: Int -> ReadS StartAssessmentFrameworkShareResponse
$creadsPrec :: Int -> ReadS StartAssessmentFrameworkShareResponse
Prelude.Read, Int -> StartAssessmentFrameworkShareResponse -> ShowS
[StartAssessmentFrameworkShareResponse] -> ShowS
StartAssessmentFrameworkShareResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAssessmentFrameworkShareResponse] -> ShowS
$cshowList :: [StartAssessmentFrameworkShareResponse] -> ShowS
show :: StartAssessmentFrameworkShareResponse -> String
$cshow :: StartAssessmentFrameworkShareResponse -> String
showsPrec :: Int -> StartAssessmentFrameworkShareResponse -> ShowS
$cshowsPrec :: Int -> StartAssessmentFrameworkShareResponse -> ShowS
Prelude.Show, forall x.
Rep StartAssessmentFrameworkShareResponse x
-> StartAssessmentFrameworkShareResponse
forall x.
StartAssessmentFrameworkShareResponse
-> Rep StartAssessmentFrameworkShareResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAssessmentFrameworkShareResponse x
-> StartAssessmentFrameworkShareResponse
$cfrom :: forall x.
StartAssessmentFrameworkShareResponse
-> Rep StartAssessmentFrameworkShareResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartAssessmentFrameworkShareResponse' 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:
--
-- 'assessmentFrameworkShareRequest', 'startAssessmentFrameworkShareResponse_assessmentFrameworkShareRequest' - The share request that\'s created by the @StartAssessmentFrameworkShare@
-- API.
--
-- 'httpStatus', 'startAssessmentFrameworkShareResponse_httpStatus' - The response's http status code.
newStartAssessmentFrameworkShareResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartAssessmentFrameworkShareResponse
newStartAssessmentFrameworkShareResponse :: Int -> StartAssessmentFrameworkShareResponse
newStartAssessmentFrameworkShareResponse Int
pHttpStatus_ =
  StartAssessmentFrameworkShareResponse'
    { $sel:assessmentFrameworkShareRequest:StartAssessmentFrameworkShareResponse' :: Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartAssessmentFrameworkShareResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The share request that\'s created by the @StartAssessmentFrameworkShare@
-- API.
startAssessmentFrameworkShareResponse_assessmentFrameworkShareRequest :: Lens.Lens' StartAssessmentFrameworkShareResponse (Prelude.Maybe AssessmentFrameworkShareRequest)
startAssessmentFrameworkShareResponse_assessmentFrameworkShareRequest :: Lens'
  StartAssessmentFrameworkShareResponse
  (Maybe AssessmentFrameworkShareRequest)
startAssessmentFrameworkShareResponse_assessmentFrameworkShareRequest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAssessmentFrameworkShareResponse' {Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest :: Maybe AssessmentFrameworkShareRequest
$sel:assessmentFrameworkShareRequest:StartAssessmentFrameworkShareResponse' :: StartAssessmentFrameworkShareResponse
-> Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest} -> Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest) (\s :: StartAssessmentFrameworkShareResponse
s@StartAssessmentFrameworkShareResponse' {} Maybe AssessmentFrameworkShareRequest
a -> StartAssessmentFrameworkShareResponse
s {$sel:assessmentFrameworkShareRequest:StartAssessmentFrameworkShareResponse' :: Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest = Maybe AssessmentFrameworkShareRequest
a} :: StartAssessmentFrameworkShareResponse)

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

instance
  Prelude.NFData
    StartAssessmentFrameworkShareResponse
  where
  rnf :: StartAssessmentFrameworkShareResponse -> ()
rnf StartAssessmentFrameworkShareResponse' {Int
Maybe AssessmentFrameworkShareRequest
httpStatus :: Int
assessmentFrameworkShareRequest :: Maybe AssessmentFrameworkShareRequest
$sel:httpStatus:StartAssessmentFrameworkShareResponse' :: StartAssessmentFrameworkShareResponse -> Int
$sel:assessmentFrameworkShareRequest:StartAssessmentFrameworkShareResponse' :: StartAssessmentFrameworkShareResponse
-> Maybe AssessmentFrameworkShareRequest
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AssessmentFrameworkShareRequest
assessmentFrameworkShareRequest
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus