amazonka-simspaceweaver-2.0: gen/Amazonka/SimSpaceWeaver/Types/LoggingConfiguration.hs
{-# 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.SimSpaceWeaver.Types.LoggingConfiguration
-- Copyright : (c) 2013-2023 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SimSpaceWeaver.Types.LoggingConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SimSpaceWeaver.Types.LogDestination
-- | The logging configuration for a simulation.
--
-- /See:/ 'newLoggingConfiguration' smart constructor.
data LoggingConfiguration = LoggingConfiguration'
{ -- | A list of the locations where SimSpace Weaver sends simulation log data.
destinations :: Prelude.Maybe [LogDestination]
}
deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)
-- |
-- Create a value of 'LoggingConfiguration' 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:
--
-- 'destinations', 'loggingConfiguration_destinations' - A list of the locations where SimSpace Weaver sends simulation log data.
newLoggingConfiguration ::
LoggingConfiguration
newLoggingConfiguration =
LoggingConfiguration'
{ destinations =
Prelude.Nothing
}
-- | A list of the locations where SimSpace Weaver sends simulation log data.
loggingConfiguration_destinations :: Lens.Lens' LoggingConfiguration (Prelude.Maybe [LogDestination])
loggingConfiguration_destinations = Lens.lens (\LoggingConfiguration' {destinations} -> destinations) (\s@LoggingConfiguration' {} a -> s {destinations = a} :: LoggingConfiguration) Prelude.. Lens.mapping Lens.coerced
instance Data.FromJSON LoggingConfiguration where
parseJSON =
Data.withObject
"LoggingConfiguration"
( \x ->
LoggingConfiguration'
Prelude.<$> (x Data..:? "Destinations" Data..!= Prelude.mempty)
)
instance Prelude.Hashable LoggingConfiguration where
hashWithSalt _salt LoggingConfiguration' {..} =
_salt `Prelude.hashWithSalt` destinations
instance Prelude.NFData LoggingConfiguration where
rnf LoggingConfiguration' {..} =
Prelude.rnf destinations