{-# 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.MarketplaceCatalog.DescribeEntity
-- 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)
--
-- Returns the metadata and content of the entity.
module Amazonka.MarketplaceCatalog.DescribeEntity
  ( -- * Creating a Request
    DescribeEntity (..),
    newDescribeEntity,

    -- * Request Lenses
    describeEntity_catalog,
    describeEntity_entityId,

    -- * Destructuring the Response
    DescribeEntityResponse (..),
    newDescribeEntityResponse,

    -- * Response Lenses
    describeEntityResponse_lastModifiedDate,
    describeEntityResponse_entityType,
    describeEntityResponse_details,
    describeEntityResponse_entityIdentifier,
    describeEntityResponse_entityArn,
    describeEntityResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeEntity' smart constructor.
data DescribeEntity = DescribeEntity'
  { -- | Required. The catalog related to the request. Fixed value:
    -- @AWSMarketplace@
    DescribeEntity -> Text
catalog :: Prelude.Text,
    -- | Required. The unique ID of the entity to describe.
    DescribeEntity -> Text
entityId :: Prelude.Text
  }
  deriving (DescribeEntity -> DescribeEntity -> Bool
(DescribeEntity -> DescribeEntity -> Bool)
-> (DescribeEntity -> DescribeEntity -> Bool) -> Eq DescribeEntity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEntity -> DescribeEntity -> Bool
$c/= :: DescribeEntity -> DescribeEntity -> Bool
== :: DescribeEntity -> DescribeEntity -> Bool
$c== :: DescribeEntity -> DescribeEntity -> Bool
Prelude.Eq, ReadPrec [DescribeEntity]
ReadPrec DescribeEntity
Int -> ReadS DescribeEntity
ReadS [DescribeEntity]
(Int -> ReadS DescribeEntity)
-> ReadS [DescribeEntity]
-> ReadPrec DescribeEntity
-> ReadPrec [DescribeEntity]
-> Read DescribeEntity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEntity]
$creadListPrec :: ReadPrec [DescribeEntity]
readPrec :: ReadPrec DescribeEntity
$creadPrec :: ReadPrec DescribeEntity
readList :: ReadS [DescribeEntity]
$creadList :: ReadS [DescribeEntity]
readsPrec :: Int -> ReadS DescribeEntity
$creadsPrec :: Int -> ReadS DescribeEntity
Prelude.Read, Int -> DescribeEntity -> ShowS
[DescribeEntity] -> ShowS
DescribeEntity -> String
(Int -> DescribeEntity -> ShowS)
-> (DescribeEntity -> String)
-> ([DescribeEntity] -> ShowS)
-> Show DescribeEntity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEntity] -> ShowS
$cshowList :: [DescribeEntity] -> ShowS
show :: DescribeEntity -> String
$cshow :: DescribeEntity -> String
showsPrec :: Int -> DescribeEntity -> ShowS
$cshowsPrec :: Int -> DescribeEntity -> ShowS
Prelude.Show, (forall x. DescribeEntity -> Rep DescribeEntity x)
-> (forall x. Rep DescribeEntity x -> DescribeEntity)
-> Generic DescribeEntity
forall x. Rep DescribeEntity x -> DescribeEntity
forall x. DescribeEntity -> Rep DescribeEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEntity x -> DescribeEntity
$cfrom :: forall x. DescribeEntity -> Rep DescribeEntity x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEntity' 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:
--
-- 'catalog', 'describeEntity_catalog' - Required. The catalog related to the request. Fixed value:
-- @AWSMarketplace@
--
-- 'entityId', 'describeEntity_entityId' - Required. The unique ID of the entity to describe.
newDescribeEntity ::
  -- | 'catalog'
  Prelude.Text ->
  -- | 'entityId'
  Prelude.Text ->
  DescribeEntity
newDescribeEntity :: Text -> Text -> DescribeEntity
newDescribeEntity Text
pCatalog_ Text
pEntityId_ =
  DescribeEntity' :: Text -> Text -> DescribeEntity
DescribeEntity'
    { $sel:catalog:DescribeEntity' :: Text
catalog = Text
pCatalog_,
      $sel:entityId:DescribeEntity' :: Text
entityId = Text
pEntityId_
    }

-- | Required. The catalog related to the request. Fixed value:
-- @AWSMarketplace@
describeEntity_catalog :: Lens.Lens' DescribeEntity Prelude.Text
describeEntity_catalog :: (Text -> f Text) -> DescribeEntity -> f DescribeEntity
describeEntity_catalog = (DescribeEntity -> Text)
-> (DescribeEntity -> Text -> DescribeEntity)
-> Lens DescribeEntity DescribeEntity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntity' {Text
catalog :: Text
$sel:catalog:DescribeEntity' :: DescribeEntity -> Text
catalog} -> Text
catalog) (\s :: DescribeEntity
s@DescribeEntity' {} Text
a -> DescribeEntity
s {$sel:catalog:DescribeEntity' :: Text
catalog = Text
a} :: DescribeEntity)

-- | Required. The unique ID of the entity to describe.
describeEntity_entityId :: Lens.Lens' DescribeEntity Prelude.Text
describeEntity_entityId :: (Text -> f Text) -> DescribeEntity -> f DescribeEntity
describeEntity_entityId = (DescribeEntity -> Text)
-> (DescribeEntity -> Text -> DescribeEntity)
-> Lens DescribeEntity DescribeEntity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntity' {Text
entityId :: Text
$sel:entityId:DescribeEntity' :: DescribeEntity -> Text
entityId} -> Text
entityId) (\s :: DescribeEntity
s@DescribeEntity' {} Text
a -> DescribeEntity
s {$sel:entityId:DescribeEntity' :: Text
entityId = Text
a} :: DescribeEntity)

instance Core.AWSRequest DescribeEntity where
  type
    AWSResponse DescribeEntity =
      DescribeEntityResponse
  request :: DescribeEntity -> Request DescribeEntity
request = Service -> DescribeEntity -> Request DescribeEntity
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeEntity
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEntity)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeEntity))
-> Logger
-> Service
-> Proxy DescribeEntity
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEntity)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeEntityResponse
DescribeEntityResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeEntityResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeEntityResponse)
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
"LastModifiedDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeEntityResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> DescribeEntityResponse)
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
"EntityType")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> DescribeEntityResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> DescribeEntityResponse)
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
"Details")
            Either
  String (Maybe Text -> Maybe Text -> Int -> DescribeEntityResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeEntityResponse)
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
"EntityIdentifier")
            Either String (Maybe Text -> Int -> DescribeEntityResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeEntityResponse)
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
"EntityArn")
            Either String (Int -> DescribeEntityResponse)
-> Either String Int -> Either String DescribeEntityResponse
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 DescribeEntity

instance Prelude.NFData DescribeEntity

instance Core.ToHeaders DescribeEntity where
  toHeaders :: DescribeEntity -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeEntity -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath DescribeEntity where
  toPath :: DescribeEntity -> ByteString
toPath = ByteString -> DescribeEntity -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DescribeEntity"

instance Core.ToQuery DescribeEntity where
  toQuery :: DescribeEntity -> QueryString
toQuery DescribeEntity' {Text
entityId :: Text
catalog :: Text
$sel:entityId:DescribeEntity' :: DescribeEntity -> Text
$sel:catalog:DescribeEntity' :: DescribeEntity -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"catalog" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
catalog,
        ByteString
"entityId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
entityId
      ]

-- | /See:/ 'newDescribeEntityResponse' smart constructor.
data DescribeEntityResponse = DescribeEntityResponse'
  { -- | The last modified date of the entity, in ISO 8601 format
    -- (2018-02-27T13:45:22Z).
    DescribeEntityResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | The named type of the entity, in the format of @EntityType\@Version@.
    DescribeEntityResponse -> Maybe Text
entityType :: Prelude.Maybe Prelude.Text,
    -- | This stringified JSON object includes the details of the entity.
    DescribeEntityResponse -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the entity, in the format of @EntityId\@RevisionId@.
    DescribeEntityResponse -> Maybe Text
entityIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The ARN associated to the unique identifier for the change set
    -- referenced in this request.
    DescribeEntityResponse -> Maybe Text
entityArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeEntityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeEntityResponse -> DescribeEntityResponse -> Bool
(DescribeEntityResponse -> DescribeEntityResponse -> Bool)
-> (DescribeEntityResponse -> DescribeEntityResponse -> Bool)
-> Eq DescribeEntityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEntityResponse -> DescribeEntityResponse -> Bool
$c/= :: DescribeEntityResponse -> DescribeEntityResponse -> Bool
== :: DescribeEntityResponse -> DescribeEntityResponse -> Bool
$c== :: DescribeEntityResponse -> DescribeEntityResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEntityResponse]
ReadPrec DescribeEntityResponse
Int -> ReadS DescribeEntityResponse
ReadS [DescribeEntityResponse]
(Int -> ReadS DescribeEntityResponse)
-> ReadS [DescribeEntityResponse]
-> ReadPrec DescribeEntityResponse
-> ReadPrec [DescribeEntityResponse]
-> Read DescribeEntityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEntityResponse]
$creadListPrec :: ReadPrec [DescribeEntityResponse]
readPrec :: ReadPrec DescribeEntityResponse
$creadPrec :: ReadPrec DescribeEntityResponse
readList :: ReadS [DescribeEntityResponse]
$creadList :: ReadS [DescribeEntityResponse]
readsPrec :: Int -> ReadS DescribeEntityResponse
$creadsPrec :: Int -> ReadS DescribeEntityResponse
Prelude.Read, Int -> DescribeEntityResponse -> ShowS
[DescribeEntityResponse] -> ShowS
DescribeEntityResponse -> String
(Int -> DescribeEntityResponse -> ShowS)
-> (DescribeEntityResponse -> String)
-> ([DescribeEntityResponse] -> ShowS)
-> Show DescribeEntityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEntityResponse] -> ShowS
$cshowList :: [DescribeEntityResponse] -> ShowS
show :: DescribeEntityResponse -> String
$cshow :: DescribeEntityResponse -> String
showsPrec :: Int -> DescribeEntityResponse -> ShowS
$cshowsPrec :: Int -> DescribeEntityResponse -> ShowS
Prelude.Show, (forall x. DescribeEntityResponse -> Rep DescribeEntityResponse x)
-> (forall x.
    Rep DescribeEntityResponse x -> DescribeEntityResponse)
-> Generic DescribeEntityResponse
forall x. Rep DescribeEntityResponse x -> DescribeEntityResponse
forall x. DescribeEntityResponse -> Rep DescribeEntityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEntityResponse x -> DescribeEntityResponse
$cfrom :: forall x. DescribeEntityResponse -> Rep DescribeEntityResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEntityResponse' 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:
--
-- 'lastModifiedDate', 'describeEntityResponse_lastModifiedDate' - The last modified date of the entity, in ISO 8601 format
-- (2018-02-27T13:45:22Z).
--
-- 'entityType', 'describeEntityResponse_entityType' - The named type of the entity, in the format of @EntityType\@Version@.
--
-- 'details', 'describeEntityResponse_details' - This stringified JSON object includes the details of the entity.
--
-- 'entityIdentifier', 'describeEntityResponse_entityIdentifier' - The identifier of the entity, in the format of @EntityId\@RevisionId@.
--
-- 'entityArn', 'describeEntityResponse_entityArn' - The ARN associated to the unique identifier for the change set
-- referenced in this request.
--
-- 'httpStatus', 'describeEntityResponse_httpStatus' - The response's http status code.
newDescribeEntityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeEntityResponse
newDescribeEntityResponse :: Int -> DescribeEntityResponse
newDescribeEntityResponse Int
pHttpStatus_ =
  DescribeEntityResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeEntityResponse
DescribeEntityResponse'
    { $sel:lastModifiedDate:DescribeEntityResponse' :: Maybe Text
lastModifiedDate =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityType:DescribeEntityResponse' :: Maybe Text
entityType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:details:DescribeEntityResponse' :: Maybe Text
details = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityIdentifier:DescribeEntityResponse' :: Maybe Text
entityIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityArn:DescribeEntityResponse' :: Maybe Text
entityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeEntityResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The last modified date of the entity, in ISO 8601 format
-- (2018-02-27T13:45:22Z).
describeEntityResponse_lastModifiedDate :: Lens.Lens' DescribeEntityResponse (Prelude.Maybe Prelude.Text)
describeEntityResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> DescribeEntityResponse -> f DescribeEntityResponse
describeEntityResponse_lastModifiedDate = (DescribeEntityResponse -> Maybe Text)
-> (DescribeEntityResponse -> Maybe Text -> DescribeEntityResponse)
-> Lens
     DescribeEntityResponse
     DescribeEntityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntityResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:DescribeEntityResponse' :: DescribeEntityResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: DescribeEntityResponse
s@DescribeEntityResponse' {} Maybe Text
a -> DescribeEntityResponse
s {$sel:lastModifiedDate:DescribeEntityResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: DescribeEntityResponse)

-- | The named type of the entity, in the format of @EntityType\@Version@.
describeEntityResponse_entityType :: Lens.Lens' DescribeEntityResponse (Prelude.Maybe Prelude.Text)
describeEntityResponse_entityType :: (Maybe Text -> f (Maybe Text))
-> DescribeEntityResponse -> f DescribeEntityResponse
describeEntityResponse_entityType = (DescribeEntityResponse -> Maybe Text)
-> (DescribeEntityResponse -> Maybe Text -> DescribeEntityResponse)
-> Lens
     DescribeEntityResponse
     DescribeEntityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntityResponse' {Maybe Text
entityType :: Maybe Text
$sel:entityType:DescribeEntityResponse' :: DescribeEntityResponse -> Maybe Text
entityType} -> Maybe Text
entityType) (\s :: DescribeEntityResponse
s@DescribeEntityResponse' {} Maybe Text
a -> DescribeEntityResponse
s {$sel:entityType:DescribeEntityResponse' :: Maybe Text
entityType = Maybe Text
a} :: DescribeEntityResponse)

-- | This stringified JSON object includes the details of the entity.
describeEntityResponse_details :: Lens.Lens' DescribeEntityResponse (Prelude.Maybe Prelude.Text)
describeEntityResponse_details :: (Maybe Text -> f (Maybe Text))
-> DescribeEntityResponse -> f DescribeEntityResponse
describeEntityResponse_details = (DescribeEntityResponse -> Maybe Text)
-> (DescribeEntityResponse -> Maybe Text -> DescribeEntityResponse)
-> Lens
     DescribeEntityResponse
     DescribeEntityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntityResponse' {Maybe Text
details :: Maybe Text
$sel:details:DescribeEntityResponse' :: DescribeEntityResponse -> Maybe Text
details} -> Maybe Text
details) (\s :: DescribeEntityResponse
s@DescribeEntityResponse' {} Maybe Text
a -> DescribeEntityResponse
s {$sel:details:DescribeEntityResponse' :: Maybe Text
details = Maybe Text
a} :: DescribeEntityResponse)

-- | The identifier of the entity, in the format of @EntityId\@RevisionId@.
describeEntityResponse_entityIdentifier :: Lens.Lens' DescribeEntityResponse (Prelude.Maybe Prelude.Text)
describeEntityResponse_entityIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeEntityResponse -> f DescribeEntityResponse
describeEntityResponse_entityIdentifier = (DescribeEntityResponse -> Maybe Text)
-> (DescribeEntityResponse -> Maybe Text -> DescribeEntityResponse)
-> Lens
     DescribeEntityResponse
     DescribeEntityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntityResponse' {Maybe Text
entityIdentifier :: Maybe Text
$sel:entityIdentifier:DescribeEntityResponse' :: DescribeEntityResponse -> Maybe Text
entityIdentifier} -> Maybe Text
entityIdentifier) (\s :: DescribeEntityResponse
s@DescribeEntityResponse' {} Maybe Text
a -> DescribeEntityResponse
s {$sel:entityIdentifier:DescribeEntityResponse' :: Maybe Text
entityIdentifier = Maybe Text
a} :: DescribeEntityResponse)

-- | The ARN associated to the unique identifier for the change set
-- referenced in this request.
describeEntityResponse_entityArn :: Lens.Lens' DescribeEntityResponse (Prelude.Maybe Prelude.Text)
describeEntityResponse_entityArn :: (Maybe Text -> f (Maybe Text))
-> DescribeEntityResponse -> f DescribeEntityResponse
describeEntityResponse_entityArn = (DescribeEntityResponse -> Maybe Text)
-> (DescribeEntityResponse -> Maybe Text -> DescribeEntityResponse)
-> Lens
     DescribeEntityResponse
     DescribeEntityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEntityResponse' {Maybe Text
entityArn :: Maybe Text
$sel:entityArn:DescribeEntityResponse' :: DescribeEntityResponse -> Maybe Text
entityArn} -> Maybe Text
entityArn) (\s :: DescribeEntityResponse
s@DescribeEntityResponse' {} Maybe Text
a -> DescribeEntityResponse
s {$sel:entityArn:DescribeEntityResponse' :: Maybe Text
entityArn = Maybe Text
a} :: DescribeEntityResponse)

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

instance Prelude.NFData DescribeEntityResponse