{-# 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.DescribeFleetPortSettings
-- 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)
--
-- Retrieves a fleet\'s inbound connection permissions. Connection
-- permissions specify the range of IP addresses and port settings that
-- incoming traffic can use to access server processes in the fleet. Game
-- sessions that are running on instances in the fleet must use connections
-- that fall in this range.
--
-- This operation can be used in the following ways:
--
-- -   To retrieve the inbound connection permissions for a fleet, identify
--     the fleet\'s unique identifier.
--
-- -   To check the status of recent updates to a fleet remote location,
--     specify the fleet ID and a location. Port setting updates can take
--     time to propagate across all locations.
--
-- If successful, a set of IpPermission objects is returned for the
-- requested fleet ID. When a location is specified, a pending status is
-- included. If the requested fleet has been deleted, the result set is
-- empty.
--
-- __Learn more__
--
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html Setting up GameLift fleets>
--
-- __Related actions__
--
-- ListFleets | DescribeEC2InstanceLimits | DescribeFleetAttributes |
-- DescribeFleetCapacity | DescribeFleetEvents |
-- DescribeFleetLocationAttributes | DescribeFleetPortSettings |
-- DescribeFleetUtilization | DescribeRuntimeConfiguration |
-- DescribeScalingPolicies |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.DescribeFleetPortSettings
  ( -- * Creating a Request
    DescribeFleetPortSettings (..),
    newDescribeFleetPortSettings,

    -- * Request Lenses
    describeFleetPortSettings_location,
    describeFleetPortSettings_fleetId,

    -- * Destructuring the Response
    DescribeFleetPortSettingsResponse (..),
    newDescribeFleetPortSettingsResponse,

    -- * Response Lenses
    describeFleetPortSettingsResponse_location,
    describeFleetPortSettingsResponse_inboundPermissions,
    describeFleetPortSettingsResponse_fleetArn,
    describeFleetPortSettingsResponse_updateStatus,
    describeFleetPortSettingsResponse_fleetId,
    describeFleetPortSettingsResponse_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:/ 'newDescribeFleetPortSettings' smart constructor.
data DescribeFleetPortSettings = DescribeFleetPortSettings'
  { -- | A remote location to check for status of port setting updates. Use the
    -- AWS Region code format, such as @us-west-2@.
    DescribeFleetPortSettings -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the fleet to retrieve port settings for. You can
    -- use either the fleet ID or ARN value.
    DescribeFleetPortSettings -> Text
fleetId :: Prelude.Text
  }
  deriving (DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool
(DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool)
-> (DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool)
-> Eq DescribeFleetPortSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool
$c/= :: DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool
== :: DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool
$c== :: DescribeFleetPortSettings -> DescribeFleetPortSettings -> Bool
Prelude.Eq, ReadPrec [DescribeFleetPortSettings]
ReadPrec DescribeFleetPortSettings
Int -> ReadS DescribeFleetPortSettings
ReadS [DescribeFleetPortSettings]
(Int -> ReadS DescribeFleetPortSettings)
-> ReadS [DescribeFleetPortSettings]
-> ReadPrec DescribeFleetPortSettings
-> ReadPrec [DescribeFleetPortSettings]
-> Read DescribeFleetPortSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetPortSettings]
$creadListPrec :: ReadPrec [DescribeFleetPortSettings]
readPrec :: ReadPrec DescribeFleetPortSettings
$creadPrec :: ReadPrec DescribeFleetPortSettings
readList :: ReadS [DescribeFleetPortSettings]
$creadList :: ReadS [DescribeFleetPortSettings]
readsPrec :: Int -> ReadS DescribeFleetPortSettings
$creadsPrec :: Int -> ReadS DescribeFleetPortSettings
Prelude.Read, Int -> DescribeFleetPortSettings -> ShowS
[DescribeFleetPortSettings] -> ShowS
DescribeFleetPortSettings -> String
(Int -> DescribeFleetPortSettings -> ShowS)
-> (DescribeFleetPortSettings -> String)
-> ([DescribeFleetPortSettings] -> ShowS)
-> Show DescribeFleetPortSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetPortSettings] -> ShowS
$cshowList :: [DescribeFleetPortSettings] -> ShowS
show :: DescribeFleetPortSettings -> String
$cshow :: DescribeFleetPortSettings -> String
showsPrec :: Int -> DescribeFleetPortSettings -> ShowS
$cshowsPrec :: Int -> DescribeFleetPortSettings -> ShowS
Prelude.Show, (forall x.
 DescribeFleetPortSettings -> Rep DescribeFleetPortSettings x)
-> (forall x.
    Rep DescribeFleetPortSettings x -> DescribeFleetPortSettings)
-> Generic DescribeFleetPortSettings
forall x.
Rep DescribeFleetPortSettings x -> DescribeFleetPortSettings
forall x.
DescribeFleetPortSettings -> Rep DescribeFleetPortSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetPortSettings x -> DescribeFleetPortSettings
$cfrom :: forall x.
DescribeFleetPortSettings -> Rep DescribeFleetPortSettings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetPortSettings' 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:
--
-- 'location', 'describeFleetPortSettings_location' - A remote location to check for status of port setting updates. Use the
-- AWS Region code format, such as @us-west-2@.
--
-- 'fleetId', 'describeFleetPortSettings_fleetId' - A unique identifier for the fleet to retrieve port settings for. You can
-- use either the fleet ID or ARN value.
newDescribeFleetPortSettings ::
  -- | 'fleetId'
  Prelude.Text ->
  DescribeFleetPortSettings
newDescribeFleetPortSettings :: Text -> DescribeFleetPortSettings
newDescribeFleetPortSettings Text
pFleetId_ =
  DescribeFleetPortSettings' :: Maybe Text -> Text -> DescribeFleetPortSettings
DescribeFleetPortSettings'
    { $sel:location:DescribeFleetPortSettings' :: Maybe Text
location =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:DescribeFleetPortSettings' :: Text
fleetId = Text
pFleetId_
    }

-- | A remote location to check for status of port setting updates. Use the
-- AWS Region code format, such as @us-west-2@.
describeFleetPortSettings_location :: Lens.Lens' DescribeFleetPortSettings (Prelude.Maybe Prelude.Text)
describeFleetPortSettings_location :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetPortSettings -> f DescribeFleetPortSettings
describeFleetPortSettings_location = (DescribeFleetPortSettings -> Maybe Text)
-> (DescribeFleetPortSettings
    -> Maybe Text -> DescribeFleetPortSettings)
-> Lens
     DescribeFleetPortSettings
     DescribeFleetPortSettings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetPortSettings' {Maybe Text
location :: Maybe Text
$sel:location:DescribeFleetPortSettings' :: DescribeFleetPortSettings -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeFleetPortSettings
s@DescribeFleetPortSettings' {} Maybe Text
a -> DescribeFleetPortSettings
s {$sel:location:DescribeFleetPortSettings' :: Maybe Text
location = Maybe Text
a} :: DescribeFleetPortSettings)

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

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

instance Prelude.NFData DescribeFleetPortSettings

instance Core.ToHeaders DescribeFleetPortSettings where
  toHeaders :: DescribeFleetPortSettings -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeFleetPortSettings -> 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.DescribeFleetPortSettings" ::
                          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 DescribeFleetPortSettings where
  toJSON :: DescribeFleetPortSettings -> Value
toJSON DescribeFleetPortSettings' {Maybe Text
Text
fleetId :: Text
location :: Maybe Text
$sel:fleetId:DescribeFleetPortSettings' :: DescribeFleetPortSettings -> Text
$sel:location:DescribeFleetPortSettings' :: DescribeFleetPortSettings -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Location" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
location,
            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 DescribeFleetPortSettings where
  toPath :: DescribeFleetPortSettings -> ByteString
toPath = ByteString -> DescribeFleetPortSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeFleetPortSettings where
  toQuery :: DescribeFleetPortSettings -> QueryString
toQuery = QueryString -> DescribeFleetPortSettings -> 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:/ 'newDescribeFleetPortSettingsResponse' smart constructor.
data DescribeFleetPortSettingsResponse = DescribeFleetPortSettingsResponse'
  { -- | The requested fleet location, expressed as an AWS Region code, such as
    -- @us-west-2@.
    DescribeFleetPortSettingsResponse -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | The port settings for the requested fleet ID.
    DescribeFleetPortSettingsResponse -> Maybe [IpPermission]
inboundPermissions :: Prelude.Maybe [IpPermission],
    -- | 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@.
    DescribeFleetPortSettingsResponse -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
    -- | The current status of updates to the fleet\'s port settings in the
    -- requested fleet location. A status of @PENDING_UPDATE@ indicates that an
    -- update was requested for the fleet but has not yet been completed for
    -- the location.
    DescribeFleetPortSettingsResponse -> Maybe LocationUpdateStatus
updateStatus :: Prelude.Maybe LocationUpdateStatus,
    -- | A unique identifier for the fleet that was requested.
    DescribeFleetPortSettingsResponse -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFleetPortSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFleetPortSettingsResponse
-> DescribeFleetPortSettingsResponse -> Bool
(DescribeFleetPortSettingsResponse
 -> DescribeFleetPortSettingsResponse -> Bool)
-> (DescribeFleetPortSettingsResponse
    -> DescribeFleetPortSettingsResponse -> Bool)
-> Eq DescribeFleetPortSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetPortSettingsResponse
-> DescribeFleetPortSettingsResponse -> Bool
$c/= :: DescribeFleetPortSettingsResponse
-> DescribeFleetPortSettingsResponse -> Bool
== :: DescribeFleetPortSettingsResponse
-> DescribeFleetPortSettingsResponse -> Bool
$c== :: DescribeFleetPortSettingsResponse
-> DescribeFleetPortSettingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFleetPortSettingsResponse]
ReadPrec DescribeFleetPortSettingsResponse
Int -> ReadS DescribeFleetPortSettingsResponse
ReadS [DescribeFleetPortSettingsResponse]
(Int -> ReadS DescribeFleetPortSettingsResponse)
-> ReadS [DescribeFleetPortSettingsResponse]
-> ReadPrec DescribeFleetPortSettingsResponse
-> ReadPrec [DescribeFleetPortSettingsResponse]
-> Read DescribeFleetPortSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetPortSettingsResponse]
$creadListPrec :: ReadPrec [DescribeFleetPortSettingsResponse]
readPrec :: ReadPrec DescribeFleetPortSettingsResponse
$creadPrec :: ReadPrec DescribeFleetPortSettingsResponse
readList :: ReadS [DescribeFleetPortSettingsResponse]
$creadList :: ReadS [DescribeFleetPortSettingsResponse]
readsPrec :: Int -> ReadS DescribeFleetPortSettingsResponse
$creadsPrec :: Int -> ReadS DescribeFleetPortSettingsResponse
Prelude.Read, Int -> DescribeFleetPortSettingsResponse -> ShowS
[DescribeFleetPortSettingsResponse] -> ShowS
DescribeFleetPortSettingsResponse -> String
(Int -> DescribeFleetPortSettingsResponse -> ShowS)
-> (DescribeFleetPortSettingsResponse -> String)
-> ([DescribeFleetPortSettingsResponse] -> ShowS)
-> Show DescribeFleetPortSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetPortSettingsResponse] -> ShowS
$cshowList :: [DescribeFleetPortSettingsResponse] -> ShowS
show :: DescribeFleetPortSettingsResponse -> String
$cshow :: DescribeFleetPortSettingsResponse -> String
showsPrec :: Int -> DescribeFleetPortSettingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeFleetPortSettingsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeFleetPortSettingsResponse
 -> Rep DescribeFleetPortSettingsResponse x)
-> (forall x.
    Rep DescribeFleetPortSettingsResponse x
    -> DescribeFleetPortSettingsResponse)
-> Generic DescribeFleetPortSettingsResponse
forall x.
Rep DescribeFleetPortSettingsResponse x
-> DescribeFleetPortSettingsResponse
forall x.
DescribeFleetPortSettingsResponse
-> Rep DescribeFleetPortSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetPortSettingsResponse x
-> DescribeFleetPortSettingsResponse
$cfrom :: forall x.
DescribeFleetPortSettingsResponse
-> Rep DescribeFleetPortSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetPortSettingsResponse' 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:
--
-- 'location', 'describeFleetPortSettingsResponse_location' - The requested fleet location, expressed as an AWS Region code, such as
-- @us-west-2@.
--
-- 'inboundPermissions', 'describeFleetPortSettingsResponse_inboundPermissions' - The port settings for the requested fleet ID.
--
-- 'fleetArn', 'describeFleetPortSettingsResponse_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@.
--
-- 'updateStatus', 'describeFleetPortSettingsResponse_updateStatus' - The current status of updates to the fleet\'s port settings in the
-- requested fleet location. A status of @PENDING_UPDATE@ indicates that an
-- update was requested for the fleet but has not yet been completed for
-- the location.
--
-- 'fleetId', 'describeFleetPortSettingsResponse_fleetId' - A unique identifier for the fleet that was requested.
--
-- 'httpStatus', 'describeFleetPortSettingsResponse_httpStatus' - The response's http status code.
newDescribeFleetPortSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFleetPortSettingsResponse
newDescribeFleetPortSettingsResponse :: Int -> DescribeFleetPortSettingsResponse
newDescribeFleetPortSettingsResponse Int
pHttpStatus_ =
  DescribeFleetPortSettingsResponse' :: Maybe Text
-> Maybe [IpPermission]
-> Maybe Text
-> Maybe LocationUpdateStatus
-> Maybe Text
-> Int
-> DescribeFleetPortSettingsResponse
DescribeFleetPortSettingsResponse'
    { $sel:location:DescribeFleetPortSettingsResponse' :: Maybe Text
location =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inboundPermissions:DescribeFleetPortSettingsResponse' :: Maybe [IpPermission]
inboundPermissions = Maybe [IpPermission]
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetArn:DescribeFleetPortSettingsResponse' :: Maybe Text
fleetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updateStatus:DescribeFleetPortSettingsResponse' :: Maybe LocationUpdateStatus
updateStatus = Maybe LocationUpdateStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetId:DescribeFleetPortSettingsResponse' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFleetPortSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The requested fleet location, expressed as an AWS Region code, such as
-- @us-west-2@.
describeFleetPortSettingsResponse_location :: Lens.Lens' DescribeFleetPortSettingsResponse (Prelude.Maybe Prelude.Text)
describeFleetPortSettingsResponse_location :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetPortSettingsResponse
-> f DescribeFleetPortSettingsResponse
describeFleetPortSettingsResponse_location = (DescribeFleetPortSettingsResponse -> Maybe Text)
-> (DescribeFleetPortSettingsResponse
    -> Maybe Text -> DescribeFleetPortSettingsResponse)
-> Lens
     DescribeFleetPortSettingsResponse
     DescribeFleetPortSettingsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetPortSettingsResponse' {Maybe Text
location :: Maybe Text
$sel:location:DescribeFleetPortSettingsResponse' :: DescribeFleetPortSettingsResponse -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeFleetPortSettingsResponse
s@DescribeFleetPortSettingsResponse' {} Maybe Text
a -> DescribeFleetPortSettingsResponse
s {$sel:location:DescribeFleetPortSettingsResponse' :: Maybe Text
location = Maybe Text
a} :: DescribeFleetPortSettingsResponse)

-- | The port settings for the requested fleet ID.
describeFleetPortSettingsResponse_inboundPermissions :: Lens.Lens' DescribeFleetPortSettingsResponse (Prelude.Maybe [IpPermission])
describeFleetPortSettingsResponse_inboundPermissions :: (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> DescribeFleetPortSettingsResponse
-> f DescribeFleetPortSettingsResponse
describeFleetPortSettingsResponse_inboundPermissions = (DescribeFleetPortSettingsResponse -> Maybe [IpPermission])
-> (DescribeFleetPortSettingsResponse
    -> Maybe [IpPermission] -> DescribeFleetPortSettingsResponse)
-> Lens
     DescribeFleetPortSettingsResponse
     DescribeFleetPortSettingsResponse
     (Maybe [IpPermission])
     (Maybe [IpPermission])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetPortSettingsResponse' {Maybe [IpPermission]
inboundPermissions :: Maybe [IpPermission]
$sel:inboundPermissions:DescribeFleetPortSettingsResponse' :: DescribeFleetPortSettingsResponse -> Maybe [IpPermission]
inboundPermissions} -> Maybe [IpPermission]
inboundPermissions) (\s :: DescribeFleetPortSettingsResponse
s@DescribeFleetPortSettingsResponse' {} Maybe [IpPermission]
a -> DescribeFleetPortSettingsResponse
s {$sel:inboundPermissions:DescribeFleetPortSettingsResponse' :: Maybe [IpPermission]
inboundPermissions = Maybe [IpPermission]
a} :: DescribeFleetPortSettingsResponse) ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
 -> DescribeFleetPortSettingsResponse
 -> f DescribeFleetPortSettingsResponse)
-> ((Maybe [IpPermission] -> f (Maybe [IpPermission]))
    -> Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> (Maybe [IpPermission] -> f (Maybe [IpPermission]))
-> DescribeFleetPortSettingsResponse
-> f DescribeFleetPortSettingsResponse
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

-- | 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@.
describeFleetPortSettingsResponse_fleetArn :: Lens.Lens' DescribeFleetPortSettingsResponse (Prelude.Maybe Prelude.Text)
describeFleetPortSettingsResponse_fleetArn :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetPortSettingsResponse
-> f DescribeFleetPortSettingsResponse
describeFleetPortSettingsResponse_fleetArn = (DescribeFleetPortSettingsResponse -> Maybe Text)
-> (DescribeFleetPortSettingsResponse
    -> Maybe Text -> DescribeFleetPortSettingsResponse)
-> Lens
     DescribeFleetPortSettingsResponse
     DescribeFleetPortSettingsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetPortSettingsResponse' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:DescribeFleetPortSettingsResponse' :: DescribeFleetPortSettingsResponse -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: DescribeFleetPortSettingsResponse
s@DescribeFleetPortSettingsResponse' {} Maybe Text
a -> DescribeFleetPortSettingsResponse
s {$sel:fleetArn:DescribeFleetPortSettingsResponse' :: Maybe Text
fleetArn = Maybe Text
a} :: DescribeFleetPortSettingsResponse)

-- | The current status of updates to the fleet\'s port settings in the
-- requested fleet location. A status of @PENDING_UPDATE@ indicates that an
-- update was requested for the fleet but has not yet been completed for
-- the location.
describeFleetPortSettingsResponse_updateStatus :: Lens.Lens' DescribeFleetPortSettingsResponse (Prelude.Maybe LocationUpdateStatus)
describeFleetPortSettingsResponse_updateStatus :: (Maybe LocationUpdateStatus -> f (Maybe LocationUpdateStatus))
-> DescribeFleetPortSettingsResponse
-> f DescribeFleetPortSettingsResponse
describeFleetPortSettingsResponse_updateStatus = (DescribeFleetPortSettingsResponse -> Maybe LocationUpdateStatus)
-> (DescribeFleetPortSettingsResponse
    -> Maybe LocationUpdateStatus -> DescribeFleetPortSettingsResponse)
-> Lens
     DescribeFleetPortSettingsResponse
     DescribeFleetPortSettingsResponse
     (Maybe LocationUpdateStatus)
     (Maybe LocationUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetPortSettingsResponse' {Maybe LocationUpdateStatus
updateStatus :: Maybe LocationUpdateStatus
$sel:updateStatus:DescribeFleetPortSettingsResponse' :: DescribeFleetPortSettingsResponse -> Maybe LocationUpdateStatus
updateStatus} -> Maybe LocationUpdateStatus
updateStatus) (\s :: DescribeFleetPortSettingsResponse
s@DescribeFleetPortSettingsResponse' {} Maybe LocationUpdateStatus
a -> DescribeFleetPortSettingsResponse
s {$sel:updateStatus:DescribeFleetPortSettingsResponse' :: Maybe LocationUpdateStatus
updateStatus = Maybe LocationUpdateStatus
a} :: DescribeFleetPortSettingsResponse)

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

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

instance
  Prelude.NFData
    DescribeFleetPortSettingsResponse