{-# 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.DescribeProvisionedProductPlan
-- 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 resource changes for the specified plan.
module Amazonka.ServiceCatalog.DescribeProvisionedProductPlan
  ( -- * Creating a Request
    DescribeProvisionedProductPlan (..),
    newDescribeProvisionedProductPlan,

    -- * Request Lenses
    describeProvisionedProductPlan_acceptLanguage,
    describeProvisionedProductPlan_pageToken,
    describeProvisionedProductPlan_pageSize,
    describeProvisionedProductPlan_planId,

    -- * Destructuring the Response
    DescribeProvisionedProductPlanResponse (..),
    newDescribeProvisionedProductPlanResponse,

    -- * Response Lenses
    describeProvisionedProductPlanResponse_nextPageToken,
    describeProvisionedProductPlanResponse_provisionedProductPlanDetails,
    describeProvisionedProductPlanResponse_resourceChanges,
    describeProvisionedProductPlanResponse_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

-- | /See:/ 'newDescribeProvisionedProductPlan' smart constructor.
data DescribeProvisionedProductPlan = DescribeProvisionedProductPlan'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribeProvisionedProductPlan -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    DescribeProvisionedProductPlan -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    DescribeProvisionedProductPlan -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The plan identifier.
    DescribeProvisionedProductPlan -> Text
planId :: Prelude.Text
  }
  deriving (DescribeProvisionedProductPlan
-> DescribeProvisionedProductPlan -> Bool
(DescribeProvisionedProductPlan
 -> DescribeProvisionedProductPlan -> Bool)
-> (DescribeProvisionedProductPlan
    -> DescribeProvisionedProductPlan -> Bool)
-> Eq DescribeProvisionedProductPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisionedProductPlan
-> DescribeProvisionedProductPlan -> Bool
$c/= :: DescribeProvisionedProductPlan
-> DescribeProvisionedProductPlan -> Bool
== :: DescribeProvisionedProductPlan
-> DescribeProvisionedProductPlan -> Bool
$c== :: DescribeProvisionedProductPlan
-> DescribeProvisionedProductPlan -> Bool
Prelude.Eq, ReadPrec [DescribeProvisionedProductPlan]
ReadPrec DescribeProvisionedProductPlan
Int -> ReadS DescribeProvisionedProductPlan
ReadS [DescribeProvisionedProductPlan]
(Int -> ReadS DescribeProvisionedProductPlan)
-> ReadS [DescribeProvisionedProductPlan]
-> ReadPrec DescribeProvisionedProductPlan
-> ReadPrec [DescribeProvisionedProductPlan]
-> Read DescribeProvisionedProductPlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisionedProductPlan]
$creadListPrec :: ReadPrec [DescribeProvisionedProductPlan]
readPrec :: ReadPrec DescribeProvisionedProductPlan
$creadPrec :: ReadPrec DescribeProvisionedProductPlan
readList :: ReadS [DescribeProvisionedProductPlan]
$creadList :: ReadS [DescribeProvisionedProductPlan]
readsPrec :: Int -> ReadS DescribeProvisionedProductPlan
$creadsPrec :: Int -> ReadS DescribeProvisionedProductPlan
Prelude.Read, Int -> DescribeProvisionedProductPlan -> ShowS
[DescribeProvisionedProductPlan] -> ShowS
DescribeProvisionedProductPlan -> String
(Int -> DescribeProvisionedProductPlan -> ShowS)
-> (DescribeProvisionedProductPlan -> String)
-> ([DescribeProvisionedProductPlan] -> ShowS)
-> Show DescribeProvisionedProductPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisionedProductPlan] -> ShowS
$cshowList :: [DescribeProvisionedProductPlan] -> ShowS
show :: DescribeProvisionedProductPlan -> String
$cshow :: DescribeProvisionedProductPlan -> String
showsPrec :: Int -> DescribeProvisionedProductPlan -> ShowS
$cshowsPrec :: Int -> DescribeProvisionedProductPlan -> ShowS
Prelude.Show, (forall x.
 DescribeProvisionedProductPlan
 -> Rep DescribeProvisionedProductPlan x)
-> (forall x.
    Rep DescribeProvisionedProductPlan x
    -> DescribeProvisionedProductPlan)
-> Generic DescribeProvisionedProductPlan
forall x.
Rep DescribeProvisionedProductPlan x
-> DescribeProvisionedProductPlan
forall x.
DescribeProvisionedProductPlan
-> Rep DescribeProvisionedProductPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisionedProductPlan x
-> DescribeProvisionedProductPlan
$cfrom :: forall x.
DescribeProvisionedProductPlan
-> Rep DescribeProvisionedProductPlan x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisionedProductPlan' 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', 'describeProvisionedProductPlan_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageToken', 'describeProvisionedProductPlan_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'describeProvisionedProductPlan_pageSize' - The maximum number of items to return with this call.
--
-- 'planId', 'describeProvisionedProductPlan_planId' - The plan identifier.
newDescribeProvisionedProductPlan ::
  -- | 'planId'
  Prelude.Text ->
  DescribeProvisionedProductPlan
newDescribeProvisionedProductPlan :: Text -> DescribeProvisionedProductPlan
newDescribeProvisionedProductPlan Text
pPlanId_ =
  DescribeProvisionedProductPlan' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeProvisionedProductPlan
DescribeProvisionedProductPlan'
    { $sel:acceptLanguage:DescribeProvisionedProductPlan' :: Maybe Text
acceptLanguage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:DescribeProvisionedProductPlan' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:DescribeProvisionedProductPlan' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:planId:DescribeProvisionedProductPlan' :: Text
planId = Text
pPlanId_
    }

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

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
describeProvisionedProductPlan_pageToken :: Lens.Lens' DescribeProvisionedProductPlan (Prelude.Maybe Prelude.Text)
describeProvisionedProductPlan_pageToken :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisionedProductPlan
-> f DescribeProvisionedProductPlan
describeProvisionedProductPlan_pageToken = (DescribeProvisionedProductPlan -> Maybe Text)
-> (DescribeProvisionedProductPlan
    -> Maybe Text -> DescribeProvisionedProductPlan)
-> Lens
     DescribeProvisionedProductPlan
     DescribeProvisionedProductPlan
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlan' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: DescribeProvisionedProductPlan
s@DescribeProvisionedProductPlan' {} Maybe Text
a -> DescribeProvisionedProductPlan
s {$sel:pageToken:DescribeProvisionedProductPlan' :: Maybe Text
pageToken = Maybe Text
a} :: DescribeProvisionedProductPlan)

-- | The maximum number of items to return with this call.
describeProvisionedProductPlan_pageSize :: Lens.Lens' DescribeProvisionedProductPlan (Prelude.Maybe Prelude.Natural)
describeProvisionedProductPlan_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> DescribeProvisionedProductPlan
-> f DescribeProvisionedProductPlan
describeProvisionedProductPlan_pageSize = (DescribeProvisionedProductPlan -> Maybe Natural)
-> (DescribeProvisionedProductPlan
    -> Maybe Natural -> DescribeProvisionedProductPlan)
-> Lens
     DescribeProvisionedProductPlan
     DescribeProvisionedProductPlan
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlan' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: DescribeProvisionedProductPlan
s@DescribeProvisionedProductPlan' {} Maybe Natural
a -> DescribeProvisionedProductPlan
s {$sel:pageSize:DescribeProvisionedProductPlan' :: Maybe Natural
pageSize = Maybe Natural
a} :: DescribeProvisionedProductPlan)

-- | The plan identifier.
describeProvisionedProductPlan_planId :: Lens.Lens' DescribeProvisionedProductPlan Prelude.Text
describeProvisionedProductPlan_planId :: (Text -> f Text)
-> DescribeProvisionedProductPlan
-> f DescribeProvisionedProductPlan
describeProvisionedProductPlan_planId = (DescribeProvisionedProductPlan -> Text)
-> (DescribeProvisionedProductPlan
    -> Text -> DescribeProvisionedProductPlan)
-> Lens
     DescribeProvisionedProductPlan
     DescribeProvisionedProductPlan
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlan' {Text
planId :: Text
$sel:planId:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Text
planId} -> Text
planId) (\s :: DescribeProvisionedProductPlan
s@DescribeProvisionedProductPlan' {} Text
a -> DescribeProvisionedProductPlan
s {$sel:planId:DescribeProvisionedProductPlan' :: Text
planId = Text
a} :: DescribeProvisionedProductPlan)

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

instance
  Prelude.NFData
    DescribeProvisionedProductPlan

instance
  Core.ToHeaders
    DescribeProvisionedProductPlan
  where
  toHeaders :: DescribeProvisionedProductPlan -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeProvisionedProductPlan -> 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.DescribeProvisionedProductPlan" ::
                          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 DescribeProvisionedProductPlan where
  toJSON :: DescribeProvisionedProductPlan -> Value
toJSON DescribeProvisionedProductPlan' {Maybe Natural
Maybe Text
Text
planId :: Text
pageSize :: Maybe Natural
pageToken :: Maybe Text
acceptLanguage :: Maybe Text
$sel:planId:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Text
$sel:pageSize:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Maybe Natural
$sel:pageToken:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Maybe Text
$sel:acceptLanguage:DescribeProvisionedProductPlan' :: DescribeProvisionedProductPlan -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"PageToken" 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
pageToken,
            (Text
"PageSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pageSize,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PlanId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
planId)
          ]
      )

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

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

-- | /See:/ 'newDescribeProvisionedProductPlanResponse' smart constructor.
data DescribeProvisionedProductPlanResponse = DescribeProvisionedProductPlanResponse'
  { -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    DescribeProvisionedProductPlanResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the plan.
    DescribeProvisionedProductPlanResponse
-> Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails :: Prelude.Maybe ProvisionedProductPlanDetails,
    -- | Information about the resource changes that will occur when the plan is
    -- executed.
    DescribeProvisionedProductPlanResponse -> Maybe [ResourceChange]
resourceChanges :: Prelude.Maybe [ResourceChange],
    -- | The response's http status code.
    DescribeProvisionedProductPlanResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProvisionedProductPlanResponse
-> DescribeProvisionedProductPlanResponse -> Bool
(DescribeProvisionedProductPlanResponse
 -> DescribeProvisionedProductPlanResponse -> Bool)
-> (DescribeProvisionedProductPlanResponse
    -> DescribeProvisionedProductPlanResponse -> Bool)
-> Eq DescribeProvisionedProductPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisionedProductPlanResponse
-> DescribeProvisionedProductPlanResponse -> Bool
$c/= :: DescribeProvisionedProductPlanResponse
-> DescribeProvisionedProductPlanResponse -> Bool
== :: DescribeProvisionedProductPlanResponse
-> DescribeProvisionedProductPlanResponse -> Bool
$c== :: DescribeProvisionedProductPlanResponse
-> DescribeProvisionedProductPlanResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProvisionedProductPlanResponse]
ReadPrec DescribeProvisionedProductPlanResponse
Int -> ReadS DescribeProvisionedProductPlanResponse
ReadS [DescribeProvisionedProductPlanResponse]
(Int -> ReadS DescribeProvisionedProductPlanResponse)
-> ReadS [DescribeProvisionedProductPlanResponse]
-> ReadPrec DescribeProvisionedProductPlanResponse
-> ReadPrec [DescribeProvisionedProductPlanResponse]
-> Read DescribeProvisionedProductPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisionedProductPlanResponse]
$creadListPrec :: ReadPrec [DescribeProvisionedProductPlanResponse]
readPrec :: ReadPrec DescribeProvisionedProductPlanResponse
$creadPrec :: ReadPrec DescribeProvisionedProductPlanResponse
readList :: ReadS [DescribeProvisionedProductPlanResponse]
$creadList :: ReadS [DescribeProvisionedProductPlanResponse]
readsPrec :: Int -> ReadS DescribeProvisionedProductPlanResponse
$creadsPrec :: Int -> ReadS DescribeProvisionedProductPlanResponse
Prelude.Read, Int -> DescribeProvisionedProductPlanResponse -> ShowS
[DescribeProvisionedProductPlanResponse] -> ShowS
DescribeProvisionedProductPlanResponse -> String
(Int -> DescribeProvisionedProductPlanResponse -> ShowS)
-> (DescribeProvisionedProductPlanResponse -> String)
-> ([DescribeProvisionedProductPlanResponse] -> ShowS)
-> Show DescribeProvisionedProductPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisionedProductPlanResponse] -> ShowS
$cshowList :: [DescribeProvisionedProductPlanResponse] -> ShowS
show :: DescribeProvisionedProductPlanResponse -> String
$cshow :: DescribeProvisionedProductPlanResponse -> String
showsPrec :: Int -> DescribeProvisionedProductPlanResponse -> ShowS
$cshowsPrec :: Int -> DescribeProvisionedProductPlanResponse -> ShowS
Prelude.Show, (forall x.
 DescribeProvisionedProductPlanResponse
 -> Rep DescribeProvisionedProductPlanResponse x)
-> (forall x.
    Rep DescribeProvisionedProductPlanResponse x
    -> DescribeProvisionedProductPlanResponse)
-> Generic DescribeProvisionedProductPlanResponse
forall x.
Rep DescribeProvisionedProductPlanResponse x
-> DescribeProvisionedProductPlanResponse
forall x.
DescribeProvisionedProductPlanResponse
-> Rep DescribeProvisionedProductPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisionedProductPlanResponse x
-> DescribeProvisionedProductPlanResponse
$cfrom :: forall x.
DescribeProvisionedProductPlanResponse
-> Rep DescribeProvisionedProductPlanResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisionedProductPlanResponse' 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:
--
-- 'nextPageToken', 'describeProvisionedProductPlanResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'provisionedProductPlanDetails', 'describeProvisionedProductPlanResponse_provisionedProductPlanDetails' - Information about the plan.
--
-- 'resourceChanges', 'describeProvisionedProductPlanResponse_resourceChanges' - Information about the resource changes that will occur when the plan is
-- executed.
--
-- 'httpStatus', 'describeProvisionedProductPlanResponse_httpStatus' - The response's http status code.
newDescribeProvisionedProductPlanResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProvisionedProductPlanResponse
newDescribeProvisionedProductPlanResponse :: Int -> DescribeProvisionedProductPlanResponse
newDescribeProvisionedProductPlanResponse
  Int
pHttpStatus_ =
    DescribeProvisionedProductPlanResponse' :: Maybe Text
-> Maybe ProvisionedProductPlanDetails
-> Maybe [ResourceChange]
-> Int
-> DescribeProvisionedProductPlanResponse
DescribeProvisionedProductPlanResponse'
      { $sel:nextPageToken:DescribeProvisionedProductPlanResponse' :: Maybe Text
nextPageToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedProductPlanDetails:DescribeProvisionedProductPlanResponse' :: Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails =
          Maybe ProvisionedProductPlanDetails
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceChanges:DescribeProvisionedProductPlanResponse' :: Maybe [ResourceChange]
resourceChanges = Maybe [ResourceChange]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeProvisionedProductPlanResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
describeProvisionedProductPlanResponse_nextPageToken :: Lens.Lens' DescribeProvisionedProductPlanResponse (Prelude.Maybe Prelude.Text)
describeProvisionedProductPlanResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisionedProductPlanResponse
-> f DescribeProvisionedProductPlanResponse
describeProvisionedProductPlanResponse_nextPageToken = (DescribeProvisionedProductPlanResponse -> Maybe Text)
-> (DescribeProvisionedProductPlanResponse
    -> Maybe Text -> DescribeProvisionedProductPlanResponse)
-> Lens
     DescribeProvisionedProductPlanResponse
     DescribeProvisionedProductPlanResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlanResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:DescribeProvisionedProductPlanResponse' :: DescribeProvisionedProductPlanResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: DescribeProvisionedProductPlanResponse
s@DescribeProvisionedProductPlanResponse' {} Maybe Text
a -> DescribeProvisionedProductPlanResponse
s {$sel:nextPageToken:DescribeProvisionedProductPlanResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: DescribeProvisionedProductPlanResponse)

-- | Information about the plan.
describeProvisionedProductPlanResponse_provisionedProductPlanDetails :: Lens.Lens' DescribeProvisionedProductPlanResponse (Prelude.Maybe ProvisionedProductPlanDetails)
describeProvisionedProductPlanResponse_provisionedProductPlanDetails :: (Maybe ProvisionedProductPlanDetails
 -> f (Maybe ProvisionedProductPlanDetails))
-> DescribeProvisionedProductPlanResponse
-> f DescribeProvisionedProductPlanResponse
describeProvisionedProductPlanResponse_provisionedProductPlanDetails = (DescribeProvisionedProductPlanResponse
 -> Maybe ProvisionedProductPlanDetails)
-> (DescribeProvisionedProductPlanResponse
    -> Maybe ProvisionedProductPlanDetails
    -> DescribeProvisionedProductPlanResponse)
-> Lens
     DescribeProvisionedProductPlanResponse
     DescribeProvisionedProductPlanResponse
     (Maybe ProvisionedProductPlanDetails)
     (Maybe ProvisionedProductPlanDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlanResponse' {Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails :: Maybe ProvisionedProductPlanDetails
$sel:provisionedProductPlanDetails:DescribeProvisionedProductPlanResponse' :: DescribeProvisionedProductPlanResponse
-> Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails} -> Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails) (\s :: DescribeProvisionedProductPlanResponse
s@DescribeProvisionedProductPlanResponse' {} Maybe ProvisionedProductPlanDetails
a -> DescribeProvisionedProductPlanResponse
s {$sel:provisionedProductPlanDetails:DescribeProvisionedProductPlanResponse' :: Maybe ProvisionedProductPlanDetails
provisionedProductPlanDetails = Maybe ProvisionedProductPlanDetails
a} :: DescribeProvisionedProductPlanResponse)

-- | Information about the resource changes that will occur when the plan is
-- executed.
describeProvisionedProductPlanResponse_resourceChanges :: Lens.Lens' DescribeProvisionedProductPlanResponse (Prelude.Maybe [ResourceChange])
describeProvisionedProductPlanResponse_resourceChanges :: (Maybe [ResourceChange] -> f (Maybe [ResourceChange]))
-> DescribeProvisionedProductPlanResponse
-> f DescribeProvisionedProductPlanResponse
describeProvisionedProductPlanResponse_resourceChanges = (DescribeProvisionedProductPlanResponse -> Maybe [ResourceChange])
-> (DescribeProvisionedProductPlanResponse
    -> Maybe [ResourceChange]
    -> DescribeProvisionedProductPlanResponse)
-> Lens
     DescribeProvisionedProductPlanResponse
     DescribeProvisionedProductPlanResponse
     (Maybe [ResourceChange])
     (Maybe [ResourceChange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisionedProductPlanResponse' {Maybe [ResourceChange]
resourceChanges :: Maybe [ResourceChange]
$sel:resourceChanges:DescribeProvisionedProductPlanResponse' :: DescribeProvisionedProductPlanResponse -> Maybe [ResourceChange]
resourceChanges} -> Maybe [ResourceChange]
resourceChanges) (\s :: DescribeProvisionedProductPlanResponse
s@DescribeProvisionedProductPlanResponse' {} Maybe [ResourceChange]
a -> DescribeProvisionedProductPlanResponse
s {$sel:resourceChanges:DescribeProvisionedProductPlanResponse' :: Maybe [ResourceChange]
resourceChanges = Maybe [ResourceChange]
a} :: DescribeProvisionedProductPlanResponse) ((Maybe [ResourceChange] -> f (Maybe [ResourceChange]))
 -> DescribeProvisionedProductPlanResponse
 -> f DescribeProvisionedProductPlanResponse)
-> ((Maybe [ResourceChange] -> f (Maybe [ResourceChange]))
    -> Maybe [ResourceChange] -> f (Maybe [ResourceChange]))
-> (Maybe [ResourceChange] -> f (Maybe [ResourceChange]))
-> DescribeProvisionedProductPlanResponse
-> f DescribeProvisionedProductPlanResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceChange] [ResourceChange] [ResourceChange] [ResourceChange]
-> Iso
     (Maybe [ResourceChange])
     (Maybe [ResourceChange])
     (Maybe [ResourceChange])
     (Maybe [ResourceChange])
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
  [ResourceChange] [ResourceChange] [ResourceChange] [ResourceChange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeProvisionedProductPlanResponse