{-# 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.Panorama.Types.PackageImportJobOutput
-- 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.Panorama.Types.PackageImportJobOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Panorama.Types.OutPutS3Location
import qualified Amazonka.Prelude as Prelude

-- | Results of a package import job.
--
-- /See:/ 'newPackageImportJobOutput' smart constructor.
data PackageImportJobOutput = PackageImportJobOutput'
  { -- | The package\'s ID.
    PackageImportJobOutput -> Text
packageId :: Prelude.Text,
    -- | The package\'s version.
    PackageImportJobOutput -> Text
packageVersion :: Prelude.Text,
    -- | The package\'s patch version.
    PackageImportJobOutput -> Text
patchVersion :: Prelude.Text,
    -- | The package\'s output location.
    PackageImportJobOutput -> OutPutS3Location
outputS3Location :: OutPutS3Location
  }
  deriving (PackageImportJobOutput -> PackageImportJobOutput -> Bool
(PackageImportJobOutput -> PackageImportJobOutput -> Bool)
-> (PackageImportJobOutput -> PackageImportJobOutput -> Bool)
-> Eq PackageImportJobOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PackageImportJobOutput -> PackageImportJobOutput -> Bool
$c/= :: PackageImportJobOutput -> PackageImportJobOutput -> Bool
== :: PackageImportJobOutput -> PackageImportJobOutput -> Bool
$c== :: PackageImportJobOutput -> PackageImportJobOutput -> Bool
Prelude.Eq, ReadPrec [PackageImportJobOutput]
ReadPrec PackageImportJobOutput
Int -> ReadS PackageImportJobOutput
ReadS [PackageImportJobOutput]
(Int -> ReadS PackageImportJobOutput)
-> ReadS [PackageImportJobOutput]
-> ReadPrec PackageImportJobOutput
-> ReadPrec [PackageImportJobOutput]
-> Read PackageImportJobOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PackageImportJobOutput]
$creadListPrec :: ReadPrec [PackageImportJobOutput]
readPrec :: ReadPrec PackageImportJobOutput
$creadPrec :: ReadPrec PackageImportJobOutput
readList :: ReadS [PackageImportJobOutput]
$creadList :: ReadS [PackageImportJobOutput]
readsPrec :: Int -> ReadS PackageImportJobOutput
$creadsPrec :: Int -> ReadS PackageImportJobOutput
Prelude.Read, Int -> PackageImportJobOutput -> ShowS
[PackageImportJobOutput] -> ShowS
PackageImportJobOutput -> String
(Int -> PackageImportJobOutput -> ShowS)
-> (PackageImportJobOutput -> String)
-> ([PackageImportJobOutput] -> ShowS)
-> Show PackageImportJobOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PackageImportJobOutput] -> ShowS
$cshowList :: [PackageImportJobOutput] -> ShowS
show :: PackageImportJobOutput -> String
$cshow :: PackageImportJobOutput -> String
showsPrec :: Int -> PackageImportJobOutput -> ShowS
$cshowsPrec :: Int -> PackageImportJobOutput -> ShowS
Prelude.Show, (forall x. PackageImportJobOutput -> Rep PackageImportJobOutput x)
-> (forall x.
    Rep PackageImportJobOutput x -> PackageImportJobOutput)
-> Generic PackageImportJobOutput
forall x. Rep PackageImportJobOutput x -> PackageImportJobOutput
forall x. PackageImportJobOutput -> Rep PackageImportJobOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PackageImportJobOutput x -> PackageImportJobOutput
$cfrom :: forall x. PackageImportJobOutput -> Rep PackageImportJobOutput x
Prelude.Generic)

-- |
-- Create a value of 'PackageImportJobOutput' 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:
--
-- 'packageId', 'packageImportJobOutput_packageId' - The package\'s ID.
--
-- 'packageVersion', 'packageImportJobOutput_packageVersion' - The package\'s version.
--
-- 'patchVersion', 'packageImportJobOutput_patchVersion' - The package\'s patch version.
--
-- 'outputS3Location', 'packageImportJobOutput_outputS3Location' - The package\'s output location.
newPackageImportJobOutput ::
  -- | 'packageId'
  Prelude.Text ->
  -- | 'packageVersion'
  Prelude.Text ->
  -- | 'patchVersion'
  Prelude.Text ->
  -- | 'outputS3Location'
  OutPutS3Location ->
  PackageImportJobOutput
newPackageImportJobOutput :: Text -> Text -> Text -> OutPutS3Location -> PackageImportJobOutput
newPackageImportJobOutput
  Text
pPackageId_
  Text
pPackageVersion_
  Text
pPatchVersion_
  OutPutS3Location
pOutputS3Location_ =
    PackageImportJobOutput' :: Text -> Text -> Text -> OutPutS3Location -> PackageImportJobOutput
PackageImportJobOutput'
      { $sel:packageId:PackageImportJobOutput' :: Text
packageId = Text
pPackageId_,
        $sel:packageVersion:PackageImportJobOutput' :: Text
packageVersion = Text
pPackageVersion_,
        $sel:patchVersion:PackageImportJobOutput' :: Text
patchVersion = Text
pPatchVersion_,
        $sel:outputS3Location:PackageImportJobOutput' :: OutPutS3Location
outputS3Location = OutPutS3Location
pOutputS3Location_
      }

-- | The package\'s ID.
packageImportJobOutput_packageId :: Lens.Lens' PackageImportJobOutput Prelude.Text
packageImportJobOutput_packageId :: (Text -> f Text)
-> PackageImportJobOutput -> f PackageImportJobOutput
packageImportJobOutput_packageId = (PackageImportJobOutput -> Text)
-> (PackageImportJobOutput -> Text -> PackageImportJobOutput)
-> Lens PackageImportJobOutput PackageImportJobOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageImportJobOutput' {Text
packageId :: Text
$sel:packageId:PackageImportJobOutput' :: PackageImportJobOutput -> Text
packageId} -> Text
packageId) (\s :: PackageImportJobOutput
s@PackageImportJobOutput' {} Text
a -> PackageImportJobOutput
s {$sel:packageId:PackageImportJobOutput' :: Text
packageId = Text
a} :: PackageImportJobOutput)

-- | The package\'s version.
packageImportJobOutput_packageVersion :: Lens.Lens' PackageImportJobOutput Prelude.Text
packageImportJobOutput_packageVersion :: (Text -> f Text)
-> PackageImportJobOutput -> f PackageImportJobOutput
packageImportJobOutput_packageVersion = (PackageImportJobOutput -> Text)
-> (PackageImportJobOutput -> Text -> PackageImportJobOutput)
-> Lens PackageImportJobOutput PackageImportJobOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageImportJobOutput' {Text
packageVersion :: Text
$sel:packageVersion:PackageImportJobOutput' :: PackageImportJobOutput -> Text
packageVersion} -> Text
packageVersion) (\s :: PackageImportJobOutput
s@PackageImportJobOutput' {} Text
a -> PackageImportJobOutput
s {$sel:packageVersion:PackageImportJobOutput' :: Text
packageVersion = Text
a} :: PackageImportJobOutput)

-- | The package\'s patch version.
packageImportJobOutput_patchVersion :: Lens.Lens' PackageImportJobOutput Prelude.Text
packageImportJobOutput_patchVersion :: (Text -> f Text)
-> PackageImportJobOutput -> f PackageImportJobOutput
packageImportJobOutput_patchVersion = (PackageImportJobOutput -> Text)
-> (PackageImportJobOutput -> Text -> PackageImportJobOutput)
-> Lens PackageImportJobOutput PackageImportJobOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageImportJobOutput' {Text
patchVersion :: Text
$sel:patchVersion:PackageImportJobOutput' :: PackageImportJobOutput -> Text
patchVersion} -> Text
patchVersion) (\s :: PackageImportJobOutput
s@PackageImportJobOutput' {} Text
a -> PackageImportJobOutput
s {$sel:patchVersion:PackageImportJobOutput' :: Text
patchVersion = Text
a} :: PackageImportJobOutput)

-- | The package\'s output location.
packageImportJobOutput_outputS3Location :: Lens.Lens' PackageImportJobOutput OutPutS3Location
packageImportJobOutput_outputS3Location :: (OutPutS3Location -> f OutPutS3Location)
-> PackageImportJobOutput -> f PackageImportJobOutput
packageImportJobOutput_outputS3Location = (PackageImportJobOutput -> OutPutS3Location)
-> (PackageImportJobOutput
    -> OutPutS3Location -> PackageImportJobOutput)
-> Lens
     PackageImportJobOutput
     PackageImportJobOutput
     OutPutS3Location
     OutPutS3Location
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageImportJobOutput' {OutPutS3Location
outputS3Location :: OutPutS3Location
$sel:outputS3Location:PackageImportJobOutput' :: PackageImportJobOutput -> OutPutS3Location
outputS3Location} -> OutPutS3Location
outputS3Location) (\s :: PackageImportJobOutput
s@PackageImportJobOutput' {} OutPutS3Location
a -> PackageImportJobOutput
s {$sel:outputS3Location:PackageImportJobOutput' :: OutPutS3Location
outputS3Location = OutPutS3Location
a} :: PackageImportJobOutput)

instance Core.FromJSON PackageImportJobOutput where
  parseJSON :: Value -> Parser PackageImportJobOutput
parseJSON =
    String
-> (Object -> Parser PackageImportJobOutput)
-> Value
-> Parser PackageImportJobOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PackageImportJobOutput"
      ( \Object
x ->
          Text -> Text -> Text -> OutPutS3Location -> PackageImportJobOutput
PackageImportJobOutput'
            (Text
 -> Text -> Text -> OutPutS3Location -> PackageImportJobOutput)
-> Parser Text
-> Parser
     (Text -> Text -> OutPutS3Location -> PackageImportJobOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PackageId")
            Parser (Text -> Text -> OutPutS3Location -> PackageImportJobOutput)
-> Parser Text
-> Parser (Text -> OutPutS3Location -> PackageImportJobOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PackageVersion")
            Parser (Text -> OutPutS3Location -> PackageImportJobOutput)
-> Parser Text
-> Parser (OutPutS3Location -> PackageImportJobOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PatchVersion")
            Parser (OutPutS3Location -> PackageImportJobOutput)
-> Parser OutPutS3Location -> Parser PackageImportJobOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OutPutS3Location
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputS3Location")
      )

instance Prelude.Hashable PackageImportJobOutput

instance Prelude.NFData PackageImportJobOutput