{-# 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_overrideLinkOutUri,
updateContent_removeOverrideLinkOutUri,
updateContent_metadata,
updateContent_title,
updateContent_revisionId,
updateContent_uploadId,
updateContent_contentId,
updateContent_knowledgeBaseId,
UpdateContentResponse (..),
newUpdateContentResponse,
updateContentResponse_content,
updateContentResponse_httpStatus,
)
where
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
import Amazonka.Wisdom.Types
data UpdateContent = UpdateContent'
{
UpdateContent -> Maybe Text
overrideLinkOutUri :: Prelude.Maybe Prelude.Text,
UpdateContent -> Maybe Bool
removeOverrideLinkOutUri :: Prelude.Maybe Prelude.Bool,
UpdateContent -> Maybe (HashMap Text Text)
metadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateContent -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
UpdateContent -> Maybe Text
revisionId :: 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
(UpdateContent -> UpdateContent -> Bool)
-> (UpdateContent -> UpdateContent -> Bool) -> Eq UpdateContent
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]
(Int -> ReadS UpdateContent)
-> ReadS [UpdateContent]
-> ReadPrec UpdateContent
-> ReadPrec [UpdateContent]
-> Read 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
(Int -> UpdateContent -> ShowS)
-> (UpdateContent -> String)
-> ([UpdateContent] -> ShowS)
-> Show UpdateContent
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. UpdateContent -> Rep UpdateContent x)
-> (forall x. Rep UpdateContent x -> UpdateContent)
-> Generic UpdateContent
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' :: Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateContent
UpdateContent'
{ $sel:overrideLinkOutUri:UpdateContent' :: Maybe Text
overrideLinkOutUri =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:removeOverrideLinkOutUri:UpdateContent' :: Maybe Bool
removeOverrideLinkOutUri = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:UpdateContent' :: Maybe (HashMap Text Text)
metadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:title:UpdateContent' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:UpdateContent' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:uploadId:UpdateContent' :: Maybe Text
uploadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:contentId:UpdateContent' :: Text
contentId = Text
pContentId_,
$sel:knowledgeBaseId:UpdateContent' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_
}
updateContent_overrideLinkOutUri :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_overrideLinkOutUri :: (Maybe Text -> f (Maybe Text)) -> UpdateContent -> f UpdateContent
updateContent_overrideLinkOutUri = (UpdateContent -> Maybe Text)
-> (UpdateContent -> Maybe Text -> UpdateContent)
-> Lens UpdateContent UpdateContent (Maybe Text) (Maybe Text)
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 :: (Maybe Bool -> f (Maybe Bool)) -> UpdateContent -> f UpdateContent
updateContent_removeOverrideLinkOutUri = (UpdateContent -> Maybe Bool)
-> (UpdateContent -> Maybe Bool -> UpdateContent)
-> Lens UpdateContent UpdateContent (Maybe Bool) (Maybe Bool)
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_metadata :: Lens.Lens' UpdateContent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateContent_metadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateContent -> f UpdateContent
updateContent_metadata = (UpdateContent -> Maybe (HashMap Text Text))
-> (UpdateContent -> Maybe (HashMap Text Text) -> UpdateContent)
-> Lens
UpdateContent
UpdateContent
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateContent -> f UpdateContent)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateContent
-> f UpdateContent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateContent_title :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_title :: (Maybe Text -> f (Maybe Text)) -> UpdateContent -> f UpdateContent
updateContent_title = (UpdateContent -> Maybe Text)
-> (UpdateContent -> Maybe Text -> UpdateContent)
-> Lens UpdateContent UpdateContent (Maybe Text) (Maybe Text)
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_revisionId :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_revisionId :: (Maybe Text -> f (Maybe Text)) -> UpdateContent -> f UpdateContent
updateContent_revisionId = (UpdateContent -> Maybe Text)
-> (UpdateContent -> Maybe Text -> UpdateContent)
-> Lens UpdateContent UpdateContent (Maybe Text) (Maybe Text)
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_uploadId :: Lens.Lens' UpdateContent (Prelude.Maybe Prelude.Text)
updateContent_uploadId :: (Maybe Text -> f (Maybe Text)) -> UpdateContent -> f UpdateContent
updateContent_uploadId = (UpdateContent -> Maybe Text)
-> (UpdateContent -> Maybe Text -> UpdateContent)
-> Lens UpdateContent UpdateContent (Maybe Text) (Maybe Text)
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 :: (Text -> f Text) -> UpdateContent -> f UpdateContent
updateContent_contentId = (UpdateContent -> Text)
-> (UpdateContent -> Text -> UpdateContent)
-> Lens UpdateContent UpdateContent Text Text
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 :: (Text -> f Text) -> UpdateContent -> f UpdateContent
updateContent_knowledgeBaseId = (UpdateContent -> Text)
-> (UpdateContent -> Text -> UpdateContent)
-> Lens UpdateContent UpdateContent Text Text
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 :: UpdateContent -> Request UpdateContent
request = Service -> UpdateContent -> Request UpdateContent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateContent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateContent))
-> Logger
-> Service
-> Proxy UpdateContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateContent)))
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 ContentData -> Int -> UpdateContentResponse
UpdateContentResponse'
(Maybe ContentData -> Int -> UpdateContentResponse)
-> Either String (Maybe ContentData)
-> Either String (Int -> UpdateContentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ContentData)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"content")
Either String (Int -> UpdateContentResponse)
-> Either String Int -> Either String UpdateContentResponse
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 UpdateContent
instance Prelude.NFData UpdateContent
instance Core.ToHeaders UpdateContent where
toHeaders :: UpdateContent -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateContent -> 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 UpdateContent where
toJSON :: UpdateContent -> Value
toJSON UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
revisionId :: Maybe Text
title :: Maybe Text
metadata :: Maybe (HashMap Text Text)
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"overrideLinkOutUri" 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
overrideLinkOutUri,
(Text
"removeOverrideLinkOutUri" 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
removeOverrideLinkOutUri,
(Text
"metadata" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
metadata,
(Text
"title" 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
title,
(Text
"revisionId" 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
revisionId,
(Text
"uploadId" 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
uploadId
]
)
instance Core.ToPath UpdateContent where
toPath :: UpdateContent -> ByteString
toPath UpdateContent' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Text
knowledgeBaseId :: Text
contentId :: Text
uploadId :: Maybe Text
revisionId :: Maybe Text
title :: Maybe Text
metadata :: Maybe (HashMap Text Text)
removeOverrideLinkOutUri :: Maybe Bool
overrideLinkOutUri :: Maybe Text
$sel:knowledgeBaseId:UpdateContent' :: UpdateContent -> Text
$sel:contentId:UpdateContent' :: UpdateContent -> Text
$sel:uploadId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:revisionId:UpdateContent' :: UpdateContent -> Maybe Text
$sel:title:UpdateContent' :: UpdateContent -> Maybe Text
$sel:metadata:UpdateContent' :: UpdateContent -> Maybe (HashMap Text Text)
$sel:removeOverrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Bool
$sel:overrideLinkOutUri:UpdateContent' :: UpdateContent -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/knowledgeBases/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
knowledgeBaseId,
ByteString
"/contents/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
contentId
]
instance Core.ToQuery UpdateContent where
toQuery :: UpdateContent -> QueryString
toQuery = QueryString -> UpdateContent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(UpdateContentResponse -> UpdateContentResponse -> Bool)
-> (UpdateContentResponse -> UpdateContentResponse -> Bool)
-> Eq UpdateContentResponse
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
(Int -> UpdateContentResponse -> ShowS)
-> (UpdateContentResponse -> String)
-> ([UpdateContentResponse] -> ShowS)
-> Show UpdateContentResponse
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. UpdateContentResponse -> Rep UpdateContentResponse x)
-> (forall x. Rep UpdateContentResponse x -> UpdateContentResponse)
-> Generic UpdateContentResponse
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' :: Maybe ContentData -> Int -> UpdateContentResponse
UpdateContentResponse'
{ $sel:content:UpdateContentResponse' :: Maybe ContentData
content = Maybe ContentData
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateContentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateContentResponse_content :: Lens.Lens' UpdateContentResponse (Prelude.Maybe ContentData)
updateContentResponse_content :: (Maybe ContentData -> f (Maybe ContentData))
-> UpdateContentResponse -> f UpdateContentResponse
updateContentResponse_content = (UpdateContentResponse -> Maybe ContentData)
-> (UpdateContentResponse
-> Maybe ContentData -> UpdateContentResponse)
-> Lens
UpdateContentResponse
UpdateContentResponse
(Maybe ContentData)
(Maybe ContentData)
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 :: (Int -> f Int) -> UpdateContentResponse -> f UpdateContentResponse
updateContentResponse_httpStatus = (UpdateContentResponse -> Int)
-> (UpdateContentResponse -> Int -> UpdateContentResponse)
-> Lens UpdateContentResponse UpdateContentResponse Int Int
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