{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribePackage
-- 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)
--
-- Returns information about a package.
module Amazonka.Panorama.DescribePackage
  ( -- * Creating a Request
    DescribePackage (..),
    newDescribePackage,

    -- * Request Lenses
    describePackage_packageId,

    -- * Destructuring the Response
    DescribePackageResponse (..),
    newDescribePackageResponse,

    -- * Response Lenses
    describePackageResponse_writeAccessPrincipalArns,
    describePackageResponse_readAccessPrincipalArns,
    describePackageResponse_httpStatus,
    describePackageResponse_packageId,
    describePackageResponse_packageName,
    describePackageResponse_arn,
    describePackageResponse_storageLocation,
    describePackageResponse_createdTime,
    describePackageResponse_tags,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Panorama.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribePackage' smart constructor.
data DescribePackage = DescribePackage'
  { -- | The package\'s ID.
    DescribePackage -> Text
packageId :: Prelude.Text
  }
  deriving (DescribePackage -> DescribePackage -> Bool
(DescribePackage -> DescribePackage -> Bool)
-> (DescribePackage -> DescribePackage -> Bool)
-> Eq DescribePackage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePackage -> DescribePackage -> Bool
$c/= :: DescribePackage -> DescribePackage -> Bool
== :: DescribePackage -> DescribePackage -> Bool
$c== :: DescribePackage -> DescribePackage -> Bool
Prelude.Eq, ReadPrec [DescribePackage]
ReadPrec DescribePackage
Int -> ReadS DescribePackage
ReadS [DescribePackage]
(Int -> ReadS DescribePackage)
-> ReadS [DescribePackage]
-> ReadPrec DescribePackage
-> ReadPrec [DescribePackage]
-> Read DescribePackage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePackage]
$creadListPrec :: ReadPrec [DescribePackage]
readPrec :: ReadPrec DescribePackage
$creadPrec :: ReadPrec DescribePackage
readList :: ReadS [DescribePackage]
$creadList :: ReadS [DescribePackage]
readsPrec :: Int -> ReadS DescribePackage
$creadsPrec :: Int -> ReadS DescribePackage
Prelude.Read, Int -> DescribePackage -> ShowS
[DescribePackage] -> ShowS
DescribePackage -> String
(Int -> DescribePackage -> ShowS)
-> (DescribePackage -> String)
-> ([DescribePackage] -> ShowS)
-> Show DescribePackage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePackage] -> ShowS
$cshowList :: [DescribePackage] -> ShowS
show :: DescribePackage -> String
$cshow :: DescribePackage -> String
showsPrec :: Int -> DescribePackage -> ShowS
$cshowsPrec :: Int -> DescribePackage -> ShowS
Prelude.Show, (forall x. DescribePackage -> Rep DescribePackage x)
-> (forall x. Rep DescribePackage x -> DescribePackage)
-> Generic DescribePackage
forall x. Rep DescribePackage x -> DescribePackage
forall x. DescribePackage -> Rep DescribePackage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePackage x -> DescribePackage
$cfrom :: forall x. DescribePackage -> Rep DescribePackage x
Prelude.Generic)

-- |
-- Create a value of 'DescribePackage' 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', 'describePackage_packageId' - The package\'s ID.
newDescribePackage ::
  -- | 'packageId'
  Prelude.Text ->
  DescribePackage
newDescribePackage :: Text -> DescribePackage
newDescribePackage Text
pPackageId_ =
  DescribePackage' :: Text -> DescribePackage
DescribePackage' {$sel:packageId:DescribePackage' :: Text
packageId = Text
pPackageId_}

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

instance Core.AWSRequest DescribePackage where
  type
    AWSResponse DescribePackage =
      DescribePackageResponse
  request :: DescribePackage -> Request DescribePackage
request = Service -> DescribePackage -> Request DescribePackage
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribePackage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribePackage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribePackage))
-> Logger
-> Service
-> Proxy DescribePackage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribePackage)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Text]
-> Maybe [Text]
-> Int
-> Text
-> Text
-> Text
-> StorageLocation
-> POSIX
-> HashMap Text Text
-> DescribePackageResponse
DescribePackageResponse'
            (Maybe [Text]
 -> Maybe [Text]
 -> Int
 -> Text
 -> Text
 -> Text
 -> StorageLocation
 -> POSIX
 -> HashMap Text Text
 -> DescribePackageResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [Text]
      -> Int
      -> Text
      -> Text
      -> Text
      -> StorageLocation
      -> POSIX
      -> HashMap Text Text
      -> DescribePackageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WriteAccessPrincipalArns"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [Text]
   -> Int
   -> Text
   -> Text
   -> Text
   -> StorageLocation
   -> POSIX
   -> HashMap Text Text
   -> DescribePackageResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Int
      -> Text
      -> Text
      -> Text
      -> StorageLocation
      -> POSIX
      -> HashMap Text Text
      -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReadAccessPrincipalArns"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Int
   -> Text
   -> Text
   -> Text
   -> StorageLocation
   -> POSIX
   -> HashMap Text Text
   -> DescribePackageResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Text
      -> StorageLocation
      -> POSIX
      -> HashMap Text Text
      -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  (Text
   -> Text
   -> Text
   -> StorageLocation
   -> POSIX
   -> HashMap Text Text
   -> DescribePackageResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> StorageLocation
      -> POSIX
      -> HashMap Text Text
      -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PackageId")
            Either
  String
  (Text
   -> Text
   -> StorageLocation
   -> POSIX
   -> HashMap Text Text
   -> DescribePackageResponse)
-> Either String Text
-> Either
     String
     (Text
      -> StorageLocation
      -> POSIX
      -> HashMap Text Text
      -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PackageName")
            Either
  String
  (Text
   -> StorageLocation
   -> POSIX
   -> HashMap Text Text
   -> DescribePackageResponse)
-> Either String Text
-> Either
     String
     (StorageLocation
      -> POSIX -> HashMap Text Text -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Arn")
            Either
  String
  (StorageLocation
   -> POSIX -> HashMap Text Text -> DescribePackageResponse)
-> Either String StorageLocation
-> Either
     String (POSIX -> HashMap Text Text -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String StorageLocation
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"StorageLocation")
            Either
  String (POSIX -> HashMap Text Text -> DescribePackageResponse)
-> Either String POSIX
-> Either String (HashMap Text Text -> DescribePackageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreatedTime")
            Either String (HashMap Text Text -> DescribePackageResponse)
-> Either String (HashMap Text Text)
-> Either String DescribePackageResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (HashMap Text Text))
-> HashMap Text Text -> Either String (HashMap Text Text)
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable DescribePackage

instance Prelude.NFData DescribePackage

instance Core.ToHeaders DescribePackage where
  toHeaders :: DescribePackage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribePackage -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribePackage where
  toPath :: DescribePackage -> ByteString
toPath DescribePackage' {Text
packageId :: Text
$sel:packageId:DescribePackage' :: DescribePackage -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/packages/metadata/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
packageId]

instance Core.ToQuery DescribePackage where
  toQuery :: DescribePackage -> QueryString
toQuery = QueryString -> DescribePackage -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribePackageResponse' smart constructor.
data DescribePackageResponse = DescribePackageResponse'
  { -- | ARNs of accounts that have write access to the package.
    DescribePackageResponse -> Maybe [Text]
writeAccessPrincipalArns :: Prelude.Maybe [Prelude.Text],
    -- | ARNs of accounts that have read access to the package.
    DescribePackageResponse -> Maybe [Text]
readAccessPrincipalArns :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    DescribePackageResponse -> Int
httpStatus :: Prelude.Int,
    -- | The package\'s ID.
    DescribePackageResponse -> Text
packageId :: Prelude.Text,
    -- | The package\'s name.
    DescribePackageResponse -> Text
packageName :: Prelude.Text,
    -- | The package\'s ARN.
    DescribePackageResponse -> Text
arn :: Prelude.Text,
    -- | The package\'s storage location.
    DescribePackageResponse -> StorageLocation
storageLocation :: StorageLocation,
    -- | When the package was created.
    DescribePackageResponse -> POSIX
createdTime :: Core.POSIX,
    -- | The package\'s tags.
    DescribePackageResponse -> HashMap Text Text
tags :: Prelude.HashMap Prelude.Text Prelude.Text
  }
  deriving (DescribePackageResponse -> DescribePackageResponse -> Bool
(DescribePackageResponse -> DescribePackageResponse -> Bool)
-> (DescribePackageResponse -> DescribePackageResponse -> Bool)
-> Eq DescribePackageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePackageResponse -> DescribePackageResponse -> Bool
$c/= :: DescribePackageResponse -> DescribePackageResponse -> Bool
== :: DescribePackageResponse -> DescribePackageResponse -> Bool
$c== :: DescribePackageResponse -> DescribePackageResponse -> Bool
Prelude.Eq, ReadPrec [DescribePackageResponse]
ReadPrec DescribePackageResponse
Int -> ReadS DescribePackageResponse
ReadS [DescribePackageResponse]
(Int -> ReadS DescribePackageResponse)
-> ReadS [DescribePackageResponse]
-> ReadPrec DescribePackageResponse
-> ReadPrec [DescribePackageResponse]
-> Read DescribePackageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePackageResponse]
$creadListPrec :: ReadPrec [DescribePackageResponse]
readPrec :: ReadPrec DescribePackageResponse
$creadPrec :: ReadPrec DescribePackageResponse
readList :: ReadS [DescribePackageResponse]
$creadList :: ReadS [DescribePackageResponse]
readsPrec :: Int -> ReadS DescribePackageResponse
$creadsPrec :: Int -> ReadS DescribePackageResponse
Prelude.Read, Int -> DescribePackageResponse -> ShowS
[DescribePackageResponse] -> ShowS
DescribePackageResponse -> String
(Int -> DescribePackageResponse -> ShowS)
-> (DescribePackageResponse -> String)
-> ([DescribePackageResponse] -> ShowS)
-> Show DescribePackageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePackageResponse] -> ShowS
$cshowList :: [DescribePackageResponse] -> ShowS
show :: DescribePackageResponse -> String
$cshow :: DescribePackageResponse -> String
showsPrec :: Int -> DescribePackageResponse -> ShowS
$cshowsPrec :: Int -> DescribePackageResponse -> ShowS
Prelude.Show, (forall x.
 DescribePackageResponse -> Rep DescribePackageResponse x)
-> (forall x.
    Rep DescribePackageResponse x -> DescribePackageResponse)
-> Generic DescribePackageResponse
forall x. Rep DescribePackageResponse x -> DescribePackageResponse
forall x. DescribePackageResponse -> Rep DescribePackageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePackageResponse x -> DescribePackageResponse
$cfrom :: forall x. DescribePackageResponse -> Rep DescribePackageResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePackageResponse' 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:
--
-- 'writeAccessPrincipalArns', 'describePackageResponse_writeAccessPrincipalArns' - ARNs of accounts that have write access to the package.
--
-- 'readAccessPrincipalArns', 'describePackageResponse_readAccessPrincipalArns' - ARNs of accounts that have read access to the package.
--
-- 'httpStatus', 'describePackageResponse_httpStatus' - The response's http status code.
--
-- 'packageId', 'describePackageResponse_packageId' - The package\'s ID.
--
-- 'packageName', 'describePackageResponse_packageName' - The package\'s name.
--
-- 'arn', 'describePackageResponse_arn' - The package\'s ARN.
--
-- 'storageLocation', 'describePackageResponse_storageLocation' - The package\'s storage location.
--
-- 'createdTime', 'describePackageResponse_createdTime' - When the package was created.
--
-- 'tags', 'describePackageResponse_tags' - The package\'s tags.
newDescribePackageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'packageId'
  Prelude.Text ->
  -- | 'packageName'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'storageLocation'
  StorageLocation ->
  -- | 'createdTime'
  Prelude.UTCTime ->
  DescribePackageResponse
newDescribePackageResponse :: Int
-> Text
-> Text
-> Text
-> StorageLocation
-> UTCTime
-> DescribePackageResponse
newDescribePackageResponse
  Int
pHttpStatus_
  Text
pPackageId_
  Text
pPackageName_
  Text
pArn_
  StorageLocation
pStorageLocation_
  UTCTime
pCreatedTime_ =
    DescribePackageResponse' :: Maybe [Text]
-> Maybe [Text]
-> Int
-> Text
-> Text
-> Text
-> StorageLocation
-> POSIX
-> HashMap Text Text
-> DescribePackageResponse
DescribePackageResponse'
      { $sel:writeAccessPrincipalArns:DescribePackageResponse' :: Maybe [Text]
writeAccessPrincipalArns =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:readAccessPrincipalArns:DescribePackageResponse' :: Maybe [Text]
readAccessPrincipalArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribePackageResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:packageId:DescribePackageResponse' :: Text
packageId = Text
pPackageId_,
        $sel:packageName:DescribePackageResponse' :: Text
packageName = Text
pPackageName_,
        $sel:arn:DescribePackageResponse' :: Text
arn = Text
pArn_,
        $sel:storageLocation:DescribePackageResponse' :: StorageLocation
storageLocation = StorageLocation
pStorageLocation_,
        $sel:createdTime:DescribePackageResponse' :: POSIX
createdTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTime_,
        $sel:tags:DescribePackageResponse' :: HashMap Text Text
tags = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
      }

-- | ARNs of accounts that have write access to the package.
describePackageResponse_writeAccessPrincipalArns :: Lens.Lens' DescribePackageResponse (Prelude.Maybe [Prelude.Text])
describePackageResponse_writeAccessPrincipalArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_writeAccessPrincipalArns = (DescribePackageResponse -> Maybe [Text])
-> (DescribePackageResponse
    -> Maybe [Text] -> DescribePackageResponse)
-> Lens
     DescribePackageResponse
     DescribePackageResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {Maybe [Text]
writeAccessPrincipalArns :: Maybe [Text]
$sel:writeAccessPrincipalArns:DescribePackageResponse' :: DescribePackageResponse -> Maybe [Text]
writeAccessPrincipalArns} -> Maybe [Text]
writeAccessPrincipalArns) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} Maybe [Text]
a -> DescribePackageResponse
s {$sel:writeAccessPrincipalArns:DescribePackageResponse' :: Maybe [Text]
writeAccessPrincipalArns = Maybe [Text]
a} :: DescribePackageResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribePackageResponse -> f DescribePackageResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribePackageResponse
-> f DescribePackageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | ARNs of accounts that have read access to the package.
describePackageResponse_readAccessPrincipalArns :: Lens.Lens' DescribePackageResponse (Prelude.Maybe [Prelude.Text])
describePackageResponse_readAccessPrincipalArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_readAccessPrincipalArns = (DescribePackageResponse -> Maybe [Text])
-> (DescribePackageResponse
    -> Maybe [Text] -> DescribePackageResponse)
-> Lens
     DescribePackageResponse
     DescribePackageResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {Maybe [Text]
readAccessPrincipalArns :: Maybe [Text]
$sel:readAccessPrincipalArns:DescribePackageResponse' :: DescribePackageResponse -> Maybe [Text]
readAccessPrincipalArns} -> Maybe [Text]
readAccessPrincipalArns) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} Maybe [Text]
a -> DescribePackageResponse
s {$sel:readAccessPrincipalArns:DescribePackageResponse' :: Maybe [Text]
readAccessPrincipalArns = Maybe [Text]
a} :: DescribePackageResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribePackageResponse -> f DescribePackageResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribePackageResponse
-> f DescribePackageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describePackageResponse_httpStatus :: Lens.Lens' DescribePackageResponse Prelude.Int
describePackageResponse_httpStatus :: (Int -> f Int)
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_httpStatus = (DescribePackageResponse -> Int)
-> (DescribePackageResponse -> Int -> DescribePackageResponse)
-> Lens DescribePackageResponse DescribePackageResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribePackageResponse' :: DescribePackageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} Int
a -> DescribePackageResponse
s {$sel:httpStatus:DescribePackageResponse' :: Int
httpStatus = Int
a} :: DescribePackageResponse)

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

-- | The package\'s name.
describePackageResponse_packageName :: Lens.Lens' DescribePackageResponse Prelude.Text
describePackageResponse_packageName :: (Text -> f Text)
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_packageName = (DescribePackageResponse -> Text)
-> (DescribePackageResponse -> Text -> DescribePackageResponse)
-> Lens DescribePackageResponse DescribePackageResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {Text
packageName :: Text
$sel:packageName:DescribePackageResponse' :: DescribePackageResponse -> Text
packageName} -> Text
packageName) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} Text
a -> DescribePackageResponse
s {$sel:packageName:DescribePackageResponse' :: Text
packageName = Text
a} :: DescribePackageResponse)

-- | The package\'s ARN.
describePackageResponse_arn :: Lens.Lens' DescribePackageResponse Prelude.Text
describePackageResponse_arn :: (Text -> f Text)
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_arn = (DescribePackageResponse -> Text)
-> (DescribePackageResponse -> Text -> DescribePackageResponse)
-> Lens DescribePackageResponse DescribePackageResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {Text
arn :: Text
$sel:arn:DescribePackageResponse' :: DescribePackageResponse -> Text
arn} -> Text
arn) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} Text
a -> DescribePackageResponse
s {$sel:arn:DescribePackageResponse' :: Text
arn = Text
a} :: DescribePackageResponse)

-- | The package\'s storage location.
describePackageResponse_storageLocation :: Lens.Lens' DescribePackageResponse StorageLocation
describePackageResponse_storageLocation :: (StorageLocation -> f StorageLocation)
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_storageLocation = (DescribePackageResponse -> StorageLocation)
-> (DescribePackageResponse
    -> StorageLocation -> DescribePackageResponse)
-> Lens
     DescribePackageResponse
     DescribePackageResponse
     StorageLocation
     StorageLocation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {StorageLocation
storageLocation :: StorageLocation
$sel:storageLocation:DescribePackageResponse' :: DescribePackageResponse -> StorageLocation
storageLocation} -> StorageLocation
storageLocation) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} StorageLocation
a -> DescribePackageResponse
s {$sel:storageLocation:DescribePackageResponse' :: StorageLocation
storageLocation = StorageLocation
a} :: DescribePackageResponse)

-- | When the package was created.
describePackageResponse_createdTime :: Lens.Lens' DescribePackageResponse Prelude.UTCTime
describePackageResponse_createdTime :: (UTCTime -> f UTCTime)
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_createdTime = (DescribePackageResponse -> POSIX)
-> (DescribePackageResponse -> POSIX -> DescribePackageResponse)
-> Lens DescribePackageResponse DescribePackageResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {POSIX
createdTime :: POSIX
$sel:createdTime:DescribePackageResponse' :: DescribePackageResponse -> POSIX
createdTime} -> POSIX
createdTime) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} POSIX
a -> DescribePackageResponse
s {$sel:createdTime:DescribePackageResponse' :: POSIX
createdTime = POSIX
a} :: DescribePackageResponse) ((POSIX -> f POSIX)
 -> DescribePackageResponse -> f DescribePackageResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribePackageResponse
-> f DescribePackageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The package\'s tags.
describePackageResponse_tags :: Lens.Lens' DescribePackageResponse (Prelude.HashMap Prelude.Text Prelude.Text)
describePackageResponse_tags :: (HashMap Text Text -> f (HashMap Text Text))
-> DescribePackageResponse -> f DescribePackageResponse
describePackageResponse_tags = (DescribePackageResponse -> HashMap Text Text)
-> (DescribePackageResponse
    -> HashMap Text Text -> DescribePackageResponse)
-> Lens
     DescribePackageResponse
     DescribePackageResponse
     (HashMap Text Text)
     (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePackageResponse' {HashMap Text Text
tags :: HashMap Text Text
$sel:tags:DescribePackageResponse' :: DescribePackageResponse -> HashMap Text Text
tags} -> HashMap Text Text
tags) (\s :: DescribePackageResponse
s@DescribePackageResponse' {} HashMap Text Text
a -> DescribePackageResponse
s {$sel:tags:DescribePackageResponse' :: HashMap Text Text
tags = HashMap Text Text
a} :: DescribePackageResponse) ((HashMap Text Text -> f (HashMap Text Text))
 -> DescribePackageResponse -> f DescribePackageResponse)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> DescribePackageResponse
-> f DescribePackageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData DescribePackageResponse