{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSM.Types.Command
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.Command where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.CloudWatchOutputConfig
import Amazonka.SSM.Types.CommandStatus
import Amazonka.SSM.Types.NotificationConfig
import Amazonka.SSM.Types.Target

-- | Describes a command request.
--
-- /See:/ 'newCommand' smart constructor.
data Command = Command'
  { -- | The status of the command.
    Command -> Maybe CommandStatus
status :: Prelude.Maybe CommandStatus,
    -- | If this time is reached and the command hasn\'t already started running,
    -- it won\'t run. Calculated based on the @ExpiresAfter@ user input
    -- provided as part of the @SendCommand@ API operation.
    Command -> Maybe POSIX
expiresAfter :: Prelude.Maybe Core.POSIX,
    -- | Configurations for sending notifications about command status changes.
    Command -> Maybe NotificationConfig
notificationConfig :: Prelude.Maybe NotificationConfig,
    -- | The number of targets for the command.
    Command -> Maybe Int
targetCount :: Prelude.Maybe Prelude.Int,
    -- | Amazon CloudWatch Logs information where you want Amazon Web Services
    -- Systems Manager to send the command output.
    Command -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig :: Prelude.Maybe CloudWatchOutputConfig,
    -- | The number of targets for which the status is Delivery Timed Out.
    Command -> Maybe Int
deliveryTimedOutCount :: Prelude.Maybe Prelude.Int,
    -- | The S3 directory path inside the bucket where the responses to the
    -- command executions should be stored. This was requested when issuing the
    -- command.
    Command -> Maybe Text
outputS3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | The name of the document requested for execution.
    Command -> Maybe Text
documentName :: Prelude.Maybe Prelude.Text,
    -- | The number of targets for which the status is Failed or Execution Timed
    -- Out.
    Command -> Maybe Int
errorCount :: Prelude.Maybe Prelude.Int,
    -- | A detailed status of the command execution. @StatusDetails@ includes
    -- more information than @Status@ because it includes states resulting from
    -- error and concurrency control parameters. @StatusDetails@ can show
    -- different results than Status. For more information about these
    -- statuses, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html Understanding command statuses>
    -- in the /Amazon Web Services Systems Manager User Guide/. StatusDetails
    -- can be one of the following values:
    --
    -- -   Pending: The command hasn\'t been sent to any instances.
    --
    -- -   In Progress: The command has been sent to at least one instance but
    --     hasn\'t reached a final state on all instances.
    --
    -- -   Success: The command successfully ran on all invocations. This is a
    --     terminal state.
    --
    -- -   Delivery Timed Out: The value of MaxErrors or more command
    --     invocations shows a status of Delivery Timed Out. This is a terminal
    --     state.
    --
    -- -   Execution Timed Out: The value of MaxErrors or more command
    --     invocations shows a status of Execution Timed Out. This is a
    --     terminal state.
    --
    -- -   Failed: The value of MaxErrors or more command invocations shows a
    --     status of Failed. This is a terminal state.
    --
    -- -   Incomplete: The command was attempted on all instances and one or
    --     more invocations doesn\'t have a value of Success but not enough
    --     invocations failed for the status to be Failed. This is a terminal
    --     state.
    --
    -- -   Canceled: The command was terminated before it was completed. This
    --     is a terminal state.
    --
    -- -   Rate Exceeded: The number of instances targeted by the command
    --     exceeded the account limit for pending invocations. The system has
    --     canceled the command before running it on any instance. This is a
    --     terminal state.
    Command -> Maybe Text
statusDetails :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of errors allowed before the system stops sending the
    -- command to additional targets. You can specify a number of errors, such
    -- as 10, or a percentage or errors, such as 10%. The default value is @0@.
    -- For more information about how to use @MaxErrors@, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    Command -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The instance IDs against which this command was requested.
    Command -> Maybe [Text]
instanceIds :: Prelude.Maybe [Prelude.Text],
    -- | (Deprecated) You can no longer specify this parameter. The system
    -- ignores it. Instead, Systems Manager automatically determines the Amazon
    -- Web Services Region of the S3 bucket.
    Command -> Maybe Text
outputS3Region :: Prelude.Maybe Prelude.Text,
    -- | An array of search criteria that targets instances using a Key,Value
    -- combination that you specify. Targets is required if you don\'t provide
    -- one or more instance IDs in the call.
    Command -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | A unique identifier for this command.
    Command -> Maybe Text
commandId :: Prelude.Maybe Prelude.Text,
    -- | The parameter values to be inserted in the document when running the
    -- command.
    Command -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The Systems Manager document (SSM document) version.
    Command -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The @TimeoutSeconds@ value specified for a command.
    Command -> Maybe Natural
timeoutSeconds :: Prelude.Maybe Prelude.Natural,
    -- | User-specified information about the command, such as a brief
    -- description of what the command should do.
    Command -> Maybe Text
comment :: Prelude.Maybe Prelude.Text,
    -- | The number of targets for which the command invocation reached a
    -- terminal state. Terminal states include the following: Success, Failed,
    -- Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or
    -- Undeliverable.
    Command -> Maybe Int
completedCount :: Prelude.Maybe Prelude.Int,
    -- | The S3 bucket where the responses to the command executions should be
    -- stored. This was requested when issuing the command.
    Command -> Maybe Text
outputS3BucketName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of instances that are allowed to run the command at
    -- the same time. You can specify a number of instances, such as 10, or a
    -- percentage of instances, such as 10%. The default value is 50. For more
    -- information about how to use @MaxConcurrency@, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    Command -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The date and time the command was requested.
    Command -> Maybe POSIX
requestedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The Identity and Access Management (IAM) service role that Run Command,
    -- a capability of Amazon Web Services Systems Manager, uses to act on your
    -- behalf when sending notifications about command status changes.
    Command -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text
  }
  deriving (Command -> Command -> Bool
(Command -> Command -> Bool)
-> (Command -> Command -> Bool) -> Eq Command
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Command -> Command -> Bool
$c/= :: Command -> Command -> Bool
== :: Command -> Command -> Bool
$c== :: Command -> Command -> Bool
Prelude.Eq, ReadPrec [Command]
ReadPrec Command
Int -> ReadS Command
ReadS [Command]
(Int -> ReadS Command)
-> ReadS [Command]
-> ReadPrec Command
-> ReadPrec [Command]
-> Read Command
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Command]
$creadListPrec :: ReadPrec [Command]
readPrec :: ReadPrec Command
$creadPrec :: ReadPrec Command
readList :: ReadS [Command]
$creadList :: ReadS [Command]
readsPrec :: Int -> ReadS Command
$creadsPrec :: Int -> ReadS Command
Prelude.Read, Int -> Command -> ShowS
[Command] -> ShowS
Command -> String
(Int -> Command -> ShowS)
-> (Command -> String) -> ([Command] -> ShowS) -> Show Command
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Command] -> ShowS
$cshowList :: [Command] -> ShowS
show :: Command -> String
$cshow :: Command -> String
showsPrec :: Int -> Command -> ShowS
$cshowsPrec :: Int -> Command -> ShowS
Prelude.Show, (forall x. Command -> Rep Command x)
-> (forall x. Rep Command x -> Command) -> Generic Command
forall x. Rep Command x -> Command
forall x. Command -> Rep Command x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Command x -> Command
$cfrom :: forall x. Command -> Rep Command x
Prelude.Generic)

-- |
-- Create a value of 'Command' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'command_status' - The status of the command.
--
-- 'expiresAfter', 'command_expiresAfter' - If this time is reached and the command hasn\'t already started running,
-- it won\'t run. Calculated based on the @ExpiresAfter@ user input
-- provided as part of the @SendCommand@ API operation.
--
-- 'notificationConfig', 'command_notificationConfig' - Configurations for sending notifications about command status changes.
--
-- 'targetCount', 'command_targetCount' - The number of targets for the command.
--
-- 'cloudWatchOutputConfig', 'command_cloudWatchOutputConfig' - Amazon CloudWatch Logs information where you want Amazon Web Services
-- Systems Manager to send the command output.
--
-- 'deliveryTimedOutCount', 'command_deliveryTimedOutCount' - The number of targets for which the status is Delivery Timed Out.
--
-- 'outputS3KeyPrefix', 'command_outputS3KeyPrefix' - The S3 directory path inside the bucket where the responses to the
-- command executions should be stored. This was requested when issuing the
-- command.
--
-- 'documentName', 'command_documentName' - The name of the document requested for execution.
--
-- 'errorCount', 'command_errorCount' - The number of targets for which the status is Failed or Execution Timed
-- Out.
--
-- 'statusDetails', 'command_statusDetails' - A detailed status of the command execution. @StatusDetails@ includes
-- more information than @Status@ because it includes states resulting from
-- error and concurrency control parameters. @StatusDetails@ can show
-- different results than Status. For more information about these
-- statuses, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html Understanding command statuses>
-- in the /Amazon Web Services Systems Manager User Guide/. StatusDetails
-- can be one of the following values:
--
-- -   Pending: The command hasn\'t been sent to any instances.
--
-- -   In Progress: The command has been sent to at least one instance but
--     hasn\'t reached a final state on all instances.
--
-- -   Success: The command successfully ran on all invocations. This is a
--     terminal state.
--
-- -   Delivery Timed Out: The value of MaxErrors or more command
--     invocations shows a status of Delivery Timed Out. This is a terminal
--     state.
--
-- -   Execution Timed Out: The value of MaxErrors or more command
--     invocations shows a status of Execution Timed Out. This is a
--     terminal state.
--
-- -   Failed: The value of MaxErrors or more command invocations shows a
--     status of Failed. This is a terminal state.
--
-- -   Incomplete: The command was attempted on all instances and one or
--     more invocations doesn\'t have a value of Success but not enough
--     invocations failed for the status to be Failed. This is a terminal
--     state.
--
-- -   Canceled: The command was terminated before it was completed. This
--     is a terminal state.
--
-- -   Rate Exceeded: The number of instances targeted by the command
--     exceeded the account limit for pending invocations. The system has
--     canceled the command before running it on any instance. This is a
--     terminal state.
--
-- 'maxErrors', 'command_maxErrors' - The maximum number of errors allowed before the system stops sending the
-- command to additional targets. You can specify a number of errors, such
-- as 10, or a percentage or errors, such as 10%. The default value is @0@.
-- For more information about how to use @MaxErrors@, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'instanceIds', 'command_instanceIds' - The instance IDs against which this command was requested.
--
-- 'outputS3Region', 'command_outputS3Region' - (Deprecated) You can no longer specify this parameter. The system
-- ignores it. Instead, Systems Manager automatically determines the Amazon
-- Web Services Region of the S3 bucket.
--
-- 'targets', 'command_targets' - An array of search criteria that targets instances using a Key,Value
-- combination that you specify. Targets is required if you don\'t provide
-- one or more instance IDs in the call.
--
-- 'commandId', 'command_commandId' - A unique identifier for this command.
--
-- 'parameters', 'command_parameters' - The parameter values to be inserted in the document when running the
-- command.
--
-- 'documentVersion', 'command_documentVersion' - The Systems Manager document (SSM document) version.
--
-- 'timeoutSeconds', 'command_timeoutSeconds' - The @TimeoutSeconds@ value specified for a command.
--
-- 'comment', 'command_comment' - User-specified information about the command, such as a brief
-- description of what the command should do.
--
-- 'completedCount', 'command_completedCount' - The number of targets for which the command invocation reached a
-- terminal state. Terminal states include the following: Success, Failed,
-- Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or
-- Undeliverable.
--
-- 'outputS3BucketName', 'command_outputS3BucketName' - The S3 bucket where the responses to the command executions should be
-- stored. This was requested when issuing the command.
--
-- 'maxConcurrency', 'command_maxConcurrency' - The maximum number of instances that are allowed to run the command at
-- the same time. You can specify a number of instances, such as 10, or a
-- percentage of instances, such as 10%. The default value is 50. For more
-- information about how to use @MaxConcurrency@, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'requestedDateTime', 'command_requestedDateTime' - The date and time the command was requested.
--
-- 'serviceRole', 'command_serviceRole' - The Identity and Access Management (IAM) service role that Run Command,
-- a capability of Amazon Web Services Systems Manager, uses to act on your
-- behalf when sending notifications about command status changes.
newCommand ::
  Command
newCommand :: Command
newCommand =
  Command' :: Maybe CommandStatus
-> Maybe POSIX
-> Maybe NotificationConfig
-> Maybe Int
-> Maybe CloudWatchOutputConfig
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Target]
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Command
Command'
    { $sel:status:Command' :: Maybe CommandStatus
status = Maybe CommandStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:expiresAfter:Command' :: Maybe POSIX
expiresAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationConfig:Command' :: Maybe NotificationConfig
notificationConfig = Maybe NotificationConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:targetCount:Command' :: Maybe Int
targetCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchOutputConfig:Command' :: Maybe CloudWatchOutputConfig
cloudWatchOutputConfig = Maybe CloudWatchOutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:deliveryTimedOutCount:Command' :: Maybe Int
deliveryTimedOutCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:outputS3KeyPrefix:Command' :: Maybe Text
outputS3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:documentName:Command' :: Maybe Text
documentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCount:Command' :: Maybe Int
errorCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:statusDetails:Command' :: Maybe Text
statusDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:Command' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceIds:Command' :: Maybe [Text]
instanceIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:outputS3Region:Command' :: Maybe Text
outputS3Region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:Command' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:commandId:Command' :: Maybe Text
commandId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:Command' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:Command' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutSeconds:Command' :: Maybe Natural
timeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:comment:Command' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:completedCount:Command' :: Maybe Int
completedCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:outputS3BucketName:Command' :: Maybe Text
outputS3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:Command' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestedDateTime:Command' :: Maybe POSIX
requestedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:Command' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the command.
command_status :: Lens.Lens' Command (Prelude.Maybe CommandStatus)
command_status :: (Maybe CommandStatus -> f (Maybe CommandStatus))
-> Command -> f Command
command_status = (Command -> Maybe CommandStatus)
-> (Command -> Maybe CommandStatus -> Command)
-> Lens Command Command (Maybe CommandStatus) (Maybe CommandStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe CommandStatus
status :: Maybe CommandStatus
$sel:status:Command' :: Command -> Maybe CommandStatus
status} -> Maybe CommandStatus
status) (\s :: Command
s@Command' {} Maybe CommandStatus
a -> Command
s {$sel:status:Command' :: Maybe CommandStatus
status = Maybe CommandStatus
a} :: Command)

-- | If this time is reached and the command hasn\'t already started running,
-- it won\'t run. Calculated based on the @ExpiresAfter@ user input
-- provided as part of the @SendCommand@ API operation.
command_expiresAfter :: Lens.Lens' Command (Prelude.Maybe Prelude.UTCTime)
command_expiresAfter :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Command -> f Command
command_expiresAfter = (Command -> Maybe POSIX)
-> (Command -> Maybe POSIX -> Command)
-> Lens Command Command (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe POSIX
expiresAfter :: Maybe POSIX
$sel:expiresAfter:Command' :: Command -> Maybe POSIX
expiresAfter} -> Maybe POSIX
expiresAfter) (\s :: Command
s@Command' {} Maybe POSIX
a -> Command
s {$sel:expiresAfter:Command' :: Maybe POSIX
expiresAfter = Maybe POSIX
a} :: Command) ((Maybe POSIX -> f (Maybe POSIX)) -> Command -> f Command)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Command
-> f Command
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Configurations for sending notifications about command status changes.
command_notificationConfig :: Lens.Lens' Command (Prelude.Maybe NotificationConfig)
command_notificationConfig :: (Maybe NotificationConfig -> f (Maybe NotificationConfig))
-> Command -> f Command
command_notificationConfig = (Command -> Maybe NotificationConfig)
-> (Command -> Maybe NotificationConfig -> Command)
-> Lens
     Command
     Command
     (Maybe NotificationConfig)
     (Maybe NotificationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe NotificationConfig
notificationConfig :: Maybe NotificationConfig
$sel:notificationConfig:Command' :: Command -> Maybe NotificationConfig
notificationConfig} -> Maybe NotificationConfig
notificationConfig) (\s :: Command
s@Command' {} Maybe NotificationConfig
a -> Command
s {$sel:notificationConfig:Command' :: Maybe NotificationConfig
notificationConfig = Maybe NotificationConfig
a} :: Command)

-- | The number of targets for the command.
command_targetCount :: Lens.Lens' Command (Prelude.Maybe Prelude.Int)
command_targetCount :: (Maybe Int -> f (Maybe Int)) -> Command -> f Command
command_targetCount = (Command -> Maybe Int)
-> (Command -> Maybe Int -> Command)
-> Lens Command Command (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Int
targetCount :: Maybe Int
$sel:targetCount:Command' :: Command -> Maybe Int
targetCount} -> Maybe Int
targetCount) (\s :: Command
s@Command' {} Maybe Int
a -> Command
s {$sel:targetCount:Command' :: Maybe Int
targetCount = Maybe Int
a} :: Command)

-- | Amazon CloudWatch Logs information where you want Amazon Web Services
-- Systems Manager to send the command output.
command_cloudWatchOutputConfig :: Lens.Lens' Command (Prelude.Maybe CloudWatchOutputConfig)
command_cloudWatchOutputConfig :: (Maybe CloudWatchOutputConfig -> f (Maybe CloudWatchOutputConfig))
-> Command -> f Command
command_cloudWatchOutputConfig = (Command -> Maybe CloudWatchOutputConfig)
-> (Command -> Maybe CloudWatchOutputConfig -> Command)
-> Lens
     Command
     Command
     (Maybe CloudWatchOutputConfig)
     (Maybe CloudWatchOutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe CloudWatchOutputConfig
cloudWatchOutputConfig :: Maybe CloudWatchOutputConfig
$sel:cloudWatchOutputConfig:Command' :: Command -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig} -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig) (\s :: Command
s@Command' {} Maybe CloudWatchOutputConfig
a -> Command
s {$sel:cloudWatchOutputConfig:Command' :: Maybe CloudWatchOutputConfig
cloudWatchOutputConfig = Maybe CloudWatchOutputConfig
a} :: Command)

-- | The number of targets for which the status is Delivery Timed Out.
command_deliveryTimedOutCount :: Lens.Lens' Command (Prelude.Maybe Prelude.Int)
command_deliveryTimedOutCount :: (Maybe Int -> f (Maybe Int)) -> Command -> f Command
command_deliveryTimedOutCount = (Command -> Maybe Int)
-> (Command -> Maybe Int -> Command)
-> Lens Command Command (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Int
deliveryTimedOutCount :: Maybe Int
$sel:deliveryTimedOutCount:Command' :: Command -> Maybe Int
deliveryTimedOutCount} -> Maybe Int
deliveryTimedOutCount) (\s :: Command
s@Command' {} Maybe Int
a -> Command
s {$sel:deliveryTimedOutCount:Command' :: Maybe Int
deliveryTimedOutCount = Maybe Int
a} :: Command)

-- | The S3 directory path inside the bucket where the responses to the
-- command executions should be stored. This was requested when issuing the
-- command.
command_outputS3KeyPrefix :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_outputS3KeyPrefix :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_outputS3KeyPrefix = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
outputS3KeyPrefix :: Maybe Text
$sel:outputS3KeyPrefix:Command' :: Command -> Maybe Text
outputS3KeyPrefix} -> Maybe Text
outputS3KeyPrefix) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:outputS3KeyPrefix:Command' :: Maybe Text
outputS3KeyPrefix = Maybe Text
a} :: Command)

-- | The name of the document requested for execution.
command_documentName :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_documentName :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_documentName = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
documentName :: Maybe Text
$sel:documentName:Command' :: Command -> Maybe Text
documentName} -> Maybe Text
documentName) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:documentName:Command' :: Maybe Text
documentName = Maybe Text
a} :: Command)

-- | The number of targets for which the status is Failed or Execution Timed
-- Out.
command_errorCount :: Lens.Lens' Command (Prelude.Maybe Prelude.Int)
command_errorCount :: (Maybe Int -> f (Maybe Int)) -> Command -> f Command
command_errorCount = (Command -> Maybe Int)
-> (Command -> Maybe Int -> Command)
-> Lens Command Command (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Int
errorCount :: Maybe Int
$sel:errorCount:Command' :: Command -> Maybe Int
errorCount} -> Maybe Int
errorCount) (\s :: Command
s@Command' {} Maybe Int
a -> Command
s {$sel:errorCount:Command' :: Maybe Int
errorCount = Maybe Int
a} :: Command)

-- | A detailed status of the command execution. @StatusDetails@ includes
-- more information than @Status@ because it includes states resulting from
-- error and concurrency control parameters. @StatusDetails@ can show
-- different results than Status. For more information about these
-- statuses, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html Understanding command statuses>
-- in the /Amazon Web Services Systems Manager User Guide/. StatusDetails
-- can be one of the following values:
--
-- -   Pending: The command hasn\'t been sent to any instances.
--
-- -   In Progress: The command has been sent to at least one instance but
--     hasn\'t reached a final state on all instances.
--
-- -   Success: The command successfully ran on all invocations. This is a
--     terminal state.
--
-- -   Delivery Timed Out: The value of MaxErrors or more command
--     invocations shows a status of Delivery Timed Out. This is a terminal
--     state.
--
-- -   Execution Timed Out: The value of MaxErrors or more command
--     invocations shows a status of Execution Timed Out. This is a
--     terminal state.
--
-- -   Failed: The value of MaxErrors or more command invocations shows a
--     status of Failed. This is a terminal state.
--
-- -   Incomplete: The command was attempted on all instances and one or
--     more invocations doesn\'t have a value of Success but not enough
--     invocations failed for the status to be Failed. This is a terminal
--     state.
--
-- -   Canceled: The command was terminated before it was completed. This
--     is a terminal state.
--
-- -   Rate Exceeded: The number of instances targeted by the command
--     exceeded the account limit for pending invocations. The system has
--     canceled the command before running it on any instance. This is a
--     terminal state.
command_statusDetails :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_statusDetails :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_statusDetails = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
statusDetails :: Maybe Text
$sel:statusDetails:Command' :: Command -> Maybe Text
statusDetails} -> Maybe Text
statusDetails) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:statusDetails:Command' :: Maybe Text
statusDetails = Maybe Text
a} :: Command)

-- | The maximum number of errors allowed before the system stops sending the
-- command to additional targets. You can specify a number of errors, such
-- as 10, or a percentage or errors, such as 10%. The default value is @0@.
-- For more information about how to use @MaxErrors@, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
-- in the /Amazon Web Services Systems Manager User Guide/.
command_maxErrors :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_maxErrors :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_maxErrors = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:Command' :: Command -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:maxErrors:Command' :: Maybe Text
maxErrors = Maybe Text
a} :: Command)

-- | The instance IDs against which this command was requested.
command_instanceIds :: Lens.Lens' Command (Prelude.Maybe [Prelude.Text])
command_instanceIds :: (Maybe [Text] -> f (Maybe [Text])) -> Command -> f Command
command_instanceIds = (Command -> Maybe [Text])
-> (Command -> Maybe [Text] -> Command)
-> Lens Command Command (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe [Text]
instanceIds :: Maybe [Text]
$sel:instanceIds:Command' :: Command -> Maybe [Text]
instanceIds} -> Maybe [Text]
instanceIds) (\s :: Command
s@Command' {} Maybe [Text]
a -> Command
s {$sel:instanceIds:Command' :: Maybe [Text]
instanceIds = Maybe [Text]
a} :: Command) ((Maybe [Text] -> f (Maybe [Text])) -> Command -> f Command)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Command
-> f Command
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | (Deprecated) You can no longer specify this parameter. The system
-- ignores it. Instead, Systems Manager automatically determines the Amazon
-- Web Services Region of the S3 bucket.
command_outputS3Region :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_outputS3Region :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_outputS3Region = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
outputS3Region :: Maybe Text
$sel:outputS3Region:Command' :: Command -> Maybe Text
outputS3Region} -> Maybe Text
outputS3Region) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:outputS3Region:Command' :: Maybe Text
outputS3Region = Maybe Text
a} :: Command)

-- | An array of search criteria that targets instances using a Key,Value
-- combination that you specify. Targets is required if you don\'t provide
-- one or more instance IDs in the call.
command_targets :: Lens.Lens' Command (Prelude.Maybe [Target])
command_targets :: (Maybe [Target] -> f (Maybe [Target])) -> Command -> f Command
command_targets = (Command -> Maybe [Target])
-> (Command -> Maybe [Target] -> Command)
-> Lens Command Command (Maybe [Target]) (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:Command' :: Command -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: Command
s@Command' {} Maybe [Target]
a -> Command
s {$sel:targets:Command' :: Maybe [Target]
targets = Maybe [Target]
a} :: Command) ((Maybe [Target] -> f (Maybe [Target])) -> Command -> f Command)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> Command
-> f Command
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
     (Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
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 [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for this command.
command_commandId :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_commandId :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_commandId = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
commandId :: Maybe Text
$sel:commandId:Command' :: Command -> Maybe Text
commandId} -> Maybe Text
commandId) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:commandId:Command' :: Maybe Text
commandId = Maybe Text
a} :: Command)

-- | The parameter values to be inserted in the document when running the
-- command.
command_parameters :: Lens.Lens' Command (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
command_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> Command -> f Command
command_parameters = (Command -> Maybe (HashMap Text [Text]))
-> (Command -> Maybe (HashMap Text [Text]) -> Command)
-> Lens
     Command
     Command
     (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 (\Command' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:Command' :: Command -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: Command
s@Command' {} Maybe (HashMap Text [Text])
a -> Command
s {$sel:parameters:Command' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: Command) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> Command -> f Command)
-> ((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])))
-> Command
-> f Command
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

-- | The Systems Manager document (SSM document) version.
command_documentVersion :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_documentVersion :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_documentVersion = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:Command' :: Command -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:documentVersion:Command' :: Maybe Text
documentVersion = Maybe Text
a} :: Command)

-- | The @TimeoutSeconds@ value specified for a command.
command_timeoutSeconds :: Lens.Lens' Command (Prelude.Maybe Prelude.Natural)
command_timeoutSeconds :: (Maybe Natural -> f (Maybe Natural)) -> Command -> f Command
command_timeoutSeconds = (Command -> Maybe Natural)
-> (Command -> Maybe Natural -> Command)
-> Lens Command Command (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Natural
timeoutSeconds :: Maybe Natural
$sel:timeoutSeconds:Command' :: Command -> Maybe Natural
timeoutSeconds} -> Maybe Natural
timeoutSeconds) (\s :: Command
s@Command' {} Maybe Natural
a -> Command
s {$sel:timeoutSeconds:Command' :: Maybe Natural
timeoutSeconds = Maybe Natural
a} :: Command)

-- | User-specified information about the command, such as a brief
-- description of what the command should do.
command_comment :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_comment :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_comment = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
comment :: Maybe Text
$sel:comment:Command' :: Command -> Maybe Text
comment} -> Maybe Text
comment) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:comment:Command' :: Maybe Text
comment = Maybe Text
a} :: Command)

-- | The number of targets for which the command invocation reached a
-- terminal state. Terminal states include the following: Success, Failed,
-- Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or
-- Undeliverable.
command_completedCount :: Lens.Lens' Command (Prelude.Maybe Prelude.Int)
command_completedCount :: (Maybe Int -> f (Maybe Int)) -> Command -> f Command
command_completedCount = (Command -> Maybe Int)
-> (Command -> Maybe Int -> Command)
-> Lens Command Command (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Int
completedCount :: Maybe Int
$sel:completedCount:Command' :: Command -> Maybe Int
completedCount} -> Maybe Int
completedCount) (\s :: Command
s@Command' {} Maybe Int
a -> Command
s {$sel:completedCount:Command' :: Maybe Int
completedCount = Maybe Int
a} :: Command)

-- | The S3 bucket where the responses to the command executions should be
-- stored. This was requested when issuing the command.
command_outputS3BucketName :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_outputS3BucketName :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_outputS3BucketName = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
outputS3BucketName :: Maybe Text
$sel:outputS3BucketName:Command' :: Command -> Maybe Text
outputS3BucketName} -> Maybe Text
outputS3BucketName) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:outputS3BucketName:Command' :: Maybe Text
outputS3BucketName = Maybe Text
a} :: Command)

-- | The maximum number of instances that are allowed to run the command at
-- the same time. You can specify a number of instances, such as 10, or a
-- percentage of instances, such as 10%. The default value is 50. For more
-- information about how to use @MaxConcurrency@, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html Running commands using Systems Manager Run Command>
-- in the /Amazon Web Services Systems Manager User Guide/.
command_maxConcurrency :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_maxConcurrency :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_maxConcurrency = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:Command' :: Command -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:maxConcurrency:Command' :: Maybe Text
maxConcurrency = Maybe Text
a} :: Command)

-- | The date and time the command was requested.
command_requestedDateTime :: Lens.Lens' Command (Prelude.Maybe Prelude.UTCTime)
command_requestedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Command -> f Command
command_requestedDateTime = (Command -> Maybe POSIX)
-> (Command -> Maybe POSIX -> Command)
-> Lens Command Command (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe POSIX
requestedDateTime :: Maybe POSIX
$sel:requestedDateTime:Command' :: Command -> Maybe POSIX
requestedDateTime} -> Maybe POSIX
requestedDateTime) (\s :: Command
s@Command' {} Maybe POSIX
a -> Command
s {$sel:requestedDateTime:Command' :: Maybe POSIX
requestedDateTime = Maybe POSIX
a} :: Command) ((Maybe POSIX -> f (Maybe POSIX)) -> Command -> f Command)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Command
-> f Command
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Identity and Access Management (IAM) service role that Run Command,
-- a capability of Amazon Web Services Systems Manager, uses to act on your
-- behalf when sending notifications about command status changes.
command_serviceRole :: Lens.Lens' Command (Prelude.Maybe Prelude.Text)
command_serviceRole :: (Maybe Text -> f (Maybe Text)) -> Command -> f Command
command_serviceRole = (Command -> Maybe Text)
-> (Command -> Maybe Text -> Command)
-> Lens Command Command (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Command' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:Command' :: Command -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: Command
s@Command' {} Maybe Text
a -> Command
s {$sel:serviceRole:Command' :: Maybe Text
serviceRole = Maybe Text
a} :: Command)

instance Core.FromJSON Command where
  parseJSON :: Value -> Parser Command
parseJSON =
    String -> (Object -> Parser Command) -> Value -> Parser Command
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Command"
      ( \Object
x ->
          Maybe CommandStatus
-> Maybe POSIX
-> Maybe NotificationConfig
-> Maybe Int
-> Maybe CloudWatchOutputConfig
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Target]
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Command
Command'
            (Maybe CommandStatus
 -> Maybe POSIX
 -> Maybe NotificationConfig
 -> Maybe Int
 -> Maybe CloudWatchOutputConfig
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe Text
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Command)
-> Parser (Maybe CommandStatus)
-> Parser
     (Maybe POSIX
      -> Maybe NotificationConfig
      -> Maybe Int
      -> Maybe CloudWatchOutputConfig
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CommandStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe POSIX
   -> Maybe NotificationConfig
   -> Maybe Int
   -> Maybe CloudWatchOutputConfig
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe NotificationConfig
      -> Maybe Int
      -> Maybe CloudWatchOutputConfig
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpiresAfter")
            Parser
  (Maybe NotificationConfig
   -> Maybe Int
   -> Maybe CloudWatchOutputConfig
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe NotificationConfig)
-> Parser
     (Maybe Int
      -> Maybe CloudWatchOutputConfig
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotificationConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotificationConfig")
            Parser
  (Maybe Int
   -> Maybe CloudWatchOutputConfig
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Int)
-> Parser
     (Maybe CloudWatchOutputConfig
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetCount")
            Parser
  (Maybe CloudWatchOutputConfig
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe CloudWatchOutputConfig)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchOutputConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchOutputConfig")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeliveryTimedOutCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputS3KeyPrefix")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentName")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusDetails")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxErrors")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Target]
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputS3Region")
            Parser
  (Maybe [Target]
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe [Target])
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets" Parser (Maybe (Maybe [Target]))
-> Maybe [Target] -> Parser (Maybe [Target])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CommandId")
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentVersion")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeoutSeconds")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Comment")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Command)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe POSIX -> Maybe Text -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletedCount")
            Parser
  (Maybe Text -> Maybe Text -> Maybe POSIX -> Maybe Text -> Command)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> Maybe Text -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputS3BucketName")
            Parser (Maybe Text -> Maybe POSIX -> Maybe Text -> Command)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxConcurrency")
            Parser (Maybe POSIX -> Maybe Text -> Command)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> Command)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestedDateTime")
            Parser (Maybe Text -> Command)
-> Parser (Maybe Text) -> Parser Command
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceRole")
      )

instance Prelude.Hashable Command

instance Prelude.NFData Command