{-# 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.RegisterCompute
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Registers your compute resources in a fleet you previously created.
-- After you register a compute to your fleet, you can monitor and manage
-- your compute using GameLift. The operation returns the compute resource
-- containing SDK endpoint you can use to connect your game server to
-- GameLift.
--
-- __Learn more__
--
-- -   <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-anywhere.html Create an Anywhere fleet>
--
-- -   <https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing.html Test your integration>
module Amazonka.GameLift.RegisterCompute
  ( -- * Creating a Request
    RegisterCompute (..),
    newRegisterCompute,

    -- * Request Lenses
    registerCompute_certificatePath,
    registerCompute_dnsName,
    registerCompute_ipAddress,
    registerCompute_location,
    registerCompute_fleetId,
    registerCompute_computeName,

    -- * Destructuring the Response
    RegisterComputeResponse (..),
    newRegisterComputeResponse,

    -- * Response Lenses
    registerComputeResponse_compute,
    registerComputeResponse_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:/ 'newRegisterCompute' smart constructor.
data RegisterCompute = RegisterCompute'
  { -- | The path to the TLS certificate on your compute resource. The path and
    -- certificate are not validated by GameLift.
    RegisterCompute -> Maybe Text
certificatePath :: Prelude.Maybe Prelude.Text,
    -- | The DNS name of the compute resource. GameLift requires the DNS name or
    -- IP address to manage your compute resource.
    RegisterCompute -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text,
    -- | The IP address of the compute resource. GameLift requires the DNS name
    -- or IP address to manage your compute resource.
    RegisterCompute -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
    -- | The name of the custom location you added to the fleet you are
    -- registering this compute resource to.
    RegisterCompute -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the fleet to register the compute to. You can
    -- use either the fleet ID or ARN value.
    RegisterCompute -> Text
fleetId :: Prelude.Text,
    -- | A descriptive label that is associated with the compute resource
    -- registered to your fleet.
    RegisterCompute -> Text
computeName :: Prelude.Text
  }
  deriving (RegisterCompute -> RegisterCompute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterCompute -> RegisterCompute -> Bool
$c/= :: RegisterCompute -> RegisterCompute -> Bool
== :: RegisterCompute -> RegisterCompute -> Bool
$c== :: RegisterCompute -> RegisterCompute -> Bool
Prelude.Eq, ReadPrec [RegisterCompute]
ReadPrec RegisterCompute
Int -> ReadS RegisterCompute
ReadS [RegisterCompute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterCompute]
$creadListPrec :: ReadPrec [RegisterCompute]
readPrec :: ReadPrec RegisterCompute
$creadPrec :: ReadPrec RegisterCompute
readList :: ReadS [RegisterCompute]
$creadList :: ReadS [RegisterCompute]
readsPrec :: Int -> ReadS RegisterCompute
$creadsPrec :: Int -> ReadS RegisterCompute
Prelude.Read, Int -> RegisterCompute -> ShowS
[RegisterCompute] -> ShowS
RegisterCompute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterCompute] -> ShowS
$cshowList :: [RegisterCompute] -> ShowS
show :: RegisterCompute -> String
$cshow :: RegisterCompute -> String
showsPrec :: Int -> RegisterCompute -> ShowS
$cshowsPrec :: Int -> RegisterCompute -> ShowS
Prelude.Show, forall x. Rep RegisterCompute x -> RegisterCompute
forall x. RegisterCompute -> Rep RegisterCompute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterCompute x -> RegisterCompute
$cfrom :: forall x. RegisterCompute -> Rep RegisterCompute x
Prelude.Generic)

-- |
-- Create a value of 'RegisterCompute' 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:
--
-- 'certificatePath', 'registerCompute_certificatePath' - The path to the TLS certificate on your compute resource. The path and
-- certificate are not validated by GameLift.
--
-- 'dnsName', 'registerCompute_dnsName' - The DNS name of the compute resource. GameLift requires the DNS name or
-- IP address to manage your compute resource.
--
-- 'ipAddress', 'registerCompute_ipAddress' - The IP address of the compute resource. GameLift requires the DNS name
-- or IP address to manage your compute resource.
--
-- 'location', 'registerCompute_location' - The name of the custom location you added to the fleet you are
-- registering this compute resource to.
--
-- 'fleetId', 'registerCompute_fleetId' - A unique identifier for the fleet to register the compute to. You can
-- use either the fleet ID or ARN value.
--
-- 'computeName', 'registerCompute_computeName' - A descriptive label that is associated with the compute resource
-- registered to your fleet.
newRegisterCompute ::
  -- | 'fleetId'
  Prelude.Text ->
  -- | 'computeName'
  Prelude.Text ->
  RegisterCompute
newRegisterCompute :: Text -> Text -> RegisterCompute
newRegisterCompute Text
pFleetId_ Text
pComputeName_ =
  RegisterCompute'
    { $sel:certificatePath:RegisterCompute' :: Maybe Text
certificatePath = forall a. Maybe a
Prelude.Nothing,
      $sel:dnsName:RegisterCompute' :: Maybe Text
dnsName = forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddress:RegisterCompute' :: Maybe Text
ipAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:location:RegisterCompute' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:RegisterCompute' :: Text
fleetId = Text
pFleetId_,
      $sel:computeName:RegisterCompute' :: Text
computeName = Text
pComputeName_
    }

-- | The path to the TLS certificate on your compute resource. The path and
-- certificate are not validated by GameLift.
registerCompute_certificatePath :: Lens.Lens' RegisterCompute (Prelude.Maybe Prelude.Text)
registerCompute_certificatePath :: Lens' RegisterCompute (Maybe Text)
registerCompute_certificatePath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Maybe Text
certificatePath :: Maybe Text
$sel:certificatePath:RegisterCompute' :: RegisterCompute -> Maybe Text
certificatePath} -> Maybe Text
certificatePath) (\s :: RegisterCompute
s@RegisterCompute' {} Maybe Text
a -> RegisterCompute
s {$sel:certificatePath:RegisterCompute' :: Maybe Text
certificatePath = Maybe Text
a} :: RegisterCompute)

-- | The DNS name of the compute resource. GameLift requires the DNS name or
-- IP address to manage your compute resource.
registerCompute_dnsName :: Lens.Lens' RegisterCompute (Prelude.Maybe Prelude.Text)
registerCompute_dnsName :: Lens' RegisterCompute (Maybe Text)
registerCompute_dnsName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:RegisterCompute' :: RegisterCompute -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: RegisterCompute
s@RegisterCompute' {} Maybe Text
a -> RegisterCompute
s {$sel:dnsName:RegisterCompute' :: Maybe Text
dnsName = Maybe Text
a} :: RegisterCompute)

-- | The IP address of the compute resource. GameLift requires the DNS name
-- or IP address to manage your compute resource.
registerCompute_ipAddress :: Lens.Lens' RegisterCompute (Prelude.Maybe Prelude.Text)
registerCompute_ipAddress :: Lens' RegisterCompute (Maybe Text)
registerCompute_ipAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:RegisterCompute' :: RegisterCompute -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: RegisterCompute
s@RegisterCompute' {} Maybe Text
a -> RegisterCompute
s {$sel:ipAddress:RegisterCompute' :: Maybe Text
ipAddress = Maybe Text
a} :: RegisterCompute)

-- | The name of the custom location you added to the fleet you are
-- registering this compute resource to.
registerCompute_location :: Lens.Lens' RegisterCompute (Prelude.Maybe Prelude.Text)
registerCompute_location :: Lens' RegisterCompute (Maybe Text)
registerCompute_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Maybe Text
location :: Maybe Text
$sel:location:RegisterCompute' :: RegisterCompute -> Maybe Text
location} -> Maybe Text
location) (\s :: RegisterCompute
s@RegisterCompute' {} Maybe Text
a -> RegisterCompute
s {$sel:location:RegisterCompute' :: Maybe Text
location = Maybe Text
a} :: RegisterCompute)

-- | A unique identifier for the fleet to register the compute to. You can
-- use either the fleet ID or ARN value.
registerCompute_fleetId :: Lens.Lens' RegisterCompute Prelude.Text
registerCompute_fleetId :: Lens' RegisterCompute Text
registerCompute_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Text
fleetId :: Text
$sel:fleetId:RegisterCompute' :: RegisterCompute -> Text
fleetId} -> Text
fleetId) (\s :: RegisterCompute
s@RegisterCompute' {} Text
a -> RegisterCompute
s {$sel:fleetId:RegisterCompute' :: Text
fleetId = Text
a} :: RegisterCompute)

-- | A descriptive label that is associated with the compute resource
-- registered to your fleet.
registerCompute_computeName :: Lens.Lens' RegisterCompute Prelude.Text
registerCompute_computeName :: Lens' RegisterCompute Text
registerCompute_computeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCompute' {Text
computeName :: Text
$sel:computeName:RegisterCompute' :: RegisterCompute -> Text
computeName} -> Text
computeName) (\s :: RegisterCompute
s@RegisterCompute' {} Text
a -> RegisterCompute
s {$sel:computeName:RegisterCompute' :: Text
computeName = Text
a} :: RegisterCompute)

instance Core.AWSRequest RegisterCompute where
  type
    AWSResponse RegisterCompute =
      RegisterComputeResponse
  request :: (Service -> Service) -> RegisterCompute -> Request RegisterCompute
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 RegisterCompute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterCompute)))
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 Compute -> Int -> RegisterComputeResponse
RegisterComputeResponse'
            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
"Compute")
            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 RegisterCompute where
  hashWithSalt :: Int -> RegisterCompute -> Int
hashWithSalt Int
_salt RegisterCompute' {Maybe Text
Text
computeName :: Text
fleetId :: Text
location :: Maybe Text
ipAddress :: Maybe Text
dnsName :: Maybe Text
certificatePath :: Maybe Text
$sel:computeName:RegisterCompute' :: RegisterCompute -> Text
$sel:fleetId:RegisterCompute' :: RegisterCompute -> Text
$sel:location:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:ipAddress:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:dnsName:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:certificatePath:RegisterCompute' :: RegisterCompute -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificatePath
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dnsName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
      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 RegisterCompute where
  rnf :: RegisterCompute -> ()
rnf RegisterCompute' {Maybe Text
Text
computeName :: Text
fleetId :: Text
location :: Maybe Text
ipAddress :: Maybe Text
dnsName :: Maybe Text
certificatePath :: Maybe Text
$sel:computeName:RegisterCompute' :: RegisterCompute -> Text
$sel:fleetId:RegisterCompute' :: RegisterCompute -> Text
$sel:location:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:ipAddress:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:dnsName:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:certificatePath:RegisterCompute' :: RegisterCompute -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificatePath
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dnsName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 RegisterCompute where
  toHeaders :: RegisterCompute -> 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.RegisterCompute" :: 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 RegisterCompute where
  toJSON :: RegisterCompute -> Value
toJSON RegisterCompute' {Maybe Text
Text
computeName :: Text
fleetId :: Text
location :: Maybe Text
ipAddress :: Maybe Text
dnsName :: Maybe Text
certificatePath :: Maybe Text
$sel:computeName:RegisterCompute' :: RegisterCompute -> Text
$sel:fleetId:RegisterCompute' :: RegisterCompute -> Text
$sel:location:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:ipAddress:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:dnsName:RegisterCompute' :: RegisterCompute -> Maybe Text
$sel:certificatePath:RegisterCompute' :: RegisterCompute -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CertificatePath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificatePath,
            (Key
"DnsName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dnsName,
            (Key
"IpAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ipAddress,
            (Key
"Location" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
location,
            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 RegisterCompute where
  toPath :: RegisterCompute -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newRegisterComputeResponse' smart constructor.
data RegisterComputeResponse = RegisterComputeResponse'
  { -- | The details of the compute resource you registered to the specified
    -- fleet.
    RegisterComputeResponse -> Maybe Compute
compute :: Prelude.Maybe Compute,
    -- | The response's http status code.
    RegisterComputeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RegisterComputeResponse -> RegisterComputeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterComputeResponse -> RegisterComputeResponse -> Bool
$c/= :: RegisterComputeResponse -> RegisterComputeResponse -> Bool
== :: RegisterComputeResponse -> RegisterComputeResponse -> Bool
$c== :: RegisterComputeResponse -> RegisterComputeResponse -> Bool
Prelude.Eq, ReadPrec [RegisterComputeResponse]
ReadPrec RegisterComputeResponse
Int -> ReadS RegisterComputeResponse
ReadS [RegisterComputeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterComputeResponse]
$creadListPrec :: ReadPrec [RegisterComputeResponse]
readPrec :: ReadPrec RegisterComputeResponse
$creadPrec :: ReadPrec RegisterComputeResponse
readList :: ReadS [RegisterComputeResponse]
$creadList :: ReadS [RegisterComputeResponse]
readsPrec :: Int -> ReadS RegisterComputeResponse
$creadsPrec :: Int -> ReadS RegisterComputeResponse
Prelude.Read, Int -> RegisterComputeResponse -> ShowS
[RegisterComputeResponse] -> ShowS
RegisterComputeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterComputeResponse] -> ShowS
$cshowList :: [RegisterComputeResponse] -> ShowS
show :: RegisterComputeResponse -> String
$cshow :: RegisterComputeResponse -> String
showsPrec :: Int -> RegisterComputeResponse -> ShowS
$cshowsPrec :: Int -> RegisterComputeResponse -> ShowS
Prelude.Show, forall x. Rep RegisterComputeResponse x -> RegisterComputeResponse
forall x. RegisterComputeResponse -> Rep RegisterComputeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterComputeResponse x -> RegisterComputeResponse
$cfrom :: forall x. RegisterComputeResponse -> Rep RegisterComputeResponse x
Prelude.Generic)

-- |
-- Create a value of 'RegisterComputeResponse' 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:
--
-- 'compute', 'registerComputeResponse_compute' - The details of the compute resource you registered to the specified
-- fleet.
--
-- 'httpStatus', 'registerComputeResponse_httpStatus' - The response's http status code.
newRegisterComputeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterComputeResponse
newRegisterComputeResponse :: Int -> RegisterComputeResponse
newRegisterComputeResponse Int
pHttpStatus_ =
  RegisterComputeResponse'
    { $sel:compute:RegisterComputeResponse' :: Maybe Compute
compute = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RegisterComputeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The details of the compute resource you registered to the specified
-- fleet.
registerComputeResponse_compute :: Lens.Lens' RegisterComputeResponse (Prelude.Maybe Compute)
registerComputeResponse_compute :: Lens' RegisterComputeResponse (Maybe Compute)
registerComputeResponse_compute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterComputeResponse' {Maybe Compute
compute :: Maybe Compute
$sel:compute:RegisterComputeResponse' :: RegisterComputeResponse -> Maybe Compute
compute} -> Maybe Compute
compute) (\s :: RegisterComputeResponse
s@RegisterComputeResponse' {} Maybe Compute
a -> RegisterComputeResponse
s {$sel:compute:RegisterComputeResponse' :: Maybe Compute
compute = Maybe Compute
a} :: RegisterComputeResponse)

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

instance Prelude.NFData RegisterComputeResponse where
  rnf :: RegisterComputeResponse -> ()
rnf RegisterComputeResponse' {Int
Maybe Compute
httpStatus :: Int
compute :: Maybe Compute
$sel:httpStatus:RegisterComputeResponse' :: RegisterComputeResponse -> Int
$sel:compute:RegisterComputeResponse' :: RegisterComputeResponse -> Maybe Compute
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Compute
compute
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus