{-# 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.DeleteFleetLocations
-- 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)
--
-- Removes locations from a multi-location fleet. When deleting a location,
-- all game server process and all instances that are still active in the
-- location are shut down.
--
-- To delete fleet locations, identify the fleet ID and provide a list of
-- the locations to be deleted.
--
-- If successful, GameLift sets the location status to @DELETING@, and
-- begins to shut down existing server processes and terminate instances in
-- each location being deleted. When completed, the location status changes
-- to @TERMINATED@.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html Setting up GameLift fleets>
--
-- __Related actions__
--
-- CreateFleetLocations | DescribeFleetLocationAttributes |
-- DescribeFleetLocationCapacity | DescribeFleetLocationUtilization |
-- DescribeFleetAttributes | DescribeFleetCapacity |
-- DescribeFleetUtilization | UpdateFleetCapacity | StopFleetActions |
-- DeleteFleetLocations |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.DeleteFleetLocations
  ( -- * Creating a Request
    DeleteFleetLocations (..),
    newDeleteFleetLocations,

    -- * Request Lenses
    deleteFleetLocations_fleetId,
    deleteFleetLocations_locations,

    -- * Destructuring the Response
    DeleteFleetLocationsResponse (..),
    newDeleteFleetLocationsResponse,

    -- * Response Lenses
    deleteFleetLocationsResponse_fleetArn,
    deleteFleetLocationsResponse_locationStates,
    deleteFleetLocationsResponse_fleetId,
    deleteFleetLocationsResponse_httpStatus,
  )
where

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

-- | Represents the input for a request operation.
--
-- /See:/ 'newDeleteFleetLocations' smart constructor.
data DeleteFleetLocations = DeleteFleetLocations'
  { -- | A unique identifier for the fleet to delete locations for. You can use
    -- either the fleet ID or ARN value.
    DeleteFleetLocations -> Text
fleetId :: Prelude.Text,
    -- | The list of fleet locations to delete. Specify locations in the form of
    -- an AWS Region code, such as @us-west-2@.
    DeleteFleetLocations -> NonEmpty Text
locations :: Prelude.NonEmpty Prelude.Text
  }
  deriving (DeleteFleetLocations -> DeleteFleetLocations -> Bool
(DeleteFleetLocations -> DeleteFleetLocations -> Bool)
-> (DeleteFleetLocations -> DeleteFleetLocations -> Bool)
-> Eq DeleteFleetLocations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFleetLocations -> DeleteFleetLocations -> Bool
$c/= :: DeleteFleetLocations -> DeleteFleetLocations -> Bool
== :: DeleteFleetLocations -> DeleteFleetLocations -> Bool
$c== :: DeleteFleetLocations -> DeleteFleetLocations -> Bool
Prelude.Eq, ReadPrec [DeleteFleetLocations]
ReadPrec DeleteFleetLocations
Int -> ReadS DeleteFleetLocations
ReadS [DeleteFleetLocations]
(Int -> ReadS DeleteFleetLocations)
-> ReadS [DeleteFleetLocations]
-> ReadPrec DeleteFleetLocations
-> ReadPrec [DeleteFleetLocations]
-> Read DeleteFleetLocations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFleetLocations]
$creadListPrec :: ReadPrec [DeleteFleetLocations]
readPrec :: ReadPrec DeleteFleetLocations
$creadPrec :: ReadPrec DeleteFleetLocations
readList :: ReadS [DeleteFleetLocations]
$creadList :: ReadS [DeleteFleetLocations]
readsPrec :: Int -> ReadS DeleteFleetLocations
$creadsPrec :: Int -> ReadS DeleteFleetLocations
Prelude.Read, Int -> DeleteFleetLocations -> ShowS
[DeleteFleetLocations] -> ShowS
DeleteFleetLocations -> String
(Int -> DeleteFleetLocations -> ShowS)
-> (DeleteFleetLocations -> String)
-> ([DeleteFleetLocations] -> ShowS)
-> Show DeleteFleetLocations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFleetLocations] -> ShowS
$cshowList :: [DeleteFleetLocations] -> ShowS
show :: DeleteFleetLocations -> String
$cshow :: DeleteFleetLocations -> String
showsPrec :: Int -> DeleteFleetLocations -> ShowS
$cshowsPrec :: Int -> DeleteFleetLocations -> ShowS
Prelude.Show, (forall x. DeleteFleetLocations -> Rep DeleteFleetLocations x)
-> (forall x. Rep DeleteFleetLocations x -> DeleteFleetLocations)
-> Generic DeleteFleetLocations
forall x. Rep DeleteFleetLocations x -> DeleteFleetLocations
forall x. DeleteFleetLocations -> Rep DeleteFleetLocations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFleetLocations x -> DeleteFleetLocations
$cfrom :: forall x. DeleteFleetLocations -> Rep DeleteFleetLocations x
Prelude.Generic)

-- |
-- Create a value of 'DeleteFleetLocations' 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', 'deleteFleetLocations_fleetId' - A unique identifier for the fleet to delete locations for. You can use
-- either the fleet ID or ARN value.
--
-- 'locations', 'deleteFleetLocations_locations' - The list of fleet locations to delete. Specify locations in the form of
-- an AWS Region code, such as @us-west-2@.
newDeleteFleetLocations ::
  -- | 'fleetId'
  Prelude.Text ->
  -- | 'locations'
  Prelude.NonEmpty Prelude.Text ->
  DeleteFleetLocations
newDeleteFleetLocations :: Text -> NonEmpty Text -> DeleteFleetLocations
newDeleteFleetLocations Text
pFleetId_ NonEmpty Text
pLocations_ =
  DeleteFleetLocations' :: Text -> NonEmpty Text -> DeleteFleetLocations
DeleteFleetLocations'
    { $sel:fleetId:DeleteFleetLocations' :: Text
fleetId = Text
pFleetId_,
      $sel:locations:DeleteFleetLocations' :: NonEmpty Text
locations = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pLocations_
    }

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

-- | The list of fleet locations to delete. Specify locations in the form of
-- an AWS Region code, such as @us-west-2@.
deleteFleetLocations_locations :: Lens.Lens' DeleteFleetLocations (Prelude.NonEmpty Prelude.Text)
deleteFleetLocations_locations :: (NonEmpty Text -> f (NonEmpty Text))
-> DeleteFleetLocations -> f DeleteFleetLocations
deleteFleetLocations_locations = (DeleteFleetLocations -> NonEmpty Text)
-> (DeleteFleetLocations -> NonEmpty Text -> DeleteFleetLocations)
-> Lens
     DeleteFleetLocations
     DeleteFleetLocations
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFleetLocations' {NonEmpty Text
locations :: NonEmpty Text
$sel:locations:DeleteFleetLocations' :: DeleteFleetLocations -> NonEmpty Text
locations} -> NonEmpty Text
locations) (\s :: DeleteFleetLocations
s@DeleteFleetLocations' {} NonEmpty Text
a -> DeleteFleetLocations
s {$sel:locations:DeleteFleetLocations' :: NonEmpty Text
locations = NonEmpty Text
a} :: DeleteFleetLocations) ((NonEmpty Text -> f (NonEmpty Text))
 -> DeleteFleetLocations -> f DeleteFleetLocations)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> DeleteFleetLocations
-> f DeleteFleetLocations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DeleteFleetLocations where
  type
    AWSResponse DeleteFleetLocations =
      DeleteFleetLocationsResponse
  request :: DeleteFleetLocations -> Request DeleteFleetLocations
request = Service -> DeleteFleetLocations -> Request DeleteFleetLocations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteFleetLocations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteFleetLocations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteFleetLocations))
-> Logger
-> Service
-> Proxy DeleteFleetLocations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteFleetLocations)))
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 [LocationState]
-> Maybe Text
-> Int
-> DeleteFleetLocationsResponse
DeleteFleetLocationsResponse'
            (Maybe Text
 -> Maybe [LocationState]
 -> Maybe Text
 -> Int
 -> DeleteFleetLocationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [LocationState]
      -> Maybe Text -> Int -> DeleteFleetLocationsResponse)
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
"FleetArn")
            Either
  String
  (Maybe [LocationState]
   -> Maybe Text -> Int -> DeleteFleetLocationsResponse)
-> Either String (Maybe [LocationState])
-> Either
     String (Maybe Text -> Int -> DeleteFleetLocationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [LocationState]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LocationStates" Either String (Maybe (Maybe [LocationState]))
-> Maybe [LocationState] -> Either String (Maybe [LocationState])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LocationState]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> DeleteFleetLocationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteFleetLocationsResponse)
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
"FleetId")
            Either String (Int -> DeleteFleetLocationsResponse)
-> Either String Int -> Either String DeleteFleetLocationsResponse
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 DeleteFleetLocations

instance Prelude.NFData DeleteFleetLocations

instance Core.ToHeaders DeleteFleetLocations where
  toHeaders :: DeleteFleetLocations -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteFleetLocations -> 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
"GameLift.DeleteFleetLocations" ::
                          Prelude.ByteString
                      ),
            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.ToJSON DeleteFleetLocations where
  toJSON :: DeleteFleetLocations -> Value
toJSON DeleteFleetLocations' {NonEmpty Text
Text
locations :: NonEmpty Text
fleetId :: Text
$sel:locations:DeleteFleetLocations' :: DeleteFleetLocations -> NonEmpty Text
$sel:fleetId:DeleteFleetLocations' :: DeleteFleetLocations -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Locations" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
locations)
          ]
      )

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

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

-- | Represents the returned data in response to a request operation.
--
-- /See:/ 'newDeleteFleetLocationsResponse' smart constructor.
data DeleteFleetLocationsResponse = DeleteFleetLocationsResponse'
  { -- | 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@.
    DeleteFleetLocationsResponse -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
    -- | The remote locations that are being deleted, with each location status
    -- set to @DELETING@.
    DeleteFleetLocationsResponse -> Maybe [LocationState]
locationStates :: Prelude.Maybe [LocationState],
    -- | A unique identifier for the fleet that location attributes are being
    -- deleted for.
    DeleteFleetLocationsResponse -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeleteFleetLocationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteFleetLocationsResponse
-> DeleteFleetLocationsResponse -> Bool
(DeleteFleetLocationsResponse
 -> DeleteFleetLocationsResponse -> Bool)
-> (DeleteFleetLocationsResponse
    -> DeleteFleetLocationsResponse -> Bool)
-> Eq DeleteFleetLocationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFleetLocationsResponse
-> DeleteFleetLocationsResponse -> Bool
$c/= :: DeleteFleetLocationsResponse
-> DeleteFleetLocationsResponse -> Bool
== :: DeleteFleetLocationsResponse
-> DeleteFleetLocationsResponse -> Bool
$c== :: DeleteFleetLocationsResponse
-> DeleteFleetLocationsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFleetLocationsResponse]
ReadPrec DeleteFleetLocationsResponse
Int -> ReadS DeleteFleetLocationsResponse
ReadS [DeleteFleetLocationsResponse]
(Int -> ReadS DeleteFleetLocationsResponse)
-> ReadS [DeleteFleetLocationsResponse]
-> ReadPrec DeleteFleetLocationsResponse
-> ReadPrec [DeleteFleetLocationsResponse]
-> Read DeleteFleetLocationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFleetLocationsResponse]
$creadListPrec :: ReadPrec [DeleteFleetLocationsResponse]
readPrec :: ReadPrec DeleteFleetLocationsResponse
$creadPrec :: ReadPrec DeleteFleetLocationsResponse
readList :: ReadS [DeleteFleetLocationsResponse]
$creadList :: ReadS [DeleteFleetLocationsResponse]
readsPrec :: Int -> ReadS DeleteFleetLocationsResponse
$creadsPrec :: Int -> ReadS DeleteFleetLocationsResponse
Prelude.Read, Int -> DeleteFleetLocationsResponse -> ShowS
[DeleteFleetLocationsResponse] -> ShowS
DeleteFleetLocationsResponse -> String
(Int -> DeleteFleetLocationsResponse -> ShowS)
-> (DeleteFleetLocationsResponse -> String)
-> ([DeleteFleetLocationsResponse] -> ShowS)
-> Show DeleteFleetLocationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFleetLocationsResponse] -> ShowS
$cshowList :: [DeleteFleetLocationsResponse] -> ShowS
show :: DeleteFleetLocationsResponse -> String
$cshow :: DeleteFleetLocationsResponse -> String
showsPrec :: Int -> DeleteFleetLocationsResponse -> ShowS
$cshowsPrec :: Int -> DeleteFleetLocationsResponse -> ShowS
Prelude.Show, (forall x.
 DeleteFleetLocationsResponse -> Rep DeleteFleetLocationsResponse x)
-> (forall x.
    Rep DeleteFleetLocationsResponse x -> DeleteFleetLocationsResponse)
-> Generic DeleteFleetLocationsResponse
forall x.
Rep DeleteFleetLocationsResponse x -> DeleteFleetLocationsResponse
forall x.
DeleteFleetLocationsResponse -> Rep DeleteFleetLocationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFleetLocationsResponse x -> DeleteFleetLocationsResponse
$cfrom :: forall x.
DeleteFleetLocationsResponse -> Rep DeleteFleetLocationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteFleetLocationsResponse' 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:
--
-- 'fleetArn', 'deleteFleetLocationsResponse_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@.
--
-- 'locationStates', 'deleteFleetLocationsResponse_locationStates' - The remote locations that are being deleted, with each location status
-- set to @DELETING@.
--
-- 'fleetId', 'deleteFleetLocationsResponse_fleetId' - A unique identifier for the fleet that location attributes are being
-- deleted for.
--
-- 'httpStatus', 'deleteFleetLocationsResponse_httpStatus' - The response's http status code.
newDeleteFleetLocationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteFleetLocationsResponse
newDeleteFleetLocationsResponse :: Int -> DeleteFleetLocationsResponse
newDeleteFleetLocationsResponse Int
pHttpStatus_ =
  DeleteFleetLocationsResponse' :: Maybe Text
-> Maybe [LocationState]
-> Maybe Text
-> Int
-> DeleteFleetLocationsResponse
DeleteFleetLocationsResponse'
    { $sel:fleetArn:DeleteFleetLocationsResponse' :: Maybe Text
fleetArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:locationStates:DeleteFleetLocationsResponse' :: Maybe [LocationState]
locationStates = Maybe [LocationState]
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:DeleteFleetLocationsResponse' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteFleetLocationsResponse' :: 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 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@.
deleteFleetLocationsResponse_fleetArn :: Lens.Lens' DeleteFleetLocationsResponse (Prelude.Maybe Prelude.Text)
deleteFleetLocationsResponse_fleetArn :: (Maybe Text -> f (Maybe Text))
-> DeleteFleetLocationsResponse -> f DeleteFleetLocationsResponse
deleteFleetLocationsResponse_fleetArn = (DeleteFleetLocationsResponse -> Maybe Text)
-> (DeleteFleetLocationsResponse
    -> Maybe Text -> DeleteFleetLocationsResponse)
-> Lens
     DeleteFleetLocationsResponse
     DeleteFleetLocationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFleetLocationsResponse' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:DeleteFleetLocationsResponse' :: DeleteFleetLocationsResponse -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: DeleteFleetLocationsResponse
s@DeleteFleetLocationsResponse' {} Maybe Text
a -> DeleteFleetLocationsResponse
s {$sel:fleetArn:DeleteFleetLocationsResponse' :: Maybe Text
fleetArn = Maybe Text
a} :: DeleteFleetLocationsResponse)

-- | The remote locations that are being deleted, with each location status
-- set to @DELETING@.
deleteFleetLocationsResponse_locationStates :: Lens.Lens' DeleteFleetLocationsResponse (Prelude.Maybe [LocationState])
deleteFleetLocationsResponse_locationStates :: (Maybe [LocationState] -> f (Maybe [LocationState]))
-> DeleteFleetLocationsResponse -> f DeleteFleetLocationsResponse
deleteFleetLocationsResponse_locationStates = (DeleteFleetLocationsResponse -> Maybe [LocationState])
-> (DeleteFleetLocationsResponse
    -> Maybe [LocationState] -> DeleteFleetLocationsResponse)
-> Lens
     DeleteFleetLocationsResponse
     DeleteFleetLocationsResponse
     (Maybe [LocationState])
     (Maybe [LocationState])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFleetLocationsResponse' {Maybe [LocationState]
locationStates :: Maybe [LocationState]
$sel:locationStates:DeleteFleetLocationsResponse' :: DeleteFleetLocationsResponse -> Maybe [LocationState]
locationStates} -> Maybe [LocationState]
locationStates) (\s :: DeleteFleetLocationsResponse
s@DeleteFleetLocationsResponse' {} Maybe [LocationState]
a -> DeleteFleetLocationsResponse
s {$sel:locationStates:DeleteFleetLocationsResponse' :: Maybe [LocationState]
locationStates = Maybe [LocationState]
a} :: DeleteFleetLocationsResponse) ((Maybe [LocationState] -> f (Maybe [LocationState]))
 -> DeleteFleetLocationsResponse -> f DeleteFleetLocationsResponse)
-> ((Maybe [LocationState] -> f (Maybe [LocationState]))
    -> Maybe [LocationState] -> f (Maybe [LocationState]))
-> (Maybe [LocationState] -> f (Maybe [LocationState]))
-> DeleteFleetLocationsResponse
-> f DeleteFleetLocationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LocationState] [LocationState] [LocationState] [LocationState]
-> Iso
     (Maybe [LocationState])
     (Maybe [LocationState])
     (Maybe [LocationState])
     (Maybe [LocationState])
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
  [LocationState] [LocationState] [LocationState] [LocationState]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for the fleet that location attributes are being
-- deleted for.
deleteFleetLocationsResponse_fleetId :: Lens.Lens' DeleteFleetLocationsResponse (Prelude.Maybe Prelude.Text)
deleteFleetLocationsResponse_fleetId :: (Maybe Text -> f (Maybe Text))
-> DeleteFleetLocationsResponse -> f DeleteFleetLocationsResponse
deleteFleetLocationsResponse_fleetId = (DeleteFleetLocationsResponse -> Maybe Text)
-> (DeleteFleetLocationsResponse
    -> Maybe Text -> DeleteFleetLocationsResponse)
-> Lens
     DeleteFleetLocationsResponse
     DeleteFleetLocationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFleetLocationsResponse' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:DeleteFleetLocationsResponse' :: DeleteFleetLocationsResponse -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: DeleteFleetLocationsResponse
s@DeleteFleetLocationsResponse' {} Maybe Text
a -> DeleteFleetLocationsResponse
s {$sel:fleetId:DeleteFleetLocationsResponse' :: Maybe Text
fleetId = Maybe Text
a} :: DeleteFleetLocationsResponse)

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

instance Prelude.NFData DeleteFleetLocationsResponse