{-# 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.ServiceCatalog.DescribeProductAsAdmin
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about the specified product. This operation is run with
-- administrator access.
module Amazonka.ServiceCatalog.DescribeProductAsAdmin
  ( -- * Creating a Request
    DescribeProductAsAdmin (..),
    newDescribeProductAsAdmin,

    -- * Request Lenses
    describeProductAsAdmin_acceptLanguage,
    describeProductAsAdmin_id,
    describeProductAsAdmin_name,
    describeProductAsAdmin_sourcePortfolioId,

    -- * Destructuring the Response
    DescribeProductAsAdminResponse (..),
    newDescribeProductAsAdminResponse,

    -- * Response Lenses
    describeProductAsAdminResponse_budgets,
    describeProductAsAdminResponse_productViewDetail,
    describeProductAsAdminResponse_provisioningArtifactSummaries,
    describeProductAsAdminResponse_tagOptions,
    describeProductAsAdminResponse_tags,
    describeProductAsAdminResponse_httpStatus,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServiceCatalog.Types

-- | /See:/ 'newDescribeProductAsAdmin' smart constructor.
data DescribeProductAsAdmin = DescribeProductAsAdmin'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribeProductAsAdmin -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The product identifier.
    DescribeProductAsAdmin -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The product name.
    DescribeProductAsAdmin -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the shared portfolio that the specified product
    -- is associated with.
    --
    -- You can provide this parameter to retrieve the shared TagOptions
    -- associated with the product. If this parameter is provided and if
    -- TagOptions sharing is enabled in the portfolio share, the API returns
    -- both local and shared TagOptions associated with the product. Otherwise
    -- only local TagOptions will be returned.
    DescribeProductAsAdmin -> Maybe Text
sourcePortfolioId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeProductAsAdmin -> DescribeProductAsAdmin -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProductAsAdmin -> DescribeProductAsAdmin -> Bool
$c/= :: DescribeProductAsAdmin -> DescribeProductAsAdmin -> Bool
== :: DescribeProductAsAdmin -> DescribeProductAsAdmin -> Bool
$c== :: DescribeProductAsAdmin -> DescribeProductAsAdmin -> Bool
Prelude.Eq, ReadPrec [DescribeProductAsAdmin]
ReadPrec DescribeProductAsAdmin
Int -> ReadS DescribeProductAsAdmin
ReadS [DescribeProductAsAdmin]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProductAsAdmin]
$creadListPrec :: ReadPrec [DescribeProductAsAdmin]
readPrec :: ReadPrec DescribeProductAsAdmin
$creadPrec :: ReadPrec DescribeProductAsAdmin
readList :: ReadS [DescribeProductAsAdmin]
$creadList :: ReadS [DescribeProductAsAdmin]
readsPrec :: Int -> ReadS DescribeProductAsAdmin
$creadsPrec :: Int -> ReadS DescribeProductAsAdmin
Prelude.Read, Int -> DescribeProductAsAdmin -> ShowS
[DescribeProductAsAdmin] -> ShowS
DescribeProductAsAdmin -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProductAsAdmin] -> ShowS
$cshowList :: [DescribeProductAsAdmin] -> ShowS
show :: DescribeProductAsAdmin -> String
$cshow :: DescribeProductAsAdmin -> String
showsPrec :: Int -> DescribeProductAsAdmin -> ShowS
$cshowsPrec :: Int -> DescribeProductAsAdmin -> ShowS
Prelude.Show, forall x. Rep DescribeProductAsAdmin x -> DescribeProductAsAdmin
forall x. DescribeProductAsAdmin -> Rep DescribeProductAsAdmin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeProductAsAdmin x -> DescribeProductAsAdmin
$cfrom :: forall x. DescribeProductAsAdmin -> Rep DescribeProductAsAdmin x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProductAsAdmin' 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:
--
-- 'acceptLanguage', 'describeProductAsAdmin_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'id', 'describeProductAsAdmin_id' - The product identifier.
--
-- 'name', 'describeProductAsAdmin_name' - The product name.
--
-- 'sourcePortfolioId', 'describeProductAsAdmin_sourcePortfolioId' - The unique identifier of the shared portfolio that the specified product
-- is associated with.
--
-- You can provide this parameter to retrieve the shared TagOptions
-- associated with the product. If this parameter is provided and if
-- TagOptions sharing is enabled in the portfolio share, the API returns
-- both local and shared TagOptions associated with the product. Otherwise
-- only local TagOptions will be returned.
newDescribeProductAsAdmin ::
  DescribeProductAsAdmin
newDescribeProductAsAdmin :: DescribeProductAsAdmin
newDescribeProductAsAdmin =
  DescribeProductAsAdmin'
    { $sel:acceptLanguage:DescribeProductAsAdmin' :: Maybe Text
acceptLanguage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeProductAsAdmin' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeProductAsAdmin' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:sourcePortfolioId:DescribeProductAsAdmin' :: Maybe Text
sourcePortfolioId = forall a. Maybe a
Prelude.Nothing
    }

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
describeProductAsAdmin_acceptLanguage :: Lens.Lens' DescribeProductAsAdmin (Prelude.Maybe Prelude.Text)
describeProductAsAdmin_acceptLanguage :: Lens' DescribeProductAsAdmin (Maybe Text)
describeProductAsAdmin_acceptLanguage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdmin' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: DescribeProductAsAdmin
s@DescribeProductAsAdmin' {} Maybe Text
a -> DescribeProductAsAdmin
s {$sel:acceptLanguage:DescribeProductAsAdmin' :: Maybe Text
acceptLanguage = Maybe Text
a} :: DescribeProductAsAdmin)

-- | The product identifier.
describeProductAsAdmin_id :: Lens.Lens' DescribeProductAsAdmin (Prelude.Maybe Prelude.Text)
describeProductAsAdmin_id :: Lens' DescribeProductAsAdmin (Maybe Text)
describeProductAsAdmin_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdmin' {Maybe Text
id :: Maybe Text
$sel:id:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeProductAsAdmin
s@DescribeProductAsAdmin' {} Maybe Text
a -> DescribeProductAsAdmin
s {$sel:id:DescribeProductAsAdmin' :: Maybe Text
id = Maybe Text
a} :: DescribeProductAsAdmin)

-- | The product name.
describeProductAsAdmin_name :: Lens.Lens' DescribeProductAsAdmin (Prelude.Maybe Prelude.Text)
describeProductAsAdmin_name :: Lens' DescribeProductAsAdmin (Maybe Text)
describeProductAsAdmin_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdmin' {Maybe Text
name :: Maybe Text
$sel:name:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeProductAsAdmin
s@DescribeProductAsAdmin' {} Maybe Text
a -> DescribeProductAsAdmin
s {$sel:name:DescribeProductAsAdmin' :: Maybe Text
name = Maybe Text
a} :: DescribeProductAsAdmin)

-- | The unique identifier of the shared portfolio that the specified product
-- is associated with.
--
-- You can provide this parameter to retrieve the shared TagOptions
-- associated with the product. If this parameter is provided and if
-- TagOptions sharing is enabled in the portfolio share, the API returns
-- both local and shared TagOptions associated with the product. Otherwise
-- only local TagOptions will be returned.
describeProductAsAdmin_sourcePortfolioId :: Lens.Lens' DescribeProductAsAdmin (Prelude.Maybe Prelude.Text)
describeProductAsAdmin_sourcePortfolioId :: Lens' DescribeProductAsAdmin (Maybe Text)
describeProductAsAdmin_sourcePortfolioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdmin' {Maybe Text
sourcePortfolioId :: Maybe Text
$sel:sourcePortfolioId:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
sourcePortfolioId} -> Maybe Text
sourcePortfolioId) (\s :: DescribeProductAsAdmin
s@DescribeProductAsAdmin' {} Maybe Text
a -> DescribeProductAsAdmin
s {$sel:sourcePortfolioId:DescribeProductAsAdmin' :: Maybe Text
sourcePortfolioId = Maybe Text
a} :: DescribeProductAsAdmin)

instance Core.AWSRequest DescribeProductAsAdmin where
  type
    AWSResponse DescribeProductAsAdmin =
      DescribeProductAsAdminResponse
  request :: (Service -> Service)
-> DescribeProductAsAdmin -> Request DescribeProductAsAdmin
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeProductAsAdmin
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProductAsAdmin)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [BudgetDetail]
-> Maybe ProductViewDetail
-> Maybe [ProvisioningArtifactSummary]
-> Maybe [TagOptionDetail]
-> Maybe [Tag]
-> Int
-> DescribeProductAsAdminResponse
DescribeProductAsAdminResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Budgets" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProductViewDetail")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProvisioningArtifactSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TagOptions" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeProductAsAdmin where
  hashWithSalt :: Int -> DescribeProductAsAdmin -> Int
hashWithSalt Int
_salt DescribeProductAsAdmin' {Maybe Text
sourcePortfolioId :: Maybe Text
name :: Maybe Text
id :: Maybe Text
acceptLanguage :: Maybe Text
$sel:sourcePortfolioId:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:name:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:id:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:acceptLanguage:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceptLanguage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourcePortfolioId

instance Prelude.NFData DescribeProductAsAdmin where
  rnf :: DescribeProductAsAdmin -> ()
rnf DescribeProductAsAdmin' {Maybe Text
sourcePortfolioId :: Maybe Text
name :: Maybe Text
id :: Maybe Text
acceptLanguage :: Maybe Text
$sel:sourcePortfolioId:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:name:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:id:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:acceptLanguage:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptLanguage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourcePortfolioId

instance Data.ToHeaders DescribeProductAsAdmin where
  toHeaders :: DescribeProductAsAdmin -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWS242ServiceCatalogService.DescribeProductAsAdmin" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribeProductAsAdmin where
  toJSON :: DescribeProductAsAdmin -> Value
toJSON DescribeProductAsAdmin' {Maybe Text
sourcePortfolioId :: Maybe Text
name :: Maybe Text
id :: Maybe Text
acceptLanguage :: Maybe Text
$sel:sourcePortfolioId:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:name:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:id:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
$sel:acceptLanguage:DescribeProductAsAdmin' :: DescribeProductAsAdmin -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AcceptLanguage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
            (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
id,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"SourcePortfolioId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourcePortfolioId
          ]
      )

instance Data.ToPath DescribeProductAsAdmin where
  toPath :: DescribeProductAsAdmin -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeProductAsAdminResponse' smart constructor.
data DescribeProductAsAdminResponse = DescribeProductAsAdminResponse'
  { -- | Information about the associated budgets.
    DescribeProductAsAdminResponse -> Maybe [BudgetDetail]
budgets :: Prelude.Maybe [BudgetDetail],
    -- | Information about the product view.
    DescribeProductAsAdminResponse -> Maybe ProductViewDetail
productViewDetail :: Prelude.Maybe ProductViewDetail,
    -- | Information about the provisioning artifacts (also known as versions)
    -- for the specified product.
    DescribeProductAsAdminResponse
-> Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries :: Prelude.Maybe [ProvisioningArtifactSummary],
    -- | Information about the TagOptions associated with the product.
    DescribeProductAsAdminResponse -> Maybe [TagOptionDetail]
tagOptions :: Prelude.Maybe [TagOptionDetail],
    -- | Information about the tags associated with the product.
    DescribeProductAsAdminResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    DescribeProductAsAdminResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProductAsAdminResponse
-> DescribeProductAsAdminResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProductAsAdminResponse
-> DescribeProductAsAdminResponse -> Bool
$c/= :: DescribeProductAsAdminResponse
-> DescribeProductAsAdminResponse -> Bool
== :: DescribeProductAsAdminResponse
-> DescribeProductAsAdminResponse -> Bool
$c== :: DescribeProductAsAdminResponse
-> DescribeProductAsAdminResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProductAsAdminResponse]
ReadPrec DescribeProductAsAdminResponse
Int -> ReadS DescribeProductAsAdminResponse
ReadS [DescribeProductAsAdminResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProductAsAdminResponse]
$creadListPrec :: ReadPrec [DescribeProductAsAdminResponse]
readPrec :: ReadPrec DescribeProductAsAdminResponse
$creadPrec :: ReadPrec DescribeProductAsAdminResponse
readList :: ReadS [DescribeProductAsAdminResponse]
$creadList :: ReadS [DescribeProductAsAdminResponse]
readsPrec :: Int -> ReadS DescribeProductAsAdminResponse
$creadsPrec :: Int -> ReadS DescribeProductAsAdminResponse
Prelude.Read, Int -> DescribeProductAsAdminResponse -> ShowS
[DescribeProductAsAdminResponse] -> ShowS
DescribeProductAsAdminResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProductAsAdminResponse] -> ShowS
$cshowList :: [DescribeProductAsAdminResponse] -> ShowS
show :: DescribeProductAsAdminResponse -> String
$cshow :: DescribeProductAsAdminResponse -> String
showsPrec :: Int -> DescribeProductAsAdminResponse -> ShowS
$cshowsPrec :: Int -> DescribeProductAsAdminResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeProductAsAdminResponse x
-> DescribeProductAsAdminResponse
forall x.
DescribeProductAsAdminResponse
-> Rep DescribeProductAsAdminResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProductAsAdminResponse x
-> DescribeProductAsAdminResponse
$cfrom :: forall x.
DescribeProductAsAdminResponse
-> Rep DescribeProductAsAdminResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProductAsAdminResponse' 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:
--
-- 'budgets', 'describeProductAsAdminResponse_budgets' - Information about the associated budgets.
--
-- 'productViewDetail', 'describeProductAsAdminResponse_productViewDetail' - Information about the product view.
--
-- 'provisioningArtifactSummaries', 'describeProductAsAdminResponse_provisioningArtifactSummaries' - Information about the provisioning artifacts (also known as versions)
-- for the specified product.
--
-- 'tagOptions', 'describeProductAsAdminResponse_tagOptions' - Information about the TagOptions associated with the product.
--
-- 'tags', 'describeProductAsAdminResponse_tags' - Information about the tags associated with the product.
--
-- 'httpStatus', 'describeProductAsAdminResponse_httpStatus' - The response's http status code.
newDescribeProductAsAdminResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProductAsAdminResponse
newDescribeProductAsAdminResponse :: Int -> DescribeProductAsAdminResponse
newDescribeProductAsAdminResponse Int
pHttpStatus_ =
  DescribeProductAsAdminResponse'
    { $sel:budgets:DescribeProductAsAdminResponse' :: Maybe [BudgetDetail]
budgets =
        forall a. Maybe a
Prelude.Nothing,
      $sel:productViewDetail:DescribeProductAsAdminResponse' :: Maybe ProductViewDetail
productViewDetail = forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningArtifactSummaries:DescribeProductAsAdminResponse' :: Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:tagOptions:DescribeProductAsAdminResponse' :: Maybe [TagOptionDetail]
tagOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeProductAsAdminResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProductAsAdminResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the associated budgets.
describeProductAsAdminResponse_budgets :: Lens.Lens' DescribeProductAsAdminResponse (Prelude.Maybe [BudgetDetail])
describeProductAsAdminResponse_budgets :: Lens' DescribeProductAsAdminResponse (Maybe [BudgetDetail])
describeProductAsAdminResponse_budgets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdminResponse' {Maybe [BudgetDetail]
budgets :: Maybe [BudgetDetail]
$sel:budgets:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [BudgetDetail]
budgets} -> Maybe [BudgetDetail]
budgets) (\s :: DescribeProductAsAdminResponse
s@DescribeProductAsAdminResponse' {} Maybe [BudgetDetail]
a -> DescribeProductAsAdminResponse
s {$sel:budgets:DescribeProductAsAdminResponse' :: Maybe [BudgetDetail]
budgets = Maybe [BudgetDetail]
a} :: DescribeProductAsAdminResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the product view.
describeProductAsAdminResponse_productViewDetail :: Lens.Lens' DescribeProductAsAdminResponse (Prelude.Maybe ProductViewDetail)
describeProductAsAdminResponse_productViewDetail :: Lens' DescribeProductAsAdminResponse (Maybe ProductViewDetail)
describeProductAsAdminResponse_productViewDetail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdminResponse' {Maybe ProductViewDetail
productViewDetail :: Maybe ProductViewDetail
$sel:productViewDetail:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe ProductViewDetail
productViewDetail} -> Maybe ProductViewDetail
productViewDetail) (\s :: DescribeProductAsAdminResponse
s@DescribeProductAsAdminResponse' {} Maybe ProductViewDetail
a -> DescribeProductAsAdminResponse
s {$sel:productViewDetail:DescribeProductAsAdminResponse' :: Maybe ProductViewDetail
productViewDetail = Maybe ProductViewDetail
a} :: DescribeProductAsAdminResponse)

-- | Information about the provisioning artifacts (also known as versions)
-- for the specified product.
describeProductAsAdminResponse_provisioningArtifactSummaries :: Lens.Lens' DescribeProductAsAdminResponse (Prelude.Maybe [ProvisioningArtifactSummary])
describeProductAsAdminResponse_provisioningArtifactSummaries :: Lens'
  DescribeProductAsAdminResponse
  (Maybe [ProvisioningArtifactSummary])
describeProductAsAdminResponse_provisioningArtifactSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdminResponse' {Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries :: Maybe [ProvisioningArtifactSummary]
$sel:provisioningArtifactSummaries:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse
-> Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries} -> Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries) (\s :: DescribeProductAsAdminResponse
s@DescribeProductAsAdminResponse' {} Maybe [ProvisioningArtifactSummary]
a -> DescribeProductAsAdminResponse
s {$sel:provisioningArtifactSummaries:DescribeProductAsAdminResponse' :: Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries = Maybe [ProvisioningArtifactSummary]
a} :: DescribeProductAsAdminResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the TagOptions associated with the product.
describeProductAsAdminResponse_tagOptions :: Lens.Lens' DescribeProductAsAdminResponse (Prelude.Maybe [TagOptionDetail])
describeProductAsAdminResponse_tagOptions :: Lens' DescribeProductAsAdminResponse (Maybe [TagOptionDetail])
describeProductAsAdminResponse_tagOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdminResponse' {Maybe [TagOptionDetail]
tagOptions :: Maybe [TagOptionDetail]
$sel:tagOptions:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [TagOptionDetail]
tagOptions} -> Maybe [TagOptionDetail]
tagOptions) (\s :: DescribeProductAsAdminResponse
s@DescribeProductAsAdminResponse' {} Maybe [TagOptionDetail]
a -> DescribeProductAsAdminResponse
s {$sel:tagOptions:DescribeProductAsAdminResponse' :: Maybe [TagOptionDetail]
tagOptions = Maybe [TagOptionDetail]
a} :: DescribeProductAsAdminResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the tags associated with the product.
describeProductAsAdminResponse_tags :: Lens.Lens' DescribeProductAsAdminResponse (Prelude.Maybe [Tag])
describeProductAsAdminResponse_tags :: Lens' DescribeProductAsAdminResponse (Maybe [Tag])
describeProductAsAdminResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProductAsAdminResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DescribeProductAsAdminResponse
s@DescribeProductAsAdminResponse' {} Maybe [Tag]
a -> DescribeProductAsAdminResponse
s {$sel:tags:DescribeProductAsAdminResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DescribeProductAsAdminResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeProductAsAdminResponse
  where
  rnf :: DescribeProductAsAdminResponse -> ()
rnf DescribeProductAsAdminResponse' {Int
Maybe [BudgetDetail]
Maybe [ProvisioningArtifactSummary]
Maybe [Tag]
Maybe [TagOptionDetail]
Maybe ProductViewDetail
httpStatus :: Int
tags :: Maybe [Tag]
tagOptions :: Maybe [TagOptionDetail]
provisioningArtifactSummaries :: Maybe [ProvisioningArtifactSummary]
productViewDetail :: Maybe ProductViewDetail
budgets :: Maybe [BudgetDetail]
$sel:httpStatus:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Int
$sel:tags:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [Tag]
$sel:tagOptions:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [TagOptionDetail]
$sel:provisioningArtifactSummaries:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse
-> Maybe [ProvisioningArtifactSummary]
$sel:productViewDetail:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe ProductViewDetail
$sel:budgets:DescribeProductAsAdminResponse' :: DescribeProductAsAdminResponse -> Maybe [BudgetDetail]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [BudgetDetail]
budgets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductViewDetail
productViewDetail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProvisioningArtifactSummary]
provisioningArtifactSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagOptionDetail]
tagOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus