{-# 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.Backup.DescribeProtectedResource
-- 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 information about a saved resource, including the last time it
-- was backed up, its Amazon Resource Name (ARN), and the Amazon Web
-- Services service type of the saved resource.
module Amazonka.Backup.DescribeProtectedResource
  ( -- * Creating a Request
    DescribeProtectedResource (..),
    newDescribeProtectedResource,

    -- * Request Lenses
    describeProtectedResource_resourceArn,

    -- * Destructuring the Response
    DescribeProtectedResourceResponse (..),
    newDescribeProtectedResourceResponse,

    -- * Response Lenses
    describeProtectedResourceResponse_resourceType,
    describeProtectedResourceResponse_lastBackupTime,
    describeProtectedResourceResponse_resourceArn,
    describeProtectedResourceResponse_httpStatus,
  )
where

import Amazonka.Backup.Types
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

-- | /See:/ 'newDescribeProtectedResource' smart constructor.
data DescribeProtectedResource = DescribeProtectedResource'
  { -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
    -- format of the ARN depends on the resource type.
    DescribeProtectedResource -> Text
resourceArn :: Prelude.Text
  }
  deriving (DescribeProtectedResource -> DescribeProtectedResource -> Bool
(DescribeProtectedResource -> DescribeProtectedResource -> Bool)
-> (DescribeProtectedResource -> DescribeProtectedResource -> Bool)
-> Eq DescribeProtectedResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProtectedResource -> DescribeProtectedResource -> Bool
$c/= :: DescribeProtectedResource -> DescribeProtectedResource -> Bool
== :: DescribeProtectedResource -> DescribeProtectedResource -> Bool
$c== :: DescribeProtectedResource -> DescribeProtectedResource -> Bool
Prelude.Eq, ReadPrec [DescribeProtectedResource]
ReadPrec DescribeProtectedResource
Int -> ReadS DescribeProtectedResource
ReadS [DescribeProtectedResource]
(Int -> ReadS DescribeProtectedResource)
-> ReadS [DescribeProtectedResource]
-> ReadPrec DescribeProtectedResource
-> ReadPrec [DescribeProtectedResource]
-> Read DescribeProtectedResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProtectedResource]
$creadListPrec :: ReadPrec [DescribeProtectedResource]
readPrec :: ReadPrec DescribeProtectedResource
$creadPrec :: ReadPrec DescribeProtectedResource
readList :: ReadS [DescribeProtectedResource]
$creadList :: ReadS [DescribeProtectedResource]
readsPrec :: Int -> ReadS DescribeProtectedResource
$creadsPrec :: Int -> ReadS DescribeProtectedResource
Prelude.Read, Int -> DescribeProtectedResource -> ShowS
[DescribeProtectedResource] -> ShowS
DescribeProtectedResource -> String
(Int -> DescribeProtectedResource -> ShowS)
-> (DescribeProtectedResource -> String)
-> ([DescribeProtectedResource] -> ShowS)
-> Show DescribeProtectedResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProtectedResource] -> ShowS
$cshowList :: [DescribeProtectedResource] -> ShowS
show :: DescribeProtectedResource -> String
$cshow :: DescribeProtectedResource -> String
showsPrec :: Int -> DescribeProtectedResource -> ShowS
$cshowsPrec :: Int -> DescribeProtectedResource -> ShowS
Prelude.Show, (forall x.
 DescribeProtectedResource -> Rep DescribeProtectedResource x)
-> (forall x.
    Rep DescribeProtectedResource x -> DescribeProtectedResource)
-> Generic DescribeProtectedResource
forall x.
Rep DescribeProtectedResource x -> DescribeProtectedResource
forall x.
DescribeProtectedResource -> Rep DescribeProtectedResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProtectedResource x -> DescribeProtectedResource
$cfrom :: forall x.
DescribeProtectedResource -> Rep DescribeProtectedResource x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProtectedResource' 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:
--
-- 'resourceArn', 'describeProtectedResource_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
newDescribeProtectedResource ::
  -- | 'resourceArn'
  Prelude.Text ->
  DescribeProtectedResource
newDescribeProtectedResource :: Text -> DescribeProtectedResource
newDescribeProtectedResource Text
pResourceArn_ =
  DescribeProtectedResource' :: Text -> DescribeProtectedResource
DescribeProtectedResource'
    { $sel:resourceArn:DescribeProtectedResource' :: Text
resourceArn =
        Text
pResourceArn_
    }

-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
describeProtectedResource_resourceArn :: Lens.Lens' DescribeProtectedResource Prelude.Text
describeProtectedResource_resourceArn :: (Text -> f Text)
-> DescribeProtectedResource -> f DescribeProtectedResource
describeProtectedResource_resourceArn = (DescribeProtectedResource -> Text)
-> (DescribeProtectedResource -> Text -> DescribeProtectedResource)
-> Lens
     DescribeProtectedResource DescribeProtectedResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProtectedResource' {Text
resourceArn :: Text
$sel:resourceArn:DescribeProtectedResource' :: DescribeProtectedResource -> Text
resourceArn} -> Text
resourceArn) (\s :: DescribeProtectedResource
s@DescribeProtectedResource' {} Text
a -> DescribeProtectedResource
s {$sel:resourceArn:DescribeProtectedResource' :: Text
resourceArn = Text
a} :: DescribeProtectedResource)

instance Core.AWSRequest DescribeProtectedResource where
  type
    AWSResponse DescribeProtectedResource =
      DescribeProtectedResourceResponse
  request :: DescribeProtectedResource -> Request DescribeProtectedResource
request = Service
-> DescribeProtectedResource -> Request DescribeProtectedResource
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeProtectedResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProtectedResource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeProtectedResource))
-> Logger
-> Service
-> Proxy DescribeProtectedResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProtectedResource)))
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 POSIX
-> Maybe Text
-> Int
-> DescribeProtectedResourceResponse
DescribeProtectedResourceResponse'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeProtectedResourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text -> Int -> DescribeProtectedResourceResponse)
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
"ResourceType")
            Either
  String
  (Maybe POSIX
   -> Maybe Text -> Int -> DescribeProtectedResourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe Text -> Int -> DescribeProtectedResourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastBackupTime")
            Either
  String (Maybe Text -> Int -> DescribeProtectedResourceResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeProtectedResourceResponse)
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
"ResourceArn")
            Either String (Int -> DescribeProtectedResourceResponse)
-> Either String Int
-> Either String DescribeProtectedResourceResponse
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 DescribeProtectedResource

instance Prelude.NFData DescribeProtectedResource

instance Core.ToHeaders DescribeProtectedResource where
  toHeaders :: DescribeProtectedResource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeProtectedResource -> 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 DescribeProtectedResource where
  toPath :: DescribeProtectedResource -> ByteString
toPath DescribeProtectedResource' {Text
resourceArn :: Text
$sel:resourceArn:DescribeProtectedResource' :: DescribeProtectedResource -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/resources/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
resourceArn]

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

-- | /See:/ 'newDescribeProtectedResourceResponse' smart constructor.
data DescribeProtectedResourceResponse = DescribeProtectedResourceResponse'
  { -- | The type of Amazon Web Services resource saved as a recovery point; for
    -- example, an Amazon EBS volume or an Amazon RDS database.
    DescribeProtectedResourceResponse -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | The date and time that a resource was last backed up, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    DescribeProtectedResourceResponse -> Maybe POSIX
lastBackupTime :: Prelude.Maybe Core.POSIX,
    -- | An ARN that uniquely identifies a resource. The format of the ARN
    -- depends on the resource type.
    DescribeProtectedResourceResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeProtectedResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProtectedResourceResponse
-> DescribeProtectedResourceResponse -> Bool
(DescribeProtectedResourceResponse
 -> DescribeProtectedResourceResponse -> Bool)
-> (DescribeProtectedResourceResponse
    -> DescribeProtectedResourceResponse -> Bool)
-> Eq DescribeProtectedResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProtectedResourceResponse
-> DescribeProtectedResourceResponse -> Bool
$c/= :: DescribeProtectedResourceResponse
-> DescribeProtectedResourceResponse -> Bool
== :: DescribeProtectedResourceResponse
-> DescribeProtectedResourceResponse -> Bool
$c== :: DescribeProtectedResourceResponse
-> DescribeProtectedResourceResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProtectedResourceResponse]
ReadPrec DescribeProtectedResourceResponse
Int -> ReadS DescribeProtectedResourceResponse
ReadS [DescribeProtectedResourceResponse]
(Int -> ReadS DescribeProtectedResourceResponse)
-> ReadS [DescribeProtectedResourceResponse]
-> ReadPrec DescribeProtectedResourceResponse
-> ReadPrec [DescribeProtectedResourceResponse]
-> Read DescribeProtectedResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProtectedResourceResponse]
$creadListPrec :: ReadPrec [DescribeProtectedResourceResponse]
readPrec :: ReadPrec DescribeProtectedResourceResponse
$creadPrec :: ReadPrec DescribeProtectedResourceResponse
readList :: ReadS [DescribeProtectedResourceResponse]
$creadList :: ReadS [DescribeProtectedResourceResponse]
readsPrec :: Int -> ReadS DescribeProtectedResourceResponse
$creadsPrec :: Int -> ReadS DescribeProtectedResourceResponse
Prelude.Read, Int -> DescribeProtectedResourceResponse -> ShowS
[DescribeProtectedResourceResponse] -> ShowS
DescribeProtectedResourceResponse -> String
(Int -> DescribeProtectedResourceResponse -> ShowS)
-> (DescribeProtectedResourceResponse -> String)
-> ([DescribeProtectedResourceResponse] -> ShowS)
-> Show DescribeProtectedResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProtectedResourceResponse] -> ShowS
$cshowList :: [DescribeProtectedResourceResponse] -> ShowS
show :: DescribeProtectedResourceResponse -> String
$cshow :: DescribeProtectedResourceResponse -> String
showsPrec :: Int -> DescribeProtectedResourceResponse -> ShowS
$cshowsPrec :: Int -> DescribeProtectedResourceResponse -> ShowS
Prelude.Show, (forall x.
 DescribeProtectedResourceResponse
 -> Rep DescribeProtectedResourceResponse x)
-> (forall x.
    Rep DescribeProtectedResourceResponse x
    -> DescribeProtectedResourceResponse)
-> Generic DescribeProtectedResourceResponse
forall x.
Rep DescribeProtectedResourceResponse x
-> DescribeProtectedResourceResponse
forall x.
DescribeProtectedResourceResponse
-> Rep DescribeProtectedResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProtectedResourceResponse x
-> DescribeProtectedResourceResponse
$cfrom :: forall x.
DescribeProtectedResourceResponse
-> Rep DescribeProtectedResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProtectedResourceResponse' 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:
--
-- 'resourceType', 'describeProtectedResourceResponse_resourceType' - The type of Amazon Web Services resource saved as a recovery point; for
-- example, an Amazon EBS volume or an Amazon RDS database.
--
-- 'lastBackupTime', 'describeProtectedResourceResponse_lastBackupTime' - The date and time that a resource was last backed up, in Unix format and
-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'resourceArn', 'describeProtectedResourceResponse_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN
-- depends on the resource type.
--
-- 'httpStatus', 'describeProtectedResourceResponse_httpStatus' - The response's http status code.
newDescribeProtectedResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProtectedResourceResponse
newDescribeProtectedResourceResponse :: Int -> DescribeProtectedResourceResponse
newDescribeProtectedResourceResponse Int
pHttpStatus_ =
  DescribeProtectedResourceResponse' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeProtectedResourceResponse
DescribeProtectedResourceResponse'
    { $sel:resourceType:DescribeProtectedResourceResponse' :: Maybe Text
resourceType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastBackupTime:DescribeProtectedResourceResponse' :: Maybe POSIX
lastBackupTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:DescribeProtectedResourceResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProtectedResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The type of Amazon Web Services resource saved as a recovery point; for
-- example, an Amazon EBS volume or an Amazon RDS database.
describeProtectedResourceResponse_resourceType :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.Text)
describeProtectedResourceResponse_resourceType :: (Maybe Text -> f (Maybe Text))
-> DescribeProtectedResourceResponse
-> f DescribeProtectedResourceResponse
describeProtectedResourceResponse_resourceType = (DescribeProtectedResourceResponse -> Maybe Text)
-> (DescribeProtectedResourceResponse
    -> Maybe Text -> DescribeProtectedResourceResponse)
-> Lens
     DescribeProtectedResourceResponse
     DescribeProtectedResourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProtectedResourceResponse' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:DescribeProtectedResourceResponse' :: DescribeProtectedResourceResponse -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: DescribeProtectedResourceResponse
s@DescribeProtectedResourceResponse' {} Maybe Text
a -> DescribeProtectedResourceResponse
s {$sel:resourceType:DescribeProtectedResourceResponse' :: Maybe Text
resourceType = Maybe Text
a} :: DescribeProtectedResourceResponse)

-- | The date and time that a resource was last backed up, in Unix format and
-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
describeProtectedResourceResponse_lastBackupTime :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.UTCTime)
describeProtectedResourceResponse_lastBackupTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProtectedResourceResponse
-> f DescribeProtectedResourceResponse
describeProtectedResourceResponse_lastBackupTime = (DescribeProtectedResourceResponse -> Maybe POSIX)
-> (DescribeProtectedResourceResponse
    -> Maybe POSIX -> DescribeProtectedResourceResponse)
-> Lens
     DescribeProtectedResourceResponse
     DescribeProtectedResourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProtectedResourceResponse' {Maybe POSIX
lastBackupTime :: Maybe POSIX
$sel:lastBackupTime:DescribeProtectedResourceResponse' :: DescribeProtectedResourceResponse -> Maybe POSIX
lastBackupTime} -> Maybe POSIX
lastBackupTime) (\s :: DescribeProtectedResourceResponse
s@DescribeProtectedResourceResponse' {} Maybe POSIX
a -> DescribeProtectedResourceResponse
s {$sel:lastBackupTime:DescribeProtectedResourceResponse' :: Maybe POSIX
lastBackupTime = Maybe POSIX
a} :: DescribeProtectedResourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeProtectedResourceResponse
 -> f DescribeProtectedResourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProtectedResourceResponse
-> f DescribeProtectedResourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An ARN that uniquely identifies a resource. The format of the ARN
-- depends on the resource type.
describeProtectedResourceResponse_resourceArn :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.Text)
describeProtectedResourceResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeProtectedResourceResponse
-> f DescribeProtectedResourceResponse
describeProtectedResourceResponse_resourceArn = (DescribeProtectedResourceResponse -> Maybe Text)
-> (DescribeProtectedResourceResponse
    -> Maybe Text -> DescribeProtectedResourceResponse)
-> Lens
     DescribeProtectedResourceResponse
     DescribeProtectedResourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProtectedResourceResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:DescribeProtectedResourceResponse' :: DescribeProtectedResourceResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: DescribeProtectedResourceResponse
s@DescribeProtectedResourceResponse' {} Maybe Text
a -> DescribeProtectedResourceResponse
s {$sel:resourceArn:DescribeProtectedResourceResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: DescribeProtectedResourceResponse)

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

instance
  Prelude.NFData
    DescribeProtectedResourceResponse