{-# 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.ExecuteProvisionedProductPlan
-- 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)
--
-- Provisions or modifies a product based on the resource changes for the
-- specified plan.
module Amazonka.ServiceCatalog.ExecuteProvisionedProductPlan
  ( -- * Creating a Request
    ExecuteProvisionedProductPlan (..),
    newExecuteProvisionedProductPlan,

    -- * Request Lenses
    executeProvisionedProductPlan_acceptLanguage,
    executeProvisionedProductPlan_planId,
    executeProvisionedProductPlan_idempotencyToken,

    -- * Destructuring the Response
    ExecuteProvisionedProductPlanResponse (..),
    newExecuteProvisionedProductPlanResponse,

    -- * Response Lenses
    executeProvisionedProductPlanResponse_recordDetail,
    executeProvisionedProductPlanResponse_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:/ 'newExecuteProvisionedProductPlan' smart constructor.
data ExecuteProvisionedProductPlan = ExecuteProvisionedProductPlan'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ExecuteProvisionedProductPlan -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The plan identifier.
    ExecuteProvisionedProductPlan -> Text
planId :: Prelude.Text,
    -- | A unique identifier that you provide to ensure idempotency. If multiple
    -- requests differ only by the idempotency token, the same response is
    -- returned for each repeated request.
    ExecuteProvisionedProductPlan -> Text
idempotencyToken :: Prelude.Text
  }
  deriving (ExecuteProvisionedProductPlan
-> ExecuteProvisionedProductPlan -> Bool
(ExecuteProvisionedProductPlan
 -> ExecuteProvisionedProductPlan -> Bool)
-> (ExecuteProvisionedProductPlan
    -> ExecuteProvisionedProductPlan -> Bool)
-> Eq ExecuteProvisionedProductPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteProvisionedProductPlan
-> ExecuteProvisionedProductPlan -> Bool
$c/= :: ExecuteProvisionedProductPlan
-> ExecuteProvisionedProductPlan -> Bool
== :: ExecuteProvisionedProductPlan
-> ExecuteProvisionedProductPlan -> Bool
$c== :: ExecuteProvisionedProductPlan
-> ExecuteProvisionedProductPlan -> Bool
Prelude.Eq, ReadPrec [ExecuteProvisionedProductPlan]
ReadPrec ExecuteProvisionedProductPlan
Int -> ReadS ExecuteProvisionedProductPlan
ReadS [ExecuteProvisionedProductPlan]
(Int -> ReadS ExecuteProvisionedProductPlan)
-> ReadS [ExecuteProvisionedProductPlan]
-> ReadPrec ExecuteProvisionedProductPlan
-> ReadPrec [ExecuteProvisionedProductPlan]
-> Read ExecuteProvisionedProductPlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteProvisionedProductPlan]
$creadListPrec :: ReadPrec [ExecuteProvisionedProductPlan]
readPrec :: ReadPrec ExecuteProvisionedProductPlan
$creadPrec :: ReadPrec ExecuteProvisionedProductPlan
readList :: ReadS [ExecuteProvisionedProductPlan]
$creadList :: ReadS [ExecuteProvisionedProductPlan]
readsPrec :: Int -> ReadS ExecuteProvisionedProductPlan
$creadsPrec :: Int -> ReadS ExecuteProvisionedProductPlan
Prelude.Read, Int -> ExecuteProvisionedProductPlan -> ShowS
[ExecuteProvisionedProductPlan] -> ShowS
ExecuteProvisionedProductPlan -> String
(Int -> ExecuteProvisionedProductPlan -> ShowS)
-> (ExecuteProvisionedProductPlan -> String)
-> ([ExecuteProvisionedProductPlan] -> ShowS)
-> Show ExecuteProvisionedProductPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteProvisionedProductPlan] -> ShowS
$cshowList :: [ExecuteProvisionedProductPlan] -> ShowS
show :: ExecuteProvisionedProductPlan -> String
$cshow :: ExecuteProvisionedProductPlan -> String
showsPrec :: Int -> ExecuteProvisionedProductPlan -> ShowS
$cshowsPrec :: Int -> ExecuteProvisionedProductPlan -> ShowS
Prelude.Show, (forall x.
 ExecuteProvisionedProductPlan
 -> Rep ExecuteProvisionedProductPlan x)
-> (forall x.
    Rep ExecuteProvisionedProductPlan x
    -> ExecuteProvisionedProductPlan)
-> Generic ExecuteProvisionedProductPlan
forall x.
Rep ExecuteProvisionedProductPlan x
-> ExecuteProvisionedProductPlan
forall x.
ExecuteProvisionedProductPlan
-> Rep ExecuteProvisionedProductPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteProvisionedProductPlan x
-> ExecuteProvisionedProductPlan
$cfrom :: forall x.
ExecuteProvisionedProductPlan
-> Rep ExecuteProvisionedProductPlan x
Prelude.Generic)

-- |
-- Create a value of 'ExecuteProvisionedProductPlan' 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', 'executeProvisionedProductPlan_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'planId', 'executeProvisionedProductPlan_planId' - The plan identifier.
--
-- 'idempotencyToken', 'executeProvisionedProductPlan_idempotencyToken' - A unique identifier that you provide to ensure idempotency. If multiple
-- requests differ only by the idempotency token, the same response is
-- returned for each repeated request.
newExecuteProvisionedProductPlan ::
  -- | 'planId'
  Prelude.Text ->
  -- | 'idempotencyToken'
  Prelude.Text ->
  ExecuteProvisionedProductPlan
newExecuteProvisionedProductPlan :: Text -> Text -> ExecuteProvisionedProductPlan
newExecuteProvisionedProductPlan
  Text
pPlanId_
  Text
pIdempotencyToken_ =
    ExecuteProvisionedProductPlan' :: Maybe Text -> Text -> Text -> ExecuteProvisionedProductPlan
ExecuteProvisionedProductPlan'
      { $sel:acceptLanguage:ExecuteProvisionedProductPlan' :: Maybe Text
acceptLanguage =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:planId:ExecuteProvisionedProductPlan' :: Text
planId = Text
pPlanId_,
        $sel:idempotencyToken:ExecuteProvisionedProductPlan' :: Text
idempotencyToken = Text
pIdempotencyToken_
      }

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

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

-- | A unique identifier that you provide to ensure idempotency. If multiple
-- requests differ only by the idempotency token, the same response is
-- returned for each repeated request.
executeProvisionedProductPlan_idempotencyToken :: Lens.Lens' ExecuteProvisionedProductPlan Prelude.Text
executeProvisionedProductPlan_idempotencyToken :: (Text -> f Text)
-> ExecuteProvisionedProductPlan -> f ExecuteProvisionedProductPlan
executeProvisionedProductPlan_idempotencyToken = (ExecuteProvisionedProductPlan -> Text)
-> (ExecuteProvisionedProductPlan
    -> Text -> ExecuteProvisionedProductPlan)
-> Lens
     ExecuteProvisionedProductPlan
     ExecuteProvisionedProductPlan
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteProvisionedProductPlan' {Text
idempotencyToken :: Text
$sel:idempotencyToken:ExecuteProvisionedProductPlan' :: ExecuteProvisionedProductPlan -> Text
idempotencyToken} -> Text
idempotencyToken) (\s :: ExecuteProvisionedProductPlan
s@ExecuteProvisionedProductPlan' {} Text
a -> ExecuteProvisionedProductPlan
s {$sel:idempotencyToken:ExecuteProvisionedProductPlan' :: Text
idempotencyToken = Text
a} :: ExecuteProvisionedProductPlan)

instance
  Core.AWSRequest
    ExecuteProvisionedProductPlan
  where
  type
    AWSResponse ExecuteProvisionedProductPlan =
      ExecuteProvisionedProductPlanResponse
  request :: ExecuteProvisionedProductPlan
-> Request ExecuteProvisionedProductPlan
request = Service
-> ExecuteProvisionedProductPlan
-> Request ExecuteProvisionedProductPlan
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ExecuteProvisionedProductPlan
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ExecuteProvisionedProductPlan)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ExecuteProvisionedProductPlan))
-> Logger
-> Service
-> Proxy ExecuteProvisionedProductPlan
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ExecuteProvisionedProductPlan)))
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 RecordDetail -> Int -> ExecuteProvisionedProductPlanResponse
ExecuteProvisionedProductPlanResponse'
            (Maybe RecordDetail
 -> Int -> ExecuteProvisionedProductPlanResponse)
-> Either String (Maybe RecordDetail)
-> Either String (Int -> ExecuteProvisionedProductPlanResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RecordDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RecordDetail")
            Either String (Int -> ExecuteProvisionedProductPlanResponse)
-> Either String Int
-> Either String ExecuteProvisionedProductPlanResponse
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
    ExecuteProvisionedProductPlan

instance Prelude.NFData ExecuteProvisionedProductPlan

instance Core.ToHeaders ExecuteProvisionedProductPlan where
  toHeaders :: ExecuteProvisionedProductPlan -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ExecuteProvisionedProductPlan -> 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.ExecuteProvisionedProductPlan" ::
                          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 ExecuteProvisionedProductPlan where
  toJSON :: ExecuteProvisionedProductPlan -> Value
toJSON ExecuteProvisionedProductPlan' {Maybe Text
Text
idempotencyToken :: Text
planId :: Text
acceptLanguage :: Maybe Text
$sel:idempotencyToken:ExecuteProvisionedProductPlan' :: ExecuteProvisionedProductPlan -> Text
$sel:planId:ExecuteProvisionedProductPlan' :: ExecuteProvisionedProductPlan -> Text
$sel:acceptLanguage:ExecuteProvisionedProductPlan' :: ExecuteProvisionedProductPlan -> 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,
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
idempotencyToken)
          ]
      )

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

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

-- | /See:/ 'newExecuteProvisionedProductPlanResponse' smart constructor.
data ExecuteProvisionedProductPlanResponse = ExecuteProvisionedProductPlanResponse'
  { -- | Information about the result of provisioning the product.
    ExecuteProvisionedProductPlanResponse -> Maybe RecordDetail
recordDetail :: Prelude.Maybe RecordDetail,
    -- | The response's http status code.
    ExecuteProvisionedProductPlanResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ExecuteProvisionedProductPlanResponse
-> ExecuteProvisionedProductPlanResponse -> Bool
(ExecuteProvisionedProductPlanResponse
 -> ExecuteProvisionedProductPlanResponse -> Bool)
-> (ExecuteProvisionedProductPlanResponse
    -> ExecuteProvisionedProductPlanResponse -> Bool)
-> Eq ExecuteProvisionedProductPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteProvisionedProductPlanResponse
-> ExecuteProvisionedProductPlanResponse -> Bool
$c/= :: ExecuteProvisionedProductPlanResponse
-> ExecuteProvisionedProductPlanResponse -> Bool
== :: ExecuteProvisionedProductPlanResponse
-> ExecuteProvisionedProductPlanResponse -> Bool
$c== :: ExecuteProvisionedProductPlanResponse
-> ExecuteProvisionedProductPlanResponse -> Bool
Prelude.Eq, ReadPrec [ExecuteProvisionedProductPlanResponse]
ReadPrec ExecuteProvisionedProductPlanResponse
Int -> ReadS ExecuteProvisionedProductPlanResponse
ReadS [ExecuteProvisionedProductPlanResponse]
(Int -> ReadS ExecuteProvisionedProductPlanResponse)
-> ReadS [ExecuteProvisionedProductPlanResponse]
-> ReadPrec ExecuteProvisionedProductPlanResponse
-> ReadPrec [ExecuteProvisionedProductPlanResponse]
-> Read ExecuteProvisionedProductPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteProvisionedProductPlanResponse]
$creadListPrec :: ReadPrec [ExecuteProvisionedProductPlanResponse]
readPrec :: ReadPrec ExecuteProvisionedProductPlanResponse
$creadPrec :: ReadPrec ExecuteProvisionedProductPlanResponse
readList :: ReadS [ExecuteProvisionedProductPlanResponse]
$creadList :: ReadS [ExecuteProvisionedProductPlanResponse]
readsPrec :: Int -> ReadS ExecuteProvisionedProductPlanResponse
$creadsPrec :: Int -> ReadS ExecuteProvisionedProductPlanResponse
Prelude.Read, Int -> ExecuteProvisionedProductPlanResponse -> ShowS
[ExecuteProvisionedProductPlanResponse] -> ShowS
ExecuteProvisionedProductPlanResponse -> String
(Int -> ExecuteProvisionedProductPlanResponse -> ShowS)
-> (ExecuteProvisionedProductPlanResponse -> String)
-> ([ExecuteProvisionedProductPlanResponse] -> ShowS)
-> Show ExecuteProvisionedProductPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteProvisionedProductPlanResponse] -> ShowS
$cshowList :: [ExecuteProvisionedProductPlanResponse] -> ShowS
show :: ExecuteProvisionedProductPlanResponse -> String
$cshow :: ExecuteProvisionedProductPlanResponse -> String
showsPrec :: Int -> ExecuteProvisionedProductPlanResponse -> ShowS
$cshowsPrec :: Int -> ExecuteProvisionedProductPlanResponse -> ShowS
Prelude.Show, (forall x.
 ExecuteProvisionedProductPlanResponse
 -> Rep ExecuteProvisionedProductPlanResponse x)
-> (forall x.
    Rep ExecuteProvisionedProductPlanResponse x
    -> ExecuteProvisionedProductPlanResponse)
-> Generic ExecuteProvisionedProductPlanResponse
forall x.
Rep ExecuteProvisionedProductPlanResponse x
-> ExecuteProvisionedProductPlanResponse
forall x.
ExecuteProvisionedProductPlanResponse
-> Rep ExecuteProvisionedProductPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteProvisionedProductPlanResponse x
-> ExecuteProvisionedProductPlanResponse
$cfrom :: forall x.
ExecuteProvisionedProductPlanResponse
-> Rep ExecuteProvisionedProductPlanResponse x
Prelude.Generic)

-- |
-- Create a value of 'ExecuteProvisionedProductPlanResponse' 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:
--
-- 'recordDetail', 'executeProvisionedProductPlanResponse_recordDetail' - Information about the result of provisioning the product.
--
-- 'httpStatus', 'executeProvisionedProductPlanResponse_httpStatus' - The response's http status code.
newExecuteProvisionedProductPlanResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ExecuteProvisionedProductPlanResponse
newExecuteProvisionedProductPlanResponse :: Int -> ExecuteProvisionedProductPlanResponse
newExecuteProvisionedProductPlanResponse Int
pHttpStatus_ =
  ExecuteProvisionedProductPlanResponse' :: Maybe RecordDetail -> Int -> ExecuteProvisionedProductPlanResponse
ExecuteProvisionedProductPlanResponse'
    { $sel:recordDetail:ExecuteProvisionedProductPlanResponse' :: Maybe RecordDetail
recordDetail =
        Maybe RecordDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ExecuteProvisionedProductPlanResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the result of provisioning the product.
executeProvisionedProductPlanResponse_recordDetail :: Lens.Lens' ExecuteProvisionedProductPlanResponse (Prelude.Maybe RecordDetail)
executeProvisionedProductPlanResponse_recordDetail :: (Maybe RecordDetail -> f (Maybe RecordDetail))
-> ExecuteProvisionedProductPlanResponse
-> f ExecuteProvisionedProductPlanResponse
executeProvisionedProductPlanResponse_recordDetail = (ExecuteProvisionedProductPlanResponse -> Maybe RecordDetail)
-> (ExecuteProvisionedProductPlanResponse
    -> Maybe RecordDetail -> ExecuteProvisionedProductPlanResponse)
-> Lens
     ExecuteProvisionedProductPlanResponse
     ExecuteProvisionedProductPlanResponse
     (Maybe RecordDetail)
     (Maybe RecordDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteProvisionedProductPlanResponse' {Maybe RecordDetail
recordDetail :: Maybe RecordDetail
$sel:recordDetail:ExecuteProvisionedProductPlanResponse' :: ExecuteProvisionedProductPlanResponse -> Maybe RecordDetail
recordDetail} -> Maybe RecordDetail
recordDetail) (\s :: ExecuteProvisionedProductPlanResponse
s@ExecuteProvisionedProductPlanResponse' {} Maybe RecordDetail
a -> ExecuteProvisionedProductPlanResponse
s {$sel:recordDetail:ExecuteProvisionedProductPlanResponse' :: Maybe RecordDetail
recordDetail = Maybe RecordDetail
a} :: ExecuteProvisionedProductPlanResponse)

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

instance
  Prelude.NFData
    ExecuteProvisionedProductPlanResponse