{-# 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.GameLift.GetComputeAccess
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Requests remote access to a fleet instance. Remote access is useful for
-- debugging, gathering benchmarking data, or observing activity in real
-- time.
--
-- To remotely access an instance, you need credentials that match the
-- operating system of the instance. For a Windows instance, GameLift
-- returns a user name and password as strings for use with a Windows
-- Remote Desktop client. For a Linux instance, GameLift returns a user
-- name and RSA private key, also as strings, for use with an SSH client.
-- The private key must be saved in the proper format to a @.pem@ file
-- before using. If you\'re making this request using the CLI, saving the
-- secret can be handled as part of the @GetInstanceAccess@ request, as
-- shown in one of the examples for this operation.
--
-- To request access to a specific instance, specify the IDs of both the
-- instance and the fleet it belongs to.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html Remotely Access Fleet Instances>
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html Debug Fleet Issues>
module Amazonka.GameLift.GetComputeAccess
  ( -- * Creating a Request
    GetComputeAccess (..),
    newGetComputeAccess,

    -- * Request Lenses
    getComputeAccess_fleetId,
    getComputeAccess_computeName,

    -- * Destructuring the Response
    GetComputeAccessResponse (..),
    newGetComputeAccessResponse,

    -- * Response Lenses
    getComputeAccessResponse_computeArn,
    getComputeAccessResponse_computeName,
    getComputeAccessResponse_credentials,
    getComputeAccessResponse_fleetArn,
    getComputeAccessResponse_fleetId,
    getComputeAccessResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetComputeAccess' smart constructor.
data GetComputeAccess = GetComputeAccess'
  { -- | A unique identifier for the fleet that the compute resource is
    -- registered to.
    GetComputeAccess -> Text
fleetId :: Prelude.Text,
    -- | The name of the compute resource you are requesting credentials for.
    GetComputeAccess -> Text
computeName :: Prelude.Text
  }
  deriving (GetComputeAccess -> GetComputeAccess -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComputeAccess -> GetComputeAccess -> Bool
$c/= :: GetComputeAccess -> GetComputeAccess -> Bool
== :: GetComputeAccess -> GetComputeAccess -> Bool
$c== :: GetComputeAccess -> GetComputeAccess -> Bool
Prelude.Eq, ReadPrec [GetComputeAccess]
ReadPrec GetComputeAccess
Int -> ReadS GetComputeAccess
ReadS [GetComputeAccess]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetComputeAccess]
$creadListPrec :: ReadPrec [GetComputeAccess]
readPrec :: ReadPrec GetComputeAccess
$creadPrec :: ReadPrec GetComputeAccess
readList :: ReadS [GetComputeAccess]
$creadList :: ReadS [GetComputeAccess]
readsPrec :: Int -> ReadS GetComputeAccess
$creadsPrec :: Int -> ReadS GetComputeAccess
Prelude.Read, Int -> GetComputeAccess -> ShowS
[GetComputeAccess] -> ShowS
GetComputeAccess -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComputeAccess] -> ShowS
$cshowList :: [GetComputeAccess] -> ShowS
show :: GetComputeAccess -> String
$cshow :: GetComputeAccess -> String
showsPrec :: Int -> GetComputeAccess -> ShowS
$cshowsPrec :: Int -> GetComputeAccess -> ShowS
Prelude.Show, forall x. Rep GetComputeAccess x -> GetComputeAccess
forall x. GetComputeAccess -> Rep GetComputeAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetComputeAccess x -> GetComputeAccess
$cfrom :: forall x. GetComputeAccess -> Rep GetComputeAccess x
Prelude.Generic)

-- |
-- Create a value of 'GetComputeAccess' 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:
--
-- 'fleetId', 'getComputeAccess_fleetId' - A unique identifier for the fleet that the compute resource is
-- registered to.
--
-- 'computeName', 'getComputeAccess_computeName' - The name of the compute resource you are requesting credentials for.
newGetComputeAccess ::
  -- | 'fleetId'
  Prelude.Text ->
  -- | 'computeName'
  Prelude.Text ->
  GetComputeAccess
newGetComputeAccess :: Text -> Text -> GetComputeAccess
newGetComputeAccess Text
pFleetId_ Text
pComputeName_ =
  GetComputeAccess'
    { $sel:fleetId:GetComputeAccess' :: Text
fleetId = Text
pFleetId_,
      $sel:computeName:GetComputeAccess' :: Text
computeName = Text
pComputeName_
    }

-- | A unique identifier for the fleet that the compute resource is
-- registered to.
getComputeAccess_fleetId :: Lens.Lens' GetComputeAccess Prelude.Text
getComputeAccess_fleetId :: Lens' GetComputeAccess Text
getComputeAccess_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccess' {Text
fleetId :: Text
$sel:fleetId:GetComputeAccess' :: GetComputeAccess -> Text
fleetId} -> Text
fleetId) (\s :: GetComputeAccess
s@GetComputeAccess' {} Text
a -> GetComputeAccess
s {$sel:fleetId:GetComputeAccess' :: Text
fleetId = Text
a} :: GetComputeAccess)

-- | The name of the compute resource you are requesting credentials for.
getComputeAccess_computeName :: Lens.Lens' GetComputeAccess Prelude.Text
getComputeAccess_computeName :: Lens' GetComputeAccess Text
getComputeAccess_computeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccess' {Text
computeName :: Text
$sel:computeName:GetComputeAccess' :: GetComputeAccess -> Text
computeName} -> Text
computeName) (\s :: GetComputeAccess
s@GetComputeAccess' {} Text
a -> GetComputeAccess
s {$sel:computeName:GetComputeAccess' :: Text
computeName = Text
a} :: GetComputeAccess)

instance Core.AWSRequest GetComputeAccess where
  type
    AWSResponse GetComputeAccess =
      GetComputeAccessResponse
  request :: (Service -> Service)
-> GetComputeAccess -> Request GetComputeAccess
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetComputeAccess
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetComputeAccess)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe (Sensitive AwsCredentials)
-> Maybe Text
-> Maybe Text
-> Int
-> GetComputeAccessResponse
GetComputeAccessResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ComputeArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ComputeName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Credentials")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FleetArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FleetId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetComputeAccess where
  hashWithSalt :: Int -> GetComputeAccess -> Int
hashWithSalt Int
_salt GetComputeAccess' {Text
computeName :: Text
fleetId :: Text
$sel:computeName:GetComputeAccess' :: GetComputeAccess -> Text
$sel:fleetId:GetComputeAccess' :: GetComputeAccess -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fleetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
computeName

instance Prelude.NFData GetComputeAccess where
  rnf :: GetComputeAccess -> ()
rnf GetComputeAccess' {Text
computeName :: Text
fleetId :: Text
$sel:computeName:GetComputeAccess' :: GetComputeAccess -> Text
$sel:fleetId:GetComputeAccess' :: GetComputeAccess -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
fleetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
computeName

instance Data.ToHeaders GetComputeAccess where
  toHeaders :: GetComputeAccess -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"GameLift.GetComputeAccess" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetComputeAccess where
  toJSON :: GetComputeAccess -> Value
toJSON GetComputeAccess' {Text
computeName :: Text
fleetId :: Text
$sel:computeName:GetComputeAccess' :: GetComputeAccess -> Text
$sel:fleetId:GetComputeAccess' :: GetComputeAccess -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"FleetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
fleetId),
            forall a. a -> Maybe a
Prelude.Just (Key
"ComputeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
computeName)
          ]
      )

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

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

-- | /See:/ 'newGetComputeAccessResponse' smart constructor.
data GetComputeAccessResponse = GetComputeAccessResponse'
  { -- | The Amazon Resource Name
    -- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
    -- that is assigned to a GameLift compute resource and uniquely identifies
    -- it. ARNs are unique across all Regions. Format is
    -- @arn:aws:gamelift:\<region>::compute\/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
    GetComputeAccessResponse -> Maybe Text
computeArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the compute resource you requested credentials for.
    GetComputeAccessResponse -> Maybe Text
computeName :: Prelude.Maybe Prelude.Text,
    -- | The access credentials for the compute resource.
    GetComputeAccessResponse -> Maybe (Sensitive AwsCredentials)
credentials :: Prelude.Maybe (Data.Sensitive AwsCredentials),
    -- | The Amazon Resource Name
    -- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
    -- that is assigned to a GameLift fleet resource and uniquely identifies
    -- it. ARNs are unique across all Regions. Format is
    -- @arn:aws:gamelift:\<region>::fleet\/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
    GetComputeAccessResponse -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
    -- | The fleet ID of compute resource.
    GetComputeAccessResponse -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetComputeAccessResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetComputeAccessResponse -> GetComputeAccessResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComputeAccessResponse -> GetComputeAccessResponse -> Bool
$c/= :: GetComputeAccessResponse -> GetComputeAccessResponse -> Bool
== :: GetComputeAccessResponse -> GetComputeAccessResponse -> Bool
$c== :: GetComputeAccessResponse -> GetComputeAccessResponse -> Bool
Prelude.Eq, Int -> GetComputeAccessResponse -> ShowS
[GetComputeAccessResponse] -> ShowS
GetComputeAccessResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComputeAccessResponse] -> ShowS
$cshowList :: [GetComputeAccessResponse] -> ShowS
show :: GetComputeAccessResponse -> String
$cshow :: GetComputeAccessResponse -> String
showsPrec :: Int -> GetComputeAccessResponse -> ShowS
$cshowsPrec :: Int -> GetComputeAccessResponse -> ShowS
Prelude.Show, forall x.
Rep GetComputeAccessResponse x -> GetComputeAccessResponse
forall x.
GetComputeAccessResponse -> Rep GetComputeAccessResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetComputeAccessResponse x -> GetComputeAccessResponse
$cfrom :: forall x.
GetComputeAccessResponse -> Rep GetComputeAccessResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetComputeAccessResponse' 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:
--
-- 'computeArn', 'getComputeAccessResponse_computeArn' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift compute resource and uniquely identifies
-- it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::compute\/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
--
-- 'computeName', 'getComputeAccessResponse_computeName' - The name of the compute resource you requested credentials for.
--
-- 'credentials', 'getComputeAccessResponse_credentials' - The access credentials for the compute resource.
--
-- 'fleetArn', 'getComputeAccessResponse_fleetArn' - The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift fleet resource and uniquely identifies
-- it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::fleet\/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
--
-- 'fleetId', 'getComputeAccessResponse_fleetId' - The fleet ID of compute resource.
--
-- 'httpStatus', 'getComputeAccessResponse_httpStatus' - The response's http status code.
newGetComputeAccessResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetComputeAccessResponse
newGetComputeAccessResponse :: Int -> GetComputeAccessResponse
newGetComputeAccessResponse Int
pHttpStatus_ =
  GetComputeAccessResponse'
    { $sel:computeArn:GetComputeAccessResponse' :: Maybe Text
computeArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:computeName:GetComputeAccessResponse' :: Maybe Text
computeName = forall a. Maybe a
Prelude.Nothing,
      $sel:credentials:GetComputeAccessResponse' :: Maybe (Sensitive AwsCredentials)
credentials = forall a. Maybe a
Prelude.Nothing,
      $sel:fleetArn:GetComputeAccessResponse' :: Maybe Text
fleetArn = forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:GetComputeAccessResponse' :: Maybe Text
fleetId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetComputeAccessResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift compute resource and uniquely identifies
-- it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::compute\/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
getComputeAccessResponse_computeArn :: Lens.Lens' GetComputeAccessResponse (Prelude.Maybe Prelude.Text)
getComputeAccessResponse_computeArn :: Lens' GetComputeAccessResponse (Maybe Text)
getComputeAccessResponse_computeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccessResponse' {Maybe Text
computeArn :: Maybe Text
$sel:computeArn:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
computeArn} -> Maybe Text
computeArn) (\s :: GetComputeAccessResponse
s@GetComputeAccessResponse' {} Maybe Text
a -> GetComputeAccessResponse
s {$sel:computeArn:GetComputeAccessResponse' :: Maybe Text
computeArn = Maybe Text
a} :: GetComputeAccessResponse)

-- | The name of the compute resource you requested credentials for.
getComputeAccessResponse_computeName :: Lens.Lens' GetComputeAccessResponse (Prelude.Maybe Prelude.Text)
getComputeAccessResponse_computeName :: Lens' GetComputeAccessResponse (Maybe Text)
getComputeAccessResponse_computeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccessResponse' {Maybe Text
computeName :: Maybe Text
$sel:computeName:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
computeName} -> Maybe Text
computeName) (\s :: GetComputeAccessResponse
s@GetComputeAccessResponse' {} Maybe Text
a -> GetComputeAccessResponse
s {$sel:computeName:GetComputeAccessResponse' :: Maybe Text
computeName = Maybe Text
a} :: GetComputeAccessResponse)

-- | The access credentials for the compute resource.
getComputeAccessResponse_credentials :: Lens.Lens' GetComputeAccessResponse (Prelude.Maybe AwsCredentials)
getComputeAccessResponse_credentials :: Lens' GetComputeAccessResponse (Maybe AwsCredentials)
getComputeAccessResponse_credentials = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccessResponse' {Maybe (Sensitive AwsCredentials)
credentials :: Maybe (Sensitive AwsCredentials)
$sel:credentials:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe (Sensitive AwsCredentials)
credentials} -> Maybe (Sensitive AwsCredentials)
credentials) (\s :: GetComputeAccessResponse
s@GetComputeAccessResponse' {} Maybe (Sensitive AwsCredentials)
a -> GetComputeAccessResponse
s {$sel:credentials:GetComputeAccessResponse' :: Maybe (Sensitive AwsCredentials)
credentials = Maybe (Sensitive AwsCredentials)
a} :: GetComputeAccessResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The Amazon Resource Name
-- (<https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html ARN>)
-- that is assigned to a GameLift fleet resource and uniquely identifies
-- it. ARNs are unique across all Regions. Format is
-- @arn:aws:gamelift:\<region>::fleet\/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912@.
getComputeAccessResponse_fleetArn :: Lens.Lens' GetComputeAccessResponse (Prelude.Maybe Prelude.Text)
getComputeAccessResponse_fleetArn :: Lens' GetComputeAccessResponse (Maybe Text)
getComputeAccessResponse_fleetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccessResponse' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: GetComputeAccessResponse
s@GetComputeAccessResponse' {} Maybe Text
a -> GetComputeAccessResponse
s {$sel:fleetArn:GetComputeAccessResponse' :: Maybe Text
fleetArn = Maybe Text
a} :: GetComputeAccessResponse)

-- | The fleet ID of compute resource.
getComputeAccessResponse_fleetId :: Lens.Lens' GetComputeAccessResponse (Prelude.Maybe Prelude.Text)
getComputeAccessResponse_fleetId :: Lens' GetComputeAccessResponse (Maybe Text)
getComputeAccessResponse_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComputeAccessResponse' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: GetComputeAccessResponse
s@GetComputeAccessResponse' {} Maybe Text
a -> GetComputeAccessResponse
s {$sel:fleetId:GetComputeAccessResponse' :: Maybe Text
fleetId = Maybe Text
a} :: GetComputeAccessResponse)

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

instance Prelude.NFData GetComputeAccessResponse where
  rnf :: GetComputeAccessResponse -> ()
rnf GetComputeAccessResponse' {Int
Maybe Text
Maybe (Sensitive AwsCredentials)
httpStatus :: Int
fleetId :: Maybe Text
fleetArn :: Maybe Text
credentials :: Maybe (Sensitive AwsCredentials)
computeName :: Maybe Text
computeArn :: Maybe Text
$sel:httpStatus:GetComputeAccessResponse' :: GetComputeAccessResponse -> Int
$sel:fleetId:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
$sel:fleetArn:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
$sel:credentials:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe (Sensitive AwsCredentials)
$sel:computeName:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
$sel:computeArn:GetComputeAccessResponse' :: GetComputeAccessResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
computeArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
computeName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive AwsCredentials)
credentials
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus