{-# 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.DescribeProvisionedProduct
-- 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)
--
-- Gets information about the specified provisioned product.
module Amazonka.ServiceCatalog.DescribeProvisionedProduct
  ( -- * Creating a Request
    DescribeProvisionedProduct (..),
    newDescribeProvisionedProduct,

    -- * Request Lenses
    describeProvisionedProduct_name,
    describeProvisionedProduct_acceptLanguage,
    describeProvisionedProduct_id,

    -- * Destructuring the Response
    DescribeProvisionedProductResponse (..),
    newDescribeProvisionedProductResponse,

    -- * Response Lenses
    describeProvisionedProductResponse_provisionedProductDetail,
    describeProvisionedProductResponse_cloudWatchDashboards,
    describeProvisionedProductResponse_httpStatus,
  )
where

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

-- | DescribeProvisionedProductAPI input structure. AcceptLanguage -
-- [Optional] The language code for localization. Id - [Optional] The
-- provisioned product identifier. Name - [Optional] Another provisioned
-- product identifier. Customers must provide either Id or Name.
--
-- /See:/ 'newDescribeProvisionedProduct' smart constructor.
data DescribeProvisionedProduct = DescribeProvisionedProduct'
  { -- | The name of the provisioned product. You must provide the name or ID,
    -- but not both.
    --
    -- If you do not provide a name or ID, or you provide both name and ID, an
    -- @InvalidParametersException@ will occur.
    DescribeProvisionedProduct -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribeProvisionedProduct -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The provisioned product identifier. You must provide the name or ID, but
    -- not both.
    --
    -- If you do not provide a name or ID, or you provide both name and ID, an
    -- @InvalidParametersException@ will occur.
    DescribeProvisionedProduct -> Maybe Text
id :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool
(DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool)
-> (DescribeProvisionedProduct
    -> DescribeProvisionedProduct -> Bool)
-> Eq DescribeProvisionedProduct
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool
$c/= :: DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool
== :: DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool
$c== :: DescribeProvisionedProduct -> DescribeProvisionedProduct -> Bool
Prelude.Eq, ReadPrec [DescribeProvisionedProduct]
ReadPrec DescribeProvisionedProduct
Int -> ReadS DescribeProvisionedProduct
ReadS [DescribeProvisionedProduct]
(Int -> ReadS DescribeProvisionedProduct)
-> ReadS [DescribeProvisionedProduct]
-> ReadPrec DescribeProvisionedProduct
-> ReadPrec [DescribeProvisionedProduct]
-> Read DescribeProvisionedProduct
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisionedProduct]
$creadListPrec :: ReadPrec [DescribeProvisionedProduct]
readPrec :: ReadPrec DescribeProvisionedProduct
$creadPrec :: ReadPrec DescribeProvisionedProduct
readList :: ReadS [DescribeProvisionedProduct]
$creadList :: ReadS [DescribeProvisionedProduct]
readsPrec :: Int -> ReadS DescribeProvisionedProduct
$creadsPrec :: Int -> ReadS DescribeProvisionedProduct
Prelude.Read, Int -> DescribeProvisionedProduct -> ShowS
[DescribeProvisionedProduct] -> ShowS
DescribeProvisionedProduct -> String
(Int -> DescribeProvisionedProduct -> ShowS)
-> (DescribeProvisionedProduct -> String)
-> ([DescribeProvisionedProduct] -> ShowS)
-> Show DescribeProvisionedProduct
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisionedProduct] -> ShowS
$cshowList :: [DescribeProvisionedProduct] -> ShowS
show :: DescribeProvisionedProduct -> String
$cshow :: DescribeProvisionedProduct -> String
showsPrec :: Int -> DescribeProvisionedProduct -> ShowS
$cshowsPrec :: Int -> DescribeProvisionedProduct -> ShowS
Prelude.Show, (forall x.
 DescribeProvisionedProduct -> Rep DescribeProvisionedProduct x)
-> (forall x.
    Rep DescribeProvisionedProduct x -> DescribeProvisionedProduct)
-> Generic DescribeProvisionedProduct
forall x.
Rep DescribeProvisionedProduct x -> DescribeProvisionedProduct
forall x.
DescribeProvisionedProduct -> Rep DescribeProvisionedProduct x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisionedProduct x -> DescribeProvisionedProduct
$cfrom :: forall x.
DescribeProvisionedProduct -> Rep DescribeProvisionedProduct x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisionedProduct' 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:
--
-- 'name', 'describeProvisionedProduct_name' - The name of the provisioned product. You must provide the name or ID,
-- but not both.
--
-- If you do not provide a name or ID, or you provide both name and ID, an
-- @InvalidParametersException@ will occur.
--
-- 'acceptLanguage', 'describeProvisionedProduct_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'id', 'describeProvisionedProduct_id' - The provisioned product identifier. You must provide the name or ID, but
-- not both.
--
-- If you do not provide a name or ID, or you provide both name and ID, an
-- @InvalidParametersException@ will occur.
newDescribeProvisionedProduct ::
  DescribeProvisionedProduct
newDescribeProvisionedProduct :: DescribeProvisionedProduct
newDescribeProvisionedProduct =
  DescribeProvisionedProduct' :: Maybe Text
-> Maybe Text -> Maybe Text -> DescribeProvisionedProduct
DescribeProvisionedProduct'
    { $sel:name:DescribeProvisionedProduct' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptLanguage:DescribeProvisionedProduct' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeProvisionedProduct' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the provisioned product. You must provide the name or ID,
-- but not both.
--
-- If you do not provide a name or ID, or you provide both name and ID, an
-- @InvalidParametersException@ will occur.
describeProvisionedProduct_name :: Lens.Lens' DescribeProvisionedProduct (Prelude.Maybe Prelude.Text)
describeProvisionedProduct_name :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisionedProduct -> f DescribeProvisionedProduct
describeProvisionedProduct_name = (DescribeProvisionedProduct -> Maybe Text)
-> (DescribeProvisionedProduct
    -> Maybe Text -> DescribeProvisionedProduct)
-> Lens
     DescribeProvisionedProduct
     DescribeProvisionedProduct
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProduct' {Maybe Text
name :: Maybe Text
$sel:name:DescribeProvisionedProduct' :: DescribeProvisionedProduct -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeProvisionedProduct
s@DescribeProvisionedProduct' {} Maybe Text
a -> DescribeProvisionedProduct
s {$sel:name:DescribeProvisionedProduct' :: Maybe Text
name = Maybe Text
a} :: DescribeProvisionedProduct)

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

-- | The provisioned product identifier. You must provide the name or ID, but
-- not both.
--
-- If you do not provide a name or ID, or you provide both name and ID, an
-- @InvalidParametersException@ will occur.
describeProvisionedProduct_id :: Lens.Lens' DescribeProvisionedProduct (Prelude.Maybe Prelude.Text)
describeProvisionedProduct_id :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisionedProduct -> f DescribeProvisionedProduct
describeProvisionedProduct_id = (DescribeProvisionedProduct -> Maybe Text)
-> (DescribeProvisionedProduct
    -> Maybe Text -> DescribeProvisionedProduct)
-> Lens
     DescribeProvisionedProduct
     DescribeProvisionedProduct
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProduct' {Maybe Text
id :: Maybe Text
$sel:id:DescribeProvisionedProduct' :: DescribeProvisionedProduct -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeProvisionedProduct
s@DescribeProvisionedProduct' {} Maybe Text
a -> DescribeProvisionedProduct
s {$sel:id:DescribeProvisionedProduct' :: Maybe Text
id = Maybe Text
a} :: DescribeProvisionedProduct)

instance Core.AWSRequest DescribeProvisionedProduct where
  type
    AWSResponse DescribeProvisionedProduct =
      DescribeProvisionedProductResponse
  request :: DescribeProvisionedProduct -> Request DescribeProvisionedProduct
request = Service
-> DescribeProvisionedProduct -> Request DescribeProvisionedProduct
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeProvisionedProduct
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProvisionedProduct)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeProvisionedProduct))
-> Logger
-> Service
-> Proxy DescribeProvisionedProduct
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProvisionedProduct)))
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 ProvisionedProductDetail
-> Maybe [CloudWatchDashboard]
-> Int
-> DescribeProvisionedProductResponse
DescribeProvisionedProductResponse'
            (Maybe ProvisionedProductDetail
 -> Maybe [CloudWatchDashboard]
 -> Int
 -> DescribeProvisionedProductResponse)
-> Either String (Maybe ProvisionedProductDetail)
-> Either
     String
     (Maybe [CloudWatchDashboard]
      -> Int -> DescribeProvisionedProductResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ProvisionedProductDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProvisionedProductDetail")
            Either
  String
  (Maybe [CloudWatchDashboard]
   -> Int -> DescribeProvisionedProductResponse)
-> Either String (Maybe [CloudWatchDashboard])
-> Either String (Int -> DescribeProvisionedProductResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [CloudWatchDashboard]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CloudWatchDashboards"
                            Either String (Maybe (Maybe [CloudWatchDashboard]))
-> Maybe [CloudWatchDashboard]
-> Either String (Maybe [CloudWatchDashboard])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CloudWatchDashboard]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> DescribeProvisionedProductResponse)
-> Either String Int
-> Either String DescribeProvisionedProductResponse
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))
      )

instance Prelude.Hashable DescribeProvisionedProduct

instance Prelude.NFData DescribeProvisionedProduct

instance Core.ToHeaders DescribeProvisionedProduct where
  toHeaders :: DescribeProvisionedProduct -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeProvisionedProduct -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWS242ServiceCatalogService.DescribeProvisionedProduct" ::
                          Prelude.ByteString
                      ),
            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.ToJSON DescribeProvisionedProduct where
  toJSON :: DescribeProvisionedProduct -> Value
toJSON DescribeProvisionedProduct' {Maybe Text
id :: Maybe Text
acceptLanguage :: Maybe Text
name :: Maybe Text
$sel:id:DescribeProvisionedProduct' :: DescribeProvisionedProduct -> Maybe Text
$sel:acceptLanguage:DescribeProvisionedProduct' :: DescribeProvisionedProduct -> Maybe Text
$sel:name:DescribeProvisionedProduct' :: DescribeProvisionedProduct -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"AcceptLanguage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
            (Text
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
id
          ]
      )

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

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

-- | /See:/ 'newDescribeProvisionedProductResponse' smart constructor.
data DescribeProvisionedProductResponse = DescribeProvisionedProductResponse'
  { -- | Information about the provisioned product.
    DescribeProvisionedProductResponse
-> Maybe ProvisionedProductDetail
provisionedProductDetail :: Prelude.Maybe ProvisionedProductDetail,
    -- | Any CloudWatch dashboards that were created when provisioning the
    -- product.
    DescribeProvisionedProductResponse -> Maybe [CloudWatchDashboard]
cloudWatchDashboards :: Prelude.Maybe [CloudWatchDashboard],
    -- | The response's http status code.
    DescribeProvisionedProductResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProvisionedProductResponse
-> DescribeProvisionedProductResponse -> Bool
(DescribeProvisionedProductResponse
 -> DescribeProvisionedProductResponse -> Bool)
-> (DescribeProvisionedProductResponse
    -> DescribeProvisionedProductResponse -> Bool)
-> Eq DescribeProvisionedProductResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisionedProductResponse
-> DescribeProvisionedProductResponse -> Bool
$c/= :: DescribeProvisionedProductResponse
-> DescribeProvisionedProductResponse -> Bool
== :: DescribeProvisionedProductResponse
-> DescribeProvisionedProductResponse -> Bool
$c== :: DescribeProvisionedProductResponse
-> DescribeProvisionedProductResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProvisionedProductResponse]
ReadPrec DescribeProvisionedProductResponse
Int -> ReadS DescribeProvisionedProductResponse
ReadS [DescribeProvisionedProductResponse]
(Int -> ReadS DescribeProvisionedProductResponse)
-> ReadS [DescribeProvisionedProductResponse]
-> ReadPrec DescribeProvisionedProductResponse
-> ReadPrec [DescribeProvisionedProductResponse]
-> Read DescribeProvisionedProductResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisionedProductResponse]
$creadListPrec :: ReadPrec [DescribeProvisionedProductResponse]
readPrec :: ReadPrec DescribeProvisionedProductResponse
$creadPrec :: ReadPrec DescribeProvisionedProductResponse
readList :: ReadS [DescribeProvisionedProductResponse]
$creadList :: ReadS [DescribeProvisionedProductResponse]
readsPrec :: Int -> ReadS DescribeProvisionedProductResponse
$creadsPrec :: Int -> ReadS DescribeProvisionedProductResponse
Prelude.Read, Int -> DescribeProvisionedProductResponse -> ShowS
[DescribeProvisionedProductResponse] -> ShowS
DescribeProvisionedProductResponse -> String
(Int -> DescribeProvisionedProductResponse -> ShowS)
-> (DescribeProvisionedProductResponse -> String)
-> ([DescribeProvisionedProductResponse] -> ShowS)
-> Show DescribeProvisionedProductResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisionedProductResponse] -> ShowS
$cshowList :: [DescribeProvisionedProductResponse] -> ShowS
show :: DescribeProvisionedProductResponse -> String
$cshow :: DescribeProvisionedProductResponse -> String
showsPrec :: Int -> DescribeProvisionedProductResponse -> ShowS
$cshowsPrec :: Int -> DescribeProvisionedProductResponse -> ShowS
Prelude.Show, (forall x.
 DescribeProvisionedProductResponse
 -> Rep DescribeProvisionedProductResponse x)
-> (forall x.
    Rep DescribeProvisionedProductResponse x
    -> DescribeProvisionedProductResponse)
-> Generic DescribeProvisionedProductResponse
forall x.
Rep DescribeProvisionedProductResponse x
-> DescribeProvisionedProductResponse
forall x.
DescribeProvisionedProductResponse
-> Rep DescribeProvisionedProductResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisionedProductResponse x
-> DescribeProvisionedProductResponse
$cfrom :: forall x.
DescribeProvisionedProductResponse
-> Rep DescribeProvisionedProductResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisionedProductResponse' 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:
--
-- 'provisionedProductDetail', 'describeProvisionedProductResponse_provisionedProductDetail' - Information about the provisioned product.
--
-- 'cloudWatchDashboards', 'describeProvisionedProductResponse_cloudWatchDashboards' - Any CloudWatch dashboards that were created when provisioning the
-- product.
--
-- 'httpStatus', 'describeProvisionedProductResponse_httpStatus' - The response's http status code.
newDescribeProvisionedProductResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProvisionedProductResponse
newDescribeProvisionedProductResponse :: Int -> DescribeProvisionedProductResponse
newDescribeProvisionedProductResponse Int
pHttpStatus_ =
  DescribeProvisionedProductResponse' :: Maybe ProvisionedProductDetail
-> Maybe [CloudWatchDashboard]
-> Int
-> DescribeProvisionedProductResponse
DescribeProvisionedProductResponse'
    { $sel:provisionedProductDetail:DescribeProvisionedProductResponse' :: Maybe ProvisionedProductDetail
provisionedProductDetail =
        Maybe ProvisionedProductDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchDashboards:DescribeProvisionedProductResponse' :: Maybe [CloudWatchDashboard]
cloudWatchDashboards = Maybe [CloudWatchDashboard]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProvisionedProductResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the provisioned product.
describeProvisionedProductResponse_provisionedProductDetail :: Lens.Lens' DescribeProvisionedProductResponse (Prelude.Maybe ProvisionedProductDetail)
describeProvisionedProductResponse_provisionedProductDetail :: (Maybe ProvisionedProductDetail
 -> f (Maybe ProvisionedProductDetail))
-> DescribeProvisionedProductResponse
-> f DescribeProvisionedProductResponse
describeProvisionedProductResponse_provisionedProductDetail = (DescribeProvisionedProductResponse
 -> Maybe ProvisionedProductDetail)
-> (DescribeProvisionedProductResponse
    -> Maybe ProvisionedProductDetail
    -> DescribeProvisionedProductResponse)
-> Lens
     DescribeProvisionedProductResponse
     DescribeProvisionedProductResponse
     (Maybe ProvisionedProductDetail)
     (Maybe ProvisionedProductDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductResponse' {Maybe ProvisionedProductDetail
provisionedProductDetail :: Maybe ProvisionedProductDetail
$sel:provisionedProductDetail:DescribeProvisionedProductResponse' :: DescribeProvisionedProductResponse
-> Maybe ProvisionedProductDetail
provisionedProductDetail} -> Maybe ProvisionedProductDetail
provisionedProductDetail) (\s :: DescribeProvisionedProductResponse
s@DescribeProvisionedProductResponse' {} Maybe ProvisionedProductDetail
a -> DescribeProvisionedProductResponse
s {$sel:provisionedProductDetail:DescribeProvisionedProductResponse' :: Maybe ProvisionedProductDetail
provisionedProductDetail = Maybe ProvisionedProductDetail
a} :: DescribeProvisionedProductResponse)

-- | Any CloudWatch dashboards that were created when provisioning the
-- product.
describeProvisionedProductResponse_cloudWatchDashboards :: Lens.Lens' DescribeProvisionedProductResponse (Prelude.Maybe [CloudWatchDashboard])
describeProvisionedProductResponse_cloudWatchDashboards :: (Maybe [CloudWatchDashboard] -> f (Maybe [CloudWatchDashboard]))
-> DescribeProvisionedProductResponse
-> f DescribeProvisionedProductResponse
describeProvisionedProductResponse_cloudWatchDashboards = (DescribeProvisionedProductResponse -> Maybe [CloudWatchDashboard])
-> (DescribeProvisionedProductResponse
    -> Maybe [CloudWatchDashboard]
    -> DescribeProvisionedProductResponse)
-> Lens
     DescribeProvisionedProductResponse
     DescribeProvisionedProductResponse
     (Maybe [CloudWatchDashboard])
     (Maybe [CloudWatchDashboard])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductResponse' {Maybe [CloudWatchDashboard]
cloudWatchDashboards :: Maybe [CloudWatchDashboard]
$sel:cloudWatchDashboards:DescribeProvisionedProductResponse' :: DescribeProvisionedProductResponse -> Maybe [CloudWatchDashboard]
cloudWatchDashboards} -> Maybe [CloudWatchDashboard]
cloudWatchDashboards) (\s :: DescribeProvisionedProductResponse
s@DescribeProvisionedProductResponse' {} Maybe [CloudWatchDashboard]
a -> DescribeProvisionedProductResponse
s {$sel:cloudWatchDashboards:DescribeProvisionedProductResponse' :: Maybe [CloudWatchDashboard]
cloudWatchDashboards = Maybe [CloudWatchDashboard]
a} :: DescribeProvisionedProductResponse) ((Maybe [CloudWatchDashboard] -> f (Maybe [CloudWatchDashboard]))
 -> DescribeProvisionedProductResponse
 -> f DescribeProvisionedProductResponse)
-> ((Maybe [CloudWatchDashboard]
     -> f (Maybe [CloudWatchDashboard]))
    -> Maybe [CloudWatchDashboard] -> f (Maybe [CloudWatchDashboard]))
-> (Maybe [CloudWatchDashboard] -> f (Maybe [CloudWatchDashboard]))
-> DescribeProvisionedProductResponse
-> f DescribeProvisionedProductResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CloudWatchDashboard]
  [CloudWatchDashboard]
  [CloudWatchDashboard]
  [CloudWatchDashboard]
-> Iso
     (Maybe [CloudWatchDashboard])
     (Maybe [CloudWatchDashboard])
     (Maybe [CloudWatchDashboard])
     (Maybe [CloudWatchDashboard])
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
  [CloudWatchDashboard]
  [CloudWatchDashboard]
  [CloudWatchDashboard]
  [CloudWatchDashboard]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeProvisionedProductResponse