{-# 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.LookoutVision.Types.GreengrassOutputDetails
-- 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.LookoutVision.Types.GreengrassOutputDetails 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

-- | Information about the AWS IoT Greengrass component created by a model
-- packaging job.
--
-- /See:/ 'newGreengrassOutputDetails' smart constructor.
data GreengrassOutputDetails = GreengrassOutputDetails'
  { -- | The name of the component.
    GreengrassOutputDetails -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
    -- | The version of the component.
    GreengrassOutputDetails -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the component.
    GreengrassOutputDetails -> Maybe Text
componentVersionArn :: Prelude.Maybe Prelude.Text
  }
  deriving (GreengrassOutputDetails -> GreengrassOutputDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GreengrassOutputDetails -> GreengrassOutputDetails -> Bool
$c/= :: GreengrassOutputDetails -> GreengrassOutputDetails -> Bool
== :: GreengrassOutputDetails -> GreengrassOutputDetails -> Bool
$c== :: GreengrassOutputDetails -> GreengrassOutputDetails -> Bool
Prelude.Eq, ReadPrec [GreengrassOutputDetails]
ReadPrec GreengrassOutputDetails
Int -> ReadS GreengrassOutputDetails
ReadS [GreengrassOutputDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GreengrassOutputDetails]
$creadListPrec :: ReadPrec [GreengrassOutputDetails]
readPrec :: ReadPrec GreengrassOutputDetails
$creadPrec :: ReadPrec GreengrassOutputDetails
readList :: ReadS [GreengrassOutputDetails]
$creadList :: ReadS [GreengrassOutputDetails]
readsPrec :: Int -> ReadS GreengrassOutputDetails
$creadsPrec :: Int -> ReadS GreengrassOutputDetails
Prelude.Read, Int -> GreengrassOutputDetails -> ShowS
[GreengrassOutputDetails] -> ShowS
GreengrassOutputDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GreengrassOutputDetails] -> ShowS
$cshowList :: [GreengrassOutputDetails] -> ShowS
show :: GreengrassOutputDetails -> String
$cshow :: GreengrassOutputDetails -> String
showsPrec :: Int -> GreengrassOutputDetails -> ShowS
$cshowsPrec :: Int -> GreengrassOutputDetails -> ShowS
Prelude.Show, forall x. Rep GreengrassOutputDetails x -> GreengrassOutputDetails
forall x. GreengrassOutputDetails -> Rep GreengrassOutputDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GreengrassOutputDetails x -> GreengrassOutputDetails
$cfrom :: forall x. GreengrassOutputDetails -> Rep GreengrassOutputDetails x
Prelude.Generic)

-- |
-- Create a value of 'GreengrassOutputDetails' 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:
--
-- 'componentName', 'greengrassOutputDetails_componentName' - The name of the component.
--
-- 'componentVersion', 'greengrassOutputDetails_componentVersion' - The version of the component.
--
-- 'componentVersionArn', 'greengrassOutputDetails_componentVersionArn' - The Amazon Resource Name (ARN) of the component.
newGreengrassOutputDetails ::
  GreengrassOutputDetails
newGreengrassOutputDetails :: GreengrassOutputDetails
newGreengrassOutputDetails =
  GreengrassOutputDetails'
    { $sel:componentName:GreengrassOutputDetails' :: Maybe Text
componentName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:componentVersion:GreengrassOutputDetails' :: Maybe Text
componentVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:componentVersionArn:GreengrassOutputDetails' :: Maybe Text
componentVersionArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the component.
greengrassOutputDetails_componentName :: Lens.Lens' GreengrassOutputDetails (Prelude.Maybe Prelude.Text)
greengrassOutputDetails_componentName :: Lens' GreengrassOutputDetails (Maybe Text)
greengrassOutputDetails_componentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GreengrassOutputDetails' {Maybe Text
componentName :: Maybe Text
$sel:componentName:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: GreengrassOutputDetails
s@GreengrassOutputDetails' {} Maybe Text
a -> GreengrassOutputDetails
s {$sel:componentName:GreengrassOutputDetails' :: Maybe Text
componentName = Maybe Text
a} :: GreengrassOutputDetails)

-- | The version of the component.
greengrassOutputDetails_componentVersion :: Lens.Lens' GreengrassOutputDetails (Prelude.Maybe Prelude.Text)
greengrassOutputDetails_componentVersion :: Lens' GreengrassOutputDetails (Maybe Text)
greengrassOutputDetails_componentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GreengrassOutputDetails' {Maybe Text
componentVersion :: Maybe Text
$sel:componentVersion:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
componentVersion} -> Maybe Text
componentVersion) (\s :: GreengrassOutputDetails
s@GreengrassOutputDetails' {} Maybe Text
a -> GreengrassOutputDetails
s {$sel:componentVersion:GreengrassOutputDetails' :: Maybe Text
componentVersion = Maybe Text
a} :: GreengrassOutputDetails)

-- | The Amazon Resource Name (ARN) of the component.
greengrassOutputDetails_componentVersionArn :: Lens.Lens' GreengrassOutputDetails (Prelude.Maybe Prelude.Text)
greengrassOutputDetails_componentVersionArn :: Lens' GreengrassOutputDetails (Maybe Text)
greengrassOutputDetails_componentVersionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GreengrassOutputDetails' {Maybe Text
componentVersionArn :: Maybe Text
$sel:componentVersionArn:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
componentVersionArn} -> Maybe Text
componentVersionArn) (\s :: GreengrassOutputDetails
s@GreengrassOutputDetails' {} Maybe Text
a -> GreengrassOutputDetails
s {$sel:componentVersionArn:GreengrassOutputDetails' :: Maybe Text
componentVersionArn = Maybe Text
a} :: GreengrassOutputDetails)

instance Data.FromJSON GreengrassOutputDetails where
  parseJSON :: Value -> Parser GreengrassOutputDetails
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"GreengrassOutputDetails"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> GreengrassOutputDetails
GreengrassOutputDetails'
            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
"ComponentName")
            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
"ComponentVersion")
            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
"ComponentVersionArn")
      )

instance Prelude.Hashable GreengrassOutputDetails where
  hashWithSalt :: Int -> GreengrassOutputDetails -> Int
hashWithSalt Int
_salt GreengrassOutputDetails' {Maybe Text
componentVersionArn :: Maybe Text
componentVersion :: Maybe Text
componentName :: Maybe Text
$sel:componentVersionArn:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
$sel:componentVersion:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
$sel:componentName:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentVersionArn

instance Prelude.NFData GreengrassOutputDetails where
  rnf :: GreengrassOutputDetails -> ()
rnf GreengrassOutputDetails' {Maybe Text
componentVersionArn :: Maybe Text
componentVersion :: Maybe Text
componentName :: Maybe Text
$sel:componentVersionArn:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
$sel:componentVersion:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
$sel:componentName:GreengrassOutputDetails' :: GreengrassOutputDetails -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentVersionArn