{-# 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.StopMonitoringSchedule
(
StopMonitoringSchedule (..),
newStopMonitoringSchedule,
stopMonitoringSchedule_monitoringScheduleName,
StopMonitoringScheduleResponse (..),
newStopMonitoringScheduleResponse,
)
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 StopMonitoringSchedule = StopMonitoringSchedule'
{
StopMonitoringSchedule -> Text
monitoringScheduleName :: Prelude.Text
}
deriving (StopMonitoringSchedule -> StopMonitoringSchedule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopMonitoringSchedule -> StopMonitoringSchedule -> Bool
$c/= :: StopMonitoringSchedule -> StopMonitoringSchedule -> Bool
== :: StopMonitoringSchedule -> StopMonitoringSchedule -> Bool
$c== :: StopMonitoringSchedule -> StopMonitoringSchedule -> Bool
Prelude.Eq, ReadPrec [StopMonitoringSchedule]
ReadPrec StopMonitoringSchedule
Int -> ReadS StopMonitoringSchedule
ReadS [StopMonitoringSchedule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopMonitoringSchedule]
$creadListPrec :: ReadPrec [StopMonitoringSchedule]
readPrec :: ReadPrec StopMonitoringSchedule
$creadPrec :: ReadPrec StopMonitoringSchedule
readList :: ReadS [StopMonitoringSchedule]
$creadList :: ReadS [StopMonitoringSchedule]
readsPrec :: Int -> ReadS StopMonitoringSchedule
$creadsPrec :: Int -> ReadS StopMonitoringSchedule
Prelude.Read, Int -> StopMonitoringSchedule -> ShowS
[StopMonitoringSchedule] -> ShowS
StopMonitoringSchedule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopMonitoringSchedule] -> ShowS
$cshowList :: [StopMonitoringSchedule] -> ShowS
show :: StopMonitoringSchedule -> String
$cshow :: StopMonitoringSchedule -> String
showsPrec :: Int -> StopMonitoringSchedule -> ShowS
$cshowsPrec :: Int -> StopMonitoringSchedule -> ShowS
Prelude.Show, forall x. Rep StopMonitoringSchedule x -> StopMonitoringSchedule
forall x. StopMonitoringSchedule -> Rep StopMonitoringSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopMonitoringSchedule x -> StopMonitoringSchedule
$cfrom :: forall x. StopMonitoringSchedule -> Rep StopMonitoringSchedule x
Prelude.Generic)
newStopMonitoringSchedule ::
Prelude.Text ->
StopMonitoringSchedule
newStopMonitoringSchedule :: Text -> StopMonitoringSchedule
newStopMonitoringSchedule Text
pMonitoringScheduleName_ =
StopMonitoringSchedule'
{ $sel:monitoringScheduleName:StopMonitoringSchedule' :: Text
monitoringScheduleName =
Text
pMonitoringScheduleName_
}
stopMonitoringSchedule_monitoringScheduleName :: Lens.Lens' StopMonitoringSchedule Prelude.Text
stopMonitoringSchedule_monitoringScheduleName :: Lens' StopMonitoringSchedule Text
stopMonitoringSchedule_monitoringScheduleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMonitoringSchedule' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:StopMonitoringSchedule' :: StopMonitoringSchedule -> Text
monitoringScheduleName} -> Text
monitoringScheduleName) (\s :: StopMonitoringSchedule
s@StopMonitoringSchedule' {} Text
a -> StopMonitoringSchedule
s {$sel:monitoringScheduleName:StopMonitoringSchedule' :: Text
monitoringScheduleName = Text
a} :: StopMonitoringSchedule)
instance Core.AWSRequest StopMonitoringSchedule where
type
AWSResponse StopMonitoringSchedule =
StopMonitoringScheduleResponse
request :: (Service -> Service)
-> StopMonitoringSchedule -> Request StopMonitoringSchedule
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 StopMonitoringSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopMonitoringSchedule)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
StopMonitoringScheduleResponse
StopMonitoringScheduleResponse'
instance Prelude.Hashable StopMonitoringSchedule where
hashWithSalt :: Int -> StopMonitoringSchedule -> Int
hashWithSalt Int
_salt StopMonitoringSchedule' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:StopMonitoringSchedule' :: StopMonitoringSchedule -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
monitoringScheduleName
instance Prelude.NFData StopMonitoringSchedule where
rnf :: StopMonitoringSchedule -> ()
rnf StopMonitoringSchedule' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:StopMonitoringSchedule' :: StopMonitoringSchedule -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
monitoringScheduleName
instance Data.ToHeaders StopMonitoringSchedule where
toHeaders :: StopMonitoringSchedule -> [Header]
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 -> [Header]
Data.=# ( ByteString
"SageMaker.StopMonitoringSchedule" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON StopMonitoringSchedule where
toJSON :: StopMonitoringSchedule -> Value
toJSON StopMonitoringSchedule' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:StopMonitoringSchedule' :: StopMonitoringSchedule -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"MonitoringScheduleName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
monitoringScheduleName
)
]
)
instance Data.ToPath StopMonitoringSchedule where
toPath :: StopMonitoringSchedule -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StopMonitoringSchedule where
toQuery :: StopMonitoringSchedule -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StopMonitoringScheduleResponse = StopMonitoringScheduleResponse'
{
}
deriving (StopMonitoringScheduleResponse
-> StopMonitoringScheduleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopMonitoringScheduleResponse
-> StopMonitoringScheduleResponse -> Bool
$c/= :: StopMonitoringScheduleResponse
-> StopMonitoringScheduleResponse -> Bool
== :: StopMonitoringScheduleResponse
-> StopMonitoringScheduleResponse -> Bool
$c== :: StopMonitoringScheduleResponse
-> StopMonitoringScheduleResponse -> Bool
Prelude.Eq, ReadPrec [StopMonitoringScheduleResponse]
ReadPrec StopMonitoringScheduleResponse
Int -> ReadS StopMonitoringScheduleResponse
ReadS [StopMonitoringScheduleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopMonitoringScheduleResponse]
$creadListPrec :: ReadPrec [StopMonitoringScheduleResponse]
readPrec :: ReadPrec StopMonitoringScheduleResponse
$creadPrec :: ReadPrec StopMonitoringScheduleResponse
readList :: ReadS [StopMonitoringScheduleResponse]
$creadList :: ReadS [StopMonitoringScheduleResponse]
readsPrec :: Int -> ReadS StopMonitoringScheduleResponse
$creadsPrec :: Int -> ReadS StopMonitoringScheduleResponse
Prelude.Read, Int -> StopMonitoringScheduleResponse -> ShowS
[StopMonitoringScheduleResponse] -> ShowS
StopMonitoringScheduleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopMonitoringScheduleResponse] -> ShowS
$cshowList :: [StopMonitoringScheduleResponse] -> ShowS
show :: StopMonitoringScheduleResponse -> String
$cshow :: StopMonitoringScheduleResponse -> String
showsPrec :: Int -> StopMonitoringScheduleResponse -> ShowS
$cshowsPrec :: Int -> StopMonitoringScheduleResponse -> ShowS
Prelude.Show, forall x.
Rep StopMonitoringScheduleResponse x
-> StopMonitoringScheduleResponse
forall x.
StopMonitoringScheduleResponse
-> Rep StopMonitoringScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopMonitoringScheduleResponse x
-> StopMonitoringScheduleResponse
$cfrom :: forall x.
StopMonitoringScheduleResponse
-> Rep StopMonitoringScheduleResponse x
Prelude.Generic)
newStopMonitoringScheduleResponse ::
StopMonitoringScheduleResponse
newStopMonitoringScheduleResponse :: StopMonitoringScheduleResponse
newStopMonitoringScheduleResponse =
StopMonitoringScheduleResponse
StopMonitoringScheduleResponse'
instance
Prelude.NFData
StopMonitoringScheduleResponse
where
rnf :: StopMonitoringScheduleResponse -> ()
rnf StopMonitoringScheduleResponse
_ = ()