{-# 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.SageMakerGeoSpatial.StopVectorEnrichmentJob
(
StopVectorEnrichmentJob (..),
newStopVectorEnrichmentJob,
stopVectorEnrichmentJob_arn,
StopVectorEnrichmentJobResponse (..),
newStopVectorEnrichmentJobResponse,
stopVectorEnrichmentJobResponse_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.SageMakerGeoSpatial.Types
data StopVectorEnrichmentJob = StopVectorEnrichmentJob'
{
StopVectorEnrichmentJob -> Text
arn :: Prelude.Text
}
deriving (StopVectorEnrichmentJob -> StopVectorEnrichmentJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopVectorEnrichmentJob -> StopVectorEnrichmentJob -> Bool
$c/= :: StopVectorEnrichmentJob -> StopVectorEnrichmentJob -> Bool
== :: StopVectorEnrichmentJob -> StopVectorEnrichmentJob -> Bool
$c== :: StopVectorEnrichmentJob -> StopVectorEnrichmentJob -> Bool
Prelude.Eq, ReadPrec [StopVectorEnrichmentJob]
ReadPrec StopVectorEnrichmentJob
Int -> ReadS StopVectorEnrichmentJob
ReadS [StopVectorEnrichmentJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopVectorEnrichmentJob]
$creadListPrec :: ReadPrec [StopVectorEnrichmentJob]
readPrec :: ReadPrec StopVectorEnrichmentJob
$creadPrec :: ReadPrec StopVectorEnrichmentJob
readList :: ReadS [StopVectorEnrichmentJob]
$creadList :: ReadS [StopVectorEnrichmentJob]
readsPrec :: Int -> ReadS StopVectorEnrichmentJob
$creadsPrec :: Int -> ReadS StopVectorEnrichmentJob
Prelude.Read, Int -> StopVectorEnrichmentJob -> ShowS
[StopVectorEnrichmentJob] -> ShowS
StopVectorEnrichmentJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopVectorEnrichmentJob] -> ShowS
$cshowList :: [StopVectorEnrichmentJob] -> ShowS
show :: StopVectorEnrichmentJob -> String
$cshow :: StopVectorEnrichmentJob -> String
showsPrec :: Int -> StopVectorEnrichmentJob -> ShowS
$cshowsPrec :: Int -> StopVectorEnrichmentJob -> ShowS
Prelude.Show, forall x. Rep StopVectorEnrichmentJob x -> StopVectorEnrichmentJob
forall x. StopVectorEnrichmentJob -> Rep StopVectorEnrichmentJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopVectorEnrichmentJob x -> StopVectorEnrichmentJob
$cfrom :: forall x. StopVectorEnrichmentJob -> Rep StopVectorEnrichmentJob x
Prelude.Generic)
newStopVectorEnrichmentJob ::
Prelude.Text ->
StopVectorEnrichmentJob
newStopVectorEnrichmentJob :: Text -> StopVectorEnrichmentJob
newStopVectorEnrichmentJob Text
pArn_ =
StopVectorEnrichmentJob' {$sel:arn:StopVectorEnrichmentJob' :: Text
arn = Text
pArn_}
stopVectorEnrichmentJob_arn :: Lens.Lens' StopVectorEnrichmentJob Prelude.Text
stopVectorEnrichmentJob_arn :: Lens' StopVectorEnrichmentJob Text
stopVectorEnrichmentJob_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopVectorEnrichmentJob' {Text
arn :: Text
$sel:arn:StopVectorEnrichmentJob' :: StopVectorEnrichmentJob -> Text
arn} -> Text
arn) (\s :: StopVectorEnrichmentJob
s@StopVectorEnrichmentJob' {} Text
a -> StopVectorEnrichmentJob
s {$sel:arn:StopVectorEnrichmentJob' :: Text
arn = Text
a} :: StopVectorEnrichmentJob)
instance Core.AWSRequest StopVectorEnrichmentJob where
type
AWSResponse StopVectorEnrichmentJob =
StopVectorEnrichmentJobResponse
request :: (Service -> Service)
-> StopVectorEnrichmentJob -> Request StopVectorEnrichmentJob
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 StopVectorEnrichmentJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopVectorEnrichmentJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> StopVectorEnrichmentJobResponse
StopVectorEnrichmentJobResponse'
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))
)
instance Prelude.Hashable StopVectorEnrichmentJob where
hashWithSalt :: Int -> StopVectorEnrichmentJob -> Int
hashWithSalt Int
_salt StopVectorEnrichmentJob' {Text
arn :: Text
$sel:arn:StopVectorEnrichmentJob' :: StopVectorEnrichmentJob -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData StopVectorEnrichmentJob where
rnf :: StopVectorEnrichmentJob -> ()
rnf StopVectorEnrichmentJob' {Text
arn :: Text
$sel:arn:StopVectorEnrichmentJob' :: StopVectorEnrichmentJob -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders StopVectorEnrichmentJob where
toHeaders :: StopVectorEnrichmentJob -> 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 StopVectorEnrichmentJob where
toJSON :: StopVectorEnrichmentJob -> Value
toJSON StopVectorEnrichmentJob' {Text
arn :: Text
$sel:arn:StopVectorEnrichmentJob' :: StopVectorEnrichmentJob -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)]
)
instance Data.ToPath StopVectorEnrichmentJob where
toPath :: StopVectorEnrichmentJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/vector-enrichment-jobs/stop"
instance Data.ToQuery StopVectorEnrichmentJob where
toQuery :: StopVectorEnrichmentJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StopVectorEnrichmentJobResponse = StopVectorEnrichmentJobResponse'
{
StopVectorEnrichmentJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StopVectorEnrichmentJobResponse
-> StopVectorEnrichmentJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopVectorEnrichmentJobResponse
-> StopVectorEnrichmentJobResponse -> Bool
$c/= :: StopVectorEnrichmentJobResponse
-> StopVectorEnrichmentJobResponse -> Bool
== :: StopVectorEnrichmentJobResponse
-> StopVectorEnrichmentJobResponse -> Bool
$c== :: StopVectorEnrichmentJobResponse
-> StopVectorEnrichmentJobResponse -> Bool
Prelude.Eq, ReadPrec [StopVectorEnrichmentJobResponse]
ReadPrec StopVectorEnrichmentJobResponse
Int -> ReadS StopVectorEnrichmentJobResponse
ReadS [StopVectorEnrichmentJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopVectorEnrichmentJobResponse]
$creadListPrec :: ReadPrec [StopVectorEnrichmentJobResponse]
readPrec :: ReadPrec StopVectorEnrichmentJobResponse
$creadPrec :: ReadPrec StopVectorEnrichmentJobResponse
readList :: ReadS [StopVectorEnrichmentJobResponse]
$creadList :: ReadS [StopVectorEnrichmentJobResponse]
readsPrec :: Int -> ReadS StopVectorEnrichmentJobResponse
$creadsPrec :: Int -> ReadS StopVectorEnrichmentJobResponse
Prelude.Read, Int -> StopVectorEnrichmentJobResponse -> ShowS
[StopVectorEnrichmentJobResponse] -> ShowS
StopVectorEnrichmentJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopVectorEnrichmentJobResponse] -> ShowS
$cshowList :: [StopVectorEnrichmentJobResponse] -> ShowS
show :: StopVectorEnrichmentJobResponse -> String
$cshow :: StopVectorEnrichmentJobResponse -> String
showsPrec :: Int -> StopVectorEnrichmentJobResponse -> ShowS
$cshowsPrec :: Int -> StopVectorEnrichmentJobResponse -> ShowS
Prelude.Show, forall x.
Rep StopVectorEnrichmentJobResponse x
-> StopVectorEnrichmentJobResponse
forall x.
StopVectorEnrichmentJobResponse
-> Rep StopVectorEnrichmentJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopVectorEnrichmentJobResponse x
-> StopVectorEnrichmentJobResponse
$cfrom :: forall x.
StopVectorEnrichmentJobResponse
-> Rep StopVectorEnrichmentJobResponse x
Prelude.Generic)
newStopVectorEnrichmentJobResponse ::
Prelude.Int ->
StopVectorEnrichmentJobResponse
newStopVectorEnrichmentJobResponse :: Int -> StopVectorEnrichmentJobResponse
newStopVectorEnrichmentJobResponse Int
pHttpStatus_ =
StopVectorEnrichmentJobResponse'
{ $sel:httpStatus:StopVectorEnrichmentJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
stopVectorEnrichmentJobResponse_httpStatus :: Lens.Lens' StopVectorEnrichmentJobResponse Prelude.Int
stopVectorEnrichmentJobResponse_httpStatus :: Lens' StopVectorEnrichmentJobResponse Int
stopVectorEnrichmentJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopVectorEnrichmentJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopVectorEnrichmentJobResponse' :: StopVectorEnrichmentJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StopVectorEnrichmentJobResponse
s@StopVectorEnrichmentJobResponse' {} Int
a -> StopVectorEnrichmentJobResponse
s {$sel:httpStatus:StopVectorEnrichmentJobResponse' :: Int
httpStatus = Int
a} :: StopVectorEnrichmentJobResponse)
instance
Prelude.NFData
StopVectorEnrichmentJobResponse
where
rnf :: StopVectorEnrichmentJobResponse -> ()
rnf StopVectorEnrichmentJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopVectorEnrichmentJobResponse' :: StopVectorEnrichmentJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus