{-# 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.EdgePresetDeploymentOutput
-- 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.EdgePresetDeploymentOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.EdgePresetDeploymentStatus
import Amazonka.SageMaker.Types.EdgePresetDeploymentType

-- | The output of a SageMaker Edge Manager deployable resource.
--
-- /See:/ 'newEdgePresetDeploymentOutput' smart constructor.
data EdgePresetDeploymentOutput = EdgePresetDeploymentOutput'
  { -- | The status of the deployable resource.
    EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus
status :: Prelude.Maybe EdgePresetDeploymentStatus,
    -- | The Amazon Resource Name (ARN) of the generated deployable resource.
    EdgePresetDeploymentOutput -> Maybe Text
artifact :: Prelude.Maybe Prelude.Text,
    -- | Returns a message describing the status of the deployed resource.
    EdgePresetDeploymentOutput -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The deployment type created by SageMaker Edge Manager. Currently only
    -- supports Amazon Web Services IoT Greengrass Version 2 components.
    EdgePresetDeploymentOutput -> EdgePresetDeploymentType
type' :: EdgePresetDeploymentType
  }
  deriving (EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool
(EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool)
-> (EdgePresetDeploymentOutput
    -> EdgePresetDeploymentOutput -> Bool)
-> Eq EdgePresetDeploymentOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool
$c/= :: EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool
== :: EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool
$c== :: EdgePresetDeploymentOutput -> EdgePresetDeploymentOutput -> Bool
Prelude.Eq, ReadPrec [EdgePresetDeploymentOutput]
ReadPrec EdgePresetDeploymentOutput
Int -> ReadS EdgePresetDeploymentOutput
ReadS [EdgePresetDeploymentOutput]
(Int -> ReadS EdgePresetDeploymentOutput)
-> ReadS [EdgePresetDeploymentOutput]
-> ReadPrec EdgePresetDeploymentOutput
-> ReadPrec [EdgePresetDeploymentOutput]
-> Read EdgePresetDeploymentOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EdgePresetDeploymentOutput]
$creadListPrec :: ReadPrec [EdgePresetDeploymentOutput]
readPrec :: ReadPrec EdgePresetDeploymentOutput
$creadPrec :: ReadPrec EdgePresetDeploymentOutput
readList :: ReadS [EdgePresetDeploymentOutput]
$creadList :: ReadS [EdgePresetDeploymentOutput]
readsPrec :: Int -> ReadS EdgePresetDeploymentOutput
$creadsPrec :: Int -> ReadS EdgePresetDeploymentOutput
Prelude.Read, Int -> EdgePresetDeploymentOutput -> ShowS
[EdgePresetDeploymentOutput] -> ShowS
EdgePresetDeploymentOutput -> String
(Int -> EdgePresetDeploymentOutput -> ShowS)
-> (EdgePresetDeploymentOutput -> String)
-> ([EdgePresetDeploymentOutput] -> ShowS)
-> Show EdgePresetDeploymentOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EdgePresetDeploymentOutput] -> ShowS
$cshowList :: [EdgePresetDeploymentOutput] -> ShowS
show :: EdgePresetDeploymentOutput -> String
$cshow :: EdgePresetDeploymentOutput -> String
showsPrec :: Int -> EdgePresetDeploymentOutput -> ShowS
$cshowsPrec :: Int -> EdgePresetDeploymentOutput -> ShowS
Prelude.Show, (forall x.
 EdgePresetDeploymentOutput -> Rep EdgePresetDeploymentOutput x)
-> (forall x.
    Rep EdgePresetDeploymentOutput x -> EdgePresetDeploymentOutput)
-> Generic EdgePresetDeploymentOutput
forall x.
Rep EdgePresetDeploymentOutput x -> EdgePresetDeploymentOutput
forall x.
EdgePresetDeploymentOutput -> Rep EdgePresetDeploymentOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EdgePresetDeploymentOutput x -> EdgePresetDeploymentOutput
$cfrom :: forall x.
EdgePresetDeploymentOutput -> Rep EdgePresetDeploymentOutput x
Prelude.Generic)

-- |
-- Create a value of 'EdgePresetDeploymentOutput' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'edgePresetDeploymentOutput_status' - The status of the deployable resource.
--
-- 'artifact', 'edgePresetDeploymentOutput_artifact' - The Amazon Resource Name (ARN) of the generated deployable resource.
--
-- 'statusMessage', 'edgePresetDeploymentOutput_statusMessage' - Returns a message describing the status of the deployed resource.
--
-- 'type'', 'edgePresetDeploymentOutput_type' - The deployment type created by SageMaker Edge Manager. Currently only
-- supports Amazon Web Services IoT Greengrass Version 2 components.
newEdgePresetDeploymentOutput ::
  -- | 'type''
  EdgePresetDeploymentType ->
  EdgePresetDeploymentOutput
newEdgePresetDeploymentOutput :: EdgePresetDeploymentType -> EdgePresetDeploymentOutput
newEdgePresetDeploymentOutput EdgePresetDeploymentType
pType_ =
  EdgePresetDeploymentOutput' :: Maybe EdgePresetDeploymentStatus
-> Maybe Text
-> Maybe Text
-> EdgePresetDeploymentType
-> EdgePresetDeploymentOutput
EdgePresetDeploymentOutput'
    { $sel:status:EdgePresetDeploymentOutput' :: Maybe EdgePresetDeploymentStatus
status =
        Maybe EdgePresetDeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:artifact:EdgePresetDeploymentOutput' :: Maybe Text
artifact = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:EdgePresetDeploymentOutput' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentType
type' = EdgePresetDeploymentType
pType_
    }

-- | The status of the deployable resource.
edgePresetDeploymentOutput_status :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe EdgePresetDeploymentStatus)
edgePresetDeploymentOutput_status :: (Maybe EdgePresetDeploymentStatus
 -> f (Maybe EdgePresetDeploymentStatus))
-> EdgePresetDeploymentOutput -> f EdgePresetDeploymentOutput
edgePresetDeploymentOutput_status = (EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus)
-> (EdgePresetDeploymentOutput
    -> Maybe EdgePresetDeploymentStatus -> EdgePresetDeploymentOutput)
-> Lens
     EdgePresetDeploymentOutput
     EdgePresetDeploymentOutput
     (Maybe EdgePresetDeploymentStatus)
     (Maybe EdgePresetDeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgePresetDeploymentOutput' {Maybe EdgePresetDeploymentStatus
status :: Maybe EdgePresetDeploymentStatus
$sel:status:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus
status} -> Maybe EdgePresetDeploymentStatus
status) (\s :: EdgePresetDeploymentOutput
s@EdgePresetDeploymentOutput' {} Maybe EdgePresetDeploymentStatus
a -> EdgePresetDeploymentOutput
s {$sel:status:EdgePresetDeploymentOutput' :: Maybe EdgePresetDeploymentStatus
status = Maybe EdgePresetDeploymentStatus
a} :: EdgePresetDeploymentOutput)

-- | The Amazon Resource Name (ARN) of the generated deployable resource.
edgePresetDeploymentOutput_artifact :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe Prelude.Text)
edgePresetDeploymentOutput_artifact :: (Maybe Text -> f (Maybe Text))
-> EdgePresetDeploymentOutput -> f EdgePresetDeploymentOutput
edgePresetDeploymentOutput_artifact = (EdgePresetDeploymentOutput -> Maybe Text)
-> (EdgePresetDeploymentOutput
    -> Maybe Text -> EdgePresetDeploymentOutput)
-> Lens
     EdgePresetDeploymentOutput
     EdgePresetDeploymentOutput
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgePresetDeploymentOutput' {Maybe Text
artifact :: Maybe Text
$sel:artifact:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
artifact} -> Maybe Text
artifact) (\s :: EdgePresetDeploymentOutput
s@EdgePresetDeploymentOutput' {} Maybe Text
a -> EdgePresetDeploymentOutput
s {$sel:artifact:EdgePresetDeploymentOutput' :: Maybe Text
artifact = Maybe Text
a} :: EdgePresetDeploymentOutput)

-- | Returns a message describing the status of the deployed resource.
edgePresetDeploymentOutput_statusMessage :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe Prelude.Text)
edgePresetDeploymentOutput_statusMessage :: (Maybe Text -> f (Maybe Text))
-> EdgePresetDeploymentOutput -> f EdgePresetDeploymentOutput
edgePresetDeploymentOutput_statusMessage = (EdgePresetDeploymentOutput -> Maybe Text)
-> (EdgePresetDeploymentOutput
    -> Maybe Text -> EdgePresetDeploymentOutput)
-> Lens
     EdgePresetDeploymentOutput
     EdgePresetDeploymentOutput
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgePresetDeploymentOutput' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: EdgePresetDeploymentOutput
s@EdgePresetDeploymentOutput' {} Maybe Text
a -> EdgePresetDeploymentOutput
s {$sel:statusMessage:EdgePresetDeploymentOutput' :: Maybe Text
statusMessage = Maybe Text
a} :: EdgePresetDeploymentOutput)

-- | The deployment type created by SageMaker Edge Manager. Currently only
-- supports Amazon Web Services IoT Greengrass Version 2 components.
edgePresetDeploymentOutput_type :: Lens.Lens' EdgePresetDeploymentOutput EdgePresetDeploymentType
edgePresetDeploymentOutput_type :: (EdgePresetDeploymentType -> f EdgePresetDeploymentType)
-> EdgePresetDeploymentOutput -> f EdgePresetDeploymentOutput
edgePresetDeploymentOutput_type = (EdgePresetDeploymentOutput -> EdgePresetDeploymentType)
-> (EdgePresetDeploymentOutput
    -> EdgePresetDeploymentType -> EdgePresetDeploymentOutput)
-> Lens
     EdgePresetDeploymentOutput
     EdgePresetDeploymentOutput
     EdgePresetDeploymentType
     EdgePresetDeploymentType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgePresetDeploymentOutput' {EdgePresetDeploymentType
type' :: EdgePresetDeploymentType
$sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> EdgePresetDeploymentType
type'} -> EdgePresetDeploymentType
type') (\s :: EdgePresetDeploymentOutput
s@EdgePresetDeploymentOutput' {} EdgePresetDeploymentType
a -> EdgePresetDeploymentOutput
s {$sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentType
type' = EdgePresetDeploymentType
a} :: EdgePresetDeploymentOutput)

instance Core.FromJSON EdgePresetDeploymentOutput where
  parseJSON :: Value -> Parser EdgePresetDeploymentOutput
parseJSON =
    String
-> (Object -> Parser EdgePresetDeploymentOutput)
-> Value
-> Parser EdgePresetDeploymentOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EdgePresetDeploymentOutput"
      ( \Object
x ->
          Maybe EdgePresetDeploymentStatus
-> Maybe Text
-> Maybe Text
-> EdgePresetDeploymentType
-> EdgePresetDeploymentOutput
EdgePresetDeploymentOutput'
            (Maybe EdgePresetDeploymentStatus
 -> Maybe Text
 -> Maybe Text
 -> EdgePresetDeploymentType
 -> EdgePresetDeploymentOutput)
-> Parser (Maybe EdgePresetDeploymentStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> EdgePresetDeploymentType
      -> EdgePresetDeploymentOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EdgePresetDeploymentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> EdgePresetDeploymentType
   -> EdgePresetDeploymentOutput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> EdgePresetDeploymentType -> EdgePresetDeploymentOutput)
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
"Artifact")
            Parser
  (Maybe Text
   -> EdgePresetDeploymentType -> EdgePresetDeploymentOutput)
-> Parser (Maybe Text)
-> Parser (EdgePresetDeploymentType -> EdgePresetDeploymentOutput)
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
"StatusMessage")
            Parser (EdgePresetDeploymentType -> EdgePresetDeploymentOutput)
-> Parser EdgePresetDeploymentType
-> Parser EdgePresetDeploymentOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EdgePresetDeploymentType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Type")
      )

instance Prelude.Hashable EdgePresetDeploymentOutput

instance Prelude.NFData EdgePresetDeploymentOutput