{-# 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.CreateContent
(
CreateContent (..),
newCreateContent,
createContent_overrideLinkOutUri,
createContent_clientToken,
createContent_metadata,
createContent_title,
createContent_tags,
createContent_knowledgeBaseId,
createContent_name,
createContent_uploadId,
CreateContentResponse (..),
newCreateContentResponse,
createContentResponse_content,
createContentResponse_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 CreateContent = CreateContent'
{
CreateContent -> Maybe Text
overrideLinkOutUri :: Prelude.Maybe Prelude.Text,
CreateContent -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateContent -> Maybe (HashMap Text Text)
metadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateContent -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
CreateContent -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateContent -> Text
knowledgeBaseId :: Prelude.Text,
CreateContent -> Text
name :: Prelude.Text,
CreateContent -> Text
uploadId :: Prelude.Text
}
deriving (CreateContent -> CreateContent -> Bool
(CreateContent -> CreateContent -> Bool)
-> (CreateContent -> CreateContent -> Bool) -> Eq CreateContent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContent -> CreateContent -> Bool
$c/= :: CreateContent -> CreateContent -> Bool
== :: CreateContent -> CreateContent -> Bool
$c== :: CreateContent -> CreateContent -> Bool
Prelude.Eq, ReadPrec [CreateContent]
ReadPrec CreateContent
Int -> ReadS CreateContent
ReadS [CreateContent]
(Int -> ReadS CreateContent)
-> ReadS [CreateContent]
-> ReadPrec CreateContent
-> ReadPrec [CreateContent]
-> Read CreateContent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContent]
$creadListPrec :: ReadPrec [CreateContent]
readPrec :: ReadPrec CreateContent
$creadPrec :: ReadPrec CreateContent
readList :: ReadS [CreateContent]
$creadList :: ReadS [CreateContent]
readsPrec :: Int -> ReadS CreateContent
$creadsPrec :: Int -> ReadS CreateContent
Prelude.Read, Int -> CreateContent -> ShowS
[CreateContent] -> ShowS
CreateContent -> String
(Int -> CreateContent -> ShowS)
-> (CreateContent -> String)
-> ([CreateContent] -> ShowS)
-> Show CreateContent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContent] -> ShowS
$cshowList :: [CreateContent] -> ShowS
show :: CreateContent -> String
$cshow :: CreateContent -> String
showsPrec :: Int -> CreateContent -> ShowS
$cshowsPrec :: Int -> CreateContent -> ShowS
Prelude.Show, (forall x. CreateContent -> Rep CreateContent x)
-> (forall x. Rep CreateContent x -> CreateContent)
-> Generic CreateContent
forall x. Rep CreateContent x -> CreateContent
forall x. CreateContent -> Rep CreateContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateContent x -> CreateContent
$cfrom :: forall x. CreateContent -> Rep CreateContent x
Prelude.Generic)
newCreateContent ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateContent
newCreateContent :: Text -> Text -> Text -> CreateContent
newCreateContent Text
pKnowledgeBaseId_ Text
pName_ Text
pUploadId_ =
CreateContent' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> CreateContent
CreateContent'
{ $sel:overrideLinkOutUri:CreateContent' :: Maybe Text
overrideLinkOutUri =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreateContent' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:CreateContent' :: Maybe (HashMap Text Text)
metadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:title:CreateContent' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateContent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:knowledgeBaseId:CreateContent' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
$sel:name:CreateContent' :: Text
name = Text
pName_,
$sel:uploadId:CreateContent' :: Text
uploadId = Text
pUploadId_
}
createContent_overrideLinkOutUri :: Lens.Lens' CreateContent (Prelude.Maybe Prelude.Text)
createContent_overrideLinkOutUri :: (Maybe Text -> f (Maybe Text)) -> CreateContent -> f CreateContent
createContent_overrideLinkOutUri = (CreateContent -> Maybe Text)
-> (CreateContent -> Maybe Text -> CreateContent)
-> Lens CreateContent CreateContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Maybe Text
overrideLinkOutUri :: Maybe Text
$sel:overrideLinkOutUri:CreateContent' :: CreateContent -> Maybe Text
overrideLinkOutUri} -> Maybe Text
overrideLinkOutUri) (\s :: CreateContent
s@CreateContent' {} Maybe Text
a -> CreateContent
s {$sel:overrideLinkOutUri:CreateContent' :: Maybe Text
overrideLinkOutUri = Maybe Text
a} :: CreateContent)
createContent_clientToken :: Lens.Lens' CreateContent (Prelude.Maybe Prelude.Text)
createContent_clientToken :: (Maybe Text -> f (Maybe Text)) -> CreateContent -> f CreateContent
createContent_clientToken = (CreateContent -> Maybe Text)
-> (CreateContent -> Maybe Text -> CreateContent)
-> Lens CreateContent CreateContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateContent' :: CreateContent -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateContent
s@CreateContent' {} Maybe Text
a -> CreateContent
s {$sel:clientToken:CreateContent' :: Maybe Text
clientToken = Maybe Text
a} :: CreateContent)
createContent_metadata :: Lens.Lens' CreateContent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createContent_metadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateContent -> f CreateContent
createContent_metadata = (CreateContent -> Maybe (HashMap Text Text))
-> (CreateContent -> Maybe (HashMap Text Text) -> CreateContent)
-> Lens
CreateContent
CreateContent
(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 (\CreateContent' {Maybe (HashMap Text Text)
metadata :: Maybe (HashMap Text Text)
$sel:metadata:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
metadata} -> Maybe (HashMap Text Text)
metadata) (\s :: CreateContent
s@CreateContent' {} Maybe (HashMap Text Text)
a -> CreateContent
s {$sel:metadata:CreateContent' :: Maybe (HashMap Text Text)
metadata = Maybe (HashMap Text Text)
a} :: CreateContent) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateContent -> f CreateContent)
-> ((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)))
-> CreateContent
-> f CreateContent
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
createContent_title :: Lens.Lens' CreateContent (Prelude.Maybe Prelude.Text)
createContent_title :: (Maybe Text -> f (Maybe Text)) -> CreateContent -> f CreateContent
createContent_title = (CreateContent -> Maybe Text)
-> (CreateContent -> Maybe Text -> CreateContent)
-> Lens CreateContent CreateContent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Maybe Text
title :: Maybe Text
$sel:title:CreateContent' :: CreateContent -> Maybe Text
title} -> Maybe Text
title) (\s :: CreateContent
s@CreateContent' {} Maybe Text
a -> CreateContent
s {$sel:title:CreateContent' :: Maybe Text
title = Maybe Text
a} :: CreateContent)
createContent_tags :: Lens.Lens' CreateContent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createContent_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateContent -> f CreateContent
createContent_tags = (CreateContent -> Maybe (HashMap Text Text))
-> (CreateContent -> Maybe (HashMap Text Text) -> CreateContent)
-> Lens
CreateContent
CreateContent
(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 (\CreateContent' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateContent
s@CreateContent' {} Maybe (HashMap Text Text)
a -> CreateContent
s {$sel:tags:CreateContent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateContent) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateContent -> f CreateContent)
-> ((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)))
-> CreateContent
-> f CreateContent
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
createContent_knowledgeBaseId :: Lens.Lens' CreateContent Prelude.Text
createContent_knowledgeBaseId :: (Text -> f Text) -> CreateContent -> f CreateContent
createContent_knowledgeBaseId = (CreateContent -> Text)
-> (CreateContent -> Text -> CreateContent)
-> Lens CreateContent CreateContent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:CreateContent' :: CreateContent -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: CreateContent
s@CreateContent' {} Text
a -> CreateContent
s {$sel:knowledgeBaseId:CreateContent' :: Text
knowledgeBaseId = Text
a} :: CreateContent)
createContent_name :: Lens.Lens' CreateContent Prelude.Text
createContent_name :: (Text -> f Text) -> CreateContent -> f CreateContent
createContent_name = (CreateContent -> Text)
-> (CreateContent -> Text -> CreateContent)
-> Lens CreateContent CreateContent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Text
name :: Text
$sel:name:CreateContent' :: CreateContent -> Text
name} -> Text
name) (\s :: CreateContent
s@CreateContent' {} Text
a -> CreateContent
s {$sel:name:CreateContent' :: Text
name = Text
a} :: CreateContent)
createContent_uploadId :: Lens.Lens' CreateContent Prelude.Text
createContent_uploadId :: (Text -> f Text) -> CreateContent -> f CreateContent
createContent_uploadId = (CreateContent -> Text)
-> (CreateContent -> Text -> CreateContent)
-> Lens CreateContent CreateContent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContent' {Text
uploadId :: Text
$sel:uploadId:CreateContent' :: CreateContent -> Text
uploadId} -> Text
uploadId) (\s :: CreateContent
s@CreateContent' {} Text
a -> CreateContent
s {$sel:uploadId:CreateContent' :: Text
uploadId = Text
a} :: CreateContent)
instance Core.AWSRequest CreateContent where
type
AWSResponse CreateContent =
CreateContentResponse
request :: CreateContent -> Request CreateContent
request = Service -> CreateContent -> Request CreateContent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateContent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateContent))
-> Logger
-> Service
-> Proxy CreateContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateContent)))
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 -> CreateContentResponse
CreateContentResponse'
(Maybe ContentData -> Int -> CreateContentResponse)
-> Either String (Maybe ContentData)
-> Either String (Int -> CreateContentResponse)
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 -> CreateContentResponse)
-> Either String Int -> Either String CreateContentResponse
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 CreateContent
instance Prelude.NFData CreateContent
instance Core.ToHeaders CreateContent where
toHeaders :: CreateContent -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateContent -> 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 CreateContent where
toJSON :: CreateContent -> Value
toJSON CreateContent' {Maybe Text
Maybe (HashMap Text Text)
Text
uploadId :: Text
name :: Text
knowledgeBaseId :: Text
tags :: Maybe (HashMap Text Text)
title :: Maybe Text
metadata :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
overrideLinkOutUri :: Maybe Text
$sel:uploadId:CreateContent' :: CreateContent -> Text
$sel:name:CreateContent' :: CreateContent -> Text
$sel:knowledgeBaseId:CreateContent' :: CreateContent -> Text
$sel:tags:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
$sel:title:CreateContent' :: CreateContent -> Maybe Text
$sel:metadata:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
$sel:clientToken:CreateContent' :: CreateContent -> Maybe Text
$sel:overrideLinkOutUri:CreateContent' :: CreateContent -> 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
"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,
(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
"tags" 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)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"uploadId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
uploadId)
]
)
instance Core.ToPath CreateContent where
toPath :: CreateContent -> ByteString
toPath CreateContent' {Maybe Text
Maybe (HashMap Text Text)
Text
uploadId :: Text
name :: Text
knowledgeBaseId :: Text
tags :: Maybe (HashMap Text Text)
title :: Maybe Text
metadata :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
overrideLinkOutUri :: Maybe Text
$sel:uploadId:CreateContent' :: CreateContent -> Text
$sel:name:CreateContent' :: CreateContent -> Text
$sel:knowledgeBaseId:CreateContent' :: CreateContent -> Text
$sel:tags:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
$sel:title:CreateContent' :: CreateContent -> Maybe Text
$sel:metadata:CreateContent' :: CreateContent -> Maybe (HashMap Text Text)
$sel:clientToken:CreateContent' :: CreateContent -> Maybe Text
$sel:overrideLinkOutUri:CreateContent' :: CreateContent -> 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"
]
instance Core.ToQuery CreateContent where
toQuery :: CreateContent -> QueryString
toQuery = QueryString -> CreateContent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateContentResponse = CreateContentResponse'
{
CreateContentResponse -> Maybe ContentData
content :: Prelude.Maybe ContentData,
CreateContentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateContentResponse -> CreateContentResponse -> Bool
(CreateContentResponse -> CreateContentResponse -> Bool)
-> (CreateContentResponse -> CreateContentResponse -> Bool)
-> Eq CreateContentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContentResponse -> CreateContentResponse -> Bool
$c/= :: CreateContentResponse -> CreateContentResponse -> Bool
== :: CreateContentResponse -> CreateContentResponse -> Bool
$c== :: CreateContentResponse -> CreateContentResponse -> Bool
Prelude.Eq, Int -> CreateContentResponse -> ShowS
[CreateContentResponse] -> ShowS
CreateContentResponse -> String
(Int -> CreateContentResponse -> ShowS)
-> (CreateContentResponse -> String)
-> ([CreateContentResponse] -> ShowS)
-> Show CreateContentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContentResponse] -> ShowS
$cshowList :: [CreateContentResponse] -> ShowS
show :: CreateContentResponse -> String
$cshow :: CreateContentResponse -> String
showsPrec :: Int -> CreateContentResponse -> ShowS
$cshowsPrec :: Int -> CreateContentResponse -> ShowS
Prelude.Show, (forall x. CreateContentResponse -> Rep CreateContentResponse x)
-> (forall x. Rep CreateContentResponse x -> CreateContentResponse)
-> Generic CreateContentResponse
forall x. Rep CreateContentResponse x -> CreateContentResponse
forall x. CreateContentResponse -> Rep CreateContentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateContentResponse x -> CreateContentResponse
$cfrom :: forall x. CreateContentResponse -> Rep CreateContentResponse x
Prelude.Generic)
newCreateContentResponse ::
Prelude.Int ->
CreateContentResponse
newCreateContentResponse :: Int -> CreateContentResponse
newCreateContentResponse Int
pHttpStatus_ =
CreateContentResponse' :: Maybe ContentData -> Int -> CreateContentResponse
CreateContentResponse'
{ $sel:content:CreateContentResponse' :: Maybe ContentData
content = Maybe ContentData
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateContentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createContentResponse_content :: Lens.Lens' CreateContentResponse (Prelude.Maybe ContentData)
createContentResponse_content :: (Maybe ContentData -> f (Maybe ContentData))
-> CreateContentResponse -> f CreateContentResponse
createContentResponse_content = (CreateContentResponse -> Maybe ContentData)
-> (CreateContentResponse
-> Maybe ContentData -> CreateContentResponse)
-> Lens
CreateContentResponse
CreateContentResponse
(Maybe ContentData)
(Maybe ContentData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContentResponse' {Maybe ContentData
content :: Maybe ContentData
$sel:content:CreateContentResponse' :: CreateContentResponse -> Maybe ContentData
content} -> Maybe ContentData
content) (\s :: CreateContentResponse
s@CreateContentResponse' {} Maybe ContentData
a -> CreateContentResponse
s {$sel:content:CreateContentResponse' :: Maybe ContentData
content = Maybe ContentData
a} :: CreateContentResponse)
createContentResponse_httpStatus :: Lens.Lens' CreateContentResponse Prelude.Int
createContentResponse_httpStatus :: (Int -> f Int) -> CreateContentResponse -> f CreateContentResponse
createContentResponse_httpStatus = (CreateContentResponse -> Int)
-> (CreateContentResponse -> Int -> CreateContentResponse)
-> Lens CreateContentResponse CreateContentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateContentResponse' :: CreateContentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateContentResponse
s@CreateContentResponse' {} Int
a -> CreateContentResponse
s {$sel:httpStatus:CreateContentResponse' :: Int
httpStatus = Int
a} :: CreateContentResponse)
instance Prelude.NFData CreateContentResponse