{-# 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.RobOMaker.Types.SimulationJobRequest
-- 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.RobOMaker.Types.SimulationJobRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.Compute
import Amazonka.RobOMaker.Types.DataSourceConfig
import Amazonka.RobOMaker.Types.FailureBehavior
import Amazonka.RobOMaker.Types.LoggingConfig
import Amazonka.RobOMaker.Types.OutputLocation
import Amazonka.RobOMaker.Types.RobotApplicationConfig
import Amazonka.RobOMaker.Types.SimulationApplicationConfig
import Amazonka.RobOMaker.Types.VPCConfig

-- | Information about a simulation job request.
--
-- /See:/ 'newSimulationJobRequest' smart constructor.
data SimulationJobRequest = SimulationJobRequest'
  { -- | The failure behavior the simulation job.
    --
    -- [Continue]
    --     Leaves the host running for its maximum timeout duration after a
    --     @4XX@ error code.
    --
    -- [Fail]
    --     Stop the simulation job and terminate the instance.
    SimulationJobRequest -> Maybe FailureBehavior
failureBehavior :: Prelude.Maybe FailureBehavior,
    -- | The robot applications to use in the simulation job.
    SimulationJobRequest -> Maybe (NonEmpty RobotApplicationConfig)
robotApplications :: Prelude.Maybe (Prelude.NonEmpty RobotApplicationConfig),
    -- | Compute information for the simulation job
    SimulationJobRequest -> Maybe Compute
compute :: Prelude.Maybe Compute,
    -- | Specify data sources to mount read-only files from S3 into your
    -- simulation. These files are available under
    -- @\/opt\/robomaker\/datasources\/data_source_name@.
    --
    -- There is a limit of 100 files and a combined size of 25GB for all
    -- @DataSourceConfig@ objects.
    SimulationJobRequest -> Maybe (NonEmpty DataSourceConfig)
dataSources :: Prelude.Maybe (Prelude.NonEmpty DataSourceConfig),
    -- | A Boolean indicating whether to use default applications in the
    -- simulation job. Default applications include Gazebo, rqt, rviz and
    -- terminal access.
    SimulationJobRequest -> Maybe Bool
useDefaultApplications :: Prelude.Maybe Prelude.Bool,
    SimulationJobRequest -> Maybe VPCConfig
vpcConfig :: Prelude.Maybe VPCConfig,
    SimulationJobRequest -> Maybe OutputLocation
outputLocation :: Prelude.Maybe OutputLocation,
    -- | The simulation applications to use in the simulation job.
    SimulationJobRequest
-> Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications :: Prelude.Maybe (Prelude.NonEmpty SimulationApplicationConfig),
    SimulationJobRequest -> Maybe LoggingConfig
loggingConfig :: Prelude.Maybe LoggingConfig,
    -- | The IAM role name that allows the simulation instance to call the AWS
    -- APIs that are specified in its associated policies on your behalf. This
    -- is how credentials are passed in to your simulation job.
    SimulationJobRequest -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- simulation job request.
    SimulationJobRequest -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The maximum simulation job duration in seconds. The value must be 8 days
    -- (691,200 seconds) or less.
    SimulationJobRequest -> Integer
maxJobDurationInSeconds :: Prelude.Integer
  }
  deriving (SimulationJobRequest -> SimulationJobRequest -> Bool
(SimulationJobRequest -> SimulationJobRequest -> Bool)
-> (SimulationJobRequest -> SimulationJobRequest -> Bool)
-> Eq SimulationJobRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimulationJobRequest -> SimulationJobRequest -> Bool
$c/= :: SimulationJobRequest -> SimulationJobRequest -> Bool
== :: SimulationJobRequest -> SimulationJobRequest -> Bool
$c== :: SimulationJobRequest -> SimulationJobRequest -> Bool
Prelude.Eq, ReadPrec [SimulationJobRequest]
ReadPrec SimulationJobRequest
Int -> ReadS SimulationJobRequest
ReadS [SimulationJobRequest]
(Int -> ReadS SimulationJobRequest)
-> ReadS [SimulationJobRequest]
-> ReadPrec SimulationJobRequest
-> ReadPrec [SimulationJobRequest]
-> Read SimulationJobRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SimulationJobRequest]
$creadListPrec :: ReadPrec [SimulationJobRequest]
readPrec :: ReadPrec SimulationJobRequest
$creadPrec :: ReadPrec SimulationJobRequest
readList :: ReadS [SimulationJobRequest]
$creadList :: ReadS [SimulationJobRequest]
readsPrec :: Int -> ReadS SimulationJobRequest
$creadsPrec :: Int -> ReadS SimulationJobRequest
Prelude.Read, Int -> SimulationJobRequest -> ShowS
[SimulationJobRequest] -> ShowS
SimulationJobRequest -> String
(Int -> SimulationJobRequest -> ShowS)
-> (SimulationJobRequest -> String)
-> ([SimulationJobRequest] -> ShowS)
-> Show SimulationJobRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimulationJobRequest] -> ShowS
$cshowList :: [SimulationJobRequest] -> ShowS
show :: SimulationJobRequest -> String
$cshow :: SimulationJobRequest -> String
showsPrec :: Int -> SimulationJobRequest -> ShowS
$cshowsPrec :: Int -> SimulationJobRequest -> ShowS
Prelude.Show, (forall x. SimulationJobRequest -> Rep SimulationJobRequest x)
-> (forall x. Rep SimulationJobRequest x -> SimulationJobRequest)
-> Generic SimulationJobRequest
forall x. Rep SimulationJobRequest x -> SimulationJobRequest
forall x. SimulationJobRequest -> Rep SimulationJobRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimulationJobRequest x -> SimulationJobRequest
$cfrom :: forall x. SimulationJobRequest -> Rep SimulationJobRequest x
Prelude.Generic)

-- |
-- Create a value of 'SimulationJobRequest' 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:
--
-- 'failureBehavior', 'simulationJobRequest_failureBehavior' - The failure behavior the simulation job.
--
-- [Continue]
--     Leaves the host running for its maximum timeout duration after a
--     @4XX@ error code.
--
-- [Fail]
--     Stop the simulation job and terminate the instance.
--
-- 'robotApplications', 'simulationJobRequest_robotApplications' - The robot applications to use in the simulation job.
--
-- 'compute', 'simulationJobRequest_compute' - Compute information for the simulation job
--
-- 'dataSources', 'simulationJobRequest_dataSources' - Specify data sources to mount read-only files from S3 into your
-- simulation. These files are available under
-- @\/opt\/robomaker\/datasources\/data_source_name@.
--
-- There is a limit of 100 files and a combined size of 25GB for all
-- @DataSourceConfig@ objects.
--
-- 'useDefaultApplications', 'simulationJobRequest_useDefaultApplications' - A Boolean indicating whether to use default applications in the
-- simulation job. Default applications include Gazebo, rqt, rviz and
-- terminal access.
--
-- 'vpcConfig', 'simulationJobRequest_vpcConfig' - Undocumented member.
--
-- 'outputLocation', 'simulationJobRequest_outputLocation' - Undocumented member.
--
-- 'simulationApplications', 'simulationJobRequest_simulationApplications' - The simulation applications to use in the simulation job.
--
-- 'loggingConfig', 'simulationJobRequest_loggingConfig' - Undocumented member.
--
-- 'iamRole', 'simulationJobRequest_iamRole' - The IAM role name that allows the simulation instance to call the AWS
-- APIs that are specified in its associated policies on your behalf. This
-- is how credentials are passed in to your simulation job.
--
-- 'tags', 'simulationJobRequest_tags' - A map that contains tag keys and tag values that are attached to the
-- simulation job request.
--
-- 'maxJobDurationInSeconds', 'simulationJobRequest_maxJobDurationInSeconds' - The maximum simulation job duration in seconds. The value must be 8 days
-- (691,200 seconds) or less.
newSimulationJobRequest ::
  -- | 'maxJobDurationInSeconds'
  Prelude.Integer ->
  SimulationJobRequest
newSimulationJobRequest :: Integer -> SimulationJobRequest
newSimulationJobRequest Integer
pMaxJobDurationInSeconds_ =
  SimulationJobRequest' :: Maybe FailureBehavior
-> Maybe (NonEmpty RobotApplicationConfig)
-> Maybe Compute
-> Maybe (NonEmpty DataSourceConfig)
-> Maybe Bool
-> Maybe VPCConfig
-> Maybe OutputLocation
-> Maybe (NonEmpty SimulationApplicationConfig)
-> Maybe LoggingConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Integer
-> SimulationJobRequest
SimulationJobRequest'
    { $sel:failureBehavior:SimulationJobRequest' :: Maybe FailureBehavior
failureBehavior =
        Maybe FailureBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:robotApplications:SimulationJobRequest' :: Maybe (NonEmpty RobotApplicationConfig)
robotApplications = Maybe (NonEmpty RobotApplicationConfig)
forall a. Maybe a
Prelude.Nothing,
      $sel:compute:SimulationJobRequest' :: Maybe Compute
compute = Maybe Compute
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSources:SimulationJobRequest' :: Maybe (NonEmpty DataSourceConfig)
dataSources = Maybe (NonEmpty DataSourceConfig)
forall a. Maybe a
Prelude.Nothing,
      $sel:useDefaultApplications:SimulationJobRequest' :: Maybe Bool
useDefaultApplications = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:SimulationJobRequest' :: Maybe VPCConfig
vpcConfig = Maybe VPCConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:SimulationJobRequest' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:simulationApplications:SimulationJobRequest' :: Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications = Maybe (NonEmpty SimulationApplicationConfig)
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingConfig:SimulationJobRequest' :: Maybe LoggingConfig
loggingConfig = Maybe LoggingConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:SimulationJobRequest' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:SimulationJobRequest' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxJobDurationInSeconds:SimulationJobRequest' :: Integer
maxJobDurationInSeconds = Integer
pMaxJobDurationInSeconds_
    }

-- | The failure behavior the simulation job.
--
-- [Continue]
--     Leaves the host running for its maximum timeout duration after a
--     @4XX@ error code.
--
-- [Fail]
--     Stop the simulation job and terminate the instance.
simulationJobRequest_failureBehavior :: Lens.Lens' SimulationJobRequest (Prelude.Maybe FailureBehavior)
simulationJobRequest_failureBehavior :: (Maybe FailureBehavior -> f (Maybe FailureBehavior))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_failureBehavior = (SimulationJobRequest -> Maybe FailureBehavior)
-> (SimulationJobRequest
    -> Maybe FailureBehavior -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe FailureBehavior)
     (Maybe FailureBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe FailureBehavior
failureBehavior :: Maybe FailureBehavior
$sel:failureBehavior:SimulationJobRequest' :: SimulationJobRequest -> Maybe FailureBehavior
failureBehavior} -> Maybe FailureBehavior
failureBehavior) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe FailureBehavior
a -> SimulationJobRequest
s {$sel:failureBehavior:SimulationJobRequest' :: Maybe FailureBehavior
failureBehavior = Maybe FailureBehavior
a} :: SimulationJobRequest)

-- | The robot applications to use in the simulation job.
simulationJobRequest_robotApplications :: Lens.Lens' SimulationJobRequest (Prelude.Maybe (Prelude.NonEmpty RobotApplicationConfig))
simulationJobRequest_robotApplications :: (Maybe (NonEmpty RobotApplicationConfig)
 -> f (Maybe (NonEmpty RobotApplicationConfig)))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_robotApplications = (SimulationJobRequest -> Maybe (NonEmpty RobotApplicationConfig))
-> (SimulationJobRequest
    -> Maybe (NonEmpty RobotApplicationConfig) -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe (NonEmpty RobotApplicationConfig))
     (Maybe (NonEmpty RobotApplicationConfig))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe (NonEmpty RobotApplicationConfig)
robotApplications :: Maybe (NonEmpty RobotApplicationConfig)
$sel:robotApplications:SimulationJobRequest' :: SimulationJobRequest -> Maybe (NonEmpty RobotApplicationConfig)
robotApplications} -> Maybe (NonEmpty RobotApplicationConfig)
robotApplications) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe (NonEmpty RobotApplicationConfig)
a -> SimulationJobRequest
s {$sel:robotApplications:SimulationJobRequest' :: Maybe (NonEmpty RobotApplicationConfig)
robotApplications = Maybe (NonEmpty RobotApplicationConfig)
a} :: SimulationJobRequest) ((Maybe (NonEmpty RobotApplicationConfig)
  -> f (Maybe (NonEmpty RobotApplicationConfig)))
 -> SimulationJobRequest -> f SimulationJobRequest)
-> ((Maybe (NonEmpty RobotApplicationConfig)
     -> f (Maybe (NonEmpty RobotApplicationConfig)))
    -> Maybe (NonEmpty RobotApplicationConfig)
    -> f (Maybe (NonEmpty RobotApplicationConfig)))
-> (Maybe (NonEmpty RobotApplicationConfig)
    -> f (Maybe (NonEmpty RobotApplicationConfig)))
-> SimulationJobRequest
-> f SimulationJobRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
-> Iso
     (Maybe (NonEmpty RobotApplicationConfig))
     (Maybe (NonEmpty RobotApplicationConfig))
     (Maybe (NonEmpty RobotApplicationConfig))
     (Maybe (NonEmpty RobotApplicationConfig))
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 RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
  (NonEmpty RobotApplicationConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Compute information for the simulation job
simulationJobRequest_compute :: Lens.Lens' SimulationJobRequest (Prelude.Maybe Compute)
simulationJobRequest_compute :: (Maybe Compute -> f (Maybe Compute))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_compute = (SimulationJobRequest -> Maybe Compute)
-> (SimulationJobRequest -> Maybe Compute -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe Compute)
     (Maybe Compute)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe Compute
compute :: Maybe Compute
$sel:compute:SimulationJobRequest' :: SimulationJobRequest -> Maybe Compute
compute} -> Maybe Compute
compute) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe Compute
a -> SimulationJobRequest
s {$sel:compute:SimulationJobRequest' :: Maybe Compute
compute = Maybe Compute
a} :: SimulationJobRequest)

-- | Specify data sources to mount read-only files from S3 into your
-- simulation. These files are available under
-- @\/opt\/robomaker\/datasources\/data_source_name@.
--
-- There is a limit of 100 files and a combined size of 25GB for all
-- @DataSourceConfig@ objects.
simulationJobRequest_dataSources :: Lens.Lens' SimulationJobRequest (Prelude.Maybe (Prelude.NonEmpty DataSourceConfig))
simulationJobRequest_dataSources :: (Maybe (NonEmpty DataSourceConfig)
 -> f (Maybe (NonEmpty DataSourceConfig)))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_dataSources = (SimulationJobRequest -> Maybe (NonEmpty DataSourceConfig))
-> (SimulationJobRequest
    -> Maybe (NonEmpty DataSourceConfig) -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe (NonEmpty DataSourceConfig))
     (Maybe (NonEmpty DataSourceConfig))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe (NonEmpty DataSourceConfig)
dataSources :: Maybe (NonEmpty DataSourceConfig)
$sel:dataSources:SimulationJobRequest' :: SimulationJobRequest -> Maybe (NonEmpty DataSourceConfig)
dataSources} -> Maybe (NonEmpty DataSourceConfig)
dataSources) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe (NonEmpty DataSourceConfig)
a -> SimulationJobRequest
s {$sel:dataSources:SimulationJobRequest' :: Maybe (NonEmpty DataSourceConfig)
dataSources = Maybe (NonEmpty DataSourceConfig)
a} :: SimulationJobRequest) ((Maybe (NonEmpty DataSourceConfig)
  -> f (Maybe (NonEmpty DataSourceConfig)))
 -> SimulationJobRequest -> f SimulationJobRequest)
-> ((Maybe (NonEmpty DataSourceConfig)
     -> f (Maybe (NonEmpty DataSourceConfig)))
    -> Maybe (NonEmpty DataSourceConfig)
    -> f (Maybe (NonEmpty DataSourceConfig)))
-> (Maybe (NonEmpty DataSourceConfig)
    -> f (Maybe (NonEmpty DataSourceConfig)))
-> SimulationJobRequest
-> f SimulationJobRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DataSourceConfig)
  (NonEmpty DataSourceConfig)
  (NonEmpty DataSourceConfig)
  (NonEmpty DataSourceConfig)
-> Iso
     (Maybe (NonEmpty DataSourceConfig))
     (Maybe (NonEmpty DataSourceConfig))
     (Maybe (NonEmpty DataSourceConfig))
     (Maybe (NonEmpty DataSourceConfig))
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 DataSourceConfig)
  (NonEmpty DataSourceConfig)
  (NonEmpty DataSourceConfig)
  (NonEmpty DataSourceConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A Boolean indicating whether to use default applications in the
-- simulation job. Default applications include Gazebo, rqt, rviz and
-- terminal access.
simulationJobRequest_useDefaultApplications :: Lens.Lens' SimulationJobRequest (Prelude.Maybe Prelude.Bool)
simulationJobRequest_useDefaultApplications :: (Maybe Bool -> f (Maybe Bool))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_useDefaultApplications = (SimulationJobRequest -> Maybe Bool)
-> (SimulationJobRequest -> Maybe Bool -> SimulationJobRequest)
-> Lens
     SimulationJobRequest SimulationJobRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe Bool
useDefaultApplications :: Maybe Bool
$sel:useDefaultApplications:SimulationJobRequest' :: SimulationJobRequest -> Maybe Bool
useDefaultApplications} -> Maybe Bool
useDefaultApplications) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe Bool
a -> SimulationJobRequest
s {$sel:useDefaultApplications:SimulationJobRequest' :: Maybe Bool
useDefaultApplications = Maybe Bool
a} :: SimulationJobRequest)

-- | Undocumented member.
simulationJobRequest_vpcConfig :: Lens.Lens' SimulationJobRequest (Prelude.Maybe VPCConfig)
simulationJobRequest_vpcConfig :: (Maybe VPCConfig -> f (Maybe VPCConfig))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_vpcConfig = (SimulationJobRequest -> Maybe VPCConfig)
-> (SimulationJobRequest
    -> Maybe VPCConfig -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe VPCConfig)
     (Maybe VPCConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe VPCConfig
vpcConfig :: Maybe VPCConfig
$sel:vpcConfig:SimulationJobRequest' :: SimulationJobRequest -> Maybe VPCConfig
vpcConfig} -> Maybe VPCConfig
vpcConfig) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe VPCConfig
a -> SimulationJobRequest
s {$sel:vpcConfig:SimulationJobRequest' :: Maybe VPCConfig
vpcConfig = Maybe VPCConfig
a} :: SimulationJobRequest)

-- | Undocumented member.
simulationJobRequest_outputLocation :: Lens.Lens' SimulationJobRequest (Prelude.Maybe OutputLocation)
simulationJobRequest_outputLocation :: (Maybe OutputLocation -> f (Maybe OutputLocation))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_outputLocation = (SimulationJobRequest -> Maybe OutputLocation)
-> (SimulationJobRequest
    -> Maybe OutputLocation -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe OutputLocation)
     (Maybe OutputLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe OutputLocation
outputLocation :: Maybe OutputLocation
$sel:outputLocation:SimulationJobRequest' :: SimulationJobRequest -> Maybe OutputLocation
outputLocation} -> Maybe OutputLocation
outputLocation) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe OutputLocation
a -> SimulationJobRequest
s {$sel:outputLocation:SimulationJobRequest' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
a} :: SimulationJobRequest)

-- | The simulation applications to use in the simulation job.
simulationJobRequest_simulationApplications :: Lens.Lens' SimulationJobRequest (Prelude.Maybe (Prelude.NonEmpty SimulationApplicationConfig))
simulationJobRequest_simulationApplications :: (Maybe (NonEmpty SimulationApplicationConfig)
 -> f (Maybe (NonEmpty SimulationApplicationConfig)))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_simulationApplications = (SimulationJobRequest
 -> Maybe (NonEmpty SimulationApplicationConfig))
-> (SimulationJobRequest
    -> Maybe (NonEmpty SimulationApplicationConfig)
    -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe (NonEmpty SimulationApplicationConfig))
     (Maybe (NonEmpty SimulationApplicationConfig))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications :: Maybe (NonEmpty SimulationApplicationConfig)
$sel:simulationApplications:SimulationJobRequest' :: SimulationJobRequest
-> Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications} -> Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe (NonEmpty SimulationApplicationConfig)
a -> SimulationJobRequest
s {$sel:simulationApplications:SimulationJobRequest' :: Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications = Maybe (NonEmpty SimulationApplicationConfig)
a} :: SimulationJobRequest) ((Maybe (NonEmpty SimulationApplicationConfig)
  -> f (Maybe (NonEmpty SimulationApplicationConfig)))
 -> SimulationJobRequest -> f SimulationJobRequest)
-> ((Maybe (NonEmpty SimulationApplicationConfig)
     -> f (Maybe (NonEmpty SimulationApplicationConfig)))
    -> Maybe (NonEmpty SimulationApplicationConfig)
    -> f (Maybe (NonEmpty SimulationApplicationConfig)))
-> (Maybe (NonEmpty SimulationApplicationConfig)
    -> f (Maybe (NonEmpty SimulationApplicationConfig)))
-> SimulationJobRequest
-> f SimulationJobRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
-> Iso
     (Maybe (NonEmpty SimulationApplicationConfig))
     (Maybe (NonEmpty SimulationApplicationConfig))
     (Maybe (NonEmpty SimulationApplicationConfig))
     (Maybe (NonEmpty SimulationApplicationConfig))
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 SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
  (NonEmpty SimulationApplicationConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
simulationJobRequest_loggingConfig :: Lens.Lens' SimulationJobRequest (Prelude.Maybe LoggingConfig)
simulationJobRequest_loggingConfig :: (Maybe LoggingConfig -> f (Maybe LoggingConfig))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_loggingConfig = (SimulationJobRequest -> Maybe LoggingConfig)
-> (SimulationJobRequest
    -> Maybe LoggingConfig -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (Maybe LoggingConfig)
     (Maybe LoggingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe LoggingConfig
loggingConfig :: Maybe LoggingConfig
$sel:loggingConfig:SimulationJobRequest' :: SimulationJobRequest -> Maybe LoggingConfig
loggingConfig} -> Maybe LoggingConfig
loggingConfig) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe LoggingConfig
a -> SimulationJobRequest
s {$sel:loggingConfig:SimulationJobRequest' :: Maybe LoggingConfig
loggingConfig = Maybe LoggingConfig
a} :: SimulationJobRequest)

-- | The IAM role name that allows the simulation instance to call the AWS
-- APIs that are specified in its associated policies on your behalf. This
-- is how credentials are passed in to your simulation job.
simulationJobRequest_iamRole :: Lens.Lens' SimulationJobRequest (Prelude.Maybe Prelude.Text)
simulationJobRequest_iamRole :: (Maybe Text -> f (Maybe Text))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_iamRole = (SimulationJobRequest -> Maybe Text)
-> (SimulationJobRequest -> Maybe Text -> SimulationJobRequest)
-> Lens
     SimulationJobRequest SimulationJobRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:SimulationJobRequest' :: SimulationJobRequest -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe Text
a -> SimulationJobRequest
s {$sel:iamRole:SimulationJobRequest' :: Maybe Text
iamRole = Maybe Text
a} :: SimulationJobRequest)

-- | A map that contains tag keys and tag values that are attached to the
-- simulation job request.
simulationJobRequest_tags :: Lens.Lens' SimulationJobRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
simulationJobRequest_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_tags = (SimulationJobRequest -> Maybe (HashMap Text Text))
-> (SimulationJobRequest
    -> Maybe (HashMap Text Text) -> SimulationJobRequest)
-> Lens
     SimulationJobRequest
     SimulationJobRequest
     (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 (\SimulationJobRequest' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:SimulationJobRequest' :: SimulationJobRequest -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Maybe (HashMap Text Text)
a -> SimulationJobRequest
s {$sel:tags:SimulationJobRequest' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: SimulationJobRequest) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> SimulationJobRequest -> f SimulationJobRequest)
-> ((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)))
-> SimulationJobRequest
-> f SimulationJobRequest
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 maximum simulation job duration in seconds. The value must be 8 days
-- (691,200 seconds) or less.
simulationJobRequest_maxJobDurationInSeconds :: Lens.Lens' SimulationJobRequest Prelude.Integer
simulationJobRequest_maxJobDurationInSeconds :: (Integer -> f Integer)
-> SimulationJobRequest -> f SimulationJobRequest
simulationJobRequest_maxJobDurationInSeconds = (SimulationJobRequest -> Integer)
-> (SimulationJobRequest -> Integer -> SimulationJobRequest)
-> Lens SimulationJobRequest SimulationJobRequest Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobRequest' {Integer
maxJobDurationInSeconds :: Integer
$sel:maxJobDurationInSeconds:SimulationJobRequest' :: SimulationJobRequest -> Integer
maxJobDurationInSeconds} -> Integer
maxJobDurationInSeconds) (\s :: SimulationJobRequest
s@SimulationJobRequest' {} Integer
a -> SimulationJobRequest
s {$sel:maxJobDurationInSeconds:SimulationJobRequest' :: Integer
maxJobDurationInSeconds = Integer
a} :: SimulationJobRequest)

instance Core.FromJSON SimulationJobRequest where
  parseJSON :: Value -> Parser SimulationJobRequest
parseJSON =
    String
-> (Object -> Parser SimulationJobRequest)
-> Value
-> Parser SimulationJobRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SimulationJobRequest"
      ( \Object
x ->
          Maybe FailureBehavior
-> Maybe (NonEmpty RobotApplicationConfig)
-> Maybe Compute
-> Maybe (NonEmpty DataSourceConfig)
-> Maybe Bool
-> Maybe VPCConfig
-> Maybe OutputLocation
-> Maybe (NonEmpty SimulationApplicationConfig)
-> Maybe LoggingConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Integer
-> SimulationJobRequest
SimulationJobRequest'
            (Maybe FailureBehavior
 -> Maybe (NonEmpty RobotApplicationConfig)
 -> Maybe Compute
 -> Maybe (NonEmpty DataSourceConfig)
 -> Maybe Bool
 -> Maybe VPCConfig
 -> Maybe OutputLocation
 -> Maybe (NonEmpty SimulationApplicationConfig)
 -> Maybe LoggingConfig
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Integer
 -> SimulationJobRequest)
-> Parser (Maybe FailureBehavior)
-> Parser
     (Maybe (NonEmpty RobotApplicationConfig)
      -> Maybe Compute
      -> Maybe (NonEmpty DataSourceConfig)
      -> Maybe Bool
      -> Maybe VPCConfig
      -> Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe FailureBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failureBehavior")
            Parser
  (Maybe (NonEmpty RobotApplicationConfig)
   -> Maybe Compute
   -> Maybe (NonEmpty DataSourceConfig)
   -> Maybe Bool
   -> Maybe VPCConfig
   -> Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe (NonEmpty RobotApplicationConfig))
-> Parser
     (Maybe Compute
      -> Maybe (NonEmpty DataSourceConfig)
      -> Maybe Bool
      -> Maybe VPCConfig
      -> Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty RobotApplicationConfig))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"robotApplications")
            Parser
  (Maybe Compute
   -> Maybe (NonEmpty DataSourceConfig)
   -> Maybe Bool
   -> Maybe VPCConfig
   -> Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe Compute)
-> Parser
     (Maybe (NonEmpty DataSourceConfig)
      -> Maybe Bool
      -> Maybe VPCConfig
      -> Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Compute)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"compute")
            Parser
  (Maybe (NonEmpty DataSourceConfig)
   -> Maybe Bool
   -> Maybe VPCConfig
   -> Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe (NonEmpty DataSourceConfig))
-> Parser
     (Maybe Bool
      -> Maybe VPCConfig
      -> Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DataSourceConfig))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataSources")
            Parser
  (Maybe Bool
   -> Maybe VPCConfig
   -> Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe Bool)
-> Parser
     (Maybe VPCConfig
      -> Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"useDefaultApplications")
            Parser
  (Maybe VPCConfig
   -> Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe VPCConfig)
-> Parser
     (Maybe OutputLocation
      -> Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VPCConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vpcConfig")
            Parser
  (Maybe OutputLocation
   -> Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe OutputLocation)
-> Parser
     (Maybe (NonEmpty SimulationApplicationConfig)
      -> Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputLocation")
            Parser
  (Maybe (NonEmpty SimulationApplicationConfig)
   -> Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe (NonEmpty SimulationApplicationConfig))
-> Parser
     (Maybe LoggingConfig
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Integer
      -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (NonEmpty SimulationApplicationConfig))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"simulationApplications")
            Parser
  (Maybe LoggingConfig
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Integer
   -> SimulationJobRequest)
-> Parser (Maybe LoggingConfig)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Integer -> SimulationJobRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoggingConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"loggingConfig")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Integer -> SimulationJobRequest)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text) -> Integer -> SimulationJobRequest)
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
"iamRole")
            Parser
  (Maybe (HashMap Text Text) -> Integer -> SimulationJobRequest)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Integer -> SimulationJobRequest)
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
"tags" 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 (Integer -> SimulationJobRequest)
-> Parser Integer -> Parser SimulationJobRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"maxJobDurationInSeconds")
      )

instance Prelude.Hashable SimulationJobRequest

instance Prelude.NFData SimulationJobRequest

instance Core.ToJSON SimulationJobRequest where
  toJSON :: SimulationJobRequest -> Value
toJSON SimulationJobRequest' {Integer
Maybe Bool
Maybe (NonEmpty DataSourceConfig)
Maybe (NonEmpty RobotApplicationConfig)
Maybe (NonEmpty SimulationApplicationConfig)
Maybe Text
Maybe (HashMap Text Text)
Maybe Compute
Maybe FailureBehavior
Maybe LoggingConfig
Maybe OutputLocation
Maybe VPCConfig
maxJobDurationInSeconds :: Integer
tags :: Maybe (HashMap Text Text)
iamRole :: Maybe Text
loggingConfig :: Maybe LoggingConfig
simulationApplications :: Maybe (NonEmpty SimulationApplicationConfig)
outputLocation :: Maybe OutputLocation
vpcConfig :: Maybe VPCConfig
useDefaultApplications :: Maybe Bool
dataSources :: Maybe (NonEmpty DataSourceConfig)
compute :: Maybe Compute
robotApplications :: Maybe (NonEmpty RobotApplicationConfig)
failureBehavior :: Maybe FailureBehavior
$sel:maxJobDurationInSeconds:SimulationJobRequest' :: SimulationJobRequest -> Integer
$sel:tags:SimulationJobRequest' :: SimulationJobRequest -> Maybe (HashMap Text Text)
$sel:iamRole:SimulationJobRequest' :: SimulationJobRequest -> Maybe Text
$sel:loggingConfig:SimulationJobRequest' :: SimulationJobRequest -> Maybe LoggingConfig
$sel:simulationApplications:SimulationJobRequest' :: SimulationJobRequest
-> Maybe (NonEmpty SimulationApplicationConfig)
$sel:outputLocation:SimulationJobRequest' :: SimulationJobRequest -> Maybe OutputLocation
$sel:vpcConfig:SimulationJobRequest' :: SimulationJobRequest -> Maybe VPCConfig
$sel:useDefaultApplications:SimulationJobRequest' :: SimulationJobRequest -> Maybe Bool
$sel:dataSources:SimulationJobRequest' :: SimulationJobRequest -> Maybe (NonEmpty DataSourceConfig)
$sel:compute:SimulationJobRequest' :: SimulationJobRequest -> Maybe Compute
$sel:robotApplications:SimulationJobRequest' :: SimulationJobRequest -> Maybe (NonEmpty RobotApplicationConfig)
$sel:failureBehavior:SimulationJobRequest' :: SimulationJobRequest -> Maybe FailureBehavior
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"failureBehavior" Text -> FailureBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FailureBehavior -> Pair) -> Maybe FailureBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FailureBehavior
failureBehavior,
            (Text
"robotApplications" Text -> NonEmpty RobotApplicationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty RobotApplicationConfig -> Pair)
-> Maybe (NonEmpty RobotApplicationConfig) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty RobotApplicationConfig)
robotApplications,
            (Text
"compute" Text -> Compute -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Compute -> Pair) -> Maybe Compute -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Compute
compute,
            (Text
"dataSources" Text -> NonEmpty DataSourceConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty DataSourceConfig -> Pair)
-> Maybe (NonEmpty DataSourceConfig) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty DataSourceConfig)
dataSources,
            (Text
"useDefaultApplications" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useDefaultApplications,
            (Text
"vpcConfig" Text -> VPCConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VPCConfig -> Pair) -> Maybe VPCConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VPCConfig
vpcConfig,
            (Text
"outputLocation" Text -> OutputLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OutputLocation -> Pair) -> Maybe OutputLocation -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OutputLocation
outputLocation,
            (Text
"simulationApplications" Text -> NonEmpty SimulationApplicationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty SimulationApplicationConfig -> Pair)
-> Maybe (NonEmpty SimulationApplicationConfig) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty SimulationApplicationConfig)
simulationApplications,
            (Text
"loggingConfig" Text -> LoggingConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LoggingConfig -> Pair) -> Maybe LoggingConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingConfig
loggingConfig,
            (Text
"iamRole" 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
iamRole,
            (Text
"tags" 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)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"maxJobDurationInSeconds"
                  Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Integer
maxJobDurationInSeconds
              )
          ]
      )