{-# 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.UpdateFleetPortSettings
-- 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)
--
-- Updates permissions that allow inbound traffic to connect to game
-- sessions that are being hosted on instances in the fleet.
--
-- To update settings, specify the fleet ID to be updated and specify the
-- changes to be made. List the permissions you want to add in
-- @InboundPermissionAuthorizations@, and permissions you want to remove in
-- @InboundPermissionRevocations@. Permissions to be removed must match
-- existing fleet permissions.
--
-- If successful, the fleet ID for the updated fleet is returned. For
-- fleets with remote locations, port setting updates can take time to
-- propagate across all locations. You can check the status of updates in
-- each location by calling @DescribeFleetPortSettings@ with a location
-- name.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html Setting up GameLift fleets>
--
-- __Related actions__
--
-- CreateFleetLocations | UpdateFleetAttributes | UpdateFleetCapacity |
-- UpdateFleetPortSettings | UpdateRuntimeConfiguration | StopFleetActions
-- | StartFleetActions | PutScalingPolicy | DeleteFleet |
-- DeleteFleetLocations | DeleteScalingPolicy |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.UpdateFleetPortSettings
  ( -- * Creating a Request
    UpdateFleetPortSettings (..),
    newUpdateFleetPortSettings,

    -- * Request Lenses
    updateFleetPortSettings_inboundPermissionRevocations,
    updateFleetPortSettings_inboundPermissionAuthorizations,
    updateFleetPortSettings_fleetId,

    -- * Destructuring the Response
    UpdateFleetPortSettingsResponse (..),
    newUpdateFleetPortSettingsResponse,

    -- * Response Lenses
    updateFleetPortSettingsResponse_fleetId,
    updateFleetPortSettingsResponse_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:/ 'newUpdateFleetPortSettings' smart constructor.
data UpdateFleetPortSettings = UpdateFleetPortSettings'
  { -- | A collection of port settings to be removed from the fleet resource.
    UpdateFleetPortSettings -> Maybe [IpPermission]
inboundPermissionRevocations :: Prelude.Maybe [IpPermission],
    -- | A collection of port settings to be added to the fleet resource.
    UpdateFleetPortSettings -> Maybe [IpPermission]
inboundPermissionAuthorizations :: Prelude.Maybe [IpPermission],
    -- | A unique identifier for the fleet to update port settings for. You can
    -- use either the fleet ID or ARN value.
    UpdateFleetPortSettings -> Text
fleetId :: Prelude.Text
  }
  deriving (UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool
(UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool)
-> (UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool)
-> Eq UpdateFleetPortSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool
$c/= :: UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool
== :: UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool
$c== :: UpdateFleetPortSettings -> UpdateFleetPortSettings -> Bool
Prelude.Eq, ReadPrec [UpdateFleetPortSettings]
ReadPrec UpdateFleetPortSettings
Int -> ReadS UpdateFleetPortSettings
ReadS [UpdateFleetPortSettings]
(Int -> ReadS UpdateFleetPortSettings)
-> ReadS [UpdateFleetPortSettings]
-> ReadPrec UpdateFleetPortSettings
-> ReadPrec [UpdateFleetPortSettings]
-> Read UpdateFleetPortSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFleetPortSettings]
$creadListPrec :: ReadPrec [UpdateFleetPortSettings]
readPrec :: ReadPrec UpdateFleetPortSettings
$creadPrec :: ReadPrec UpdateFleetPortSettings
readList :: ReadS [UpdateFleetPortSettings]
$creadList :: ReadS [UpdateFleetPortSettings]
readsPrec :: Int -> ReadS UpdateFleetPortSettings
$creadsPrec :: Int -> ReadS UpdateFleetPortSettings
Prelude.Read, Int -> UpdateFleetPortSettings -> ShowS
[UpdateFleetPortSettings] -> ShowS
UpdateFleetPortSettings -> String
(Int -> UpdateFleetPortSettings -> ShowS)
-> (UpdateFleetPortSettings -> String)
-> ([UpdateFleetPortSettings] -> ShowS)
-> Show UpdateFleetPortSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFleetPortSettings] -> ShowS
$cshowList :: [UpdateFleetPortSettings] -> ShowS
show :: UpdateFleetPortSettings -> String
$cshow :: UpdateFleetPortSettings -> String
showsPrec :: Int -> UpdateFleetPortSettings -> ShowS
$cshowsPrec :: Int -> UpdateFleetPortSettings -> ShowS
Prelude.Show, (forall x.
 UpdateFleetPortSettings -> Rep UpdateFleetPortSettings x)
-> (forall x.
    Rep UpdateFleetPortSettings x -> UpdateFleetPortSettings)
-> Generic UpdateFleetPortSettings
forall x. Rep UpdateFleetPortSettings x -> UpdateFleetPortSettings
forall x. UpdateFleetPortSettings -> Rep UpdateFleetPortSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFleetPortSettings x -> UpdateFleetPortSettings
$cfrom :: forall x. UpdateFleetPortSettings -> Rep UpdateFleetPortSettings x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFleetPortSettings' 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:
--
-- 'inboundPermissionRevocations', 'updateFleetPortSettings_inboundPermissionRevocations' - A collection of port settings to be removed from the fleet resource.
--
-- 'inboundPermissionAuthorizations', 'updateFleetPortSettings_inboundPermissionAuthorizations' - A collection of port settings to be added to the fleet resource.
--
-- 'fleetId', 'updateFleetPortSettings_fleetId' - A unique identifier for the fleet to update port settings for. You can
-- use either the fleet ID or ARN value.
newUpdateFleetPortSettings ::
  -- | 'fleetId'
  Prelude.Text ->
  UpdateFleetPortSettings
newUpdateFleetPortSettings :: Text -> UpdateFleetPortSettings
newUpdateFleetPortSettings Text
pFleetId_ =
  UpdateFleetPortSettings' :: Maybe [IpPermission]
-> Maybe [IpPermission] -> Text -> UpdateFleetPortSettings
UpdateFleetPortSettings'
    { $sel:inboundPermissionRevocations:UpdateFleetPortSettings' :: Maybe [IpPermission]
inboundPermissionRevocations =
        Maybe [IpPermission]
forall a. Maybe a
Prelude.Nothing,
      $sel:inboundPermissionAuthorizations:UpdateFleetPortSettings' :: Maybe [IpPermission]
inboundPermissionAuthorizations = Maybe [IpPermission]
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:UpdateFleetPortSettings' :: Text
fleetId = Text
pFleetId_
    }

-- | A collection of port settings to be removed from the fleet resource.
updateFleetPortSettings_inboundPermissionRevocations :: Lens.Lens' UpdateFleetPortSettings (Prelude.Maybe [IpPermission])
updateFleetPortSettings_inboundPermissionRevocations :: (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> UpdateFleetPortSettings -> f UpdateFleetPortSettings
updateFleetPortSettings_inboundPermissionRevocations = (UpdateFleetPortSettings -> Maybe [IpPermission])
-> (UpdateFleetPortSettings
    -> Maybe [IpPermission] -> UpdateFleetPortSettings)
-> Lens
     UpdateFleetPortSettings
     UpdateFleetPortSettings
     (Maybe [IpPermission])
     (Maybe [IpPermission])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetPortSettings' {Maybe [IpPermission]
inboundPermissionRevocations :: Maybe [IpPermission]
$sel:inboundPermissionRevocations:UpdateFleetPortSettings' :: UpdateFleetPortSettings -> Maybe [IpPermission]
inboundPermissionRevocations} -> Maybe [IpPermission]
inboundPermissionRevocations) (\s :: UpdateFleetPortSettings
s@UpdateFleetPortSettings' {} Maybe [IpPermission]
a -> UpdateFleetPortSettings
s {$sel:inboundPermissionRevocations:UpdateFleetPortSettings' :: Maybe [IpPermission]
inboundPermissionRevocations = Maybe [IpPermission]
a} :: UpdateFleetPortSettings) ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
 -> UpdateFleetPortSettings -> f UpdateFleetPortSettings)
-> ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
    -> Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> UpdateFleetPortSettings
-> f UpdateFleetPortSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [IpPermission] [IpPermission] [IpPermission] [IpPermission]
-> Iso
     (Maybe [IpPermission])
     (Maybe [IpPermission])
     (Maybe [IpPermission])
     (Maybe [IpPermission])
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 [IpPermission] [IpPermission] [IpPermission] [IpPermission]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A collection of port settings to be added to the fleet resource.
updateFleetPortSettings_inboundPermissionAuthorizations :: Lens.Lens' UpdateFleetPortSettings (Prelude.Maybe [IpPermission])
updateFleetPortSettings_inboundPermissionAuthorizations :: (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> UpdateFleetPortSettings -> f UpdateFleetPortSettings
updateFleetPortSettings_inboundPermissionAuthorizations = (UpdateFleetPortSettings -> Maybe [IpPermission])
-> (UpdateFleetPortSettings
    -> Maybe [IpPermission] -> UpdateFleetPortSettings)
-> Lens
     UpdateFleetPortSettings
     UpdateFleetPortSettings
     (Maybe [IpPermission])
     (Maybe [IpPermission])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetPortSettings' {Maybe [IpPermission]
inboundPermissionAuthorizations :: Maybe [IpPermission]
$sel:inboundPermissionAuthorizations:UpdateFleetPortSettings' :: UpdateFleetPortSettings -> Maybe [IpPermission]
inboundPermissionAuthorizations} -> Maybe [IpPermission]
inboundPermissionAuthorizations) (\s :: UpdateFleetPortSettings
s@UpdateFleetPortSettings' {} Maybe [IpPermission]
a -> UpdateFleetPortSettings
s {$sel:inboundPermissionAuthorizations:UpdateFleetPortSettings' :: Maybe [IpPermission]
inboundPermissionAuthorizations = Maybe [IpPermission]
a} :: UpdateFleetPortSettings) ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
 -> UpdateFleetPortSettings -> f UpdateFleetPortSettings)
-> ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
    -> Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> UpdateFleetPortSettings
-> f UpdateFleetPortSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [IpPermission] [IpPermission] [IpPermission] [IpPermission]
-> Iso
     (Maybe [IpPermission])
     (Maybe [IpPermission])
     (Maybe [IpPermission])
     (Maybe [IpPermission])
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 [IpPermission] [IpPermission] [IpPermission] [IpPermission]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Core.AWSRequest UpdateFleetPortSettings where
  type
    AWSResponse UpdateFleetPortSettings =
      UpdateFleetPortSettingsResponse
  request :: UpdateFleetPortSettings -> Request UpdateFleetPortSettings
request = Service
-> UpdateFleetPortSettings -> Request UpdateFleetPortSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFleetPortSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFleetPortSettings)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateFleetPortSettings))
-> Logger
-> Service
-> Proxy UpdateFleetPortSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFleetPortSettings)))
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 -> Int -> UpdateFleetPortSettingsResponse
UpdateFleetPortSettingsResponse'
            (Maybe Text -> Int -> UpdateFleetPortSettingsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateFleetPortSettingsResponse)
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
"FleetId")
            Either String (Int -> UpdateFleetPortSettingsResponse)
-> Either String Int
-> Either String UpdateFleetPortSettingsResponse
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 UpdateFleetPortSettings

instance Prelude.NFData UpdateFleetPortSettings

instance Core.ToHeaders UpdateFleetPortSettings where
  toHeaders :: UpdateFleetPortSettings -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFleetPortSettings -> 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.UpdateFleetPortSettings" ::
                          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 UpdateFleetPortSettings where
  toJSON :: UpdateFleetPortSettings -> Value
toJSON UpdateFleetPortSettings' {Maybe [IpPermission]
Text
fleetId :: Text
inboundPermissionAuthorizations :: Maybe [IpPermission]
inboundPermissionRevocations :: Maybe [IpPermission]
$sel:fleetId:UpdateFleetPortSettings' :: UpdateFleetPortSettings -> Text
$sel:inboundPermissionAuthorizations:UpdateFleetPortSettings' :: UpdateFleetPortSettings -> Maybe [IpPermission]
$sel:inboundPermissionRevocations:UpdateFleetPortSettings' :: UpdateFleetPortSettings -> Maybe [IpPermission]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InboundPermissionRevocations" Text -> [IpPermission] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([IpPermission] -> Pair) -> Maybe [IpPermission] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [IpPermission]
inboundPermissionRevocations,
            (Text
"InboundPermissionAuthorizations" Text -> [IpPermission] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([IpPermission] -> Pair) -> Maybe [IpPermission] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [IpPermission]
inboundPermissionAuthorizations,
            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)
          ]
      )

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

instance Core.ToQuery UpdateFleetPortSettings where
  toQuery :: UpdateFleetPortSettings -> QueryString
toQuery = QueryString -> UpdateFleetPortSettings -> 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:/ 'newUpdateFleetPortSettingsResponse' smart constructor.
data UpdateFleetPortSettingsResponse = UpdateFleetPortSettingsResponse'
  { -- | A unique identifier for the fleet that was updated.
    UpdateFleetPortSettingsResponse -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateFleetPortSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFleetPortSettingsResponse
-> UpdateFleetPortSettingsResponse -> Bool
(UpdateFleetPortSettingsResponse
 -> UpdateFleetPortSettingsResponse -> Bool)
-> (UpdateFleetPortSettingsResponse
    -> UpdateFleetPortSettingsResponse -> Bool)
-> Eq UpdateFleetPortSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFleetPortSettingsResponse
-> UpdateFleetPortSettingsResponse -> Bool
$c/= :: UpdateFleetPortSettingsResponse
-> UpdateFleetPortSettingsResponse -> Bool
== :: UpdateFleetPortSettingsResponse
-> UpdateFleetPortSettingsResponse -> Bool
$c== :: UpdateFleetPortSettingsResponse
-> UpdateFleetPortSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFleetPortSettingsResponse]
ReadPrec UpdateFleetPortSettingsResponse
Int -> ReadS UpdateFleetPortSettingsResponse
ReadS [UpdateFleetPortSettingsResponse]
(Int -> ReadS UpdateFleetPortSettingsResponse)
-> ReadS [UpdateFleetPortSettingsResponse]
-> ReadPrec UpdateFleetPortSettingsResponse
-> ReadPrec [UpdateFleetPortSettingsResponse]
-> Read UpdateFleetPortSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFleetPortSettingsResponse]
$creadListPrec :: ReadPrec [UpdateFleetPortSettingsResponse]
readPrec :: ReadPrec UpdateFleetPortSettingsResponse
$creadPrec :: ReadPrec UpdateFleetPortSettingsResponse
readList :: ReadS [UpdateFleetPortSettingsResponse]
$creadList :: ReadS [UpdateFleetPortSettingsResponse]
readsPrec :: Int -> ReadS UpdateFleetPortSettingsResponse
$creadsPrec :: Int -> ReadS UpdateFleetPortSettingsResponse
Prelude.Read, Int -> UpdateFleetPortSettingsResponse -> ShowS
[UpdateFleetPortSettingsResponse] -> ShowS
UpdateFleetPortSettingsResponse -> String
(Int -> UpdateFleetPortSettingsResponse -> ShowS)
-> (UpdateFleetPortSettingsResponse -> String)
-> ([UpdateFleetPortSettingsResponse] -> ShowS)
-> Show UpdateFleetPortSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFleetPortSettingsResponse] -> ShowS
$cshowList :: [UpdateFleetPortSettingsResponse] -> ShowS
show :: UpdateFleetPortSettingsResponse -> String
$cshow :: UpdateFleetPortSettingsResponse -> String
showsPrec :: Int -> UpdateFleetPortSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdateFleetPortSettingsResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFleetPortSettingsResponse
 -> Rep UpdateFleetPortSettingsResponse x)
-> (forall x.
    Rep UpdateFleetPortSettingsResponse x
    -> UpdateFleetPortSettingsResponse)
-> Generic UpdateFleetPortSettingsResponse
forall x.
Rep UpdateFleetPortSettingsResponse x
-> UpdateFleetPortSettingsResponse
forall x.
UpdateFleetPortSettingsResponse
-> Rep UpdateFleetPortSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFleetPortSettingsResponse x
-> UpdateFleetPortSettingsResponse
$cfrom :: forall x.
UpdateFleetPortSettingsResponse
-> Rep UpdateFleetPortSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFleetPortSettingsResponse' 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', 'updateFleetPortSettingsResponse_fleetId' - A unique identifier for the fleet that was updated.
--
-- 'httpStatus', 'updateFleetPortSettingsResponse_httpStatus' - The response's http status code.
newUpdateFleetPortSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFleetPortSettingsResponse
newUpdateFleetPortSettingsResponse :: Int -> UpdateFleetPortSettingsResponse
newUpdateFleetPortSettingsResponse Int
pHttpStatus_ =
  UpdateFleetPortSettingsResponse' :: Maybe Text -> Int -> UpdateFleetPortSettingsResponse
UpdateFleetPortSettingsResponse'
    { $sel:fleetId:UpdateFleetPortSettingsResponse' :: Maybe Text
fleetId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFleetPortSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique identifier for the fleet that was updated.
updateFleetPortSettingsResponse_fleetId :: Lens.Lens' UpdateFleetPortSettingsResponse (Prelude.Maybe Prelude.Text)
updateFleetPortSettingsResponse_fleetId :: (Maybe Text -> f (Maybe Text))
-> UpdateFleetPortSettingsResponse
-> f UpdateFleetPortSettingsResponse
updateFleetPortSettingsResponse_fleetId = (UpdateFleetPortSettingsResponse -> Maybe Text)
-> (UpdateFleetPortSettingsResponse
    -> Maybe Text -> UpdateFleetPortSettingsResponse)
-> Lens
     UpdateFleetPortSettingsResponse
     UpdateFleetPortSettingsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetPortSettingsResponse' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:UpdateFleetPortSettingsResponse' :: UpdateFleetPortSettingsResponse -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: UpdateFleetPortSettingsResponse
s@UpdateFleetPortSettingsResponse' {} Maybe Text
a -> UpdateFleetPortSettingsResponse
s {$sel:fleetId:UpdateFleetPortSettingsResponse' :: Maybe Text
fleetId = Maybe Text
a} :: UpdateFleetPortSettingsResponse)

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

instance
  Prelude.NFData
    UpdateFleetPortSettingsResponse