{-# 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.CodeArtifact.Types.PackageVersionDescription
-- 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.CodeArtifact.Types.PackageVersionDescription where

import Amazonka.CodeArtifact.Types.LicenseInfo
import Amazonka.CodeArtifact.Types.PackageFormat
import Amazonka.CodeArtifact.Types.PackageVersionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details about a package version.
--
-- /See:/ 'newPackageVersionDescription' smart constructor.
data PackageVersionDescription = PackageVersionDescription'
  { -- | A summary of the package version. The summary is extracted from the
    -- package. The information in and detail level of the summary depends on
    -- the package version\'s format.
    PackageVersionDescription -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
    -- | The homepage associated with the package.
    PackageVersionDescription -> Maybe Text
homePage :: Prelude.Maybe Prelude.Text,
    -- | A string that contains the status of the package version. It can be one
    -- of the following:
    --
    -- -   @Published@
    --
    -- -   @Unfinished@
    --
    -- -   @Unlisted@
    --
    -- -   @Archived@
    --
    -- -   @Disposed@
    PackageVersionDescription -> Maybe PackageVersionStatus
status :: Prelude.Maybe PackageVersionStatus,
    -- | The repository for the source code in the package version, or the source
    -- code used to build it.
    PackageVersionDescription -> Maybe Text
sourceCodeRepository :: Prelude.Maybe Prelude.Text,
    -- | The name of the requested package.
    PackageVersionDescription -> Maybe Text
packageName :: Prelude.Maybe Prelude.Text,
    -- | A timestamp that contains the date and time the package version was
    -- published.
    PackageVersionDescription -> Maybe POSIX
publishedTime :: Prelude.Maybe Core.POSIX,
    -- | The format of the package version. The valid package formats are:
    --
    -- -   @npm@: A Node Package Manager (npm) package.
    --
    -- -   @pypi@: A Python Package Index (PyPI) package.
    --
    -- -   @maven@: A Maven package that contains compiled code in a
    --     distributable format, such as a JAR file.
    PackageVersionDescription -> Maybe PackageFormat
format :: Prelude.Maybe PackageFormat,
    -- | The namespace of the package. The package component that specifies its
    -- namespace depends on its type. For example:
    --
    -- -   The namespace of a Maven package is its @groupId@.
    --
    -- -   The namespace of an npm package is its @scope@.
    --
    -- -   A Python package does not contain a corresponding component, so
    --     Python packages do not have a namespace.
    PackageVersionDescription -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The version of the package.
    PackageVersionDescription -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The name of the package that is displayed. The @displayName@ varies
    -- depending on the package version\'s format. For example, if an npm
    -- package is named @ui@, is in the namespace @vue@, and has the format
    -- @npm@, then the @displayName@ is @\@vue\/ui@.
    PackageVersionDescription -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Information about licenses associated with the package version.
    PackageVersionDescription -> Maybe [LicenseInfo]
licenses :: Prelude.Maybe [LicenseInfo],
    -- | The revision of the package version.
    PackageVersionDescription -> Maybe Text
revision :: Prelude.Maybe Prelude.Text
  }
  deriving (PackageVersionDescription -> PackageVersionDescription -> Bool
(PackageVersionDescription -> PackageVersionDescription -> Bool)
-> (PackageVersionDescription -> PackageVersionDescription -> Bool)
-> Eq PackageVersionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PackageVersionDescription -> PackageVersionDescription -> Bool
$c/= :: PackageVersionDescription -> PackageVersionDescription -> Bool
== :: PackageVersionDescription -> PackageVersionDescription -> Bool
$c== :: PackageVersionDescription -> PackageVersionDescription -> Bool
Prelude.Eq, ReadPrec [PackageVersionDescription]
ReadPrec PackageVersionDescription
Int -> ReadS PackageVersionDescription
ReadS [PackageVersionDescription]
(Int -> ReadS PackageVersionDescription)
-> ReadS [PackageVersionDescription]
-> ReadPrec PackageVersionDescription
-> ReadPrec [PackageVersionDescription]
-> Read PackageVersionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PackageVersionDescription]
$creadListPrec :: ReadPrec [PackageVersionDescription]
readPrec :: ReadPrec PackageVersionDescription
$creadPrec :: ReadPrec PackageVersionDescription
readList :: ReadS [PackageVersionDescription]
$creadList :: ReadS [PackageVersionDescription]
readsPrec :: Int -> ReadS PackageVersionDescription
$creadsPrec :: Int -> ReadS PackageVersionDescription
Prelude.Read, Int -> PackageVersionDescription -> ShowS
[PackageVersionDescription] -> ShowS
PackageVersionDescription -> String
(Int -> PackageVersionDescription -> ShowS)
-> (PackageVersionDescription -> String)
-> ([PackageVersionDescription] -> ShowS)
-> Show PackageVersionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PackageVersionDescription] -> ShowS
$cshowList :: [PackageVersionDescription] -> ShowS
show :: PackageVersionDescription -> String
$cshow :: PackageVersionDescription -> String
showsPrec :: Int -> PackageVersionDescription -> ShowS
$cshowsPrec :: Int -> PackageVersionDescription -> ShowS
Prelude.Show, (forall x.
 PackageVersionDescription -> Rep PackageVersionDescription x)
-> (forall x.
    Rep PackageVersionDescription x -> PackageVersionDescription)
-> Generic PackageVersionDescription
forall x.
Rep PackageVersionDescription x -> PackageVersionDescription
forall x.
PackageVersionDescription -> Rep PackageVersionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PackageVersionDescription x -> PackageVersionDescription
$cfrom :: forall x.
PackageVersionDescription -> Rep PackageVersionDescription x
Prelude.Generic)

-- |
-- Create a value of 'PackageVersionDescription' 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:
--
-- 'summary', 'packageVersionDescription_summary' - A summary of the package version. The summary is extracted from the
-- package. The information in and detail level of the summary depends on
-- the package version\'s format.
--
-- 'homePage', 'packageVersionDescription_homePage' - The homepage associated with the package.
--
-- 'status', 'packageVersionDescription_status' - A string that contains the status of the package version. It can be one
-- of the following:
--
-- -   @Published@
--
-- -   @Unfinished@
--
-- -   @Unlisted@
--
-- -   @Archived@
--
-- -   @Disposed@
--
-- 'sourceCodeRepository', 'packageVersionDescription_sourceCodeRepository' - The repository for the source code in the package version, or the source
-- code used to build it.
--
-- 'packageName', 'packageVersionDescription_packageName' - The name of the requested package.
--
-- 'publishedTime', 'packageVersionDescription_publishedTime' - A timestamp that contains the date and time the package version was
-- published.
--
-- 'format', 'packageVersionDescription_format' - The format of the package version. The valid package formats are:
--
-- -   @npm@: A Node Package Manager (npm) package.
--
-- -   @pypi@: A Python Package Index (PyPI) package.
--
-- -   @maven@: A Maven package that contains compiled code in a
--     distributable format, such as a JAR file.
--
-- 'namespace', 'packageVersionDescription_namespace' - The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
--
-- 'version', 'packageVersionDescription_version' - The version of the package.
--
-- 'displayName', 'packageVersionDescription_displayName' - The name of the package that is displayed. The @displayName@ varies
-- depending on the package version\'s format. For example, if an npm
-- package is named @ui@, is in the namespace @vue@, and has the format
-- @npm@, then the @displayName@ is @\@vue\/ui@.
--
-- 'licenses', 'packageVersionDescription_licenses' - Information about licenses associated with the package version.
--
-- 'revision', 'packageVersionDescription_revision' - The revision of the package version.
newPackageVersionDescription ::
  PackageVersionDescription
newPackageVersionDescription :: PackageVersionDescription
newPackageVersionDescription =
  PackageVersionDescription' :: Maybe Text
-> Maybe Text
-> Maybe PackageVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PackageFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [LicenseInfo]
-> Maybe Text
-> PackageVersionDescription
PackageVersionDescription'
    { $sel:summary:PackageVersionDescription' :: Maybe Text
summary =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:homePage:PackageVersionDescription' :: Maybe Text
homePage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:PackageVersionDescription' :: Maybe PackageVersionStatus
status = Maybe PackageVersionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceCodeRepository:PackageVersionDescription' :: Maybe Text
sourceCodeRepository = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packageName:PackageVersionDescription' :: Maybe Text
packageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publishedTime:PackageVersionDescription' :: Maybe POSIX
publishedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:format:PackageVersionDescription' :: Maybe PackageFormat
format = Maybe PackageFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:namespace:PackageVersionDescription' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:PackageVersionDescription' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:PackageVersionDescription' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenses:PackageVersionDescription' :: Maybe [LicenseInfo]
licenses = Maybe [LicenseInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:revision:PackageVersionDescription' :: Maybe Text
revision = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A summary of the package version. The summary is extracted from the
-- package. The information in and detail level of the summary depends on
-- the package version\'s format.
packageVersionDescription_summary :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_summary :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_summary = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
summary :: Maybe Text
$sel:summary:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
summary} -> Maybe Text
summary) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:summary:PackageVersionDescription' :: Maybe Text
summary = Maybe Text
a} :: PackageVersionDescription)

-- | The homepage associated with the package.
packageVersionDescription_homePage :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_homePage :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_homePage = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
homePage :: Maybe Text
$sel:homePage:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
homePage} -> Maybe Text
homePage) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:homePage:PackageVersionDescription' :: Maybe Text
homePage = Maybe Text
a} :: PackageVersionDescription)

-- | A string that contains the status of the package version. It can be one
-- of the following:
--
-- -   @Published@
--
-- -   @Unfinished@
--
-- -   @Unlisted@
--
-- -   @Archived@
--
-- -   @Disposed@
packageVersionDescription_status :: Lens.Lens' PackageVersionDescription (Prelude.Maybe PackageVersionStatus)
packageVersionDescription_status :: (Maybe PackageVersionStatus -> f (Maybe PackageVersionStatus))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_status = (PackageVersionDescription -> Maybe PackageVersionStatus)
-> (PackageVersionDescription
    -> Maybe PackageVersionStatus -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe PackageVersionStatus)
     (Maybe PackageVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe PackageVersionStatus
status :: Maybe PackageVersionStatus
$sel:status:PackageVersionDescription' :: PackageVersionDescription -> Maybe PackageVersionStatus
status} -> Maybe PackageVersionStatus
status) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe PackageVersionStatus
a -> PackageVersionDescription
s {$sel:status:PackageVersionDescription' :: Maybe PackageVersionStatus
status = Maybe PackageVersionStatus
a} :: PackageVersionDescription)

-- | The repository for the source code in the package version, or the source
-- code used to build it.
packageVersionDescription_sourceCodeRepository :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_sourceCodeRepository :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_sourceCodeRepository = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
sourceCodeRepository :: Maybe Text
$sel:sourceCodeRepository:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
sourceCodeRepository} -> Maybe Text
sourceCodeRepository) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:sourceCodeRepository:PackageVersionDescription' :: Maybe Text
sourceCodeRepository = Maybe Text
a} :: PackageVersionDescription)

-- | The name of the requested package.
packageVersionDescription_packageName :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_packageName :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_packageName = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
packageName :: Maybe Text
$sel:packageName:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
packageName} -> Maybe Text
packageName) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:packageName:PackageVersionDescription' :: Maybe Text
packageName = Maybe Text
a} :: PackageVersionDescription)

-- | A timestamp that contains the date and time the package version was
-- published.
packageVersionDescription_publishedTime :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.UTCTime)
packageVersionDescription_publishedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_publishedTime = (PackageVersionDescription -> Maybe POSIX)
-> (PackageVersionDescription
    -> Maybe POSIX -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe POSIX
publishedTime :: Maybe POSIX
$sel:publishedTime:PackageVersionDescription' :: PackageVersionDescription -> Maybe POSIX
publishedTime} -> Maybe POSIX
publishedTime) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe POSIX
a -> PackageVersionDescription
s {$sel:publishedTime:PackageVersionDescription' :: Maybe POSIX
publishedTime = Maybe POSIX
a} :: PackageVersionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> PackageVersionDescription -> f PackageVersionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PackageVersionDescription
-> f PackageVersionDescription
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 format of the package version. The valid package formats are:
--
-- -   @npm@: A Node Package Manager (npm) package.
--
-- -   @pypi@: A Python Package Index (PyPI) package.
--
-- -   @maven@: A Maven package that contains compiled code in a
--     distributable format, such as a JAR file.
packageVersionDescription_format :: Lens.Lens' PackageVersionDescription (Prelude.Maybe PackageFormat)
packageVersionDescription_format :: (Maybe PackageFormat -> f (Maybe PackageFormat))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_format = (PackageVersionDescription -> Maybe PackageFormat)
-> (PackageVersionDescription
    -> Maybe PackageFormat -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe PackageFormat)
     (Maybe PackageFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe PackageFormat
format :: Maybe PackageFormat
$sel:format:PackageVersionDescription' :: PackageVersionDescription -> Maybe PackageFormat
format} -> Maybe PackageFormat
format) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe PackageFormat
a -> PackageVersionDescription
s {$sel:format:PackageVersionDescription' :: Maybe PackageFormat
format = Maybe PackageFormat
a} :: PackageVersionDescription)

-- | The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
packageVersionDescription_namespace :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_namespace :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_namespace = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
namespace :: Maybe Text
$sel:namespace:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:namespace:PackageVersionDescription' :: Maybe Text
namespace = Maybe Text
a} :: PackageVersionDescription)

-- | The version of the package.
packageVersionDescription_version :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_version :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_version = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
version :: Maybe Text
$sel:version:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
version} -> Maybe Text
version) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:version:PackageVersionDescription' :: Maybe Text
version = Maybe Text
a} :: PackageVersionDescription)

-- | The name of the package that is displayed. The @displayName@ varies
-- depending on the package version\'s format. For example, if an npm
-- package is named @ui@, is in the namespace @vue@, and has the format
-- @npm@, then the @displayName@ is @\@vue\/ui@.
packageVersionDescription_displayName :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_displayName :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_displayName = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
displayName :: Maybe Text
$sel:displayName:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:displayName:PackageVersionDescription' :: Maybe Text
displayName = Maybe Text
a} :: PackageVersionDescription)

-- | Information about licenses associated with the package version.
packageVersionDescription_licenses :: Lens.Lens' PackageVersionDescription (Prelude.Maybe [LicenseInfo])
packageVersionDescription_licenses :: (Maybe [LicenseInfo] -> f (Maybe [LicenseInfo]))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_licenses = (PackageVersionDescription -> Maybe [LicenseInfo])
-> (PackageVersionDescription
    -> Maybe [LicenseInfo] -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe [LicenseInfo])
     (Maybe [LicenseInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe [LicenseInfo]
licenses :: Maybe [LicenseInfo]
$sel:licenses:PackageVersionDescription' :: PackageVersionDescription -> Maybe [LicenseInfo]
licenses} -> Maybe [LicenseInfo]
licenses) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe [LicenseInfo]
a -> PackageVersionDescription
s {$sel:licenses:PackageVersionDescription' :: Maybe [LicenseInfo]
licenses = Maybe [LicenseInfo]
a} :: PackageVersionDescription) ((Maybe [LicenseInfo] -> f (Maybe [LicenseInfo]))
 -> PackageVersionDescription -> f PackageVersionDescription)
-> ((Maybe [LicenseInfo] -> f (Maybe [LicenseInfo]))
    -> Maybe [LicenseInfo] -> f (Maybe [LicenseInfo]))
-> (Maybe [LicenseInfo] -> f (Maybe [LicenseInfo]))
-> PackageVersionDescription
-> f PackageVersionDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LicenseInfo] [LicenseInfo] [LicenseInfo] [LicenseInfo]
-> Iso
     (Maybe [LicenseInfo])
     (Maybe [LicenseInfo])
     (Maybe [LicenseInfo])
     (Maybe [LicenseInfo])
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 [LicenseInfo] [LicenseInfo] [LicenseInfo] [LicenseInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The revision of the package version.
packageVersionDescription_revision :: Lens.Lens' PackageVersionDescription (Prelude.Maybe Prelude.Text)
packageVersionDescription_revision :: (Maybe Text -> f (Maybe Text))
-> PackageVersionDescription -> f PackageVersionDescription
packageVersionDescription_revision = (PackageVersionDescription -> Maybe Text)
-> (PackageVersionDescription
    -> Maybe Text -> PackageVersionDescription)
-> Lens
     PackageVersionDescription
     PackageVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackageVersionDescription' {Maybe Text
revision :: Maybe Text
$sel:revision:PackageVersionDescription' :: PackageVersionDescription -> Maybe Text
revision} -> Maybe Text
revision) (\s :: PackageVersionDescription
s@PackageVersionDescription' {} Maybe Text
a -> PackageVersionDescription
s {$sel:revision:PackageVersionDescription' :: Maybe Text
revision = Maybe Text
a} :: PackageVersionDescription)

instance Core.FromJSON PackageVersionDescription where
  parseJSON :: Value -> Parser PackageVersionDescription
parseJSON =
    String
-> (Object -> Parser PackageVersionDescription)
-> Value
-> Parser PackageVersionDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PackageVersionDescription"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe PackageVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PackageFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [LicenseInfo]
-> Maybe Text
-> PackageVersionDescription
PackageVersionDescription'
            (Maybe Text
 -> Maybe Text
 -> Maybe PackageVersionStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe PackageFormat
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [LicenseInfo]
 -> Maybe Text
 -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PackageVersionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
forall (f :: * -> *) a b. Functor 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
"summary")
            Parser
  (Maybe Text
   -> Maybe PackageVersionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe PackageVersionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
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
"homePage")
            Parser
  (Maybe PackageVersionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe PackageVersionStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PackageVersionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
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
"sourceCodeRepository")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
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
"packageName")
            Parser
  (Maybe POSIX
   -> Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe PackageFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
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
"publishedTime")
            Parser
  (Maybe PackageFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe PackageFormat)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PackageFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"format")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [LicenseInfo]
      -> Maybe Text
      -> PackageVersionDescription)
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
"namespace")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [LicenseInfo]
   -> Maybe Text
   -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [LicenseInfo] -> Maybe Text -> PackageVersionDescription)
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
"version")
            Parser
  (Maybe Text
   -> Maybe [LicenseInfo] -> Maybe Text -> PackageVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [LicenseInfo] -> Maybe Text -> PackageVersionDescription)
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
"displayName")
            Parser
  (Maybe [LicenseInfo] -> Maybe Text -> PackageVersionDescription)
-> Parser (Maybe [LicenseInfo])
-> Parser (Maybe Text -> PackageVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [LicenseInfo]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"licenses" Parser (Maybe (Maybe [LicenseInfo]))
-> Maybe [LicenseInfo] -> Parser (Maybe [LicenseInfo])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LicenseInfo]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> PackageVersionDescription)
-> Parser (Maybe Text) -> Parser PackageVersionDescription
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
"revision")
      )

instance Prelude.Hashable PackageVersionDescription

instance Prelude.NFData PackageVersionDescription