{-# 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.Wisdom.UpdateContent
(
UpdateContent (..),
newUpdateContent,
updateContent_metadata,
updateContent_overrideLinkOutUri,
updateContent_removeOverrideLinkOutUri,
updateContent_revisionId,
updateContent_title,
updateContent_uploadId,
updateContent_contentId,
updateContent_knowledgeBaseId,
UpdateContentResponse (..),
newUpdateContentResponse,
updateContentResponse_content,
updateContentResponse_httpStatus,
)
where
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
import Amazonka.Wisdom.Types
data UpdateContent = UpdateContent'
{
UpdateContent -> Maybe (HashMap Text Text)
metadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateContent -> Maybe Text
overrideLinkOutUri :: Prelude.Maybe Prelude.Text,
UpdateContent -> Maybe Bool
removeOverrideLinkOutUri :: Prelude.Maybe Prelude.Bool,
UpdateContent -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
UpdateContent -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
UpdateContent -> Maybe Text
uploadId :: Prelude.Maybe Prelude.Text,
UpdateContent -> Text
contentId :: Prelude.Text,
UpdateContent -> Text
knowledgeBaseId :: Prelude.Text
}
deriving (UpdateContent -> UpdateContent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContent -> UpdateContent -> Bool
$c/= :: UpdateContent -> UpdateContent -> Bool
== :: UpdateContent -> UpdateContent -> Bool
$c== :: UpdateContent -> UpdateContent -> Bool
Prelude.Eq, ReadPrec [UpdateContent]
ReadPrec UpdateContent
Int -> ReadS UpdateContent
ReadS [UpdateContent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateContent]
$creadListPrec :: ReadPrec [UpdateContent]
readPrec :: ReadPrec UpdateContent
$creadPrec :: ReadPrec UpdateContent
readList :: ReadS [UpdateContent]
$creadList :: ReadS [UpdateContent]
readsPrec :: Int -> ReadS UpdateContent
$creadsPrec :: Int -> ReadS UpdateContent
Prelude.Read, Int -> UpdateContent -> ShowS
[UpdateContent] -> ShowS
UpdateContent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContent] -> ShowS
$cshowList :: [UpdateContent] -> ShowS
show :: UpdateContent -> String
$cshow :: UpdateContent -> String
showsPrec :: Int -> UpdateContent -> ShowS
$cshowsPrec :: Int -> UpdateContent -> ShowS
Prelude.Show, forall x. Rep UpdateContent x -> UpdateContent
forall x. UpdateContent -> Rep UpdateContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateContent x -> UpdateContent
$cfrom :: forall x. UpdateContent -> Rep UpdateContent x
Prelude.Generic)
newUpdateContent ::
Prelude.Text ->
Prelude.Text ->
UpdateContent
newUpdateContent :: Text -> Text -> UpdateContent
newUpdateContent Text
pContentId_ Text
pKnowledgeBaseId_ =
UpdateContent'
{ $sel:metadata:UpdateContent' :: Maybe (HashMap Text Text)
metadata = forall a. Maybe a
Prelude.Nothing,
$sel:overrideLinkOutUri:UpdateContent' :: Maybe Text
overrideLinkOutUri = forall a. Maybe a
Prelude.Nothing,
$sel:removeOverrideLinkOutUri:UpdateContent' :: Maybe Bool
removeOverrideLinkOutUri = forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:UpdateContent' :: Maybe Text
revisionId = forall a. Maybe a
Prelude.Nothing,
$sel:title:UpdateContent' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing,
$sel:uploadId:UpdateContent' :: Maybe Text
uploadId = forall a. Maybe a
Prelude.Nothing,
$sel:contentId:UpdateContent' :: Text
contentId = Text
pContentId_,
$sel:knowledgeBaseId:UpdateContent' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_
}
updateContent_metadata :: Lens.Lens' UpdateContent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateContent_metadata :: Lens' UpdateContent (Maybe (HashMap Text Text))
updateContent_metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe (HashMap Text Text)
metadata :: Maybe (HashMap Text Text)
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
metadata} -> Maybe (HashMap Text Text)
metadata) (\s :: UpdateContent
s@UpdateContent' {} Maybe (HashMap Text Text)
a -> UpdateContent
s {$sel:metadata:UpdateContent' :: Maybe (HashMap Text Text)
metadata = Maybe (HashMap Text Text)
a} :: UpdateContent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateContent_overrideLinkOutUri :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_overrideLinkOutUri :: Lens' UpdateContent (Maybe Text)
updateContent_overrideLinkOutUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe Text
overrideLinkOutUri :: Maybe Text
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
overrideLinkOutUri} -> Maybe Text
overrideLinkOutUri) (\s :: UpdateContent
s@UpdateContent' {} Maybe Text
a -> UpdateContent
s {$sel:overrideLinkOutUri:UpdateContent' :: Maybe Text
overrideLinkOutUri = Maybe Text
a} :: UpdateContent)
updateContent_removeOverrideLinkOutUri :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Bool)
updateContent_removeOverrideLinkOutUri :: Lens' UpdateContent (Maybe Bool)
updateContent_removeOverrideLinkOutUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe Bool
removeOverrideLinkOutUri :: Maybe Bool
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
removeOverrideLinkOutUri} -> Maybe Bool
removeOverrideLinkOutUri) (\s :: UpdateContent
s@UpdateContent' {} Maybe Bool
a -> UpdateContent
s {$sel:removeOverrideLinkOutUri:UpdateContent' :: Maybe Bool
removeOverrideLinkOutUri = Maybe Bool
a} :: UpdateContent)
updateContent_revisionId :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_revisionId :: Lens' UpdateContent (Maybe Text)
updateContent_revisionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: UpdateContent
s@UpdateContent' {} Maybe Text
a -> UpdateContent
s {$sel:revisionId:UpdateContent' :: Maybe Text
revisionId = Maybe Text
a} :: UpdateContent)
updateContent_title :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_title :: Lens' UpdateContent (Maybe Text)
updateContent_title = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe Text
title :: Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
title} -> Maybe Text
title) (\s :: UpdateContent
s@UpdateContent' {} Maybe Text
a -> UpdateContent
s {$sel:title:UpdateContent' :: Maybe Text
title = Maybe Text
a} :: UpdateContent)
updateContent_uploadId :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_uploadId :: Lens' UpdateContent (Maybe Text)
updateContent_uploadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Maybe Text
uploadId :: Maybe Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
uploadId} -> Maybe Text
uploadId) (\s :: UpdateContent
s@UpdateContent' {} Maybe Text
a -> UpdateContent
s {$sel:uploadId:UpdateContent' :: Maybe Text
uploadId = Maybe Text
a} :: UpdateContent)
updateContent_contentId :: Lens.Lens' UpdateContent Prelude.Text
updateContent_contentId :: Lens' UpdateContent Text
updateContent_contentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Text
contentId :: Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
contentId} -> Text
contentId) (\s :: UpdateContent
s@UpdateContent' {} Text
a -> UpdateContent
s {$sel:contentId:UpdateContent' :: Text
contentId = Text
a} :: UpdateContent)
updateContent_knowledgeBaseId :: Lens.Lens' UpdateContent Prelude.Text
updateContent_knowledgeBaseId :: Lens' UpdateContent Text
updateContent_knowledgeBaseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContent' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: UpdateContent
s@UpdateContent' {} Text
a -> UpdateContent
s {$sel:knowledgeBaseId:UpdateContent' :: Text
knowledgeBaseId = Text
a} :: UpdateContent)
instance Core.AWSRequest UpdateContent where
type
AWSResponse UpdateContent =
UpdateContentResponse
request :: (Service -> Service) -> UpdateContent -> Request UpdateContent
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 UpdateContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateContent)))
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 ContentData -> Int -> UpdateContentResponse
UpdateContentResponse'
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
"content")
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 UpdateContent where
hashWithSalt :: Int -> UpdateContent -> Int
hashWithSalt Int
_salt UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
title :: Maybe Text
revisionId :: Maybe Text
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
metadata :: Maybe (HashMap Text Text)
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
metadata
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
overrideLinkOutUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
removeOverrideLinkOutUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
revisionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
uploadId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
contentId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
knowledgeBaseId
instance Prelude.NFData UpdateContent where
rnf :: UpdateContent -> ()
rnf UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
title :: Maybe Text
revisionId :: Maybe Text
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
metadata :: Maybe (HashMap Text Text)
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
metadata
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
overrideLinkOutUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
removeOverrideLinkOutUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
revisionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
title
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
uploadId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
knowledgeBaseId
instance Data.ToHeaders UpdateContent where
toHeaders :: UpdateContent -> 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 UpdateContent where
toJSON :: UpdateContent -> Value
toJSON UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
title :: Maybe Text
revisionId :: Maybe Text
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
metadata :: Maybe (HashMap Text Text)
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"metadata" 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 (HashMap Text Text)
metadata,
(Key
"overrideLinkOutUri" 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
overrideLinkOutUri,
(Key
"removeOverrideLinkOutUri" 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 Bool
removeOverrideLinkOutUri,
(Key
"revisionId" 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
revisionId,
(Key
"title" 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
title,
(Key
"uploadId" 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
uploadId
]
)
instance Data.ToPath UpdateContent where
toPath :: UpdateContent -> ByteString
toPath UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
title :: Maybe Text
revisionId :: Maybe Text
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
metadata :: Maybe (HashMap Text Text)
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/knowledgeBases/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
knowledgeBaseId,
ByteString
"/contents/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
contentId
]
instance Data.ToQuery UpdateContent where
toQuery :: UpdateContent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateContentResponse = UpdateContentResponse'
{
UpdateContentResponse -> Maybe ContentData
content :: Prelude.Maybe ContentData,
UpdateContentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateContentResponse -> UpdateContentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContentResponse -> UpdateContentResponse -> Bool
$c/= :: UpdateContentResponse -> UpdateContentResponse -> Bool
== :: UpdateContentResponse -> UpdateContentResponse -> Bool
$c== :: UpdateContentResponse -> UpdateContentResponse -> Bool
Prelude.Eq, Int -> UpdateContentResponse -> ShowS
[UpdateContentResponse] -> ShowS
UpdateContentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContentResponse] -> ShowS
$cshowList :: [UpdateContentResponse] -> ShowS
show :: UpdateContentResponse -> String
$cshow :: UpdateContentResponse -> String
showsPrec :: Int -> UpdateContentResponse -> ShowS
$cshowsPrec :: Int -> UpdateContentResponse -> ShowS
Prelude.Show, forall x. Rep UpdateContentResponse x -> UpdateContentResponse
forall x. UpdateContentResponse -> Rep UpdateContentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateContentResponse x -> UpdateContentResponse
$cfrom :: forall x. UpdateContentResponse -> Rep UpdateContentResponse x
Prelude.Generic)
newUpdateContentResponse ::
Prelude.Int ->
UpdateContentResponse
newUpdateContentResponse :: Int -> UpdateContentResponse
newUpdateContentResponse Int
pHttpStatus_ =
UpdateContentResponse'
{ $sel:content:UpdateContentResponse' :: Maybe ContentData
content = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateContentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateContentResponse_content :: Lens.Lens' UpdateContentResponse (Prelude.Maybe ContentData)
updateContentResponse_content :: Lens' UpdateContentResponse (Maybe ContentData)
updateContentResponse_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContentResponse' {Maybe ContentData
content :: Maybe ContentData
$sel:content:UpdateContentResponse' :: UpdateContentResponse -> Maybe ContentData
content} -> Maybe ContentData
content) (\s :: UpdateContentResponse
s@UpdateContentResponse' {} Maybe ContentData
a -> UpdateContentResponse
s {$sel:content:UpdateContentResponse' :: Maybe ContentData
content = Maybe ContentData
a} :: UpdateContentResponse)
updateContentResponse_httpStatus :: Lens.Lens' UpdateContentResponse Prelude.Int
updateContentResponse_httpStatus :: Lens' UpdateContentResponse Int
updateContentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContentResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateContentResponse' :: UpdateContentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateContentResponse
s@UpdateContentResponse' {} Int
a -> UpdateContentResponse
s {$sel:httpStatus:UpdateContentResponse' :: Int
httpStatus = Int
a} :: UpdateContentResponse)
instance Prelude.NFData UpdateContentResponse where
rnf :: UpdateContentResponse -> ()
rnf UpdateContentResponse' {Int
Maybe ContentData
httpStatus :: Int
content :: Maybe ContentData
$sel:httpStatus:UpdateContentResponse' :: UpdateContentResponse -> Int
$sel:content:UpdateContentResponse' :: UpdateContentResponse -> Maybe ContentData
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentData
content
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus