{-# 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.CodeGuruProfiler.Types.ProfilingGroupDescription
-- 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.CodeGuruProfiler.Types.ProfilingGroupDescription where

import Amazonka.CodeGuruProfiler.Types.AgentOrchestrationConfig
import Amazonka.CodeGuruProfiler.Types.ComputePlatform
import Amazonka.CodeGuruProfiler.Types.ProfilingStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about a profiling group.
--
-- /See:/ 'newProfilingGroupDescription' smart constructor.
data ProfilingGroupDescription = ProfilingGroupDescription'
  { -- | The compute platform of the profiling group. If it is set to
    -- @AWSLambda@, then the profiled application runs on AWS Lambda. If it is
    -- set to @Default@, then the profiled application runs on a compute
    -- platform that is not AWS Lambda, such an Amazon EC2 instance, an
    -- on-premises server, or a different platform. The default is @Default@.
    ProfilingGroupDescription -> Maybe ComputePlatform
computePlatform :: Prelude.Maybe ComputePlatform,
    -- | The Amazon Resource Name (ARN) identifying the profiling group resource.
    ProfilingGroupDescription -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time when the profiling group was created. Specify using the ISO
    -- 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1
    -- millisecond past June 1, 2020 1:15:02 PM UTC.
    ProfilingGroupDescription -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The name of the profiling group.
    ProfilingGroupDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A
    -- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingStatus.html ProfilingStatus>
    -- object that includes information about the last time a profile agent
    -- pinged back, the last time a profile was received, and the aggregation
    -- period and start time for the most recent aggregated profile.
    ProfilingGroupDescription -> Maybe ProfilingStatus
profilingStatus :: Prelude.Maybe ProfilingStatus,
    -- | The date and time when the profiling group was last updated. Specify
    -- using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z
    -- represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
    ProfilingGroupDescription -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | An
    -- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AgentOrchestrationConfig.html AgentOrchestrationConfig>
    -- object that indicates if the profiling group is enabled for profiled or
    -- not.
    ProfilingGroupDescription -> Maybe AgentOrchestrationConfig
agentOrchestrationConfig :: Prelude.Maybe AgentOrchestrationConfig,
    -- | A list of the tags that belong to this profiling group.
    ProfilingGroupDescription -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ProfilingGroupDescription -> ProfilingGroupDescription -> Bool
(ProfilingGroupDescription -> ProfilingGroupDescription -> Bool)
-> (ProfilingGroupDescription -> ProfilingGroupDescription -> Bool)
-> Eq ProfilingGroupDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfilingGroupDescription -> ProfilingGroupDescription -> Bool
$c/= :: ProfilingGroupDescription -> ProfilingGroupDescription -> Bool
== :: ProfilingGroupDescription -> ProfilingGroupDescription -> Bool
$c== :: ProfilingGroupDescription -> ProfilingGroupDescription -> Bool
Prelude.Eq, ReadPrec [ProfilingGroupDescription]
ReadPrec ProfilingGroupDescription
Int -> ReadS ProfilingGroupDescription
ReadS [ProfilingGroupDescription]
(Int -> ReadS ProfilingGroupDescription)
-> ReadS [ProfilingGroupDescription]
-> ReadPrec ProfilingGroupDescription
-> ReadPrec [ProfilingGroupDescription]
-> Read ProfilingGroupDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfilingGroupDescription]
$creadListPrec :: ReadPrec [ProfilingGroupDescription]
readPrec :: ReadPrec ProfilingGroupDescription
$creadPrec :: ReadPrec ProfilingGroupDescription
readList :: ReadS [ProfilingGroupDescription]
$creadList :: ReadS [ProfilingGroupDescription]
readsPrec :: Int -> ReadS ProfilingGroupDescription
$creadsPrec :: Int -> ReadS ProfilingGroupDescription
Prelude.Read, Int -> ProfilingGroupDescription -> ShowS
[ProfilingGroupDescription] -> ShowS
ProfilingGroupDescription -> String
(Int -> ProfilingGroupDescription -> ShowS)
-> (ProfilingGroupDescription -> String)
-> ([ProfilingGroupDescription] -> ShowS)
-> Show ProfilingGroupDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfilingGroupDescription] -> ShowS
$cshowList :: [ProfilingGroupDescription] -> ShowS
show :: ProfilingGroupDescription -> String
$cshow :: ProfilingGroupDescription -> String
showsPrec :: Int -> ProfilingGroupDescription -> ShowS
$cshowsPrec :: Int -> ProfilingGroupDescription -> ShowS
Prelude.Show, (forall x.
 ProfilingGroupDescription -> Rep ProfilingGroupDescription x)
-> (forall x.
    Rep ProfilingGroupDescription x -> ProfilingGroupDescription)
-> Generic ProfilingGroupDescription
forall x.
Rep ProfilingGroupDescription x -> ProfilingGroupDescription
forall x.
ProfilingGroupDescription -> Rep ProfilingGroupDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProfilingGroupDescription x -> ProfilingGroupDescription
$cfrom :: forall x.
ProfilingGroupDescription -> Rep ProfilingGroupDescription x
Prelude.Generic)

-- |
-- Create a value of 'ProfilingGroupDescription' 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:
--
-- 'computePlatform', 'profilingGroupDescription_computePlatform' - The compute platform of the profiling group. If it is set to
-- @AWSLambda@, then the profiled application runs on AWS Lambda. If it is
-- set to @Default@, then the profiled application runs on a compute
-- platform that is not AWS Lambda, such an Amazon EC2 instance, an
-- on-premises server, or a different platform. The default is @Default@.
--
-- 'arn', 'profilingGroupDescription_arn' - The Amazon Resource Name (ARN) identifying the profiling group resource.
--
-- 'createdAt', 'profilingGroupDescription_createdAt' - The time when the profiling group was created. Specify using the ISO
-- 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1
-- millisecond past June 1, 2020 1:15:02 PM UTC.
--
-- 'name', 'profilingGroupDescription_name' - The name of the profiling group.
--
-- 'profilingStatus', 'profilingGroupDescription_profilingStatus' - A
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingStatus.html ProfilingStatus>
-- object that includes information about the last time a profile agent
-- pinged back, the last time a profile was received, and the aggregation
-- period and start time for the most recent aggregated profile.
--
-- 'updatedAt', 'profilingGroupDescription_updatedAt' - The date and time when the profiling group was last updated. Specify
-- using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z
-- represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
--
-- 'agentOrchestrationConfig', 'profilingGroupDescription_agentOrchestrationConfig' - An
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AgentOrchestrationConfig.html AgentOrchestrationConfig>
-- object that indicates if the profiling group is enabled for profiled or
-- not.
--
-- 'tags', 'profilingGroupDescription_tags' - A list of the tags that belong to this profiling group.
newProfilingGroupDescription ::
  ProfilingGroupDescription
newProfilingGroupDescription :: ProfilingGroupDescription
newProfilingGroupDescription =
  ProfilingGroupDescription' :: Maybe ComputePlatform
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ProfilingStatus
-> Maybe POSIX
-> Maybe AgentOrchestrationConfig
-> Maybe (HashMap Text Text)
-> ProfilingGroupDescription
ProfilingGroupDescription'
    { $sel:computePlatform:ProfilingGroupDescription' :: Maybe ComputePlatform
computePlatform =
        Maybe ComputePlatform
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ProfilingGroupDescription' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:ProfilingGroupDescription' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ProfilingGroupDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profilingStatus:ProfilingGroupDescription' :: Maybe ProfilingStatus
profilingStatus = Maybe ProfilingStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:ProfilingGroupDescription' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:agentOrchestrationConfig:ProfilingGroupDescription' :: Maybe AgentOrchestrationConfig
agentOrchestrationConfig = Maybe AgentOrchestrationConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ProfilingGroupDescription' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The compute platform of the profiling group. If it is set to
-- @AWSLambda@, then the profiled application runs on AWS Lambda. If it is
-- set to @Default@, then the profiled application runs on a compute
-- platform that is not AWS Lambda, such an Amazon EC2 instance, an
-- on-premises server, or a different platform. The default is @Default@.
profilingGroupDescription_computePlatform :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe ComputePlatform)
profilingGroupDescription_computePlatform :: (Maybe ComputePlatform -> f (Maybe ComputePlatform))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_computePlatform = (ProfilingGroupDescription -> Maybe ComputePlatform)
-> (ProfilingGroupDescription
    -> Maybe ComputePlatform -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe ComputePlatform)
     (Maybe ComputePlatform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe ComputePlatform
computePlatform :: Maybe ComputePlatform
$sel:computePlatform:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe ComputePlatform
computePlatform} -> Maybe ComputePlatform
computePlatform) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe ComputePlatform
a -> ProfilingGroupDescription
s {$sel:computePlatform:ProfilingGroupDescription' :: Maybe ComputePlatform
computePlatform = Maybe ComputePlatform
a} :: ProfilingGroupDescription)

-- | The Amazon Resource Name (ARN) identifying the profiling group resource.
profilingGroupDescription_arn :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe Prelude.Text)
profilingGroupDescription_arn :: (Maybe Text -> f (Maybe Text))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_arn = (ProfilingGroupDescription -> Maybe Text)
-> (ProfilingGroupDescription
    -> Maybe Text -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe Text
arn :: Maybe Text
$sel:arn:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe Text
a -> ProfilingGroupDescription
s {$sel:arn:ProfilingGroupDescription' :: Maybe Text
arn = Maybe Text
a} :: ProfilingGroupDescription)

-- | The time when the profiling group was created. Specify using the ISO
-- 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1
-- millisecond past June 1, 2020 1:15:02 PM UTC.
profilingGroupDescription_createdAt :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe Prelude.UTCTime)
profilingGroupDescription_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_createdAt = (ProfilingGroupDescription -> Maybe POSIX)
-> (ProfilingGroupDescription
    -> Maybe POSIX -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe POSIX
a -> ProfilingGroupDescription
s {$sel:createdAt:ProfilingGroupDescription' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ProfilingGroupDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProfilingGroupDescription -> f ProfilingGroupDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingGroupDescription
-> f ProfilingGroupDescription
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 name of the profiling group.
profilingGroupDescription_name :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe Prelude.Text)
profilingGroupDescription_name :: (Maybe Text -> f (Maybe Text))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_name = (ProfilingGroupDescription -> Maybe Text)
-> (ProfilingGroupDescription
    -> Maybe Text -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe Text
name :: Maybe Text
$sel:name:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe Text
a -> ProfilingGroupDescription
s {$sel:name:ProfilingGroupDescription' :: Maybe Text
name = Maybe Text
a} :: ProfilingGroupDescription)

-- | A
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingStatus.html ProfilingStatus>
-- object that includes information about the last time a profile agent
-- pinged back, the last time a profile was received, and the aggregation
-- period and start time for the most recent aggregated profile.
profilingGroupDescription_profilingStatus :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe ProfilingStatus)
profilingGroupDescription_profilingStatus :: (Maybe ProfilingStatus -> f (Maybe ProfilingStatus))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_profilingStatus = (ProfilingGroupDescription -> Maybe ProfilingStatus)
-> (ProfilingGroupDescription
    -> Maybe ProfilingStatus -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe ProfilingStatus)
     (Maybe ProfilingStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe ProfilingStatus
profilingStatus :: Maybe ProfilingStatus
$sel:profilingStatus:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe ProfilingStatus
profilingStatus} -> Maybe ProfilingStatus
profilingStatus) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe ProfilingStatus
a -> ProfilingGroupDescription
s {$sel:profilingStatus:ProfilingGroupDescription' :: Maybe ProfilingStatus
profilingStatus = Maybe ProfilingStatus
a} :: ProfilingGroupDescription)

-- | The date and time when the profiling group was last updated. Specify
-- using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z
-- represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
profilingGroupDescription_updatedAt :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe Prelude.UTCTime)
profilingGroupDescription_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_updatedAt = (ProfilingGroupDescription -> Maybe POSIX)
-> (ProfilingGroupDescription
    -> Maybe POSIX -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe POSIX
a -> ProfilingGroupDescription
s {$sel:updatedAt:ProfilingGroupDescription' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: ProfilingGroupDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProfilingGroupDescription -> f ProfilingGroupDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilingGroupDescription
-> f ProfilingGroupDescription
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

-- | An
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AgentOrchestrationConfig.html AgentOrchestrationConfig>
-- object that indicates if the profiling group is enabled for profiled or
-- not.
profilingGroupDescription_agentOrchestrationConfig :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe AgentOrchestrationConfig)
profilingGroupDescription_agentOrchestrationConfig :: (Maybe AgentOrchestrationConfig
 -> f (Maybe AgentOrchestrationConfig))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_agentOrchestrationConfig = (ProfilingGroupDescription -> Maybe AgentOrchestrationConfig)
-> (ProfilingGroupDescription
    -> Maybe AgentOrchestrationConfig -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (Maybe AgentOrchestrationConfig)
     (Maybe AgentOrchestrationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilingGroupDescription' {Maybe AgentOrchestrationConfig
agentOrchestrationConfig :: Maybe AgentOrchestrationConfig
$sel:agentOrchestrationConfig:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe AgentOrchestrationConfig
agentOrchestrationConfig} -> Maybe AgentOrchestrationConfig
agentOrchestrationConfig) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe AgentOrchestrationConfig
a -> ProfilingGroupDescription
s {$sel:agentOrchestrationConfig:ProfilingGroupDescription' :: Maybe AgentOrchestrationConfig
agentOrchestrationConfig = Maybe AgentOrchestrationConfig
a} :: ProfilingGroupDescription)

-- | A list of the tags that belong to this profiling group.
profilingGroupDescription_tags :: Lens.Lens' ProfilingGroupDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
profilingGroupDescription_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ProfilingGroupDescription -> f ProfilingGroupDescription
profilingGroupDescription_tags = (ProfilingGroupDescription -> Maybe (HashMap Text Text))
-> (ProfilingGroupDescription
    -> Maybe (HashMap Text Text) -> ProfilingGroupDescription)
-> Lens
     ProfilingGroupDescription
     ProfilingGroupDescription
     (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 (\ProfilingGroupDescription' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ProfilingGroupDescription' :: ProfilingGroupDescription -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ProfilingGroupDescription
s@ProfilingGroupDescription' {} Maybe (HashMap Text Text)
a -> ProfilingGroupDescription
s {$sel:tags:ProfilingGroupDescription' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ProfilingGroupDescription) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ProfilingGroupDescription -> f ProfilingGroupDescription)
-> ((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)))
-> ProfilingGroupDescription
-> f ProfilingGroupDescription
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

instance Core.FromJSON ProfilingGroupDescription where
  parseJSON :: Value -> Parser ProfilingGroupDescription
parseJSON =
    String
-> (Object -> Parser ProfilingGroupDescription)
-> Value
-> Parser ProfilingGroupDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProfilingGroupDescription"
      ( \Object
x ->
          Maybe ComputePlatform
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ProfilingStatus
-> Maybe POSIX
-> Maybe AgentOrchestrationConfig
-> Maybe (HashMap Text Text)
-> ProfilingGroupDescription
ProfilingGroupDescription'
            (Maybe ComputePlatform
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ProfilingStatus
 -> Maybe POSIX
 -> Maybe AgentOrchestrationConfig
 -> Maybe (HashMap Text Text)
 -> ProfilingGroupDescription)
-> Parser (Maybe ComputePlatform)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ProfilingStatus
      -> Maybe POSIX
      -> Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text)
      -> ProfilingGroupDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ComputePlatform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"computePlatform")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ProfilingStatus
   -> Maybe POSIX
   -> Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text)
   -> ProfilingGroupDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ProfilingStatus
      -> Maybe POSIX
      -> Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text)
      -> ProfilingGroupDescription)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe ProfilingStatus
   -> Maybe POSIX
   -> Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text)
   -> ProfilingGroupDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe ProfilingStatus
      -> Maybe POSIX
      -> Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text)
      -> ProfilingGroupDescription)
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
"createdAt")
            Parser
  (Maybe Text
   -> Maybe ProfilingStatus
   -> Maybe POSIX
   -> Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text)
   -> ProfilingGroupDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProfilingStatus
      -> Maybe POSIX
      -> Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text)
      -> ProfilingGroupDescription)
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
"name")
            Parser
  (Maybe ProfilingStatus
   -> Maybe POSIX
   -> Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text)
   -> ProfilingGroupDescription)
-> Parser (Maybe ProfilingStatus)
-> Parser
     (Maybe POSIX
      -> Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text)
      -> ProfilingGroupDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProfilingStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"profilingStatus")
            Parser
  (Maybe POSIX
   -> Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text)
   -> ProfilingGroupDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe AgentOrchestrationConfig
      -> Maybe (HashMap Text Text) -> ProfilingGroupDescription)
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
"updatedAt")
            Parser
  (Maybe AgentOrchestrationConfig
   -> Maybe (HashMap Text Text) -> ProfilingGroupDescription)
-> Parser (Maybe AgentOrchestrationConfig)
-> Parser (Maybe (HashMap Text Text) -> ProfilingGroupDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AgentOrchestrationConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"agentOrchestrationConfig")
            Parser (Maybe (HashMap Text Text) -> ProfilingGroupDescription)
-> Parser (Maybe (HashMap Text Text))
-> Parser ProfilingGroupDescription
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)
      )

instance Prelude.Hashable ProfilingGroupDescription

instance Prelude.NFData ProfilingGroupDescription