{-# 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.DescribeRecord
-- 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 request operation.
--
-- Use this operation after calling a request operation (for example,
-- ProvisionProduct, TerminateProvisionedProduct, or
-- UpdateProvisionedProduct).
--
-- If a provisioned product was transferred to a new owner using
-- UpdateProvisionedProductProperties, the new owner will be able to
-- describe all past records for that product. The previous owner will no
-- longer be able to describe the records, but will be able to use
-- ListRecordHistory to see the product\'s history from when he was the
-- owner.
module Amazonka.ServiceCatalog.DescribeRecord
  ( -- * Creating a Request
    DescribeRecord (..),
    newDescribeRecord,

    -- * Request Lenses
    describeRecord_acceptLanguage,
    describeRecord_pageToken,
    describeRecord_pageSize,
    describeRecord_id,

    -- * Destructuring the Response
    DescribeRecordResponse (..),
    newDescribeRecordResponse,

    -- * Response Lenses
    describeRecordResponse_recordDetail,
    describeRecordResponse_nextPageToken,
    describeRecordResponse_recordOutputs,
    describeRecordResponse_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:/ 'newDescribeRecord' smart constructor.
data DescribeRecord = DescribeRecord'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribeRecord -> 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.
    DescribeRecord -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    DescribeRecord -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The record identifier of the provisioned product. This identifier is
    -- returned by the request operation.
    DescribeRecord -> Text
id :: Prelude.Text
  }
  deriving (DescribeRecord -> DescribeRecord -> Bool
(DescribeRecord -> DescribeRecord -> Bool)
-> (DescribeRecord -> DescribeRecord -> Bool) -> Eq DescribeRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecord -> DescribeRecord -> Bool
$c/= :: DescribeRecord -> DescribeRecord -> Bool
== :: DescribeRecord -> DescribeRecord -> Bool
$c== :: DescribeRecord -> DescribeRecord -> Bool
Prelude.Eq, ReadPrec [DescribeRecord]
ReadPrec DescribeRecord
Int -> ReadS DescribeRecord
ReadS [DescribeRecord]
(Int -> ReadS DescribeRecord)
-> ReadS [DescribeRecord]
-> ReadPrec DescribeRecord
-> ReadPrec [DescribeRecord]
-> Read DescribeRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecord]
$creadListPrec :: ReadPrec [DescribeRecord]
readPrec :: ReadPrec DescribeRecord
$creadPrec :: ReadPrec DescribeRecord
readList :: ReadS [DescribeRecord]
$creadList :: ReadS [DescribeRecord]
readsPrec :: Int -> ReadS DescribeRecord
$creadsPrec :: Int -> ReadS DescribeRecord
Prelude.Read, Int -> DescribeRecord -> ShowS
[DescribeRecord] -> ShowS
DescribeRecord -> String
(Int -> DescribeRecord -> ShowS)
-> (DescribeRecord -> String)
-> ([DescribeRecord] -> ShowS)
-> Show DescribeRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecord] -> ShowS
$cshowList :: [DescribeRecord] -> ShowS
show :: DescribeRecord -> String
$cshow :: DescribeRecord -> String
showsPrec :: Int -> DescribeRecord -> ShowS
$cshowsPrec :: Int -> DescribeRecord -> ShowS
Prelude.Show, (forall x. DescribeRecord -> Rep DescribeRecord x)
-> (forall x. Rep DescribeRecord x -> DescribeRecord)
-> Generic DescribeRecord
forall x. Rep DescribeRecord x -> DescribeRecord
forall x. DescribeRecord -> Rep DescribeRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRecord x -> DescribeRecord
$cfrom :: forall x. DescribeRecord -> Rep DescribeRecord x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecord' 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', 'describeRecord_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageToken', 'describeRecord_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'describeRecord_pageSize' - The maximum number of items to return with this call.
--
-- 'id', 'describeRecord_id' - The record identifier of the provisioned product. This identifier is
-- returned by the request operation.
newDescribeRecord ::
  -- | 'id'
  Prelude.Text ->
  DescribeRecord
newDescribeRecord :: Text -> DescribeRecord
newDescribeRecord Text
pId_ =
  DescribeRecord' :: Maybe Text -> Maybe Text -> Maybe Natural -> Text -> DescribeRecord
DescribeRecord'
    { $sel:acceptLanguage:DescribeRecord' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:DescribeRecord' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:DescribeRecord' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeRecord' :: Text
id = Text
pId_
    }

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

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

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

-- | The record identifier of the provisioned product. This identifier is
-- returned by the request operation.
describeRecord_id :: Lens.Lens' DescribeRecord Prelude.Text
describeRecord_id :: (Text -> f Text) -> DescribeRecord -> f DescribeRecord
describeRecord_id = (DescribeRecord -> Text)
-> (DescribeRecord -> Text -> DescribeRecord)
-> Lens DescribeRecord DescribeRecord Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecord' {Text
id :: Text
$sel:id:DescribeRecord' :: DescribeRecord -> Text
id} -> Text
id) (\s :: DescribeRecord
s@DescribeRecord' {} Text
a -> DescribeRecord
s {$sel:id:DescribeRecord' :: Text
id = Text
a} :: DescribeRecord)

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

instance Prelude.NFData DescribeRecord

instance Core.ToHeaders DescribeRecord where
  toHeaders :: DescribeRecord -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRecord -> 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.DescribeRecord" ::
                          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 DescribeRecord where
  toJSON :: DescribeRecord -> Value
toJSON DescribeRecord' {Maybe Natural
Maybe Text
Text
id :: Text
pageSize :: Maybe Natural
pageToken :: Maybe Text
acceptLanguage :: Maybe Text
$sel:id:DescribeRecord' :: DescribeRecord -> Text
$sel:pageSize:DescribeRecord' :: DescribeRecord -> Maybe Natural
$sel:pageToken:DescribeRecord' :: DescribeRecord -> Maybe Text
$sel:acceptLanguage:DescribeRecord' :: DescribeRecord -> 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
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id)
          ]
      )

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

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

-- | /See:/ 'newDescribeRecordResponse' smart constructor.
data DescribeRecordResponse = DescribeRecordResponse'
  { -- | Information about the product.
    DescribeRecordResponse -> Maybe RecordDetail
recordDetail :: Prelude.Maybe RecordDetail,
    -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    DescribeRecordResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the product created as the result of a request. For
    -- example, the output for a CloudFormation-backed product that creates an
    -- S3 bucket would include the S3 bucket URL.
    DescribeRecordResponse -> Maybe [RecordOutput]
recordOutputs :: Prelude.Maybe [RecordOutput],
    -- | The response's http status code.
    DescribeRecordResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRecordResponse -> DescribeRecordResponse -> Bool
(DescribeRecordResponse -> DescribeRecordResponse -> Bool)
-> (DescribeRecordResponse -> DescribeRecordResponse -> Bool)
-> Eq DescribeRecordResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRecordResponse -> DescribeRecordResponse -> Bool
$c/= :: DescribeRecordResponse -> DescribeRecordResponse -> Bool
== :: DescribeRecordResponse -> DescribeRecordResponse -> Bool
$c== :: DescribeRecordResponse -> DescribeRecordResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRecordResponse]
ReadPrec DescribeRecordResponse
Int -> ReadS DescribeRecordResponse
ReadS [DescribeRecordResponse]
(Int -> ReadS DescribeRecordResponse)
-> ReadS [DescribeRecordResponse]
-> ReadPrec DescribeRecordResponse
-> ReadPrec [DescribeRecordResponse]
-> Read DescribeRecordResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRecordResponse]
$creadListPrec :: ReadPrec [DescribeRecordResponse]
readPrec :: ReadPrec DescribeRecordResponse
$creadPrec :: ReadPrec DescribeRecordResponse
readList :: ReadS [DescribeRecordResponse]
$creadList :: ReadS [DescribeRecordResponse]
readsPrec :: Int -> ReadS DescribeRecordResponse
$creadsPrec :: Int -> ReadS DescribeRecordResponse
Prelude.Read, Int -> DescribeRecordResponse -> ShowS
[DescribeRecordResponse] -> ShowS
DescribeRecordResponse -> String
(Int -> DescribeRecordResponse -> ShowS)
-> (DescribeRecordResponse -> String)
-> ([DescribeRecordResponse] -> ShowS)
-> Show DescribeRecordResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRecordResponse] -> ShowS
$cshowList :: [DescribeRecordResponse] -> ShowS
show :: DescribeRecordResponse -> String
$cshow :: DescribeRecordResponse -> String
showsPrec :: Int -> DescribeRecordResponse -> ShowS
$cshowsPrec :: Int -> DescribeRecordResponse -> ShowS
Prelude.Show, (forall x. DescribeRecordResponse -> Rep DescribeRecordResponse x)
-> (forall x.
    Rep DescribeRecordResponse x -> DescribeRecordResponse)
-> Generic DescribeRecordResponse
forall x. Rep DescribeRecordResponse x -> DescribeRecordResponse
forall x. DescribeRecordResponse -> Rep DescribeRecordResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRecordResponse x -> DescribeRecordResponse
$cfrom :: forall x. DescribeRecordResponse -> Rep DescribeRecordResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRecordResponse' 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', 'describeRecordResponse_recordDetail' - Information about the product.
--
-- 'nextPageToken', 'describeRecordResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'recordOutputs', 'describeRecordResponse_recordOutputs' - Information about the product created as the result of a request. For
-- example, the output for a CloudFormation-backed product that creates an
-- S3 bucket would include the S3 bucket URL.
--
-- 'httpStatus', 'describeRecordResponse_httpStatus' - The response's http status code.
newDescribeRecordResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRecordResponse
newDescribeRecordResponse :: Int -> DescribeRecordResponse
newDescribeRecordResponse Int
pHttpStatus_ =
  DescribeRecordResponse' :: Maybe RecordDetail
-> Maybe Text
-> Maybe [RecordOutput]
-> Int
-> DescribeRecordResponse
DescribeRecordResponse'
    { $sel:recordDetail:DescribeRecordResponse' :: Maybe RecordDetail
recordDetail =
        Maybe RecordDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:nextPageToken:DescribeRecordResponse' :: Maybe Text
nextPageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recordOutputs:DescribeRecordResponse' :: Maybe [RecordOutput]
recordOutputs = Maybe [RecordOutput]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRecordResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | Information about the product created as the result of a request. For
-- example, the output for a CloudFormation-backed product that creates an
-- S3 bucket would include the S3 bucket URL.
describeRecordResponse_recordOutputs :: Lens.Lens' DescribeRecordResponse (Prelude.Maybe [RecordOutput])
describeRecordResponse_recordOutputs :: (Maybe [RecordOutput] -> f (Maybe [RecordOutput]))
-> DescribeRecordResponse -> f DescribeRecordResponse
describeRecordResponse_recordOutputs = (DescribeRecordResponse -> Maybe [RecordOutput])
-> (DescribeRecordResponse
    -> Maybe [RecordOutput] -> DescribeRecordResponse)
-> Lens
     DescribeRecordResponse
     DescribeRecordResponse
     (Maybe [RecordOutput])
     (Maybe [RecordOutput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRecordResponse' {Maybe [RecordOutput]
recordOutputs :: Maybe [RecordOutput]
$sel:recordOutputs:DescribeRecordResponse' :: DescribeRecordResponse -> Maybe [RecordOutput]
recordOutputs} -> Maybe [RecordOutput]
recordOutputs) (\s :: DescribeRecordResponse
s@DescribeRecordResponse' {} Maybe [RecordOutput]
a -> DescribeRecordResponse
s {$sel:recordOutputs:DescribeRecordResponse' :: Maybe [RecordOutput]
recordOutputs = Maybe [RecordOutput]
a} :: DescribeRecordResponse) ((Maybe [RecordOutput] -> f (Maybe [RecordOutput]))
 -> DescribeRecordResponse -> f DescribeRecordResponse)
-> ((Maybe [RecordOutput] -> f (Maybe [RecordOutput]))
    -> Maybe [RecordOutput] -> f (Maybe [RecordOutput]))
-> (Maybe [RecordOutput] -> f (Maybe [RecordOutput]))
-> DescribeRecordResponse
-> f DescribeRecordResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [RecordOutput] [RecordOutput] [RecordOutput] [RecordOutput]
-> Iso
     (Maybe [RecordOutput])
     (Maybe [RecordOutput])
     (Maybe [RecordOutput])
     (Maybe [RecordOutput])
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 [RecordOutput] [RecordOutput] [RecordOutput] [RecordOutput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeRecordResponse