{-# 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.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 DisassociateTrialComponent = DisassociateTrialComponent'
{
DisassociateTrialComponent -> Text
trialComponentName :: Prelude.Text,
DisassociateTrialComponent -> Text
trialName :: Prelude.Text
}
deriving (DisassociateTrialComponent -> DisassociateTrialComponent -> Bool
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]
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
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.
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'
{ $sel:trialComponentName:DisassociateTrialComponent' :: Text
trialComponentName =
Text
pTrialComponentName_,
$sel:trialName:DisassociateTrialComponent' :: Text
trialName = Text
pTrialName_
}
disassociateTrialComponent_trialComponentName :: Lens.Lens' DisassociateTrialComponent Prelude.Text
disassociateTrialComponent_trialComponentName :: Lens' DisassociateTrialComponent Text
disassociateTrialComponent_trialComponentName = 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 :: Lens' DisassociateTrialComponent Text
disassociateTrialComponent_trialName = 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 :: (Service -> Service)
-> DisassociateTrialComponent -> Request DisassociateTrialComponent
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 DisassociateTrialComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTrialComponent)))
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 ->
Maybe Text
-> Maybe Text -> Int -> DisassociateTrialComponentResponse
DisassociateTrialComponentResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TrialArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TrialComponentArn")
forall (f :: * -> *) a b. Applicative f => 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 DisassociateTrialComponent where
hashWithSalt :: Int -> DisassociateTrialComponent -> Int
hashWithSalt Int
_salt DisassociateTrialComponent' {Text
trialName :: Text
trialComponentName :: Text
$sel:trialName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
$sel:trialComponentName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trialComponentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trialName
instance Prelude.NFData DisassociateTrialComponent where
rnf :: DisassociateTrialComponent -> ()
rnf DisassociateTrialComponent' {Text
trialName :: Text
trialComponentName :: Text
$sel:trialName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
$sel:trialComponentName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
trialComponentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trialName
instance Data.ToHeaders DisassociateTrialComponent where
toHeaders :: DisassociateTrialComponent -> 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.DisassociateTrialComponent" ::
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 DisassociateTrialComponent where
toJSON :: DisassociateTrialComponent -> Value
toJSON DisassociateTrialComponent' {Text
trialName :: Text
trialComponentName :: Text
$sel:trialName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
$sel:trialComponentName:DisassociateTrialComponent' :: DisassociateTrialComponent -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"TrialComponentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
trialComponentName),
forall a. a -> Maybe a
Prelude.Just (Key
"TrialName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
trialName)
]
)
instance Data.ToPath DisassociateTrialComponent where
toPath :: DisassociateTrialComponent -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DisassociateTrialComponent where
toQuery :: DisassociateTrialComponent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
{ $sel:trialArn:DisassociateTrialComponentResponse' :: Maybe Text
trialArn =
forall a. Maybe a
Prelude.Nothing,
$sel:trialComponentArn:DisassociateTrialComponentResponse' :: Maybe Text
trialComponentArn = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisassociateTrialComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disassociateTrialComponentResponse_trialArn :: Lens.Lens' DisassociateTrialComponentResponse (Prelude.Maybe Prelude.Text)
disassociateTrialComponentResponse_trialArn :: Lens' DisassociateTrialComponentResponse (Maybe Text)
disassociateTrialComponentResponse_trialArn = 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 :: Lens' DisassociateTrialComponentResponse (Maybe Text)
disassociateTrialComponentResponse_trialComponentArn = 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 :: Lens' DisassociateTrialComponentResponse Int
disassociateTrialComponentResponse_httpStatus = 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
where
rnf :: DisassociateTrialComponentResponse -> ()
rnf DisassociateTrialComponentResponse' {Int
Maybe Text
httpStatus :: Int
trialComponentArn :: Maybe Text
trialArn :: Maybe Text
$sel:httpStatus:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Int
$sel:trialComponentArn:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Maybe Text
$sel:trialArn:DisassociateTrialComponentResponse' :: DisassociateTrialComponentResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trialArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trialComponentArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus