{-# 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.SageMaker.ImportHubContent
(
ImportHubContent (..),
newImportHubContent,
importHubContent_hubContentDescription,
importHubContent_hubContentDisplayName,
importHubContent_hubContentMarkdown,
importHubContent_hubContentSearchKeywords,
importHubContent_hubContentVersion,
importHubContent_tags,
importHubContent_hubContentName,
importHubContent_hubContentType,
importHubContent_documentSchemaVersion,
importHubContent_hubName,
importHubContent_hubContentDocument,
ImportHubContentResponse (..),
newImportHubContentResponse,
importHubContentResponse_httpStatus,
importHubContentResponse_hubArn,
importHubContentResponse_hubContentArn,
)
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.SageMaker.Types
data ImportHubContent = ImportHubContent'
{
ImportHubContent -> Maybe Text
hubContentDescription :: Prelude.Maybe Prelude.Text,
ImportHubContent -> Maybe Text
hubContentDisplayName :: Prelude.Maybe Prelude.Text,
ImportHubContent -> Maybe Text
hubContentMarkdown :: Prelude.Maybe Prelude.Text,
ImportHubContent -> Maybe [Text]
hubContentSearchKeywords :: Prelude.Maybe [Prelude.Text],
ImportHubContent -> Maybe Text
hubContentVersion :: Prelude.Maybe Prelude.Text,
ImportHubContent -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
ImportHubContent -> Text
hubContentName :: Prelude.Text,
ImportHubContent -> HubContentType
hubContentType :: HubContentType,
ImportHubContent -> Text
documentSchemaVersion :: Prelude.Text,
ImportHubContent -> Text
hubName :: Prelude.Text,
ImportHubContent -> Text
hubContentDocument :: Prelude.Text
}
deriving (ImportHubContent -> ImportHubContent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportHubContent -> ImportHubContent -> Bool
$c/= :: ImportHubContent -> ImportHubContent -> Bool
== :: ImportHubContent -> ImportHubContent -> Bool
$c== :: ImportHubContent -> ImportHubContent -> Bool
Prelude.Eq, ReadPrec [ImportHubContent]
ReadPrec ImportHubContent
Int -> ReadS ImportHubContent
ReadS [ImportHubContent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportHubContent]
$creadListPrec :: ReadPrec [ImportHubContent]
readPrec :: ReadPrec ImportHubContent
$creadPrec :: ReadPrec ImportHubContent
readList :: ReadS [ImportHubContent]
$creadList :: ReadS [ImportHubContent]
readsPrec :: Int -> ReadS ImportHubContent
$creadsPrec :: Int -> ReadS ImportHubContent
Prelude.Read, Int -> ImportHubContent -> ShowS
[ImportHubContent] -> ShowS
ImportHubContent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportHubContent] -> ShowS
$cshowList :: [ImportHubContent] -> ShowS
show :: ImportHubContent -> String
$cshow :: ImportHubContent -> String
showsPrec :: Int -> ImportHubContent -> ShowS
$cshowsPrec :: Int -> ImportHubContent -> ShowS
Prelude.Show, forall x. Rep ImportHubContent x -> ImportHubContent
forall x. ImportHubContent -> Rep ImportHubContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportHubContent x -> ImportHubContent
$cfrom :: forall x. ImportHubContent -> Rep ImportHubContent x
Prelude.Generic)
newImportHubContent ::
Prelude.Text ->
HubContentType ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ImportHubContent
newImportHubContent :: Text -> HubContentType -> Text -> Text -> Text -> ImportHubContent
newImportHubContent
Text
pHubContentName_
HubContentType
pHubContentType_
Text
pDocumentSchemaVersion_
Text
pHubName_
Text
pHubContentDocument_ =
ImportHubContent'
{ $sel:hubContentDescription:ImportHubContent' :: Maybe Text
hubContentDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:hubContentDisplayName:ImportHubContent' :: Maybe Text
hubContentDisplayName = forall a. Maybe a
Prelude.Nothing,
$sel:hubContentMarkdown:ImportHubContent' :: Maybe Text
hubContentMarkdown = forall a. Maybe a
Prelude.Nothing,
$sel:hubContentSearchKeywords:ImportHubContent' :: Maybe [Text]
hubContentSearchKeywords = forall a. Maybe a
Prelude.Nothing,
$sel:hubContentVersion:ImportHubContent' :: Maybe Text
hubContentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:tags:ImportHubContent' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:hubContentName:ImportHubContent' :: Text
hubContentName = Text
pHubContentName_,
$sel:hubContentType:ImportHubContent' :: HubContentType
hubContentType = HubContentType
pHubContentType_,
$sel:documentSchemaVersion:ImportHubContent' :: Text
documentSchemaVersion = Text
pDocumentSchemaVersion_,
$sel:hubName:ImportHubContent' :: Text
hubName = Text
pHubName_,
$sel:hubContentDocument:ImportHubContent' :: Text
hubContentDocument = Text
pHubContentDocument_
}
importHubContent_hubContentDescription :: Lens.Lens' ImportHubContent (Prelude.Maybe Prelude.Text)
importHubContent_hubContentDescription :: Lens' ImportHubContent (Maybe Text)
importHubContent_hubContentDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe Text
hubContentDescription :: Maybe Text
$sel:hubContentDescription:ImportHubContent' :: ImportHubContent -> Maybe Text
hubContentDescription} -> Maybe Text
hubContentDescription) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe Text
a -> ImportHubContent
s {$sel:hubContentDescription:ImportHubContent' :: Maybe Text
hubContentDescription = Maybe Text
a} :: ImportHubContent)
importHubContent_hubContentDisplayName :: Lens.Lens' ImportHubContent (Prelude.Maybe Prelude.Text)
importHubContent_hubContentDisplayName :: Lens' ImportHubContent (Maybe Text)
importHubContent_hubContentDisplayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe Text
hubContentDisplayName :: Maybe Text
$sel:hubContentDisplayName:ImportHubContent' :: ImportHubContent -> Maybe Text
hubContentDisplayName} -> Maybe Text
hubContentDisplayName) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe Text
a -> ImportHubContent
s {$sel:hubContentDisplayName:ImportHubContent' :: Maybe Text
hubContentDisplayName = Maybe Text
a} :: ImportHubContent)
importHubContent_hubContentMarkdown :: Lens.Lens' ImportHubContent (Prelude.Maybe Prelude.Text)
importHubContent_hubContentMarkdown :: Lens' ImportHubContent (Maybe Text)
importHubContent_hubContentMarkdown = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe Text
hubContentMarkdown :: Maybe Text
$sel:hubContentMarkdown:ImportHubContent' :: ImportHubContent -> Maybe Text
hubContentMarkdown} -> Maybe Text
hubContentMarkdown) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe Text
a -> ImportHubContent
s {$sel:hubContentMarkdown:ImportHubContent' :: Maybe Text
hubContentMarkdown = Maybe Text
a} :: ImportHubContent)
importHubContent_hubContentSearchKeywords :: Lens.Lens' ImportHubContent (Prelude.Maybe [Prelude.Text])
importHubContent_hubContentSearchKeywords :: Lens' ImportHubContent (Maybe [Text])
importHubContent_hubContentSearchKeywords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe [Text]
hubContentSearchKeywords :: Maybe [Text]
$sel:hubContentSearchKeywords:ImportHubContent' :: ImportHubContent -> Maybe [Text]
hubContentSearchKeywords} -> Maybe [Text]
hubContentSearchKeywords) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe [Text]
a -> ImportHubContent
s {$sel:hubContentSearchKeywords:ImportHubContent' :: Maybe [Text]
hubContentSearchKeywords = Maybe [Text]
a} :: ImportHubContent) 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
importHubContent_hubContentVersion :: Lens.Lens' ImportHubContent (Prelude.Maybe Prelude.Text)
importHubContent_hubContentVersion :: Lens' ImportHubContent (Maybe Text)
importHubContent_hubContentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe Text
hubContentVersion :: Maybe Text
$sel:hubContentVersion:ImportHubContent' :: ImportHubContent -> Maybe Text
hubContentVersion} -> Maybe Text
hubContentVersion) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe Text
a -> ImportHubContent
s {$sel:hubContentVersion:ImportHubContent' :: Maybe Text
hubContentVersion = Maybe Text
a} :: ImportHubContent)
importHubContent_tags :: Lens.Lens' ImportHubContent (Prelude.Maybe [Tag])
importHubContent_tags :: Lens' ImportHubContent (Maybe [Tag])
importHubContent_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ImportHubContent' :: ImportHubContent -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ImportHubContent
s@ImportHubContent' {} Maybe [Tag]
a -> ImportHubContent
s {$sel:tags:ImportHubContent' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ImportHubContent) 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
importHubContent_hubContentName :: Lens.Lens' ImportHubContent Prelude.Text
importHubContent_hubContentName :: Lens' ImportHubContent Text
importHubContent_hubContentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Text
hubContentName :: Text
$sel:hubContentName:ImportHubContent' :: ImportHubContent -> Text
hubContentName} -> Text
hubContentName) (\s :: ImportHubContent
s@ImportHubContent' {} Text
a -> ImportHubContent
s {$sel:hubContentName:ImportHubContent' :: Text
hubContentName = Text
a} :: ImportHubContent)
importHubContent_hubContentType :: Lens.Lens' ImportHubContent HubContentType
importHubContent_hubContentType :: Lens' ImportHubContent HubContentType
importHubContent_hubContentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {HubContentType
hubContentType :: HubContentType
$sel:hubContentType:ImportHubContent' :: ImportHubContent -> HubContentType
hubContentType} -> HubContentType
hubContentType) (\s :: ImportHubContent
s@ImportHubContent' {} HubContentType
a -> ImportHubContent
s {$sel:hubContentType:ImportHubContent' :: HubContentType
hubContentType = HubContentType
a} :: ImportHubContent)
importHubContent_documentSchemaVersion :: Lens.Lens' ImportHubContent Prelude.Text
importHubContent_documentSchemaVersion :: Lens' ImportHubContent Text
importHubContent_documentSchemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Text
documentSchemaVersion :: Text
$sel:documentSchemaVersion:ImportHubContent' :: ImportHubContent -> Text
documentSchemaVersion} -> Text
documentSchemaVersion) (\s :: ImportHubContent
s@ImportHubContent' {} Text
a -> ImportHubContent
s {$sel:documentSchemaVersion:ImportHubContent' :: Text
documentSchemaVersion = Text
a} :: ImportHubContent)
importHubContent_hubName :: Lens.Lens' ImportHubContent Prelude.Text
importHubContent_hubName :: Lens' ImportHubContent Text
importHubContent_hubName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Text
hubName :: Text
$sel:hubName:ImportHubContent' :: ImportHubContent -> Text
hubName} -> Text
hubName) (\s :: ImportHubContent
s@ImportHubContent' {} Text
a -> ImportHubContent
s {$sel:hubName:ImportHubContent' :: Text
hubName = Text
a} :: ImportHubContent)
importHubContent_hubContentDocument :: Lens.Lens' ImportHubContent Prelude.Text
importHubContent_hubContentDocument :: Lens' ImportHubContent Text
importHubContent_hubContentDocument = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContent' {Text
hubContentDocument :: Text
$sel:hubContentDocument:ImportHubContent' :: ImportHubContent -> Text
hubContentDocument} -> Text
hubContentDocument) (\s :: ImportHubContent
s@ImportHubContent' {} Text
a -> ImportHubContent
s {$sel:hubContentDocument:ImportHubContent' :: Text
hubContentDocument = Text
a} :: ImportHubContent)
instance Core.AWSRequest ImportHubContent where
type
AWSResponse ImportHubContent =
ImportHubContentResponse
request :: (Service -> Service)
-> ImportHubContent -> Request ImportHubContent
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 ImportHubContent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportHubContent)))
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 ->
Int -> Text -> Text -> ImportHubContentResponse
ImportHubContentResponse'
forall (f :: * -> *) a b. Functor 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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HubArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HubContentArn")
)
instance Prelude.Hashable ImportHubContent where
hashWithSalt :: Int -> ImportHubContent -> Int
hashWithSalt Int
_salt ImportHubContent' {Maybe [Text]
Maybe [Tag]
Maybe Text
Text
HubContentType
hubContentDocument :: Text
hubName :: Text
documentSchemaVersion :: Text
hubContentType :: HubContentType
hubContentName :: Text
tags :: Maybe [Tag]
hubContentVersion :: Maybe Text
hubContentSearchKeywords :: Maybe [Text]
hubContentMarkdown :: Maybe Text
hubContentDisplayName :: Maybe Text
hubContentDescription :: Maybe Text
$sel:hubContentDocument:ImportHubContent' :: ImportHubContent -> Text
$sel:hubName:ImportHubContent' :: ImportHubContent -> Text
$sel:documentSchemaVersion:ImportHubContent' :: ImportHubContent -> Text
$sel:hubContentType:ImportHubContent' :: ImportHubContent -> HubContentType
$sel:hubContentName:ImportHubContent' :: ImportHubContent -> Text
$sel:tags:ImportHubContent' :: ImportHubContent -> Maybe [Tag]
$sel:hubContentVersion:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentSearchKeywords:ImportHubContent' :: ImportHubContent -> Maybe [Text]
$sel:hubContentMarkdown:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDisplayName:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDescription:ImportHubContent' :: ImportHubContent -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hubContentDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hubContentDisplayName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hubContentMarkdown
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
hubContentSearchKeywords
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hubContentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hubContentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HubContentType
hubContentType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
documentSchemaVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hubName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hubContentDocument
instance Prelude.NFData ImportHubContent where
rnf :: ImportHubContent -> ()
rnf ImportHubContent' {Maybe [Text]
Maybe [Tag]
Maybe Text
Text
HubContentType
hubContentDocument :: Text
hubName :: Text
documentSchemaVersion :: Text
hubContentType :: HubContentType
hubContentName :: Text
tags :: Maybe [Tag]
hubContentVersion :: Maybe Text
hubContentSearchKeywords :: Maybe [Text]
hubContentMarkdown :: Maybe Text
hubContentDisplayName :: Maybe Text
hubContentDescription :: Maybe Text
$sel:hubContentDocument:ImportHubContent' :: ImportHubContent -> Text
$sel:hubName:ImportHubContent' :: ImportHubContent -> Text
$sel:documentSchemaVersion:ImportHubContent' :: ImportHubContent -> Text
$sel:hubContentType:ImportHubContent' :: ImportHubContent -> HubContentType
$sel:hubContentName:ImportHubContent' :: ImportHubContent -> Text
$sel:tags:ImportHubContent' :: ImportHubContent -> Maybe [Tag]
$sel:hubContentVersion:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentSearchKeywords:ImportHubContent' :: ImportHubContent -> Maybe [Text]
$sel:hubContentMarkdown:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDisplayName:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDescription:ImportHubContent' :: ImportHubContent -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hubContentDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hubContentDisplayName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hubContentMarkdown
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
hubContentSearchKeywords
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hubContentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hubContentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HubContentType
hubContentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
documentSchemaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hubName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hubContentDocument
instance Data.ToHeaders ImportHubContent where
toHeaders :: ImportHubContent -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"SageMaker.ImportHubContent" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ImportHubContent where
toJSON :: ImportHubContent -> Value
toJSON ImportHubContent' {Maybe [Text]
Maybe [Tag]
Maybe Text
Text
HubContentType
hubContentDocument :: Text
hubName :: Text
documentSchemaVersion :: Text
hubContentType :: HubContentType
hubContentName :: Text
tags :: Maybe [Tag]
hubContentVersion :: Maybe Text
hubContentSearchKeywords :: Maybe [Text]
hubContentMarkdown :: Maybe Text
hubContentDisplayName :: Maybe Text
hubContentDescription :: Maybe Text
$sel:hubContentDocument:ImportHubContent' :: ImportHubContent -> Text
$sel:hubName:ImportHubContent' :: ImportHubContent -> Text
$sel:documentSchemaVersion:ImportHubContent' :: ImportHubContent -> Text
$sel:hubContentType:ImportHubContent' :: ImportHubContent -> HubContentType
$sel:hubContentName:ImportHubContent' :: ImportHubContent -> Text
$sel:tags:ImportHubContent' :: ImportHubContent -> Maybe [Tag]
$sel:hubContentVersion:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentSearchKeywords:ImportHubContent' :: ImportHubContent -> Maybe [Text]
$sel:hubContentMarkdown:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDisplayName:ImportHubContent' :: ImportHubContent -> Maybe Text
$sel:hubContentDescription:ImportHubContent' :: ImportHubContent -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"HubContentDescription" 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
hubContentDescription,
(Key
"HubContentDisplayName" 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
hubContentDisplayName,
(Key
"HubContentMarkdown" 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
hubContentMarkdown,
(Key
"HubContentSearchKeywords" 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]
hubContentSearchKeywords,
(Key
"HubContentVersion" 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
hubContentVersion,
(Key
"Tags" 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 [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just
(Key
"HubContentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hubContentName),
forall a. a -> Maybe a
Prelude.Just
(Key
"HubContentType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= HubContentType
hubContentType),
forall a. a -> Maybe a
Prelude.Just
( Key
"DocumentSchemaVersion"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
documentSchemaVersion
),
forall a. a -> Maybe a
Prelude.Just (Key
"HubName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hubName),
forall a. a -> Maybe a
Prelude.Just
(Key
"HubContentDocument" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hubContentDocument)
]
)
instance Data.ToPath ImportHubContent where
toPath :: ImportHubContent -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ImportHubContent where
toQuery :: ImportHubContent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ImportHubContentResponse = ImportHubContentResponse'
{
ImportHubContentResponse -> Int
httpStatus :: Prelude.Int,
ImportHubContentResponse -> Text
hubArn :: Prelude.Text,
ImportHubContentResponse -> Text
hubContentArn :: Prelude.Text
}
deriving (ImportHubContentResponse -> ImportHubContentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportHubContentResponse -> ImportHubContentResponse -> Bool
$c/= :: ImportHubContentResponse -> ImportHubContentResponse -> Bool
== :: ImportHubContentResponse -> ImportHubContentResponse -> Bool
$c== :: ImportHubContentResponse -> ImportHubContentResponse -> Bool
Prelude.Eq, ReadPrec [ImportHubContentResponse]
ReadPrec ImportHubContentResponse
Int -> ReadS ImportHubContentResponse
ReadS [ImportHubContentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportHubContentResponse]
$creadListPrec :: ReadPrec [ImportHubContentResponse]
readPrec :: ReadPrec ImportHubContentResponse
$creadPrec :: ReadPrec ImportHubContentResponse
readList :: ReadS [ImportHubContentResponse]
$creadList :: ReadS [ImportHubContentResponse]
readsPrec :: Int -> ReadS ImportHubContentResponse
$creadsPrec :: Int -> ReadS ImportHubContentResponse
Prelude.Read, Int -> ImportHubContentResponse -> ShowS
[ImportHubContentResponse] -> ShowS
ImportHubContentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportHubContentResponse] -> ShowS
$cshowList :: [ImportHubContentResponse] -> ShowS
show :: ImportHubContentResponse -> String
$cshow :: ImportHubContentResponse -> String
showsPrec :: Int -> ImportHubContentResponse -> ShowS
$cshowsPrec :: Int -> ImportHubContentResponse -> ShowS
Prelude.Show, forall x.
Rep ImportHubContentResponse x -> ImportHubContentResponse
forall x.
ImportHubContentResponse -> Rep ImportHubContentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportHubContentResponse x -> ImportHubContentResponse
$cfrom :: forall x.
ImportHubContentResponse -> Rep ImportHubContentResponse x
Prelude.Generic)
newImportHubContentResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
ImportHubContentResponse
newImportHubContentResponse :: Int -> Text -> Text -> ImportHubContentResponse
newImportHubContentResponse
Int
pHttpStatus_
Text
pHubArn_
Text
pHubContentArn_ =
ImportHubContentResponse'
{ $sel:httpStatus:ImportHubContentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:hubArn:ImportHubContentResponse' :: Text
hubArn = Text
pHubArn_,
$sel:hubContentArn:ImportHubContentResponse' :: Text
hubContentArn = Text
pHubContentArn_
}
importHubContentResponse_httpStatus :: Lens.Lens' ImportHubContentResponse Prelude.Int
importHubContentResponse_httpStatus :: Lens' ImportHubContentResponse Int
importHubContentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContentResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportHubContentResponse' :: ImportHubContentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ImportHubContentResponse
s@ImportHubContentResponse' {} Int
a -> ImportHubContentResponse
s {$sel:httpStatus:ImportHubContentResponse' :: Int
httpStatus = Int
a} :: ImportHubContentResponse)
importHubContentResponse_hubArn :: Lens.Lens' ImportHubContentResponse Prelude.Text
importHubContentResponse_hubArn :: Lens' ImportHubContentResponse Text
importHubContentResponse_hubArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContentResponse' {Text
hubArn :: Text
$sel:hubArn:ImportHubContentResponse' :: ImportHubContentResponse -> Text
hubArn} -> Text
hubArn) (\s :: ImportHubContentResponse
s@ImportHubContentResponse' {} Text
a -> ImportHubContentResponse
s {$sel:hubArn:ImportHubContentResponse' :: Text
hubArn = Text
a} :: ImportHubContentResponse)
importHubContentResponse_hubContentArn :: Lens.Lens' ImportHubContentResponse Prelude.Text
importHubContentResponse_hubContentArn :: Lens' ImportHubContentResponse Text
importHubContentResponse_hubContentArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportHubContentResponse' {Text
hubContentArn :: Text
$sel:hubContentArn:ImportHubContentResponse' :: ImportHubContentResponse -> Text
hubContentArn} -> Text
hubContentArn) (\s :: ImportHubContentResponse
s@ImportHubContentResponse' {} Text
a -> ImportHubContentResponse
s {$sel:hubContentArn:ImportHubContentResponse' :: Text
hubContentArn = Text
a} :: ImportHubContentResponse)
instance Prelude.NFData ImportHubContentResponse where
rnf :: ImportHubContentResponse -> ()
rnf ImportHubContentResponse' {Int
Text
hubContentArn :: Text
hubArn :: Text
httpStatus :: Int
$sel:hubContentArn:ImportHubContentResponse' :: ImportHubContentResponse -> Text
$sel:hubArn:ImportHubContentResponse' :: ImportHubContentResponse -> Text
$sel:httpStatus:ImportHubContentResponse' :: ImportHubContentResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hubArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hubContentArn