{-# 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.UpdateDeviceFleet
(
UpdateDeviceFleet (..),
newUpdateDeviceFleet,
updateDeviceFleet_enableIotRoleAlias,
updateDeviceFleet_description,
updateDeviceFleet_roleArn,
updateDeviceFleet_deviceFleetName,
updateDeviceFleet_outputConfig,
UpdateDeviceFleetResponse (..),
newUpdateDeviceFleetResponse,
)
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 UpdateDeviceFleet = UpdateDeviceFleet'
{
UpdateDeviceFleet -> Maybe Bool
enableIotRoleAlias :: Prelude.Maybe Prelude.Bool,
UpdateDeviceFleet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateDeviceFleet -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
UpdateDeviceFleet -> Text
deviceFleetName :: Prelude.Text,
UpdateDeviceFleet -> EdgeOutputConfig
outputConfig :: EdgeOutputConfig
}
deriving (UpdateDeviceFleet -> UpdateDeviceFleet -> Bool
(UpdateDeviceFleet -> UpdateDeviceFleet -> Bool)
-> (UpdateDeviceFleet -> UpdateDeviceFleet -> Bool)
-> Eq UpdateDeviceFleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDeviceFleet -> UpdateDeviceFleet -> Bool
$c/= :: UpdateDeviceFleet -> UpdateDeviceFleet -> Bool
== :: UpdateDeviceFleet -> UpdateDeviceFleet -> Bool
$c== :: UpdateDeviceFleet -> UpdateDeviceFleet -> Bool
Prelude.Eq, ReadPrec [UpdateDeviceFleet]
ReadPrec UpdateDeviceFleet
Int -> ReadS UpdateDeviceFleet
ReadS [UpdateDeviceFleet]
(Int -> ReadS UpdateDeviceFleet)
-> ReadS [UpdateDeviceFleet]
-> ReadPrec UpdateDeviceFleet
-> ReadPrec [UpdateDeviceFleet]
-> Read UpdateDeviceFleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDeviceFleet]
$creadListPrec :: ReadPrec [UpdateDeviceFleet]
readPrec :: ReadPrec UpdateDeviceFleet
$creadPrec :: ReadPrec UpdateDeviceFleet
readList :: ReadS [UpdateDeviceFleet]
$creadList :: ReadS [UpdateDeviceFleet]
readsPrec :: Int -> ReadS UpdateDeviceFleet
$creadsPrec :: Int -> ReadS UpdateDeviceFleet
Prelude.Read, Int -> UpdateDeviceFleet -> ShowS
[UpdateDeviceFleet] -> ShowS
UpdateDeviceFleet -> String
(Int -> UpdateDeviceFleet -> ShowS)
-> (UpdateDeviceFleet -> String)
-> ([UpdateDeviceFleet] -> ShowS)
-> Show UpdateDeviceFleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDeviceFleet] -> ShowS
$cshowList :: [UpdateDeviceFleet] -> ShowS
show :: UpdateDeviceFleet -> String
$cshow :: UpdateDeviceFleet -> String
showsPrec :: Int -> UpdateDeviceFleet -> ShowS
$cshowsPrec :: Int -> UpdateDeviceFleet -> ShowS
Prelude.Show, (forall x. UpdateDeviceFleet -> Rep UpdateDeviceFleet x)
-> (forall x. Rep UpdateDeviceFleet x -> UpdateDeviceFleet)
-> Generic UpdateDeviceFleet
forall x. Rep UpdateDeviceFleet x -> UpdateDeviceFleet
forall x. UpdateDeviceFleet -> Rep UpdateDeviceFleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDeviceFleet x -> UpdateDeviceFleet
$cfrom :: forall x. UpdateDeviceFleet -> Rep UpdateDeviceFleet x
Prelude.Generic)
newUpdateDeviceFleet ::
Prelude.Text ->
EdgeOutputConfig ->
UpdateDeviceFleet
newUpdateDeviceFleet :: Text -> EdgeOutputConfig -> UpdateDeviceFleet
newUpdateDeviceFleet Text
pDeviceFleetName_ EdgeOutputConfig
pOutputConfig_ =
UpdateDeviceFleet' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> EdgeOutputConfig
-> UpdateDeviceFleet
UpdateDeviceFleet'
{ $sel:enableIotRoleAlias:UpdateDeviceFleet' :: Maybe Bool
enableIotRoleAlias =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateDeviceFleet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:UpdateDeviceFleet' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceFleetName:UpdateDeviceFleet' :: Text
deviceFleetName = Text
pDeviceFleetName_,
$sel:outputConfig:UpdateDeviceFleet' :: EdgeOutputConfig
outputConfig = EdgeOutputConfig
pOutputConfig_
}
updateDeviceFleet_enableIotRoleAlias :: Lens.Lens' UpdateDeviceFleet (Prelude.Maybe Prelude.Bool)
updateDeviceFleet_enableIotRoleAlias :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDeviceFleet -> f UpdateDeviceFleet
updateDeviceFleet_enableIotRoleAlias = (UpdateDeviceFleet -> Maybe Bool)
-> (UpdateDeviceFleet -> Maybe Bool -> UpdateDeviceFleet)
-> Lens
UpdateDeviceFleet UpdateDeviceFleet (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeviceFleet' {Maybe Bool
enableIotRoleAlias :: Maybe Bool
$sel:enableIotRoleAlias:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Bool
enableIotRoleAlias} -> Maybe Bool
enableIotRoleAlias) (\s :: UpdateDeviceFleet
s@UpdateDeviceFleet' {} Maybe Bool
a -> UpdateDeviceFleet
s {$sel:enableIotRoleAlias:UpdateDeviceFleet' :: Maybe Bool
enableIotRoleAlias = Maybe Bool
a} :: UpdateDeviceFleet)
updateDeviceFleet_description :: Lens.Lens' UpdateDeviceFleet (Prelude.Maybe Prelude.Text)
updateDeviceFleet_description :: (Maybe Text -> f (Maybe Text))
-> UpdateDeviceFleet -> f UpdateDeviceFleet
updateDeviceFleet_description = (UpdateDeviceFleet -> Maybe Text)
-> (UpdateDeviceFleet -> Maybe Text -> UpdateDeviceFleet)
-> Lens
UpdateDeviceFleet UpdateDeviceFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeviceFleet' {Maybe Text
description :: Maybe Text
$sel:description:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateDeviceFleet
s@UpdateDeviceFleet' {} Maybe Text
a -> UpdateDeviceFleet
s {$sel:description:UpdateDeviceFleet' :: Maybe Text
description = Maybe Text
a} :: UpdateDeviceFleet)
updateDeviceFleet_roleArn :: Lens.Lens' UpdateDeviceFleet (Prelude.Maybe Prelude.Text)
updateDeviceFleet_roleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateDeviceFleet -> f UpdateDeviceFleet
updateDeviceFleet_roleArn = (UpdateDeviceFleet -> Maybe Text)
-> (UpdateDeviceFleet -> Maybe Text -> UpdateDeviceFleet)
-> Lens
UpdateDeviceFleet UpdateDeviceFleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeviceFleet' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateDeviceFleet
s@UpdateDeviceFleet' {} Maybe Text
a -> UpdateDeviceFleet
s {$sel:roleArn:UpdateDeviceFleet' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateDeviceFleet)
updateDeviceFleet_deviceFleetName :: Lens.Lens' UpdateDeviceFleet Prelude.Text
updateDeviceFleet_deviceFleetName :: (Text -> f Text) -> UpdateDeviceFleet -> f UpdateDeviceFleet
updateDeviceFleet_deviceFleetName = (UpdateDeviceFleet -> Text)
-> (UpdateDeviceFleet -> Text -> UpdateDeviceFleet)
-> Lens UpdateDeviceFleet UpdateDeviceFleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeviceFleet' {Text
deviceFleetName :: Text
$sel:deviceFleetName:UpdateDeviceFleet' :: UpdateDeviceFleet -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: UpdateDeviceFleet
s@UpdateDeviceFleet' {} Text
a -> UpdateDeviceFleet
s {$sel:deviceFleetName:UpdateDeviceFleet' :: Text
deviceFleetName = Text
a} :: UpdateDeviceFleet)
updateDeviceFleet_outputConfig :: Lens.Lens' UpdateDeviceFleet EdgeOutputConfig
updateDeviceFleet_outputConfig :: (EdgeOutputConfig -> f EdgeOutputConfig)
-> UpdateDeviceFleet -> f UpdateDeviceFleet
updateDeviceFleet_outputConfig = (UpdateDeviceFleet -> EdgeOutputConfig)
-> (UpdateDeviceFleet -> EdgeOutputConfig -> UpdateDeviceFleet)
-> Lens
UpdateDeviceFleet
UpdateDeviceFleet
EdgeOutputConfig
EdgeOutputConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDeviceFleet' {EdgeOutputConfig
outputConfig :: EdgeOutputConfig
$sel:outputConfig:UpdateDeviceFleet' :: UpdateDeviceFleet -> EdgeOutputConfig
outputConfig} -> EdgeOutputConfig
outputConfig) (\s :: UpdateDeviceFleet
s@UpdateDeviceFleet' {} EdgeOutputConfig
a -> UpdateDeviceFleet
s {$sel:outputConfig:UpdateDeviceFleet' :: EdgeOutputConfig
outputConfig = EdgeOutputConfig
a} :: UpdateDeviceFleet)
instance Core.AWSRequest UpdateDeviceFleet where
type
AWSResponse UpdateDeviceFleet =
UpdateDeviceFleetResponse
request :: UpdateDeviceFleet -> Request UpdateDeviceFleet
request = Service -> UpdateDeviceFleet -> Request UpdateDeviceFleet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateDeviceFleet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDeviceFleet)))
response =
AWSResponse UpdateDeviceFleet
-> Logger
-> Service
-> Proxy UpdateDeviceFleet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDeviceFleet)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateDeviceFleet
UpdateDeviceFleetResponse
UpdateDeviceFleetResponse'
instance Prelude.Hashable UpdateDeviceFleet
instance Prelude.NFData UpdateDeviceFleet
instance Core.ToHeaders UpdateDeviceFleet where
toHeaders :: UpdateDeviceFleet -> [Header]
toHeaders =
[Header] -> UpdateDeviceFleet -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"SageMaker.UpdateDeviceFleet" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateDeviceFleet where
toJSON :: UpdateDeviceFleet -> Value
toJSON UpdateDeviceFleet' {Maybe Bool
Maybe Text
Text
EdgeOutputConfig
outputConfig :: EdgeOutputConfig
deviceFleetName :: Text
roleArn :: Maybe Text
description :: Maybe Text
enableIotRoleAlias :: Maybe Bool
$sel:outputConfig:UpdateDeviceFleet' :: UpdateDeviceFleet -> EdgeOutputConfig
$sel:deviceFleetName:UpdateDeviceFleet' :: UpdateDeviceFleet -> Text
$sel:roleArn:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Text
$sel:description:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Text
$sel:enableIotRoleAlias:UpdateDeviceFleet' :: UpdateDeviceFleet -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EnableIotRoleAlias" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableIotRoleAlias,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleArn,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DeviceFleetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deviceFleetName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputConfig" Text -> EdgeOutputConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EdgeOutputConfig
outputConfig)
]
)
instance Core.ToPath UpdateDeviceFleet where
toPath :: UpdateDeviceFleet -> ByteString
toPath = ByteString -> UpdateDeviceFleet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateDeviceFleet where
toQuery :: UpdateDeviceFleet -> QueryString
toQuery = QueryString -> UpdateDeviceFleet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateDeviceFleetResponse = UpdateDeviceFleetResponse'
{
}
deriving (UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool
(UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool)
-> (UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool)
-> Eq UpdateDeviceFleetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool
$c/= :: UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool
== :: UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool
$c== :: UpdateDeviceFleetResponse -> UpdateDeviceFleetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDeviceFleetResponse]
ReadPrec UpdateDeviceFleetResponse
Int -> ReadS UpdateDeviceFleetResponse
ReadS [UpdateDeviceFleetResponse]
(Int -> ReadS UpdateDeviceFleetResponse)
-> ReadS [UpdateDeviceFleetResponse]
-> ReadPrec UpdateDeviceFleetResponse
-> ReadPrec [UpdateDeviceFleetResponse]
-> Read UpdateDeviceFleetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDeviceFleetResponse]
$creadListPrec :: ReadPrec [UpdateDeviceFleetResponse]
readPrec :: ReadPrec UpdateDeviceFleetResponse
$creadPrec :: ReadPrec UpdateDeviceFleetResponse
readList :: ReadS [UpdateDeviceFleetResponse]
$creadList :: ReadS [UpdateDeviceFleetResponse]
readsPrec :: Int -> ReadS UpdateDeviceFleetResponse
$creadsPrec :: Int -> ReadS UpdateDeviceFleetResponse
Prelude.Read, Int -> UpdateDeviceFleetResponse -> ShowS
[UpdateDeviceFleetResponse] -> ShowS
UpdateDeviceFleetResponse -> String
(Int -> UpdateDeviceFleetResponse -> ShowS)
-> (UpdateDeviceFleetResponse -> String)
-> ([UpdateDeviceFleetResponse] -> ShowS)
-> Show UpdateDeviceFleetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDeviceFleetResponse] -> ShowS
$cshowList :: [UpdateDeviceFleetResponse] -> ShowS
show :: UpdateDeviceFleetResponse -> String
$cshow :: UpdateDeviceFleetResponse -> String
showsPrec :: Int -> UpdateDeviceFleetResponse -> ShowS
$cshowsPrec :: Int -> UpdateDeviceFleetResponse -> ShowS
Prelude.Show, (forall x.
UpdateDeviceFleetResponse -> Rep UpdateDeviceFleetResponse x)
-> (forall x.
Rep UpdateDeviceFleetResponse x -> UpdateDeviceFleetResponse)
-> Generic UpdateDeviceFleetResponse
forall x.
Rep UpdateDeviceFleetResponse x -> UpdateDeviceFleetResponse
forall x.
UpdateDeviceFleetResponse -> Rep UpdateDeviceFleetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDeviceFleetResponse x -> UpdateDeviceFleetResponse
$cfrom :: forall x.
UpdateDeviceFleetResponse -> Rep UpdateDeviceFleetResponse x
Prelude.Generic)
newUpdateDeviceFleetResponse ::
UpdateDeviceFleetResponse
newUpdateDeviceFleetResponse :: UpdateDeviceFleetResponse
newUpdateDeviceFleetResponse =
UpdateDeviceFleetResponse
UpdateDeviceFleetResponse'
instance Prelude.NFData UpdateDeviceFleetResponse