{-# 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.DisassociateTrialComponent
(
DisassociateTrialComponent (..),
newDisassociateTrialComponent,
disassociateTrialComponent_trialComponentName,
disassociateTrialComponent_trialName,
DisassociateTrialComponentResponse (..),
newDisassociateTrialComponentResponse,
disassociateTrialComponentResponse_trialArn,
disassociateTrialComponentResponse_trialComponentArn,
disassociateTrialComponentResponse_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.SageMaker.Types
data DisassociateTrialComponent = DisassociateTrialComponent'
{
DisassociateTrialComponent -> Text
trialComponentName :: Prelude.Text,
DisassociateTrialComponent -> Text
trialName :: Prelude.Text
}
deriving (DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
(DisassociateTrialComponent -> DisassociateTrialComponent -> Bool)
-> (DisassociateTrialComponent
-> DisassociateTrialComponent -> Bool)
-> Eq DisassociateTrialComponent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
$c/= :: DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
== :: DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
$c== :: DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
Prelude.Eq, ReadPrec [DisassociateTrialComponent]
ReadPrec DisassociateTrialComponent
Int -> ReadS DisassociateTrialComponent
ReadS [DisassociateTrialComponent]
(Int -> ReadS DisassociateTrialComponent)
-> ReadS [DisassociateTrialComponent]
-> ReadPrec DisassociateTrialComponent
-> ReadPrec [DisassociateTrialComponent]
-> Read DisassociateTrialComponent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTrialComponent]
$creadListPrec :: ReadPrec [DisassociateTrialComponent]
readPrec :: ReadPrec DisassociateTrialComponent
$creadPrec :: ReadPrec DisassociateTrialComponent
readList :: ReadS [DisassociateTrialComponent]
$creadList :: ReadS [DisassociateTrialComponent]
readsPrec :: Int -> ReadS DisassociateTrialComponent
$creadsPrec :: Int -> ReadS DisassociateTrialComponent
Prelude.Read, Int -> DisassociateTrialComponent -> ShowS
[DisassociateTrialComponent] -> ShowS
DisassociateTrialComponent -> String
(Int -> DisassociateTrialComponent -> ShowS)
-> (DisassociateTrialComponent -> String)
-> ([DisassociateTrialComponent] -> ShowS)
-> Show DisassociateTrialComponent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTrialComponent] -> ShowS
$cshowList :: [DisassociateTrialComponent] -> ShowS
show :: DisassociateTrialComponent -> String
$cshow :: DisassociateTrialComponent -> String
showsPrec :: Int -> DisassociateTrialComponent -> ShowS
$cshowsPrec :: Int -> DisassociateTrialComponent -> ShowS
Prelude.Show, (forall x.
DisassociateTrialComponent -> Rep DisassociateTrialComponent x)
-> (forall x.
Rep DisassociateTrialComponent x -> DisassociateTrialComponent)
-> Generic DisassociateTrialComponent
forall x.
Rep DisassociateTrialComponent x -> DisassociateTrialComponent
forall x.
DisassociateTrialComponent -> Rep DisassociateTrialComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTrialComponent x -> DisassociateTrialComponent
$cfrom :: forall x.
DisassociateTrialComponent -> Rep DisassociateTrialComponent x
Prelude.Generic)
newDisassociateTrialComponent ::
Prelude.Text ->
Prelude.Text ->
DisassociateTrialComponent
newDisassociateTrialComponent :: Text -> Text -> DisassociateTrialComponent
newDisassociateTrialComponent
Text
pTrialComponentName_
Text
pTrialName_ =
DisassociateTrialComponent' :: Text -> Text -> DisassociateTrialComponent
DisassociateTrialComponent'
{ $sel:trialComponentName:DisassociateTrialComponent' :: Text
trialComponentName =
Text
pTrialComponentName_,
$sel:trialName:DisassociateTrialComponent' :: Text
trialName = Text
pTrialName_
}
disassociateTrialComponent_trialComponentName :: Lens.Lens' DisassociateTrialComponent Prelude.Text
disassociateTrialComponent_trialComponentName :: (Text -> f Text)
-> DisassociateTrialComponent -> f DisassociateTrialComponent
disassociateTrialComponent_trialComponentName = (DisassociateTrialComponent -> Text)
-> (DisassociateTrialComponent
-> Text -> DisassociateTrialComponent)
-> Lens
DisassociateTrialComponent DisassociateTrialComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrialComponent' {Text
trialComponentName :: Text
$sel:trialComponentName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
trialComponentName} -> Text
trialComponentName) (\s :: DisassociateTrialComponent
s@DisassociateTrialComponent' {} Text
a -> DisassociateTrialComponent
s {$sel:trialComponentName:DisassociateTrialComponent' :: Text
trialComponentName = Text
a} :: DisassociateTrialComponent)
disassociateTrialComponent_trialName :: Lens.Lens' DisassociateTrialComponent Prelude.Text
disassociateTrialComponent_trialName :: (Text -> f Text)
-> DisassociateTrialComponent -> f DisassociateTrialComponent
disassociateTrialComponent_trialName = (DisassociateTrialComponent -> Text)
-> (DisassociateTrialComponent
-> Text -> DisassociateTrialComponent)
-> Lens
DisassociateTrialComponent DisassociateTrialComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrialComponent' {Text
trialName :: Text
$sel:trialName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
trialName} -> Text
trialName) (\s :: DisassociateTrialComponent
s@DisassociateTrialComponent' {} Text
a -> DisassociateTrialComponent
s {$sel:trialName:DisassociateTrialComponent' :: Text
trialName = Text
a} :: DisassociateTrialComponent)
instance Core.AWSRequest DisassociateTrialComponent where
type
AWSResponse DisassociateTrialComponent =
DisassociateTrialComponentResponse
request :: DisassociateTrialComponent -> Request DisassociateTrialComponent
request = Service
-> DisassociateTrialComponent -> Request DisassociateTrialComponent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateTrialComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTrialComponent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DisassociateTrialComponent))
-> Logger
-> Service
-> Proxy DisassociateTrialComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTrialComponent)))
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 Text
-> Maybe Text -> Int -> DisassociateTrialComponentResponse
DisassociateTrialComponentResponse'
(Maybe Text
-> Maybe Text -> Int -> DisassociateTrialComponentResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> DisassociateTrialComponentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrialArn")
Either
String (Maybe Text -> Int -> DisassociateTrialComponentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DisassociateTrialComponentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrialComponentArn")
Either String (Int -> DisassociateTrialComponentResponse)
-> Either String Int
-> Either String DisassociateTrialComponentResponse
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 DisassociateTrialComponent
instance Prelude.NFData DisassociateTrialComponent
instance Core.ToHeaders DisassociateTrialComponent where
toHeaders :: DisassociateTrialComponent -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateTrialComponent -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.DisassociateTrialComponent" ::
Prelude.ByteString
),
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 DisassociateTrialComponent where
toJSON :: DisassociateTrialComponent -> Value
toJSON DisassociateTrialComponent' {Text
trialName :: Text
trialComponentName :: Text
$sel:trialName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
$sel:trialComponentName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TrialComponentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trialComponentName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TrialName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trialName)
]
)
instance Core.ToPath DisassociateTrialComponent where
toPath :: DisassociateTrialComponent -> ByteString
toPath = ByteString -> DisassociateTrialComponent -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateTrialComponent where
toQuery :: DisassociateTrialComponent -> QueryString
toQuery = QueryString -> DisassociateTrialComponent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateTrialComponentResponse = DisassociateTrialComponentResponse'
{
DisassociateTrialComponentResponse -> Maybe Text
trialArn :: Prelude.Maybe Prelude.Text,
DisassociateTrialComponentResponse -> Maybe Text
trialComponentArn :: Prelude.Maybe Prelude.Text,
DisassociateTrialComponentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool
(DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool)
-> (DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool)
-> Eq DisassociateTrialComponentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool
$c/= :: DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool
== :: DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool
$c== :: DisassociateTrialComponentResponse
-> DisassociateTrialComponentResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateTrialComponentResponse]
ReadPrec DisassociateTrialComponentResponse
Int -> ReadS DisassociateTrialComponentResponse
ReadS [DisassociateTrialComponentResponse]
(Int -> ReadS DisassociateTrialComponentResponse)
-> ReadS [DisassociateTrialComponentResponse]
-> ReadPrec DisassociateTrialComponentResponse
-> ReadPrec [DisassociateTrialComponentResponse]
-> Read DisassociateTrialComponentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTrialComponentResponse]
$creadListPrec :: ReadPrec [DisassociateTrialComponentResponse]
readPrec :: ReadPrec DisassociateTrialComponentResponse
$creadPrec :: ReadPrec DisassociateTrialComponentResponse
readList :: ReadS [DisassociateTrialComponentResponse]
$creadList :: ReadS [DisassociateTrialComponentResponse]
readsPrec :: Int -> ReadS DisassociateTrialComponentResponse
$creadsPrec :: Int -> ReadS DisassociateTrialComponentResponse
Prelude.Read, Int -> DisassociateTrialComponentResponse -> ShowS
[DisassociateTrialComponentResponse] -> ShowS
DisassociateTrialComponentResponse -> String
(Int -> DisassociateTrialComponentResponse -> ShowS)
-> (DisassociateTrialComponentResponse -> String)
-> ([DisassociateTrialComponentResponse] -> ShowS)
-> Show DisassociateTrialComponentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTrialComponentResponse] -> ShowS
$cshowList :: [DisassociateTrialComponentResponse] -> ShowS
show :: DisassociateTrialComponentResponse -> String
$cshow :: DisassociateTrialComponentResponse -> String
showsPrec :: Int -> DisassociateTrialComponentResponse -> ShowS
$cshowsPrec :: Int -> DisassociateTrialComponentResponse -> ShowS
Prelude.Show, (forall x.
DisassociateTrialComponentResponse
-> Rep DisassociateTrialComponentResponse x)
-> (forall x.
Rep DisassociateTrialComponentResponse x
-> DisassociateTrialComponentResponse)
-> Generic DisassociateTrialComponentResponse
forall x.
Rep DisassociateTrialComponentResponse x
-> DisassociateTrialComponentResponse
forall x.
DisassociateTrialComponentResponse
-> Rep DisassociateTrialComponentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTrialComponentResponse x
-> DisassociateTrialComponentResponse
$cfrom :: forall x.
DisassociateTrialComponentResponse
-> Rep DisassociateTrialComponentResponse x
Prelude.Generic)
newDisassociateTrialComponentResponse ::
Prelude.Int ->
DisassociateTrialComponentResponse
newDisassociateTrialComponentResponse :: Int -> DisassociateTrialComponentResponse
newDisassociateTrialComponentResponse Int
pHttpStatus_ =
DisassociateTrialComponentResponse' :: Maybe Text
-> Maybe Text -> Int -> DisassociateTrialComponentResponse
DisassociateTrialComponentResponse'
{ $sel:trialArn:DisassociateTrialComponentResponse' :: Maybe Text
trialArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:trialComponentArn:DisassociateTrialComponentResponse' :: Maybe Text
trialComponentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisassociateTrialComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disassociateTrialComponentResponse_trialArn :: Lens.Lens' DisassociateTrialComponentResponse (Prelude.Maybe Prelude.Text)
disassociateTrialComponentResponse_trialArn :: (Maybe Text -> f (Maybe Text))
-> DisassociateTrialComponentResponse
-> f DisassociateTrialComponentResponse
disassociateTrialComponentResponse_trialArn = (DisassociateTrialComponentResponse -> Maybe Text)
-> (DisassociateTrialComponentResponse
-> Maybe Text -> DisassociateTrialComponentResponse)
-> Lens
DisassociateTrialComponentResponse
DisassociateTrialComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrialComponentResponse' {Maybe Text
trialArn :: Maybe Text
$sel:trialArn:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Maybe Text
trialArn} -> Maybe Text
trialArn) (\s :: DisassociateTrialComponentResponse
s@DisassociateTrialComponentResponse' {} Maybe Text
a -> DisassociateTrialComponentResponse
s {$sel:trialArn:DisassociateTrialComponentResponse' :: Maybe Text
trialArn = Maybe Text
a} :: DisassociateTrialComponentResponse)
disassociateTrialComponentResponse_trialComponentArn :: Lens.Lens' DisassociateTrialComponentResponse (Prelude.Maybe Prelude.Text)
disassociateTrialComponentResponse_trialComponentArn :: (Maybe Text -> f (Maybe Text))
-> DisassociateTrialComponentResponse
-> f DisassociateTrialComponentResponse
disassociateTrialComponentResponse_trialComponentArn = (DisassociateTrialComponentResponse -> Maybe Text)
-> (DisassociateTrialComponentResponse
-> Maybe Text -> DisassociateTrialComponentResponse)
-> Lens
DisassociateTrialComponentResponse
DisassociateTrialComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrialComponentResponse' {Maybe Text
trialComponentArn :: Maybe Text
$sel:trialComponentArn:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Maybe Text
trialComponentArn} -> Maybe Text
trialComponentArn) (\s :: DisassociateTrialComponentResponse
s@DisassociateTrialComponentResponse' {} Maybe Text
a -> DisassociateTrialComponentResponse
s {$sel:trialComponentArn:DisassociateTrialComponentResponse' :: Maybe Text
trialComponentArn = Maybe Text
a} :: DisassociateTrialComponentResponse)
disassociateTrialComponentResponse_httpStatus :: Lens.Lens' DisassociateTrialComponentResponse Prelude.Int
disassociateTrialComponentResponse_httpStatus :: (Int -> f Int)
-> DisassociateTrialComponentResponse
-> f DisassociateTrialComponentResponse
disassociateTrialComponentResponse_httpStatus = (DisassociateTrialComponentResponse -> Int)
-> (DisassociateTrialComponentResponse
-> Int -> DisassociateTrialComponentResponse)
-> Lens
DisassociateTrialComponentResponse
DisassociateTrialComponentResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrialComponentResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateTrialComponentResponse
s@DisassociateTrialComponentResponse' {} Int
a -> DisassociateTrialComponentResponse
s {$sel:httpStatus:DisassociateTrialComponentResponse' :: Int
httpStatus = Int
a} :: DisassociateTrialComponentResponse)
instance
Prelude.NFData
DisassociateTrialComponentResponse