{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.EdgePresetDeploymentOutput 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.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 Amazon Resource Name (ARN) of the generated deployable resource.
    EdgePresetDeploymentOutput -> Maybe Text
artifact :: Prelude.Maybe Prelude.Text,
    -- | The status of the deployable resource.
    EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus
status :: Prelude.Maybe EdgePresetDeploymentStatus,
    -- | 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
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]
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
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.
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:
--
-- 'artifact', 'edgePresetDeploymentOutput_artifact' - The Amazon Resource Name (ARN) of the generated deployable resource.
--
-- 'status', 'edgePresetDeploymentOutput_status' - The status of the 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'
    { $sel:artifact:EdgePresetDeploymentOutput' :: Maybe Text
artifact =
        forall a. Maybe a
Prelude.Nothing,
      $sel:status:EdgePresetDeploymentOutput' :: Maybe EdgePresetDeploymentStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:EdgePresetDeploymentOutput' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentType
type' = EdgePresetDeploymentType
pType_
    }

-- | The Amazon Resource Name (ARN) of the generated deployable resource.
edgePresetDeploymentOutput_artifact :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe Prelude.Text)
edgePresetDeploymentOutput_artifact :: Lens' EdgePresetDeploymentOutput (Maybe Text)
edgePresetDeploymentOutput_artifact = 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)

-- | The status of the deployable resource.
edgePresetDeploymentOutput_status :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe EdgePresetDeploymentStatus)
edgePresetDeploymentOutput_status :: Lens' EdgePresetDeploymentOutput (Maybe EdgePresetDeploymentStatus)
edgePresetDeploymentOutput_status = 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)

-- | Returns a message describing the status of the deployed resource.
edgePresetDeploymentOutput_statusMessage :: Lens.Lens' EdgePresetDeploymentOutput (Prelude.Maybe Prelude.Text)
edgePresetDeploymentOutput_statusMessage :: Lens' EdgePresetDeploymentOutput (Maybe Text)
edgePresetDeploymentOutput_statusMessage = 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 :: Lens' EdgePresetDeploymentOutput EdgePresetDeploymentType
edgePresetDeploymentOutput_type = 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 Data.FromJSON EdgePresetDeploymentOutput where
  parseJSON :: Value -> Parser EdgePresetDeploymentOutput
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EdgePresetDeploymentOutput"
      ( \Object
x ->
          Maybe Text
-> Maybe EdgePresetDeploymentStatus
-> Maybe Text
-> EdgePresetDeploymentType
-> EdgePresetDeploymentOutput
EdgePresetDeploymentOutput'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Artifact")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StatusMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Type")
      )

instance Prelude.Hashable EdgePresetDeploymentOutput where
  hashWithSalt :: Int -> EdgePresetDeploymentOutput -> Int
hashWithSalt Int
_salt EdgePresetDeploymentOutput' {Maybe Text
Maybe EdgePresetDeploymentStatus
EdgePresetDeploymentType
type' :: EdgePresetDeploymentType
statusMessage :: Maybe Text
status :: Maybe EdgePresetDeploymentStatus
artifact :: Maybe Text
$sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> EdgePresetDeploymentType
$sel:statusMessage:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
$sel:status:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus
$sel:artifact:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
artifact
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EdgePresetDeploymentStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EdgePresetDeploymentType
type'

instance Prelude.NFData EdgePresetDeploymentOutput where
  rnf :: EdgePresetDeploymentOutput -> ()
rnf EdgePresetDeploymentOutput' {Maybe Text
Maybe EdgePresetDeploymentStatus
EdgePresetDeploymentType
type' :: EdgePresetDeploymentType
statusMessage :: Maybe Text
status :: Maybe EdgePresetDeploymentStatus
artifact :: Maybe Text
$sel:type':EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> EdgePresetDeploymentType
$sel:statusMessage:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
$sel:status:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe EdgePresetDeploymentStatus
$sel:artifact:EdgePresetDeploymentOutput' :: EdgePresetDeploymentOutput -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
artifact
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EdgePresetDeploymentStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EdgePresetDeploymentType
type'