{-# 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.IoT.CreateOTAUpdate
(
CreateOTAUpdate (..),
newCreateOTAUpdate,
createOTAUpdate_awsJobAbortConfig,
createOTAUpdate_awsJobExecutionsRolloutConfig,
createOTAUpdate_protocols,
createOTAUpdate_awsJobPresignedUrlConfig,
createOTAUpdate_additionalParameters,
createOTAUpdate_awsJobTimeoutConfig,
createOTAUpdate_description,
createOTAUpdate_targetSelection,
createOTAUpdate_tags,
createOTAUpdate_otaUpdateId,
createOTAUpdate_targets,
createOTAUpdate_files,
createOTAUpdate_roleArn,
CreateOTAUpdateResponse (..),
newCreateOTAUpdateResponse,
createOTAUpdateResponse_awsIotJobId,
createOTAUpdateResponse_otaUpdateStatus,
createOTAUpdateResponse_awsIotJobArn,
createOTAUpdateResponse_otaUpdateId,
createOTAUpdateResponse_otaUpdateArn,
createOTAUpdateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateOTAUpdate = CreateOTAUpdate'
{
CreateOTAUpdate -> Maybe AwsJobAbortConfig
awsJobAbortConfig :: Prelude.Maybe AwsJobAbortConfig,
CreateOTAUpdate -> Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig :: Prelude.Maybe AwsJobExecutionsRolloutConfig,
CreateOTAUpdate -> Maybe (NonEmpty Protocol)
protocols :: Prelude.Maybe (Prelude.NonEmpty Protocol),
CreateOTAUpdate -> Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig :: Prelude.Maybe AwsJobPresignedUrlConfig,
CreateOTAUpdate -> Maybe (HashMap Text Text)
additionalParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateOTAUpdate -> Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig :: Prelude.Maybe AwsJobTimeoutConfig,
CreateOTAUpdate -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateOTAUpdate -> Maybe TargetSelection
targetSelection :: Prelude.Maybe TargetSelection,
CreateOTAUpdate -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateOTAUpdate -> Text
otaUpdateId :: Prelude.Text,
CreateOTAUpdate -> NonEmpty Text
targets :: Prelude.NonEmpty Prelude.Text,
CreateOTAUpdate -> NonEmpty OTAUpdateFile
files :: Prelude.NonEmpty OTAUpdateFile,
CreateOTAUpdate -> Text
roleArn :: Prelude.Text
}
deriving (CreateOTAUpdate -> CreateOTAUpdate -> Bool
(CreateOTAUpdate -> CreateOTAUpdate -> Bool)
-> (CreateOTAUpdate -> CreateOTAUpdate -> Bool)
-> Eq CreateOTAUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOTAUpdate -> CreateOTAUpdate -> Bool
$c/= :: CreateOTAUpdate -> CreateOTAUpdate -> Bool
== :: CreateOTAUpdate -> CreateOTAUpdate -> Bool
$c== :: CreateOTAUpdate -> CreateOTAUpdate -> Bool
Prelude.Eq, ReadPrec [CreateOTAUpdate]
ReadPrec CreateOTAUpdate
Int -> ReadS CreateOTAUpdate
ReadS [CreateOTAUpdate]
(Int -> ReadS CreateOTAUpdate)
-> ReadS [CreateOTAUpdate]
-> ReadPrec CreateOTAUpdate
-> ReadPrec [CreateOTAUpdate]
-> Read CreateOTAUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOTAUpdate]
$creadListPrec :: ReadPrec [CreateOTAUpdate]
readPrec :: ReadPrec CreateOTAUpdate
$creadPrec :: ReadPrec CreateOTAUpdate
readList :: ReadS [CreateOTAUpdate]
$creadList :: ReadS [CreateOTAUpdate]
readsPrec :: Int -> ReadS CreateOTAUpdate
$creadsPrec :: Int -> ReadS CreateOTAUpdate
Prelude.Read, Int -> CreateOTAUpdate -> ShowS
[CreateOTAUpdate] -> ShowS
CreateOTAUpdate -> String
(Int -> CreateOTAUpdate -> ShowS)
-> (CreateOTAUpdate -> String)
-> ([CreateOTAUpdate] -> ShowS)
-> Show CreateOTAUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOTAUpdate] -> ShowS
$cshowList :: [CreateOTAUpdate] -> ShowS
show :: CreateOTAUpdate -> String
$cshow :: CreateOTAUpdate -> String
showsPrec :: Int -> CreateOTAUpdate -> ShowS
$cshowsPrec :: Int -> CreateOTAUpdate -> ShowS
Prelude.Show, (forall x. CreateOTAUpdate -> Rep CreateOTAUpdate x)
-> (forall x. Rep CreateOTAUpdate x -> CreateOTAUpdate)
-> Generic CreateOTAUpdate
forall x. Rep CreateOTAUpdate x -> CreateOTAUpdate
forall x. CreateOTAUpdate -> Rep CreateOTAUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateOTAUpdate x -> CreateOTAUpdate
$cfrom :: forall x. CreateOTAUpdate -> Rep CreateOTAUpdate x
Prelude.Generic)
newCreateOTAUpdate ::
Prelude.Text ->
Prelude.NonEmpty Prelude.Text ->
Prelude.NonEmpty OTAUpdateFile ->
Prelude.Text ->
CreateOTAUpdate
newCreateOTAUpdate :: Text
-> NonEmpty Text
-> NonEmpty OTAUpdateFile
-> Text
-> CreateOTAUpdate
newCreateOTAUpdate
Text
pOtaUpdateId_
NonEmpty Text
pTargets_
NonEmpty OTAUpdateFile
pFiles_
Text
pRoleArn_ =
CreateOTAUpdate' :: Maybe AwsJobAbortConfig
-> Maybe AwsJobExecutionsRolloutConfig
-> Maybe (NonEmpty Protocol)
-> Maybe AwsJobPresignedUrlConfig
-> Maybe (HashMap Text Text)
-> Maybe AwsJobTimeoutConfig
-> Maybe Text
-> Maybe TargetSelection
-> Maybe [Tag]
-> Text
-> NonEmpty Text
-> NonEmpty OTAUpdateFile
-> Text
-> CreateOTAUpdate
CreateOTAUpdate'
{ $sel:awsJobAbortConfig:CreateOTAUpdate' :: Maybe AwsJobAbortConfig
awsJobAbortConfig =
Maybe AwsJobAbortConfig
forall a. Maybe a
Prelude.Nothing,
$sel:awsJobExecutionsRolloutConfig:CreateOTAUpdate' :: Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig = Maybe AwsJobExecutionsRolloutConfig
forall a. Maybe a
Prelude.Nothing,
$sel:protocols:CreateOTAUpdate' :: Maybe (NonEmpty Protocol)
protocols = Maybe (NonEmpty Protocol)
forall a. Maybe a
Prelude.Nothing,
$sel:awsJobPresignedUrlConfig:CreateOTAUpdate' :: Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig = Maybe AwsJobPresignedUrlConfig
forall a. Maybe a
Prelude.Nothing,
$sel:additionalParameters:CreateOTAUpdate' :: Maybe (HashMap Text Text)
additionalParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:awsJobTimeoutConfig:CreateOTAUpdate' :: Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig = Maybe AwsJobTimeoutConfig
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateOTAUpdate' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetSelection:CreateOTAUpdate' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateOTAUpdate' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:otaUpdateId:CreateOTAUpdate' :: Text
otaUpdateId = Text
pOtaUpdateId_,
$sel:targets:CreateOTAUpdate' :: NonEmpty Text
targets = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pTargets_,
$sel:files:CreateOTAUpdate' :: NonEmpty OTAUpdateFile
files = Tagged (NonEmpty OTAUpdateFile) (Identity (NonEmpty OTAUpdateFile))
-> Tagged
(NonEmpty OTAUpdateFile) (Identity (NonEmpty OTAUpdateFile))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty OTAUpdateFile) (Identity (NonEmpty OTAUpdateFile))
-> Tagged
(NonEmpty OTAUpdateFile) (Identity (NonEmpty OTAUpdateFile)))
-> NonEmpty OTAUpdateFile -> NonEmpty OTAUpdateFile
forall t b. AReview t b -> b -> t
Lens.# NonEmpty OTAUpdateFile
pFiles_,
$sel:roleArn:CreateOTAUpdate' :: Text
roleArn = Text
pRoleArn_
}
createOTAUpdate_awsJobAbortConfig :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe AwsJobAbortConfig)
createOTAUpdate_awsJobAbortConfig :: (Maybe AwsJobAbortConfig -> f (Maybe AwsJobAbortConfig))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_awsJobAbortConfig = (CreateOTAUpdate -> Maybe AwsJobAbortConfig)
-> (CreateOTAUpdate -> Maybe AwsJobAbortConfig -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe AwsJobAbortConfig)
(Maybe AwsJobAbortConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe AwsJobAbortConfig
awsJobAbortConfig :: Maybe AwsJobAbortConfig
$sel:awsJobAbortConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobAbortConfig
awsJobAbortConfig} -> Maybe AwsJobAbortConfig
awsJobAbortConfig) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe AwsJobAbortConfig
a -> CreateOTAUpdate
s {$sel:awsJobAbortConfig:CreateOTAUpdate' :: Maybe AwsJobAbortConfig
awsJobAbortConfig = Maybe AwsJobAbortConfig
a} :: CreateOTAUpdate)
createOTAUpdate_awsJobExecutionsRolloutConfig :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe AwsJobExecutionsRolloutConfig)
createOTAUpdate_awsJobExecutionsRolloutConfig :: (Maybe AwsJobExecutionsRolloutConfig
-> f (Maybe AwsJobExecutionsRolloutConfig))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_awsJobExecutionsRolloutConfig = (CreateOTAUpdate -> Maybe AwsJobExecutionsRolloutConfig)
-> (CreateOTAUpdate
-> Maybe AwsJobExecutionsRolloutConfig -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe AwsJobExecutionsRolloutConfig)
(Maybe AwsJobExecutionsRolloutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig :: Maybe AwsJobExecutionsRolloutConfig
$sel:awsJobExecutionsRolloutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig} -> Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe AwsJobExecutionsRolloutConfig
a -> CreateOTAUpdate
s {$sel:awsJobExecutionsRolloutConfig:CreateOTAUpdate' :: Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig = Maybe AwsJobExecutionsRolloutConfig
a} :: CreateOTAUpdate)
createOTAUpdate_protocols :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe (Prelude.NonEmpty Protocol))
createOTAUpdate_protocols :: (Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_protocols = (CreateOTAUpdate -> Maybe (NonEmpty Protocol))
-> (CreateOTAUpdate
-> Maybe (NonEmpty Protocol) -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe (NonEmpty Protocol)
protocols :: Maybe (NonEmpty Protocol)
$sel:protocols:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (NonEmpty Protocol)
protocols} -> Maybe (NonEmpty Protocol)
protocols) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe (NonEmpty Protocol)
a -> CreateOTAUpdate
s {$sel:protocols:CreateOTAUpdate' :: Maybe (NonEmpty Protocol)
protocols = Maybe (NonEmpty Protocol)
a} :: CreateOTAUpdate) ((Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> CreateOTAUpdate -> f CreateOTAUpdate)
-> ((Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> (Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> CreateOTAUpdate
-> f CreateOTAUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
-> Iso
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createOTAUpdate_awsJobPresignedUrlConfig :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe AwsJobPresignedUrlConfig)
createOTAUpdate_awsJobPresignedUrlConfig :: (Maybe AwsJobPresignedUrlConfig
-> f (Maybe AwsJobPresignedUrlConfig))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_awsJobPresignedUrlConfig = (CreateOTAUpdate -> Maybe AwsJobPresignedUrlConfig)
-> (CreateOTAUpdate
-> Maybe AwsJobPresignedUrlConfig -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe AwsJobPresignedUrlConfig)
(Maybe AwsJobPresignedUrlConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig :: Maybe AwsJobPresignedUrlConfig
$sel:awsJobPresignedUrlConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig} -> Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe AwsJobPresignedUrlConfig
a -> CreateOTAUpdate
s {$sel:awsJobPresignedUrlConfig:CreateOTAUpdate' :: Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig = Maybe AwsJobPresignedUrlConfig
a} :: CreateOTAUpdate)
createOTAUpdate_additionalParameters :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createOTAUpdate_additionalParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_additionalParameters = (CreateOTAUpdate -> Maybe (HashMap Text Text))
-> (CreateOTAUpdate
-> Maybe (HashMap Text Text) -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe (HashMap Text Text)
additionalParameters :: Maybe (HashMap Text Text)
$sel:additionalParameters:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (HashMap Text Text)
additionalParameters} -> Maybe (HashMap Text Text)
additionalParameters) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe (HashMap Text Text)
a -> CreateOTAUpdate
s {$sel:additionalParameters:CreateOTAUpdate' :: Maybe (HashMap Text Text)
additionalParameters = Maybe (HashMap Text Text)
a} :: CreateOTAUpdate) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateOTAUpdate -> f CreateOTAUpdate)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateOTAUpdate
-> f CreateOTAUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createOTAUpdate_awsJobTimeoutConfig :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe AwsJobTimeoutConfig)
createOTAUpdate_awsJobTimeoutConfig :: (Maybe AwsJobTimeoutConfig -> f (Maybe AwsJobTimeoutConfig))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_awsJobTimeoutConfig = (CreateOTAUpdate -> Maybe AwsJobTimeoutConfig)
-> (CreateOTAUpdate
-> Maybe AwsJobTimeoutConfig -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe AwsJobTimeoutConfig)
(Maybe AwsJobTimeoutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig :: Maybe AwsJobTimeoutConfig
$sel:awsJobTimeoutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig} -> Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe AwsJobTimeoutConfig
a -> CreateOTAUpdate
s {$sel:awsJobTimeoutConfig:CreateOTAUpdate' :: Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig = Maybe AwsJobTimeoutConfig
a} :: CreateOTAUpdate)
createOTAUpdate_description :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe Prelude.Text)
createOTAUpdate_description :: (Maybe Text -> f (Maybe Text))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_description = (CreateOTAUpdate -> Maybe Text)
-> (CreateOTAUpdate -> Maybe Text -> CreateOTAUpdate)
-> Lens CreateOTAUpdate CreateOTAUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe Text
description :: Maybe Text
$sel:description:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe Text
a -> CreateOTAUpdate
s {$sel:description:CreateOTAUpdate' :: Maybe Text
description = Maybe Text
a} :: CreateOTAUpdate)
createOTAUpdate_targetSelection :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe TargetSelection)
createOTAUpdate_targetSelection :: (Maybe TargetSelection -> f (Maybe TargetSelection))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_targetSelection = (CreateOTAUpdate -> Maybe TargetSelection)
-> (CreateOTAUpdate -> Maybe TargetSelection -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(Maybe TargetSelection)
(Maybe TargetSelection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe TargetSelection
targetSelection :: Maybe TargetSelection
$sel:targetSelection:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe TargetSelection
targetSelection} -> Maybe TargetSelection
targetSelection) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe TargetSelection
a -> CreateOTAUpdate
s {$sel:targetSelection:CreateOTAUpdate' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
a} :: CreateOTAUpdate)
createOTAUpdate_tags :: Lens.Lens' CreateOTAUpdate (Prelude.Maybe [Tag])
createOTAUpdate_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_tags = (CreateOTAUpdate -> Maybe [Tag])
-> (CreateOTAUpdate -> Maybe [Tag] -> CreateOTAUpdate)
-> Lens CreateOTAUpdate CreateOTAUpdate (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Maybe [Tag]
a -> CreateOTAUpdate
s {$sel:tags:CreateOTAUpdate' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateOTAUpdate) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateOTAUpdate -> f CreateOTAUpdate)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateOTAUpdate
-> f CreateOTAUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createOTAUpdate_otaUpdateId :: Lens.Lens' CreateOTAUpdate Prelude.Text
createOTAUpdate_otaUpdateId :: (Text -> f Text) -> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_otaUpdateId = (CreateOTAUpdate -> Text)
-> (CreateOTAUpdate -> Text -> CreateOTAUpdate)
-> Lens CreateOTAUpdate CreateOTAUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Text
otaUpdateId :: Text
$sel:otaUpdateId:CreateOTAUpdate' :: CreateOTAUpdate -> Text
otaUpdateId} -> Text
otaUpdateId) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Text
a -> CreateOTAUpdate
s {$sel:otaUpdateId:CreateOTAUpdate' :: Text
otaUpdateId = Text
a} :: CreateOTAUpdate)
createOTAUpdate_targets :: Lens.Lens' CreateOTAUpdate (Prelude.NonEmpty Prelude.Text)
createOTAUpdate_targets :: (NonEmpty Text -> f (NonEmpty Text))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_targets = (CreateOTAUpdate -> NonEmpty Text)
-> (CreateOTAUpdate -> NonEmpty Text -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate CreateOTAUpdate (NonEmpty Text) (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {NonEmpty Text
targets :: NonEmpty Text
$sel:targets:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty Text
targets} -> NonEmpty Text
targets) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} NonEmpty Text
a -> CreateOTAUpdate
s {$sel:targets:CreateOTAUpdate' :: NonEmpty Text
targets = NonEmpty Text
a} :: CreateOTAUpdate) ((NonEmpty Text -> f (NonEmpty Text))
-> CreateOTAUpdate -> f CreateOTAUpdate)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> CreateOTAUpdate
-> f CreateOTAUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createOTAUpdate_files :: Lens.Lens' CreateOTAUpdate (Prelude.NonEmpty OTAUpdateFile)
createOTAUpdate_files :: (NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_files = (CreateOTAUpdate -> NonEmpty OTAUpdateFile)
-> (CreateOTAUpdate -> NonEmpty OTAUpdateFile -> CreateOTAUpdate)
-> Lens
CreateOTAUpdate
CreateOTAUpdate
(NonEmpty OTAUpdateFile)
(NonEmpty OTAUpdateFile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {NonEmpty OTAUpdateFile
files :: NonEmpty OTAUpdateFile
$sel:files:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty OTAUpdateFile
files} -> NonEmpty OTAUpdateFile
files) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} NonEmpty OTAUpdateFile
a -> CreateOTAUpdate
s {$sel:files:CreateOTAUpdate' :: NonEmpty OTAUpdateFile
files = NonEmpty OTAUpdateFile
a} :: CreateOTAUpdate) ((NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> CreateOTAUpdate -> f CreateOTAUpdate)
-> ((NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> (NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> CreateOTAUpdate
-> f CreateOTAUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile))
-> NonEmpty OTAUpdateFile -> f (NonEmpty OTAUpdateFile)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createOTAUpdate_roleArn :: Lens.Lens' CreateOTAUpdate Prelude.Text
createOTAUpdate_roleArn :: (Text -> f Text) -> CreateOTAUpdate -> f CreateOTAUpdate
createOTAUpdate_roleArn = (CreateOTAUpdate -> Text)
-> (CreateOTAUpdate -> Text -> CreateOTAUpdate)
-> Lens CreateOTAUpdate CreateOTAUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdate' {Text
roleArn :: Text
$sel:roleArn:CreateOTAUpdate' :: CreateOTAUpdate -> Text
roleArn} -> Text
roleArn) (\s :: CreateOTAUpdate
s@CreateOTAUpdate' {} Text
a -> CreateOTAUpdate
s {$sel:roleArn:CreateOTAUpdate' :: Text
roleArn = Text
a} :: CreateOTAUpdate)
instance Core.AWSRequest CreateOTAUpdate where
type
AWSResponse CreateOTAUpdate =
CreateOTAUpdateResponse
request :: CreateOTAUpdate -> Request CreateOTAUpdate
request = Service -> CreateOTAUpdate -> Request CreateOTAUpdate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateOTAUpdate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateOTAUpdate)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateOTAUpdate))
-> Logger
-> Service
-> Proxy CreateOTAUpdate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateOTAUpdate)))
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 OTAUpdateStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateOTAUpdateResponse
CreateOTAUpdateResponse'
(Maybe Text
-> Maybe OTAUpdateStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateOTAUpdateResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe OTAUpdateStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateOTAUpdateResponse)
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
"awsIotJobId")
Either
String
(Maybe OTAUpdateStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateOTAUpdateResponse)
-> Either String (Maybe OTAUpdateStatus)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateOTAUpdateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OTAUpdateStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"otaUpdateStatus")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateOTAUpdateResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> Int -> CreateOTAUpdateResponse)
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
"awsIotJobArn")
Either
String (Maybe Text -> Maybe Text -> Int -> CreateOTAUpdateResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateOTAUpdateResponse)
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
"otaUpdateId")
Either String (Maybe Text -> Int -> CreateOTAUpdateResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateOTAUpdateResponse)
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
"otaUpdateArn")
Either String (Int -> CreateOTAUpdateResponse)
-> Either String Int -> Either String CreateOTAUpdateResponse
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 CreateOTAUpdate
instance Prelude.NFData CreateOTAUpdate
instance Core.ToHeaders CreateOTAUpdate where
toHeaders :: CreateOTAUpdate -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateOTAUpdate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateOTAUpdate where
toJSON :: CreateOTAUpdate -> Value
toJSON CreateOTAUpdate' {Maybe [Tag]
Maybe (NonEmpty Protocol)
Maybe Text
Maybe (HashMap Text Text)
Maybe AwsJobAbortConfig
Maybe AwsJobPresignedUrlConfig
Maybe AwsJobExecutionsRolloutConfig
Maybe AwsJobTimeoutConfig
Maybe TargetSelection
NonEmpty Text
NonEmpty OTAUpdateFile
Text
roleArn :: Text
files :: NonEmpty OTAUpdateFile
targets :: NonEmpty Text
otaUpdateId :: Text
tags :: Maybe [Tag]
targetSelection :: Maybe TargetSelection
description :: Maybe Text
awsJobTimeoutConfig :: Maybe AwsJobTimeoutConfig
additionalParameters :: Maybe (HashMap Text Text)
awsJobPresignedUrlConfig :: Maybe AwsJobPresignedUrlConfig
protocols :: Maybe (NonEmpty Protocol)
awsJobExecutionsRolloutConfig :: Maybe AwsJobExecutionsRolloutConfig
awsJobAbortConfig :: Maybe AwsJobAbortConfig
$sel:roleArn:CreateOTAUpdate' :: CreateOTAUpdate -> Text
$sel:files:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty OTAUpdateFile
$sel:targets:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty Text
$sel:otaUpdateId:CreateOTAUpdate' :: CreateOTAUpdate -> Text
$sel:tags:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe [Tag]
$sel:targetSelection:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe TargetSelection
$sel:description:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe Text
$sel:awsJobTimeoutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobTimeoutConfig
$sel:additionalParameters:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (HashMap Text Text)
$sel:awsJobPresignedUrlConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobPresignedUrlConfig
$sel:protocols:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (NonEmpty Protocol)
$sel:awsJobExecutionsRolloutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobExecutionsRolloutConfig
$sel:awsJobAbortConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobAbortConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"awsJobAbortConfig" Text -> AwsJobAbortConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsJobAbortConfig -> Pair)
-> Maybe AwsJobAbortConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsJobAbortConfig
awsJobAbortConfig,
(Text
"awsJobExecutionsRolloutConfig" Text -> AwsJobExecutionsRolloutConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsJobExecutionsRolloutConfig -> Pair)
-> Maybe AwsJobExecutionsRolloutConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsJobExecutionsRolloutConfig
awsJobExecutionsRolloutConfig,
(Text
"protocols" Text -> NonEmpty Protocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Protocol -> Pair)
-> Maybe (NonEmpty Protocol) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Protocol)
protocols,
(Text
"awsJobPresignedUrlConfig" Text -> AwsJobPresignedUrlConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsJobPresignedUrlConfig -> Pair)
-> Maybe AwsJobPresignedUrlConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsJobPresignedUrlConfig
awsJobPresignedUrlConfig,
(Text
"additionalParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
additionalParameters,
(Text
"awsJobTimeoutConfig" Text -> AwsJobTimeoutConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsJobTimeoutConfig -> Pair)
-> Maybe AwsJobTimeoutConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsJobTimeoutConfig
awsJobTimeoutConfig,
(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
"targetSelection" Text -> TargetSelection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TargetSelection -> Pair) -> Maybe TargetSelection -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetSelection
targetSelection,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"targets" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
targets),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"files" Text -> NonEmpty OTAUpdateFile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty OTAUpdateFile
files),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)
instance Core.ToPath CreateOTAUpdate where
toPath :: CreateOTAUpdate -> ByteString
toPath CreateOTAUpdate' {Maybe [Tag]
Maybe (NonEmpty Protocol)
Maybe Text
Maybe (HashMap Text Text)
Maybe AwsJobAbortConfig
Maybe AwsJobPresignedUrlConfig
Maybe AwsJobExecutionsRolloutConfig
Maybe AwsJobTimeoutConfig
Maybe TargetSelection
NonEmpty Text
NonEmpty OTAUpdateFile
Text
roleArn :: Text
files :: NonEmpty OTAUpdateFile
targets :: NonEmpty Text
otaUpdateId :: Text
tags :: Maybe [Tag]
targetSelection :: Maybe TargetSelection
description :: Maybe Text
awsJobTimeoutConfig :: Maybe AwsJobTimeoutConfig
additionalParameters :: Maybe (HashMap Text Text)
awsJobPresignedUrlConfig :: Maybe AwsJobPresignedUrlConfig
protocols :: Maybe (NonEmpty Protocol)
awsJobExecutionsRolloutConfig :: Maybe AwsJobExecutionsRolloutConfig
awsJobAbortConfig :: Maybe AwsJobAbortConfig
$sel:roleArn:CreateOTAUpdate' :: CreateOTAUpdate -> Text
$sel:files:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty OTAUpdateFile
$sel:targets:CreateOTAUpdate' :: CreateOTAUpdate -> NonEmpty Text
$sel:otaUpdateId:CreateOTAUpdate' :: CreateOTAUpdate -> Text
$sel:tags:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe [Tag]
$sel:targetSelection:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe TargetSelection
$sel:description:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe Text
$sel:awsJobTimeoutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobTimeoutConfig
$sel:additionalParameters:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (HashMap Text Text)
$sel:awsJobPresignedUrlConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobPresignedUrlConfig
$sel:protocols:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe (NonEmpty Protocol)
$sel:awsJobExecutionsRolloutConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobExecutionsRolloutConfig
$sel:awsJobAbortConfig:CreateOTAUpdate' :: CreateOTAUpdate -> Maybe AwsJobAbortConfig
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/otaUpdates/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
otaUpdateId]
instance Core.ToQuery CreateOTAUpdate where
toQuery :: CreateOTAUpdate -> QueryString
toQuery = QueryString -> CreateOTAUpdate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateOTAUpdateResponse = CreateOTAUpdateResponse'
{
CreateOTAUpdateResponse -> Maybe Text
awsIotJobId :: Prelude.Maybe Prelude.Text,
CreateOTAUpdateResponse -> Maybe OTAUpdateStatus
otaUpdateStatus :: Prelude.Maybe OTAUpdateStatus,
CreateOTAUpdateResponse -> Maybe Text
awsIotJobArn :: Prelude.Maybe Prelude.Text,
CreateOTAUpdateResponse -> Maybe Text
otaUpdateId :: Prelude.Maybe Prelude.Text,
CreateOTAUpdateResponse -> Maybe Text
otaUpdateArn :: Prelude.Maybe Prelude.Text,
CreateOTAUpdateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool
(CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool)
-> (CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool)
-> Eq CreateOTAUpdateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool
$c/= :: CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool
== :: CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool
$c== :: CreateOTAUpdateResponse -> CreateOTAUpdateResponse -> Bool
Prelude.Eq, ReadPrec [CreateOTAUpdateResponse]
ReadPrec CreateOTAUpdateResponse
Int -> ReadS CreateOTAUpdateResponse
ReadS [CreateOTAUpdateResponse]
(Int -> ReadS CreateOTAUpdateResponse)
-> ReadS [CreateOTAUpdateResponse]
-> ReadPrec CreateOTAUpdateResponse
-> ReadPrec [CreateOTAUpdateResponse]
-> Read CreateOTAUpdateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOTAUpdateResponse]
$creadListPrec :: ReadPrec [CreateOTAUpdateResponse]
readPrec :: ReadPrec CreateOTAUpdateResponse
$creadPrec :: ReadPrec CreateOTAUpdateResponse
readList :: ReadS [CreateOTAUpdateResponse]
$creadList :: ReadS [CreateOTAUpdateResponse]
readsPrec :: Int -> ReadS CreateOTAUpdateResponse
$creadsPrec :: Int -> ReadS CreateOTAUpdateResponse
Prelude.Read, Int -> CreateOTAUpdateResponse -> ShowS
[CreateOTAUpdateResponse] -> ShowS
CreateOTAUpdateResponse -> String
(Int -> CreateOTAUpdateResponse -> ShowS)
-> (CreateOTAUpdateResponse -> String)
-> ([CreateOTAUpdateResponse] -> ShowS)
-> Show CreateOTAUpdateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOTAUpdateResponse] -> ShowS
$cshowList :: [CreateOTAUpdateResponse] -> ShowS
show :: CreateOTAUpdateResponse -> String
$cshow :: CreateOTAUpdateResponse -> String
showsPrec :: Int -> CreateOTAUpdateResponse -> ShowS
$cshowsPrec :: Int -> CreateOTAUpdateResponse -> ShowS
Prelude.Show, (forall x.
CreateOTAUpdateResponse -> Rep CreateOTAUpdateResponse x)
-> (forall x.
Rep CreateOTAUpdateResponse x -> CreateOTAUpdateResponse)
-> Generic CreateOTAUpdateResponse
forall x. Rep CreateOTAUpdateResponse x -> CreateOTAUpdateResponse
forall x. CreateOTAUpdateResponse -> Rep CreateOTAUpdateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateOTAUpdateResponse x -> CreateOTAUpdateResponse
$cfrom :: forall x. CreateOTAUpdateResponse -> Rep CreateOTAUpdateResponse x
Prelude.Generic)
newCreateOTAUpdateResponse ::
Prelude.Int ->
CreateOTAUpdateResponse
newCreateOTAUpdateResponse :: Int -> CreateOTAUpdateResponse
newCreateOTAUpdateResponse Int
pHttpStatus_ =
CreateOTAUpdateResponse' :: Maybe Text
-> Maybe OTAUpdateStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateOTAUpdateResponse
CreateOTAUpdateResponse'
{ $sel:awsIotJobId:CreateOTAUpdateResponse' :: Maybe Text
awsIotJobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:otaUpdateStatus:CreateOTAUpdateResponse' :: Maybe OTAUpdateStatus
otaUpdateStatus = Maybe OTAUpdateStatus
forall a. Maybe a
Prelude.Nothing,
$sel:awsIotJobArn:CreateOTAUpdateResponse' :: Maybe Text
awsIotJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:otaUpdateId:CreateOTAUpdateResponse' :: Maybe Text
otaUpdateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:otaUpdateArn:CreateOTAUpdateResponse' :: Maybe Text
otaUpdateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateOTAUpdateResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createOTAUpdateResponse_awsIotJobId :: Lens.Lens' CreateOTAUpdateResponse (Prelude.Maybe Prelude.Text)
createOTAUpdateResponse_awsIotJobId :: (Maybe Text -> f (Maybe Text))
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_awsIotJobId = (CreateOTAUpdateResponse -> Maybe Text)
-> (CreateOTAUpdateResponse
-> Maybe Text -> CreateOTAUpdateResponse)
-> Lens
CreateOTAUpdateResponse
CreateOTAUpdateResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Maybe Text
awsIotJobId :: Maybe Text
$sel:awsIotJobId:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Maybe Text
awsIotJobId} -> Maybe Text
awsIotJobId) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Maybe Text
a -> CreateOTAUpdateResponse
s {$sel:awsIotJobId:CreateOTAUpdateResponse' :: Maybe Text
awsIotJobId = Maybe Text
a} :: CreateOTAUpdateResponse)
createOTAUpdateResponse_otaUpdateStatus :: Lens.Lens' CreateOTAUpdateResponse (Prelude.Maybe OTAUpdateStatus)
createOTAUpdateResponse_otaUpdateStatus :: (Maybe OTAUpdateStatus -> f (Maybe OTAUpdateStatus))
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_otaUpdateStatus = (CreateOTAUpdateResponse -> Maybe OTAUpdateStatus)
-> (CreateOTAUpdateResponse
-> Maybe OTAUpdateStatus -> CreateOTAUpdateResponse)
-> Lens
CreateOTAUpdateResponse
CreateOTAUpdateResponse
(Maybe OTAUpdateStatus)
(Maybe OTAUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Maybe OTAUpdateStatus
otaUpdateStatus :: Maybe OTAUpdateStatus
$sel:otaUpdateStatus:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Maybe OTAUpdateStatus
otaUpdateStatus} -> Maybe OTAUpdateStatus
otaUpdateStatus) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Maybe OTAUpdateStatus
a -> CreateOTAUpdateResponse
s {$sel:otaUpdateStatus:CreateOTAUpdateResponse' :: Maybe OTAUpdateStatus
otaUpdateStatus = Maybe OTAUpdateStatus
a} :: CreateOTAUpdateResponse)
createOTAUpdateResponse_awsIotJobArn :: Lens.Lens' CreateOTAUpdateResponse (Prelude.Maybe Prelude.Text)
createOTAUpdateResponse_awsIotJobArn :: (Maybe Text -> f (Maybe Text))
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_awsIotJobArn = (CreateOTAUpdateResponse -> Maybe Text)
-> (CreateOTAUpdateResponse
-> Maybe Text -> CreateOTAUpdateResponse)
-> Lens
CreateOTAUpdateResponse
CreateOTAUpdateResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Maybe Text
awsIotJobArn :: Maybe Text
$sel:awsIotJobArn:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Maybe Text
awsIotJobArn} -> Maybe Text
awsIotJobArn) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Maybe Text
a -> CreateOTAUpdateResponse
s {$sel:awsIotJobArn:CreateOTAUpdateResponse' :: Maybe Text
awsIotJobArn = Maybe Text
a} :: CreateOTAUpdateResponse)
createOTAUpdateResponse_otaUpdateId :: Lens.Lens' CreateOTAUpdateResponse (Prelude.Maybe Prelude.Text)
createOTAUpdateResponse_otaUpdateId :: (Maybe Text -> f (Maybe Text))
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_otaUpdateId = (CreateOTAUpdateResponse -> Maybe Text)
-> (CreateOTAUpdateResponse
-> Maybe Text -> CreateOTAUpdateResponse)
-> Lens
CreateOTAUpdateResponse
CreateOTAUpdateResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Maybe Text
otaUpdateId :: Maybe Text
$sel:otaUpdateId:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Maybe Text
otaUpdateId} -> Maybe Text
otaUpdateId) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Maybe Text
a -> CreateOTAUpdateResponse
s {$sel:otaUpdateId:CreateOTAUpdateResponse' :: Maybe Text
otaUpdateId = Maybe Text
a} :: CreateOTAUpdateResponse)
createOTAUpdateResponse_otaUpdateArn :: Lens.Lens' CreateOTAUpdateResponse (Prelude.Maybe Prelude.Text)
createOTAUpdateResponse_otaUpdateArn :: (Maybe Text -> f (Maybe Text))
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_otaUpdateArn = (CreateOTAUpdateResponse -> Maybe Text)
-> (CreateOTAUpdateResponse
-> Maybe Text -> CreateOTAUpdateResponse)
-> Lens
CreateOTAUpdateResponse
CreateOTAUpdateResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Maybe Text
otaUpdateArn :: Maybe Text
$sel:otaUpdateArn:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Maybe Text
otaUpdateArn} -> Maybe Text
otaUpdateArn) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Maybe Text
a -> CreateOTAUpdateResponse
s {$sel:otaUpdateArn:CreateOTAUpdateResponse' :: Maybe Text
otaUpdateArn = Maybe Text
a} :: CreateOTAUpdateResponse)
createOTAUpdateResponse_httpStatus :: Lens.Lens' CreateOTAUpdateResponse Prelude.Int
createOTAUpdateResponse_httpStatus :: (Int -> f Int)
-> CreateOTAUpdateResponse -> f CreateOTAUpdateResponse
createOTAUpdateResponse_httpStatus = (CreateOTAUpdateResponse -> Int)
-> (CreateOTAUpdateResponse -> Int -> CreateOTAUpdateResponse)
-> Lens CreateOTAUpdateResponse CreateOTAUpdateResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOTAUpdateResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateOTAUpdateResponse' :: CreateOTAUpdateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateOTAUpdateResponse
s@CreateOTAUpdateResponse' {} Int
a -> CreateOTAUpdateResponse
s {$sel:httpStatus:CreateOTAUpdateResponse' :: Int
httpStatus = Int
a} :: CreateOTAUpdateResponse)
instance Prelude.NFData CreateOTAUpdateResponse