{-# 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.SageMaker.Types.StudioLifecycleConfigDetails
-- 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.SageMaker.Types.StudioLifecycleConfigDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.StudioLifecycleConfigAppType

-- | Details of the Studio Lifecycle Configuration.
--
-- /See:/ 'newStudioLifecycleConfigDetails' smart constructor.
data StudioLifecycleConfigDetails = StudioLifecycleConfigDetails'
  { -- | The creation time of the Studio Lifecycle Configuration.
    StudioLifecycleConfigDetails -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | This value is equivalent to CreationTime because Studio Lifecycle
    -- Configurations are immutable.
    StudioLifecycleConfigDetails -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the Lifecycle Configuration.
    StudioLifecycleConfigDetails -> Maybe Text
studioLifecycleConfigArn :: Prelude.Maybe Prelude.Text,
    -- | The App type to which the Lifecycle Configuration is attached.
    StudioLifecycleConfigDetails -> Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType :: Prelude.Maybe StudioLifecycleConfigAppType,
    -- | The name of the Studio Lifecycle Configuration.
    StudioLifecycleConfigDetails -> Maybe Text
studioLifecycleConfigName :: Prelude.Maybe Prelude.Text
  }
  deriving (StudioLifecycleConfigDetails
-> StudioLifecycleConfigDetails -> Bool
(StudioLifecycleConfigDetails
 -> StudioLifecycleConfigDetails -> Bool)
-> (StudioLifecycleConfigDetails
    -> StudioLifecycleConfigDetails -> Bool)
-> Eq StudioLifecycleConfigDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StudioLifecycleConfigDetails
-> StudioLifecycleConfigDetails -> Bool
$c/= :: StudioLifecycleConfigDetails
-> StudioLifecycleConfigDetails -> Bool
== :: StudioLifecycleConfigDetails
-> StudioLifecycleConfigDetails -> Bool
$c== :: StudioLifecycleConfigDetails
-> StudioLifecycleConfigDetails -> Bool
Prelude.Eq, ReadPrec [StudioLifecycleConfigDetails]
ReadPrec StudioLifecycleConfigDetails
Int -> ReadS StudioLifecycleConfigDetails
ReadS [StudioLifecycleConfigDetails]
(Int -> ReadS StudioLifecycleConfigDetails)
-> ReadS [StudioLifecycleConfigDetails]
-> ReadPrec StudioLifecycleConfigDetails
-> ReadPrec [StudioLifecycleConfigDetails]
-> Read StudioLifecycleConfigDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StudioLifecycleConfigDetails]
$creadListPrec :: ReadPrec [StudioLifecycleConfigDetails]
readPrec :: ReadPrec StudioLifecycleConfigDetails
$creadPrec :: ReadPrec StudioLifecycleConfigDetails
readList :: ReadS [StudioLifecycleConfigDetails]
$creadList :: ReadS [StudioLifecycleConfigDetails]
readsPrec :: Int -> ReadS StudioLifecycleConfigDetails
$creadsPrec :: Int -> ReadS StudioLifecycleConfigDetails
Prelude.Read, Int -> StudioLifecycleConfigDetails -> ShowS
[StudioLifecycleConfigDetails] -> ShowS
StudioLifecycleConfigDetails -> String
(Int -> StudioLifecycleConfigDetails -> ShowS)
-> (StudioLifecycleConfigDetails -> String)
-> ([StudioLifecycleConfigDetails] -> ShowS)
-> Show StudioLifecycleConfigDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StudioLifecycleConfigDetails] -> ShowS
$cshowList :: [StudioLifecycleConfigDetails] -> ShowS
show :: StudioLifecycleConfigDetails -> String
$cshow :: StudioLifecycleConfigDetails -> String
showsPrec :: Int -> StudioLifecycleConfigDetails -> ShowS
$cshowsPrec :: Int -> StudioLifecycleConfigDetails -> ShowS
Prelude.Show, (forall x.
 StudioLifecycleConfigDetails -> Rep StudioLifecycleConfigDetails x)
-> (forall x.
    Rep StudioLifecycleConfigDetails x -> StudioLifecycleConfigDetails)
-> Generic StudioLifecycleConfigDetails
forall x.
Rep StudioLifecycleConfigDetails x -> StudioLifecycleConfigDetails
forall x.
StudioLifecycleConfigDetails -> Rep StudioLifecycleConfigDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StudioLifecycleConfigDetails x -> StudioLifecycleConfigDetails
$cfrom :: forall x.
StudioLifecycleConfigDetails -> Rep StudioLifecycleConfigDetails x
Prelude.Generic)

-- |
-- Create a value of 'StudioLifecycleConfigDetails' 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:
--
-- 'creationTime', 'studioLifecycleConfigDetails_creationTime' - The creation time of the Studio Lifecycle Configuration.
--
-- 'lastModifiedTime', 'studioLifecycleConfigDetails_lastModifiedTime' - This value is equivalent to CreationTime because Studio Lifecycle
-- Configurations are immutable.
--
-- 'studioLifecycleConfigArn', 'studioLifecycleConfigDetails_studioLifecycleConfigArn' - The Amazon Resource Name (ARN) of the Lifecycle Configuration.
--
-- 'studioLifecycleConfigAppType', 'studioLifecycleConfigDetails_studioLifecycleConfigAppType' - The App type to which the Lifecycle Configuration is attached.
--
-- 'studioLifecycleConfigName', 'studioLifecycleConfigDetails_studioLifecycleConfigName' - The name of the Studio Lifecycle Configuration.
newStudioLifecycleConfigDetails ::
  StudioLifecycleConfigDetails
newStudioLifecycleConfigDetails :: StudioLifecycleConfigDetails
newStudioLifecycleConfigDetails =
  StudioLifecycleConfigDetails' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe StudioLifecycleConfigAppType
-> Maybe Text
-> StudioLifecycleConfigDetails
StudioLifecycleConfigDetails'
    { $sel:creationTime:StudioLifecycleConfigDetails' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:StudioLifecycleConfigDetails' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:studioLifecycleConfigArn:StudioLifecycleConfigDetails' :: Maybe Text
studioLifecycleConfigArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:studioLifecycleConfigAppType:StudioLifecycleConfigDetails' :: Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType =
        Maybe StudioLifecycleConfigAppType
forall a. Maybe a
Prelude.Nothing,
      $sel:studioLifecycleConfigName:StudioLifecycleConfigDetails' :: Maybe Text
studioLifecycleConfigName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The creation time of the Studio Lifecycle Configuration.
studioLifecycleConfigDetails_creationTime :: Lens.Lens' StudioLifecycleConfigDetails (Prelude.Maybe Prelude.UTCTime)
studioLifecycleConfigDetails_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails
studioLifecycleConfigDetails_creationTime = (StudioLifecycleConfigDetails -> Maybe POSIX)
-> (StudioLifecycleConfigDetails
    -> Maybe POSIX -> StudioLifecycleConfigDetails)
-> Lens
     StudioLifecycleConfigDetails
     StudioLifecycleConfigDetails
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioLifecycleConfigDetails' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:StudioLifecycleConfigDetails' :: StudioLifecycleConfigDetails -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: StudioLifecycleConfigDetails
s@StudioLifecycleConfigDetails' {} Maybe POSIX
a -> StudioLifecycleConfigDetails
s {$sel:creationTime:StudioLifecycleConfigDetails' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: StudioLifecycleConfigDetails) ((Maybe POSIX -> f (Maybe POSIX))
 -> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StudioLifecycleConfigDetails
-> f StudioLifecycleConfigDetails
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

-- | This value is equivalent to CreationTime because Studio Lifecycle
-- Configurations are immutable.
studioLifecycleConfigDetails_lastModifiedTime :: Lens.Lens' StudioLifecycleConfigDetails (Prelude.Maybe Prelude.UTCTime)
studioLifecycleConfigDetails_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails
studioLifecycleConfigDetails_lastModifiedTime = (StudioLifecycleConfigDetails -> Maybe POSIX)
-> (StudioLifecycleConfigDetails
    -> Maybe POSIX -> StudioLifecycleConfigDetails)
-> Lens
     StudioLifecycleConfigDetails
     StudioLifecycleConfigDetails
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioLifecycleConfigDetails' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:StudioLifecycleConfigDetails' :: StudioLifecycleConfigDetails -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: StudioLifecycleConfigDetails
s@StudioLifecycleConfigDetails' {} Maybe POSIX
a -> StudioLifecycleConfigDetails
s {$sel:lastModifiedTime:StudioLifecycleConfigDetails' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: StudioLifecycleConfigDetails) ((Maybe POSIX -> f (Maybe POSIX))
 -> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StudioLifecycleConfigDetails
-> f StudioLifecycleConfigDetails
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 Amazon Resource Name (ARN) of the Lifecycle Configuration.
studioLifecycleConfigDetails_studioLifecycleConfigArn :: Lens.Lens' StudioLifecycleConfigDetails (Prelude.Maybe Prelude.Text)
studioLifecycleConfigDetails_studioLifecycleConfigArn :: (Maybe Text -> f (Maybe Text))
-> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails
studioLifecycleConfigDetails_studioLifecycleConfigArn = (StudioLifecycleConfigDetails -> Maybe Text)
-> (StudioLifecycleConfigDetails
    -> Maybe Text -> StudioLifecycleConfigDetails)
-> Lens
     StudioLifecycleConfigDetails
     StudioLifecycleConfigDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioLifecycleConfigDetails' {Maybe Text
studioLifecycleConfigArn :: Maybe Text
$sel:studioLifecycleConfigArn:StudioLifecycleConfigDetails' :: StudioLifecycleConfigDetails -> Maybe Text
studioLifecycleConfigArn} -> Maybe Text
studioLifecycleConfigArn) (\s :: StudioLifecycleConfigDetails
s@StudioLifecycleConfigDetails' {} Maybe Text
a -> StudioLifecycleConfigDetails
s {$sel:studioLifecycleConfigArn:StudioLifecycleConfigDetails' :: Maybe Text
studioLifecycleConfigArn = Maybe Text
a} :: StudioLifecycleConfigDetails)

-- | The App type to which the Lifecycle Configuration is attached.
studioLifecycleConfigDetails_studioLifecycleConfigAppType :: Lens.Lens' StudioLifecycleConfigDetails (Prelude.Maybe StudioLifecycleConfigAppType)
studioLifecycleConfigDetails_studioLifecycleConfigAppType :: (Maybe StudioLifecycleConfigAppType
 -> f (Maybe StudioLifecycleConfigAppType))
-> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails
studioLifecycleConfigDetails_studioLifecycleConfigAppType = (StudioLifecycleConfigDetails
 -> Maybe StudioLifecycleConfigAppType)
-> (StudioLifecycleConfigDetails
    -> Maybe StudioLifecycleConfigAppType
    -> StudioLifecycleConfigDetails)
-> Lens
     StudioLifecycleConfigDetails
     StudioLifecycleConfigDetails
     (Maybe StudioLifecycleConfigAppType)
     (Maybe StudioLifecycleConfigAppType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioLifecycleConfigDetails' {Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType :: Maybe StudioLifecycleConfigAppType
$sel:studioLifecycleConfigAppType:StudioLifecycleConfigDetails' :: StudioLifecycleConfigDetails -> Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType} -> Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType) (\s :: StudioLifecycleConfigDetails
s@StudioLifecycleConfigDetails' {} Maybe StudioLifecycleConfigAppType
a -> StudioLifecycleConfigDetails
s {$sel:studioLifecycleConfigAppType:StudioLifecycleConfigDetails' :: Maybe StudioLifecycleConfigAppType
studioLifecycleConfigAppType = Maybe StudioLifecycleConfigAppType
a} :: StudioLifecycleConfigDetails)

-- | The name of the Studio Lifecycle Configuration.
studioLifecycleConfigDetails_studioLifecycleConfigName :: Lens.Lens' StudioLifecycleConfigDetails (Prelude.Maybe Prelude.Text)
studioLifecycleConfigDetails_studioLifecycleConfigName :: (Maybe Text -> f (Maybe Text))
-> StudioLifecycleConfigDetails -> f StudioLifecycleConfigDetails
studioLifecycleConfigDetails_studioLifecycleConfigName = (StudioLifecycleConfigDetails -> Maybe Text)
-> (StudioLifecycleConfigDetails
    -> Maybe Text -> StudioLifecycleConfigDetails)
-> Lens
     StudioLifecycleConfigDetails
     StudioLifecycleConfigDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioLifecycleConfigDetails' {Maybe Text
studioLifecycleConfigName :: Maybe Text
$sel:studioLifecycleConfigName:StudioLifecycleConfigDetails' :: StudioLifecycleConfigDetails -> Maybe Text
studioLifecycleConfigName} -> Maybe Text
studioLifecycleConfigName) (\s :: StudioLifecycleConfigDetails
s@StudioLifecycleConfigDetails' {} Maybe Text
a -> StudioLifecycleConfigDetails
s {$sel:studioLifecycleConfigName:StudioLifecycleConfigDetails' :: Maybe Text
studioLifecycleConfigName = Maybe Text
a} :: StudioLifecycleConfigDetails)

instance Core.FromJSON StudioLifecycleConfigDetails where
  parseJSON :: Value -> Parser StudioLifecycleConfigDetails
parseJSON =
    String
-> (Object -> Parser StudioLifecycleConfigDetails)
-> Value
-> Parser StudioLifecycleConfigDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"StudioLifecycleConfigDetails"
      ( \Object
x ->
          Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe StudioLifecycleConfigAppType
-> Maybe Text
-> StudioLifecycleConfigDetails
StudioLifecycleConfigDetails'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe StudioLifecycleConfigAppType
 -> Maybe Text
 -> StudioLifecycleConfigDetails)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe StudioLifecycleConfigAppType
      -> Maybe Text
      -> StudioLifecycleConfigDetails)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe StudioLifecycleConfigAppType
   -> Maybe Text
   -> StudioLifecycleConfigDetails)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe StudioLifecycleConfigAppType
      -> Maybe Text
      -> StudioLifecycleConfigDetails)
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
"LastModifiedTime")
            Parser
  (Maybe Text
   -> Maybe StudioLifecycleConfigAppType
   -> Maybe Text
   -> StudioLifecycleConfigDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe StudioLifecycleConfigAppType
      -> Maybe Text -> StudioLifecycleConfigDetails)
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
"StudioLifecycleConfigArn")
            Parser
  (Maybe StudioLifecycleConfigAppType
   -> Maybe Text -> StudioLifecycleConfigDetails)
-> Parser (Maybe StudioLifecycleConfigAppType)
-> Parser (Maybe Text -> StudioLifecycleConfigDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StudioLifecycleConfigAppType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StudioLifecycleConfigAppType")
            Parser (Maybe Text -> StudioLifecycleConfigDetails)
-> Parser (Maybe Text) -> Parser StudioLifecycleConfigDetails
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
"StudioLifecycleConfigName")
      )

instance
  Prelude.Hashable
    StudioLifecycleConfigDetails

instance Prelude.NFData StudioLifecycleConfigDetails