{-# 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 #-}
module Amazonka.AuditManager.AssociateAssessmentReportEvidenceFolder
(
AssociateAssessmentReportEvidenceFolder (..),
newAssociateAssessmentReportEvidenceFolder,
associateAssessmentReportEvidenceFolder_assessmentId,
associateAssessmentReportEvidenceFolder_evidenceFolderId,
AssociateAssessmentReportEvidenceFolderResponse (..),
newAssociateAssessmentReportEvidenceFolderResponse,
associateAssessmentReportEvidenceFolderResponse_httpStatus,
)
where
import Amazonka.AuditManager.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data AssociateAssessmentReportEvidenceFolder = AssociateAssessmentReportEvidenceFolder'
{
AssociateAssessmentReportEvidenceFolder -> Text
assessmentId :: Prelude.Text,
AssociateAssessmentReportEvidenceFolder -> Text
evidenceFolderId :: Prelude.Text
}
deriving (AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool
(AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool)
-> (AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool)
-> Eq AssociateAssessmentReportEvidenceFolder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool
$c/= :: AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool
== :: AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool
$c== :: AssociateAssessmentReportEvidenceFolder
-> AssociateAssessmentReportEvidenceFolder -> Bool
Prelude.Eq, ReadPrec [AssociateAssessmentReportEvidenceFolder]
ReadPrec AssociateAssessmentReportEvidenceFolder
Int -> ReadS AssociateAssessmentReportEvidenceFolder
ReadS [AssociateAssessmentReportEvidenceFolder]
(Int -> ReadS AssociateAssessmentReportEvidenceFolder)
-> ReadS [AssociateAssessmentReportEvidenceFolder]
-> ReadPrec AssociateAssessmentReportEvidenceFolder
-> ReadPrec [AssociateAssessmentReportEvidenceFolder]
-> Read AssociateAssessmentReportEvidenceFolder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateAssessmentReportEvidenceFolder]
$creadListPrec :: ReadPrec [AssociateAssessmentReportEvidenceFolder]
readPrec :: ReadPrec AssociateAssessmentReportEvidenceFolder
$creadPrec :: ReadPrec AssociateAssessmentReportEvidenceFolder
readList :: ReadS [AssociateAssessmentReportEvidenceFolder]
$creadList :: ReadS [AssociateAssessmentReportEvidenceFolder]
readsPrec :: Int -> ReadS AssociateAssessmentReportEvidenceFolder
$creadsPrec :: Int -> ReadS AssociateAssessmentReportEvidenceFolder
Prelude.Read, Int -> AssociateAssessmentReportEvidenceFolder -> ShowS
[AssociateAssessmentReportEvidenceFolder] -> ShowS
AssociateAssessmentReportEvidenceFolder -> String
(Int -> AssociateAssessmentReportEvidenceFolder -> ShowS)
-> (AssociateAssessmentReportEvidenceFolder -> String)
-> ([AssociateAssessmentReportEvidenceFolder] -> ShowS)
-> Show AssociateAssessmentReportEvidenceFolder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateAssessmentReportEvidenceFolder] -> ShowS
$cshowList :: [AssociateAssessmentReportEvidenceFolder] -> ShowS
show :: AssociateAssessmentReportEvidenceFolder -> String
$cshow :: AssociateAssessmentReportEvidenceFolder -> String
showsPrec :: Int -> AssociateAssessmentReportEvidenceFolder -> ShowS
$cshowsPrec :: Int -> AssociateAssessmentReportEvidenceFolder -> ShowS
Prelude.Show, (forall x.
AssociateAssessmentReportEvidenceFolder
-> Rep AssociateAssessmentReportEvidenceFolder x)
-> (forall x.
Rep AssociateAssessmentReportEvidenceFolder x
-> AssociateAssessmentReportEvidenceFolder)
-> Generic AssociateAssessmentReportEvidenceFolder
forall x.
Rep AssociateAssessmentReportEvidenceFolder x
-> AssociateAssessmentReportEvidenceFolder
forall x.
AssociateAssessmentReportEvidenceFolder
-> Rep AssociateAssessmentReportEvidenceFolder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateAssessmentReportEvidenceFolder x
-> AssociateAssessmentReportEvidenceFolder
$cfrom :: forall x.
AssociateAssessmentReportEvidenceFolder
-> Rep AssociateAssessmentReportEvidenceFolder x
Prelude.Generic)
newAssociateAssessmentReportEvidenceFolder ::
Prelude.Text ->
Prelude.Text ->
AssociateAssessmentReportEvidenceFolder
newAssociateAssessmentReportEvidenceFolder :: Text -> Text -> AssociateAssessmentReportEvidenceFolder
newAssociateAssessmentReportEvidenceFolder
Text
pAssessmentId_
Text
pEvidenceFolderId_ =
AssociateAssessmentReportEvidenceFolder' :: Text -> Text -> AssociateAssessmentReportEvidenceFolder
AssociateAssessmentReportEvidenceFolder'
{ $sel:assessmentId:AssociateAssessmentReportEvidenceFolder' :: Text
assessmentId =
Text
pAssessmentId_,
$sel:evidenceFolderId:AssociateAssessmentReportEvidenceFolder' :: Text
evidenceFolderId =
Text
pEvidenceFolderId_
}
associateAssessmentReportEvidenceFolder_assessmentId :: Lens.Lens' AssociateAssessmentReportEvidenceFolder Prelude.Text
associateAssessmentReportEvidenceFolder_assessmentId :: (Text -> f Text)
-> AssociateAssessmentReportEvidenceFolder
-> f AssociateAssessmentReportEvidenceFolder
associateAssessmentReportEvidenceFolder_assessmentId = (AssociateAssessmentReportEvidenceFolder -> Text)
-> (AssociateAssessmentReportEvidenceFolder
-> Text -> AssociateAssessmentReportEvidenceFolder)
-> Lens
AssociateAssessmentReportEvidenceFolder
AssociateAssessmentReportEvidenceFolder
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateAssessmentReportEvidenceFolder' {Text
assessmentId :: Text
$sel:assessmentId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
assessmentId} -> Text
assessmentId) (\s :: AssociateAssessmentReportEvidenceFolder
s@AssociateAssessmentReportEvidenceFolder' {} Text
a -> AssociateAssessmentReportEvidenceFolder
s {$sel:assessmentId:AssociateAssessmentReportEvidenceFolder' :: Text
assessmentId = Text
a} :: AssociateAssessmentReportEvidenceFolder)
associateAssessmentReportEvidenceFolder_evidenceFolderId :: Lens.Lens' AssociateAssessmentReportEvidenceFolder Prelude.Text
associateAssessmentReportEvidenceFolder_evidenceFolderId :: (Text -> f Text)
-> AssociateAssessmentReportEvidenceFolder
-> f AssociateAssessmentReportEvidenceFolder
associateAssessmentReportEvidenceFolder_evidenceFolderId = (AssociateAssessmentReportEvidenceFolder -> Text)
-> (AssociateAssessmentReportEvidenceFolder
-> Text -> AssociateAssessmentReportEvidenceFolder)
-> Lens
AssociateAssessmentReportEvidenceFolder
AssociateAssessmentReportEvidenceFolder
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateAssessmentReportEvidenceFolder' {Text
evidenceFolderId :: Text
$sel:evidenceFolderId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
evidenceFolderId} -> Text
evidenceFolderId) (\s :: AssociateAssessmentReportEvidenceFolder
s@AssociateAssessmentReportEvidenceFolder' {} Text
a -> AssociateAssessmentReportEvidenceFolder
s {$sel:evidenceFolderId:AssociateAssessmentReportEvidenceFolder' :: Text
evidenceFolderId = Text
a} :: AssociateAssessmentReportEvidenceFolder)
instance
Core.AWSRequest
AssociateAssessmentReportEvidenceFolder
where
type
AWSResponse
AssociateAssessmentReportEvidenceFolder =
AssociateAssessmentReportEvidenceFolderResponse
request :: AssociateAssessmentReportEvidenceFolder
-> Request AssociateAssessmentReportEvidenceFolder
request = Service
-> AssociateAssessmentReportEvidenceFolder
-> Request AssociateAssessmentReportEvidenceFolder
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateAssessmentReportEvidenceFolder
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse AssociateAssessmentReportEvidenceFolder)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse AssociateAssessmentReportEvidenceFolder))
-> Logger
-> Service
-> Proxy AssociateAssessmentReportEvidenceFolder
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse AssociateAssessmentReportEvidenceFolder)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> AssociateAssessmentReportEvidenceFolderResponse
AssociateAssessmentReportEvidenceFolderResponse'
(Int -> AssociateAssessmentReportEvidenceFolderResponse)
-> Either String Int
-> Either String AssociateAssessmentReportEvidenceFolderResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
AssociateAssessmentReportEvidenceFolder
instance
Prelude.NFData
AssociateAssessmentReportEvidenceFolder
instance
Core.ToHeaders
AssociateAssessmentReportEvidenceFolder
where
toHeaders :: AssociateAssessmentReportEvidenceFolder -> ResponseHeaders
toHeaders =
ResponseHeaders
-> AssociateAssessmentReportEvidenceFolder -> 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
AssociateAssessmentReportEvidenceFolder
where
toJSON :: AssociateAssessmentReportEvidenceFolder -> Value
toJSON AssociateAssessmentReportEvidenceFolder' {Text
evidenceFolderId :: Text
assessmentId :: Text
$sel:evidenceFolderId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
$sel:assessmentId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"evidenceFolderId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
evidenceFolderId)
]
)
instance
Core.ToPath
AssociateAssessmentReportEvidenceFolder
where
toPath :: AssociateAssessmentReportEvidenceFolder -> ByteString
toPath AssociateAssessmentReportEvidenceFolder' {Text
evidenceFolderId :: Text
assessmentId :: Text
$sel:evidenceFolderId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
$sel:assessmentId:AssociateAssessmentReportEvidenceFolder' :: AssociateAssessmentReportEvidenceFolder -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/assessments/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assessmentId,
ByteString
"/associateToAssessmentReport"
]
instance
Core.ToQuery
AssociateAssessmentReportEvidenceFolder
where
toQuery :: AssociateAssessmentReportEvidenceFolder -> QueryString
toQuery = QueryString
-> AssociateAssessmentReportEvidenceFolder -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AssociateAssessmentReportEvidenceFolderResponse = AssociateAssessmentReportEvidenceFolderResponse'
{
AssociateAssessmentReportEvidenceFolderResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool
(AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool)
-> (AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool)
-> Eq AssociateAssessmentReportEvidenceFolderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool
$c/= :: AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool
== :: AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool
$c== :: AssociateAssessmentReportEvidenceFolderResponse
-> AssociateAssessmentReportEvidenceFolderResponse -> Bool
Prelude.Eq, ReadPrec [AssociateAssessmentReportEvidenceFolderResponse]
ReadPrec AssociateAssessmentReportEvidenceFolderResponse
Int -> ReadS AssociateAssessmentReportEvidenceFolderResponse
ReadS [AssociateAssessmentReportEvidenceFolderResponse]
(Int -> ReadS AssociateAssessmentReportEvidenceFolderResponse)
-> ReadS [AssociateAssessmentReportEvidenceFolderResponse]
-> ReadPrec AssociateAssessmentReportEvidenceFolderResponse
-> ReadPrec [AssociateAssessmentReportEvidenceFolderResponse]
-> Read AssociateAssessmentReportEvidenceFolderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateAssessmentReportEvidenceFolderResponse]
$creadListPrec :: ReadPrec [AssociateAssessmentReportEvidenceFolderResponse]
readPrec :: ReadPrec AssociateAssessmentReportEvidenceFolderResponse
$creadPrec :: ReadPrec AssociateAssessmentReportEvidenceFolderResponse
readList :: ReadS [AssociateAssessmentReportEvidenceFolderResponse]
$creadList :: ReadS [AssociateAssessmentReportEvidenceFolderResponse]
readsPrec :: Int -> ReadS AssociateAssessmentReportEvidenceFolderResponse
$creadsPrec :: Int -> ReadS AssociateAssessmentReportEvidenceFolderResponse
Prelude.Read, Int -> AssociateAssessmentReportEvidenceFolderResponse -> ShowS
[AssociateAssessmentReportEvidenceFolderResponse] -> ShowS
AssociateAssessmentReportEvidenceFolderResponse -> String
(Int -> AssociateAssessmentReportEvidenceFolderResponse -> ShowS)
-> (AssociateAssessmentReportEvidenceFolderResponse -> String)
-> ([AssociateAssessmentReportEvidenceFolderResponse] -> ShowS)
-> Show AssociateAssessmentReportEvidenceFolderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateAssessmentReportEvidenceFolderResponse] -> ShowS
$cshowList :: [AssociateAssessmentReportEvidenceFolderResponse] -> ShowS
show :: AssociateAssessmentReportEvidenceFolderResponse -> String
$cshow :: AssociateAssessmentReportEvidenceFolderResponse -> String
showsPrec :: Int -> AssociateAssessmentReportEvidenceFolderResponse -> ShowS
$cshowsPrec :: Int -> AssociateAssessmentReportEvidenceFolderResponse -> ShowS
Prelude.Show, (forall x.
AssociateAssessmentReportEvidenceFolderResponse
-> Rep AssociateAssessmentReportEvidenceFolderResponse x)
-> (forall x.
Rep AssociateAssessmentReportEvidenceFolderResponse x
-> AssociateAssessmentReportEvidenceFolderResponse)
-> Generic AssociateAssessmentReportEvidenceFolderResponse
forall x.
Rep AssociateAssessmentReportEvidenceFolderResponse x
-> AssociateAssessmentReportEvidenceFolderResponse
forall x.
AssociateAssessmentReportEvidenceFolderResponse
-> Rep AssociateAssessmentReportEvidenceFolderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateAssessmentReportEvidenceFolderResponse x
-> AssociateAssessmentReportEvidenceFolderResponse
$cfrom :: forall x.
AssociateAssessmentReportEvidenceFolderResponse
-> Rep AssociateAssessmentReportEvidenceFolderResponse x
Prelude.Generic)
newAssociateAssessmentReportEvidenceFolderResponse ::
Prelude.Int ->
AssociateAssessmentReportEvidenceFolderResponse
newAssociateAssessmentReportEvidenceFolderResponse :: Int -> AssociateAssessmentReportEvidenceFolderResponse
newAssociateAssessmentReportEvidenceFolderResponse
Int
pHttpStatus_ =
AssociateAssessmentReportEvidenceFolderResponse' :: Int -> AssociateAssessmentReportEvidenceFolderResponse
AssociateAssessmentReportEvidenceFolderResponse'
{ $sel:httpStatus:AssociateAssessmentReportEvidenceFolderResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
associateAssessmentReportEvidenceFolderResponse_httpStatus :: Lens.Lens' AssociateAssessmentReportEvidenceFolderResponse Prelude.Int
associateAssessmentReportEvidenceFolderResponse_httpStatus :: (Int -> f Int)
-> AssociateAssessmentReportEvidenceFolderResponse
-> f AssociateAssessmentReportEvidenceFolderResponse
associateAssessmentReportEvidenceFolderResponse_httpStatus = (AssociateAssessmentReportEvidenceFolderResponse -> Int)
-> (AssociateAssessmentReportEvidenceFolderResponse
-> Int -> AssociateAssessmentReportEvidenceFolderResponse)
-> Lens
AssociateAssessmentReportEvidenceFolderResponse
AssociateAssessmentReportEvidenceFolderResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateAssessmentReportEvidenceFolderResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateAssessmentReportEvidenceFolderResponse' :: AssociateAssessmentReportEvidenceFolderResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateAssessmentReportEvidenceFolderResponse
s@AssociateAssessmentReportEvidenceFolderResponse' {} Int
a -> AssociateAssessmentReportEvidenceFolderResponse
s {$sel:httpStatus:AssociateAssessmentReportEvidenceFolderResponse' :: Int
httpStatus = Int
a} :: AssociateAssessmentReportEvidenceFolderResponse)
instance
Prelude.NFData
AssociateAssessmentReportEvidenceFolderResponse