{-# 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.CloudControl.GetResource
-- 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 the current state of the specified resource.
-- For details, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-read.html Reading a resource\'s current state>.
--
-- You can use this action to return information about an existing resource
-- in your account and Amazon Web Services Region, whether or not those
-- resources were provisioned using Cloud Control API.
module Amazonka.CloudControl.GetResource
  ( -- * Creating a Request
    GetResource (..),
    newGetResource,

    -- * Request Lenses
    getResource_typeVersionId,
    getResource_roleArn,
    getResource_typeName,
    getResource_identifier,

    -- * Destructuring the Response
    GetResourceResponse (..),
    newGetResourceResponse,

    -- * Response Lenses
    getResourceResponse_typeName,
    getResourceResponse_resourceDescription,
    getResourceResponse_httpStatus,
  )
where

import Amazonka.CloudControl.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:/ 'newGetResource' smart constructor.
data GetResource = GetResource'
  { -- | For private resource types, the type version to use in this resource
    -- operation. If you do not specify a resource version, CloudFormation uses
    -- the default version.
    GetResource -> Maybe Text
typeVersionId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Identity and Access Management
    -- (IAM) for Cloud Control API to use when performing this resource
    -- operation. The role specified must have the permissions required for
    -- this operation. The necessary permissions for each event handler are
    -- defined in the @ handlers @ section of the
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.
    --
    -- If you do not specify a role, Cloud Control API uses a temporary session
    -- created using your Amazon Web Services user credentials.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>
    -- in the /Amazon Web Services Cloud Control API User Guide/.
    GetResource -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the resource type.
    GetResource -> Text
typeName :: Prelude.Text,
    -- | The identifier for the resource.
    --
    -- You can specify the primary identifier, or any secondary identifier
    -- defined for the resource type in its resource schema. You can only
    -- specify one identifier. Primary identifiers can be specified as a string
    -- or JSON; secondary identifiers must be specified as JSON.
    --
    -- For compound primary identifiers (that is, one that consists of multiple
    -- resource properties strung together), to specify the primary identifier
    -- as a string, list the property values /in the order they are specified/
    -- in the primary identifier definition, separated by @|@.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>
    -- in the /Amazon Web Services Cloud Control API User Guide/.
    GetResource -> Text
identifier :: Prelude.Text
  }
  deriving (GetResource -> GetResource -> Bool
(GetResource -> GetResource -> Bool)
-> (GetResource -> GetResource -> Bool) -> Eq GetResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResource -> GetResource -> Bool
$c/= :: GetResource -> GetResource -> Bool
== :: GetResource -> GetResource -> Bool
$c== :: GetResource -> GetResource -> Bool
Prelude.Eq, ReadPrec [GetResource]
ReadPrec GetResource
Int -> ReadS GetResource
ReadS [GetResource]
(Int -> ReadS GetResource)
-> ReadS [GetResource]
-> ReadPrec GetResource
-> ReadPrec [GetResource]
-> Read GetResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResource]
$creadListPrec :: ReadPrec [GetResource]
readPrec :: ReadPrec GetResource
$creadPrec :: ReadPrec GetResource
readList :: ReadS [GetResource]
$creadList :: ReadS [GetResource]
readsPrec :: Int -> ReadS GetResource
$creadsPrec :: Int -> ReadS GetResource
Prelude.Read, Int -> GetResource -> ShowS
[GetResource] -> ShowS
GetResource -> String
(Int -> GetResource -> ShowS)
-> (GetResource -> String)
-> ([GetResource] -> ShowS)
-> Show GetResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResource] -> ShowS
$cshowList :: [GetResource] -> ShowS
show :: GetResource -> String
$cshow :: GetResource -> String
showsPrec :: Int -> GetResource -> ShowS
$cshowsPrec :: Int -> GetResource -> ShowS
Prelude.Show, (forall x. GetResource -> Rep GetResource x)
-> (forall x. Rep GetResource x -> GetResource)
-> Generic GetResource
forall x. Rep GetResource x -> GetResource
forall x. GetResource -> Rep GetResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResource x -> GetResource
$cfrom :: forall x. GetResource -> Rep GetResource x
Prelude.Generic)

-- |
-- Create a value of 'GetResource' 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:
--
-- 'typeVersionId', 'getResource_typeVersionId' - For private resource types, the type version to use in this resource
-- operation. If you do not specify a resource version, CloudFormation uses
-- the default version.
--
-- 'roleArn', 'getResource_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) for Cloud Control API to use when performing this resource
-- operation. The role specified must have the permissions required for
-- this operation. The necessary permissions for each event handler are
-- defined in the @ handlers @ section of the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.
--
-- If you do not specify a role, Cloud Control API uses a temporary session
-- created using your Amazon Web Services user credentials.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>
-- in the /Amazon Web Services Cloud Control API User Guide/.
--
-- 'typeName', 'getResource_typeName' - The name of the resource type.
--
-- 'identifier', 'getResource_identifier' - The identifier for the resource.
--
-- You can specify the primary identifier, or any secondary identifier
-- defined for the resource type in its resource schema. You can only
-- specify one identifier. Primary identifiers can be specified as a string
-- or JSON; secondary identifiers must be specified as JSON.
--
-- For compound primary identifiers (that is, one that consists of multiple
-- resource properties strung together), to specify the primary identifier
-- as a string, list the property values /in the order they are specified/
-- in the primary identifier definition, separated by @|@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>
-- in the /Amazon Web Services Cloud Control API User Guide/.
newGetResource ::
  -- | 'typeName'
  Prelude.Text ->
  -- | 'identifier'
  Prelude.Text ->
  GetResource
newGetResource :: Text -> Text -> GetResource
newGetResource Text
pTypeName_ Text
pIdentifier_ =
  GetResource' :: Maybe Text -> Maybe Text -> Text -> Text -> GetResource
GetResource'
    { $sel:typeVersionId:GetResource' :: Maybe Text
typeVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:GetResource' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:GetResource' :: Text
typeName = Text
pTypeName_,
      $sel:identifier:GetResource' :: Text
identifier = Text
pIdentifier_
    }

-- | For private resource types, the type version to use in this resource
-- operation. If you do not specify a resource version, CloudFormation uses
-- the default version.
getResource_typeVersionId :: Lens.Lens' GetResource (Prelude.Maybe Prelude.Text)
getResource_typeVersionId :: (Maybe Text -> f (Maybe Text)) -> GetResource -> f GetResource
getResource_typeVersionId = (GetResource -> Maybe Text)
-> (GetResource -> Maybe Text -> GetResource)
-> Lens GetResource GetResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResource' {Maybe Text
typeVersionId :: Maybe Text
$sel:typeVersionId:GetResource' :: GetResource -> Maybe Text
typeVersionId} -> Maybe Text
typeVersionId) (\s :: GetResource
s@GetResource' {} Maybe Text
a -> GetResource
s {$sel:typeVersionId:GetResource' :: Maybe Text
typeVersionId = Maybe Text
a} :: GetResource)

-- | The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) for Cloud Control API to use when performing this resource
-- operation. The role specified must have the permissions required for
-- this operation. The necessary permissions for each event handler are
-- defined in the @ handlers @ section of the
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.
--
-- If you do not specify a role, Cloud Control API uses a temporary session
-- created using your Amazon Web Services user credentials.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>
-- in the /Amazon Web Services Cloud Control API User Guide/.
getResource_roleArn :: Lens.Lens' GetResource (Prelude.Maybe Prelude.Text)
getResource_roleArn :: (Maybe Text -> f (Maybe Text)) -> GetResource -> f GetResource
getResource_roleArn = (GetResource -> Maybe Text)
-> (GetResource -> Maybe Text -> GetResource)
-> Lens GetResource GetResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResource' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:GetResource' :: GetResource -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: GetResource
s@GetResource' {} Maybe Text
a -> GetResource
s {$sel:roleArn:GetResource' :: Maybe Text
roleArn = Maybe Text
a} :: GetResource)

-- | The name of the resource type.
getResource_typeName :: Lens.Lens' GetResource Prelude.Text
getResource_typeName :: (Text -> f Text) -> GetResource -> f GetResource
getResource_typeName = (GetResource -> Text)
-> (GetResource -> Text -> GetResource)
-> Lens GetResource GetResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResource' {Text
typeName :: Text
$sel:typeName:GetResource' :: GetResource -> Text
typeName} -> Text
typeName) (\s :: GetResource
s@GetResource' {} Text
a -> GetResource
s {$sel:typeName:GetResource' :: Text
typeName = Text
a} :: GetResource)

-- | The identifier for the resource.
--
-- You can specify the primary identifier, or any secondary identifier
-- defined for the resource type in its resource schema. You can only
-- specify one identifier. Primary identifiers can be specified as a string
-- or JSON; secondary identifiers must be specified as JSON.
--
-- For compound primary identifiers (that is, one that consists of multiple
-- resource properties strung together), to specify the primary identifier
-- as a string, list the property values /in the order they are specified/
-- in the primary identifier definition, separated by @|@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>
-- in the /Amazon Web Services Cloud Control API User Guide/.
getResource_identifier :: Lens.Lens' GetResource Prelude.Text
getResource_identifier :: (Text -> f Text) -> GetResource -> f GetResource
getResource_identifier = (GetResource -> Text)
-> (GetResource -> Text -> GetResource)
-> Lens GetResource GetResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResource' {Text
identifier :: Text
$sel:identifier:GetResource' :: GetResource -> Text
identifier} -> Text
identifier) (\s :: GetResource
s@GetResource' {} Text
a -> GetResource
s {$sel:identifier:GetResource' :: Text
identifier = Text
a} :: GetResource)

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

instance Prelude.NFData GetResource

instance Core.ToHeaders GetResource where
  toHeaders :: GetResource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetResource -> 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
"CloudApiService.GetResource" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetResource where
  toJSON :: GetResource -> Value
toJSON GetResource' {Maybe Text
Text
identifier :: Text
typeName :: Text
roleArn :: Maybe Text
typeVersionId :: Maybe Text
$sel:identifier:GetResource' :: GetResource -> Text
$sel:typeName:GetResource' :: GetResource -> Text
$sel:roleArn:GetResource' :: GetResource -> Maybe Text
$sel:typeVersionId:GetResource' :: GetResource -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TypeVersionId" 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
typeVersionId,
            (Text
"RoleArn" 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
roleArn,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TypeName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
typeName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Identifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identifier)
          ]
      )

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

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

-- | /See:/ 'newGetResourceResponse' smart constructor.
data GetResourceResponse = GetResourceResponse'
  { -- | The name of the resource type.
    GetResourceResponse -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    GetResourceResponse -> Maybe ResourceDescription
resourceDescription :: Prelude.Maybe ResourceDescription,
    -- | The response's http status code.
    GetResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetResourceResponse -> GetResourceResponse -> Bool
(GetResourceResponse -> GetResourceResponse -> Bool)
-> (GetResourceResponse -> GetResourceResponse -> Bool)
-> Eq GetResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceResponse -> GetResourceResponse -> Bool
$c/= :: GetResourceResponse -> GetResourceResponse -> Bool
== :: GetResourceResponse -> GetResourceResponse -> Bool
$c== :: GetResourceResponse -> GetResourceResponse -> Bool
Prelude.Eq, Int -> GetResourceResponse -> ShowS
[GetResourceResponse] -> ShowS
GetResourceResponse -> String
(Int -> GetResourceResponse -> ShowS)
-> (GetResourceResponse -> String)
-> ([GetResourceResponse] -> ShowS)
-> Show GetResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceResponse] -> ShowS
$cshowList :: [GetResourceResponse] -> ShowS
show :: GetResourceResponse -> String
$cshow :: GetResourceResponse -> String
showsPrec :: Int -> GetResourceResponse -> ShowS
$cshowsPrec :: Int -> GetResourceResponse -> ShowS
Prelude.Show, (forall x. GetResourceResponse -> Rep GetResourceResponse x)
-> (forall x. Rep GetResourceResponse x -> GetResourceResponse)
-> Generic GetResourceResponse
forall x. Rep GetResourceResponse x -> GetResourceResponse
forall x. GetResourceResponse -> Rep GetResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResourceResponse x -> GetResourceResponse
$cfrom :: forall x. GetResourceResponse -> Rep GetResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetResourceResponse' 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:
--
-- 'typeName', 'getResourceResponse_typeName' - The name of the resource type.
--
-- 'resourceDescription', 'getResourceResponse_resourceDescription' - Undocumented member.
--
-- 'httpStatus', 'getResourceResponse_httpStatus' - The response's http status code.
newGetResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetResourceResponse
newGetResourceResponse :: Int -> GetResourceResponse
newGetResourceResponse Int
pHttpStatus_ =
  GetResourceResponse' :: Maybe Text
-> Maybe ResourceDescription -> Int -> GetResourceResponse
GetResourceResponse'
    { $sel:typeName:GetResourceResponse' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceDescription:GetResourceResponse' :: Maybe ResourceDescription
resourceDescription = Maybe ResourceDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the resource type.
getResourceResponse_typeName :: Lens.Lens' GetResourceResponse (Prelude.Maybe Prelude.Text)
getResourceResponse_typeName :: (Maybe Text -> f (Maybe Text))
-> GetResourceResponse -> f GetResourceResponse
getResourceResponse_typeName = (GetResourceResponse -> Maybe Text)
-> (GetResourceResponse -> Maybe Text -> GetResourceResponse)
-> Lens
     GetResourceResponse GetResourceResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceResponse' {Maybe Text
typeName :: Maybe Text
$sel:typeName:GetResourceResponse' :: GetResourceResponse -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: GetResourceResponse
s@GetResourceResponse' {} Maybe Text
a -> GetResourceResponse
s {$sel:typeName:GetResourceResponse' :: Maybe Text
typeName = Maybe Text
a} :: GetResourceResponse)

-- | Undocumented member.
getResourceResponse_resourceDescription :: Lens.Lens' GetResourceResponse (Prelude.Maybe ResourceDescription)
getResourceResponse_resourceDescription :: (Maybe ResourceDescription -> f (Maybe ResourceDescription))
-> GetResourceResponse -> f GetResourceResponse
getResourceResponse_resourceDescription = (GetResourceResponse -> Maybe ResourceDescription)
-> (GetResourceResponse
    -> Maybe ResourceDescription -> GetResourceResponse)
-> Lens
     GetResourceResponse
     GetResourceResponse
     (Maybe ResourceDescription)
     (Maybe ResourceDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceResponse' {Maybe ResourceDescription
resourceDescription :: Maybe ResourceDescription
$sel:resourceDescription:GetResourceResponse' :: GetResourceResponse -> Maybe ResourceDescription
resourceDescription} -> Maybe ResourceDescription
resourceDescription) (\s :: GetResourceResponse
s@GetResourceResponse' {} Maybe ResourceDescription
a -> GetResourceResponse
s {$sel:resourceDescription:GetResourceResponse' :: Maybe ResourceDescription
resourceDescription = Maybe ResourceDescription
a} :: GetResourceResponse)

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

instance Prelude.NFData GetResourceResponse