{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppStream.Types.Fleet
-- 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)
module Amazonka.AppStream.Types.Fleet where

import Amazonka.AppStream.Types.ComputeCapacityStatus
import Amazonka.AppStream.Types.DomainJoinInfo
import Amazonka.AppStream.Types.FleetError
import Amazonka.AppStream.Types.FleetState
import Amazonka.AppStream.Types.FleetType
import Amazonka.AppStream.Types.StreamView
import Amazonka.AppStream.Types.VpcConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a fleet.
--
-- /See:/ 'newFleet' smart constructor.
data Fleet = Fleet'
  { -- | The name of the directory and organizational unit (OU) to use to join
    -- the fleet to a Microsoft Active Directory domain.
    Fleet -> Maybe DomainJoinInfo
domainJoinInfo :: Prelude.Maybe DomainJoinInfo,
    -- | The ARN of the IAM role that is applied to the fleet. To assume a role,
    -- the fleet instance calls the AWS Security Token Service (STS)
    -- @AssumeRole@ API operation and passes the ARN of the role to use. The
    -- operation creates a new session with temporary credentials. AppStream
    -- 2.0 retrieves the temporary credentials and creates the
    -- __appstream_machine_role__ credential profile on the instance.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
    -- in the /Amazon AppStream 2.0 Administration Guide/.
    Fleet -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The amount of time that a streaming session remains active after users
    -- disconnect. If they try to reconnect to the streaming session after a
    -- disconnection or network interruption within this time interval, they
    -- are connected to their previous session. Otherwise, they are connected
    -- to a new session with a new streaming instance.
    --
    -- Specify a value between 60 and 360000.
    Fleet -> Maybe Int
disconnectTimeoutInSeconds :: Prelude.Maybe Prelude.Int,
    -- | The maximum amount of time that a streaming session can remain active,
    -- in seconds. If users are still connected to a streaming instance five
    -- minutes before this limit is reached, they are prompted to save any open
    -- documents before being disconnected. After this time elapses, the
    -- instance is terminated and replaced by a new instance.
    --
    -- Specify a value between 600 and 360000.
    Fleet -> Maybe Int
maxUserDurationInSeconds :: Prelude.Maybe Prelude.Int,
    -- | The time the fleet was created.
    Fleet -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The amount of time that users can be idle (inactive) before they are
    -- disconnected from their streaming session and the
    -- @DisconnectTimeoutInSeconds@ time interval begins. Users are notified
    -- before they are disconnected due to inactivity. If users try to
    -- reconnect to the streaming session before the time interval specified in
    -- @DisconnectTimeoutInSeconds@ elapses, they are connected to their
    -- previous session. Users are considered idle when they stop providing
    -- keyboard or mouse input during their streaming session. File uploads and
    -- downloads, audio in, audio out, and pixels changing do not qualify as
    -- user activity. If users continue to be idle after the time interval in
    -- @IdleDisconnectTimeoutInSeconds@ elapses, they are disconnected.
    --
    -- To prevent users from being disconnected due to inactivity, specify a
    -- value of 0. Otherwise, specify a value between 60 and 3600. The default
    -- value is 0.
    --
    -- If you enable this feature, we recommend that you specify a value that
    -- corresponds exactly to a whole number of minutes (for example, 60, 120,
    -- and 180). If you don\'t do this, the value is rounded to the nearest
    -- minute. For example, if you specify a value of 70, users are
    -- disconnected after 1 minute of inactivity. If you specify a value that
    -- is at the midpoint between two different minutes, the value is rounded
    -- up. For example, if you specify a value of 90, users are disconnected
    -- after 2 minutes of inactivity.
    Fleet -> Maybe Int
idleDisconnectTimeoutInSeconds :: Prelude.Maybe Prelude.Int,
    -- | The fleet type.
    --
    -- [ALWAYS_ON]
    --     Provides users with instant-on access to their apps. You are charged
    --     for all running instances in your fleet, even if no users are
    --     streaming apps.
    --
    -- [ON_DEMAND]
    --     Provide users with access to applications after they connect, which
    --     takes one to two minutes. You are charged for instance streaming
    --     when users are connected and a small hourly fee for instances that
    --     are not streaming apps.
    Fleet -> Maybe FleetType
fleetType :: Prelude.Maybe FleetType,
    -- | The VPC configuration for the fleet.
    Fleet -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The ARN for the public, private, or shared image.
    Fleet -> Maybe Text
imageArn :: Prelude.Maybe Prelude.Text,
    -- | The fleet errors.
    Fleet -> Maybe [FleetError]
fleetErrors :: Prelude.Maybe [FleetError],
    -- | The fleet name to display.
    Fleet -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether default internet access is enabled for the fleet.
    Fleet -> Maybe Bool
enableDefaultInternetAccess :: Prelude.Maybe Prelude.Bool,
    -- | The name of the image used to create the fleet.
    Fleet -> Maybe Text
imageName :: Prelude.Maybe Prelude.Text,
    -- | The description to display.
    Fleet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The AppStream 2.0 view that is displayed to your users when they stream
    -- from the fleet. When @APP@ is specified, only the windows of
    -- applications opened by users display. When @DESKTOP@ is specified, the
    -- standard desktop that is provided by the operating system displays.
    --
    -- The default value is @APP@.
    Fleet -> Maybe StreamView
streamView :: Prelude.Maybe StreamView,
    -- | The Amazon Resource Name (ARN) for the fleet.
    Fleet -> Text
arn :: Prelude.Text,
    -- | The name of the fleet.
    Fleet -> Text
name :: Prelude.Text,
    -- | The instance type to use when launching fleet instances. The following
    -- instance types are available:
    --
    -- -   stream.standard.small
    --
    -- -   stream.standard.medium
    --
    -- -   stream.standard.large
    --
    -- -   stream.compute.large
    --
    -- -   stream.compute.xlarge
    --
    -- -   stream.compute.2xlarge
    --
    -- -   stream.compute.4xlarge
    --
    -- -   stream.compute.8xlarge
    --
    -- -   stream.memory.large
    --
    -- -   stream.memory.xlarge
    --
    -- -   stream.memory.2xlarge
    --
    -- -   stream.memory.4xlarge
    --
    -- -   stream.memory.8xlarge
    --
    -- -   stream.memory.z1d.large
    --
    -- -   stream.memory.z1d.xlarge
    --
    -- -   stream.memory.z1d.2xlarge
    --
    -- -   stream.memory.z1d.3xlarge
    --
    -- -   stream.memory.z1d.6xlarge
    --
    -- -   stream.memory.z1d.12xlarge
    --
    -- -   stream.graphics-design.large
    --
    -- -   stream.graphics-design.xlarge
    --
    -- -   stream.graphics-design.2xlarge
    --
    -- -   stream.graphics-design.4xlarge
    --
    -- -   stream.graphics-desktop.2xlarge
    --
    -- -   stream.graphics.g4dn.xlarge
    --
    -- -   stream.graphics.g4dn.2xlarge
    --
    -- -   stream.graphics.g4dn.4xlarge
    --
    -- -   stream.graphics.g4dn.8xlarge
    --
    -- -   stream.graphics.g4dn.12xlarge
    --
    -- -   stream.graphics.g4dn.16xlarge
    --
    -- -   stream.graphics-pro.4xlarge
    --
    -- -   stream.graphics-pro.8xlarge
    --
    -- -   stream.graphics-pro.16xlarge
    Fleet -> Text
instanceType :: Prelude.Text,
    -- | The capacity status for the fleet.
    Fleet -> ComputeCapacityStatus
computeCapacityStatus :: ComputeCapacityStatus,
    -- | The current state for the fleet.
    Fleet -> FleetState
state :: FleetState
  }
  deriving (Fleet -> Fleet -> Bool
(Fleet -> Fleet -> Bool) -> (Fleet -> Fleet -> Bool) -> Eq Fleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fleet -> Fleet -> Bool
$c/= :: Fleet -> Fleet -> Bool
== :: Fleet -> Fleet -> Bool
$c== :: Fleet -> Fleet -> Bool
Prelude.Eq, ReadPrec [Fleet]
ReadPrec Fleet
Int -> ReadS Fleet
ReadS [Fleet]
(Int -> ReadS Fleet)
-> ReadS [Fleet]
-> ReadPrec Fleet
-> ReadPrec [Fleet]
-> Read Fleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fleet]
$creadListPrec :: ReadPrec [Fleet]
readPrec :: ReadPrec Fleet
$creadPrec :: ReadPrec Fleet
readList :: ReadS [Fleet]
$creadList :: ReadS [Fleet]
readsPrec :: Int -> ReadS Fleet
$creadsPrec :: Int -> ReadS Fleet
Prelude.Read, Int -> Fleet -> ShowS
[Fleet] -> ShowS
Fleet -> String
(Int -> Fleet -> ShowS)
-> (Fleet -> String) -> ([Fleet] -> ShowS) -> Show Fleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fleet] -> ShowS
$cshowList :: [Fleet] -> ShowS
show :: Fleet -> String
$cshow :: Fleet -> String
showsPrec :: Int -> Fleet -> ShowS
$cshowsPrec :: Int -> Fleet -> ShowS
Prelude.Show, (forall x. Fleet -> Rep Fleet x)
-> (forall x. Rep Fleet x -> Fleet) -> Generic Fleet
forall x. Rep Fleet x -> Fleet
forall x. Fleet -> Rep Fleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Fleet x -> Fleet
$cfrom :: forall x. Fleet -> Rep Fleet x
Prelude.Generic)

-- |
-- Create a value of 'Fleet' 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:
--
-- 'domainJoinInfo', 'fleet_domainJoinInfo' - The name of the directory and organizational unit (OU) to use to join
-- the fleet to a Microsoft Active Directory domain.
--
-- 'iamRoleArn', 'fleet_iamRoleArn' - The ARN of the IAM role that is applied to the fleet. To assume a role,
-- the fleet instance calls the AWS Security Token Service (STS)
-- @AssumeRole@ API operation and passes the ARN of the role to use. The
-- operation creates a new session with temporary credentials. AppStream
-- 2.0 retrieves the temporary credentials and creates the
-- __appstream_machine_role__ credential profile on the instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
-- in the /Amazon AppStream 2.0 Administration Guide/.
--
-- 'disconnectTimeoutInSeconds', 'fleet_disconnectTimeoutInSeconds' - The amount of time that a streaming session remains active after users
-- disconnect. If they try to reconnect to the streaming session after a
-- disconnection or network interruption within this time interval, they
-- are connected to their previous session. Otherwise, they are connected
-- to a new session with a new streaming instance.
--
-- Specify a value between 60 and 360000.
--
-- 'maxUserDurationInSeconds', 'fleet_maxUserDurationInSeconds' - The maximum amount of time that a streaming session can remain active,
-- in seconds. If users are still connected to a streaming instance five
-- minutes before this limit is reached, they are prompted to save any open
-- documents before being disconnected. After this time elapses, the
-- instance is terminated and replaced by a new instance.
--
-- Specify a value between 600 and 360000.
--
-- 'createdTime', 'fleet_createdTime' - The time the fleet was created.
--
-- 'idleDisconnectTimeoutInSeconds', 'fleet_idleDisconnectTimeoutInSeconds' - The amount of time that users can be idle (inactive) before they are
-- disconnected from their streaming session and the
-- @DisconnectTimeoutInSeconds@ time interval begins. Users are notified
-- before they are disconnected due to inactivity. If users try to
-- reconnect to the streaming session before the time interval specified in
-- @DisconnectTimeoutInSeconds@ elapses, they are connected to their
-- previous session. Users are considered idle when they stop providing
-- keyboard or mouse input during their streaming session. File uploads and
-- downloads, audio in, audio out, and pixels changing do not qualify as
-- user activity. If users continue to be idle after the time interval in
-- @IdleDisconnectTimeoutInSeconds@ elapses, they are disconnected.
--
-- To prevent users from being disconnected due to inactivity, specify a
-- value of 0. Otherwise, specify a value between 60 and 3600. The default
-- value is 0.
--
-- If you enable this feature, we recommend that you specify a value that
-- corresponds exactly to a whole number of minutes (for example, 60, 120,
-- and 180). If you don\'t do this, the value is rounded to the nearest
-- minute. For example, if you specify a value of 70, users are
-- disconnected after 1 minute of inactivity. If you specify a value that
-- is at the midpoint between two different minutes, the value is rounded
-- up. For example, if you specify a value of 90, users are disconnected
-- after 2 minutes of inactivity.
--
-- 'fleetType', 'fleet_fleetType' - The fleet type.
--
-- [ALWAYS_ON]
--     Provides users with instant-on access to their apps. You are charged
--     for all running instances in your fleet, even if no users are
--     streaming apps.
--
-- [ON_DEMAND]
--     Provide users with access to applications after they connect, which
--     takes one to two minutes. You are charged for instance streaming
--     when users are connected and a small hourly fee for instances that
--     are not streaming apps.
--
-- 'vpcConfig', 'fleet_vpcConfig' - The VPC configuration for the fleet.
--
-- 'imageArn', 'fleet_imageArn' - The ARN for the public, private, or shared image.
--
-- 'fleetErrors', 'fleet_fleetErrors' - The fleet errors.
--
-- 'displayName', 'fleet_displayName' - The fleet name to display.
--
-- 'enableDefaultInternetAccess', 'fleet_enableDefaultInternetAccess' - Indicates whether default internet access is enabled for the fleet.
--
-- 'imageName', 'fleet_imageName' - The name of the image used to create the fleet.
--
-- 'description', 'fleet_description' - The description to display.
--
-- 'streamView', 'fleet_streamView' - The AppStream 2.0 view that is displayed to your users when they stream
-- from the fleet. When @APP@ is specified, only the windows of
-- applications opened by users display. When @DESKTOP@ is specified, the
-- standard desktop that is provided by the operating system displays.
--
-- The default value is @APP@.
--
-- 'arn', 'fleet_arn' - The Amazon Resource Name (ARN) for the fleet.
--
-- 'name', 'fleet_name' - The name of the fleet.
--
-- 'instanceType', 'fleet_instanceType' - The instance type to use when launching fleet instances. The following
-- instance types are available:
--
-- -   stream.standard.small
--
-- -   stream.standard.medium
--
-- -   stream.standard.large
--
-- -   stream.compute.large
--
-- -   stream.compute.xlarge
--
-- -   stream.compute.2xlarge
--
-- -   stream.compute.4xlarge
--
-- -   stream.compute.8xlarge
--
-- -   stream.memory.large
--
-- -   stream.memory.xlarge
--
-- -   stream.memory.2xlarge
--
-- -   stream.memory.4xlarge
--
-- -   stream.memory.8xlarge
--
-- -   stream.memory.z1d.large
--
-- -   stream.memory.z1d.xlarge
--
-- -   stream.memory.z1d.2xlarge
--
-- -   stream.memory.z1d.3xlarge
--
-- -   stream.memory.z1d.6xlarge
--
-- -   stream.memory.z1d.12xlarge
--
-- -   stream.graphics-design.large
--
-- -   stream.graphics-design.xlarge
--
-- -   stream.graphics-design.2xlarge
--
-- -   stream.graphics-design.4xlarge
--
-- -   stream.graphics-desktop.2xlarge
--
-- -   stream.graphics.g4dn.xlarge
--
-- -   stream.graphics.g4dn.2xlarge
--
-- -   stream.graphics.g4dn.4xlarge
--
-- -   stream.graphics.g4dn.8xlarge
--
-- -   stream.graphics.g4dn.12xlarge
--
-- -   stream.graphics.g4dn.16xlarge
--
-- -   stream.graphics-pro.4xlarge
--
-- -   stream.graphics-pro.8xlarge
--
-- -   stream.graphics-pro.16xlarge
--
-- 'computeCapacityStatus', 'fleet_computeCapacityStatus' - The capacity status for the fleet.
--
-- 'state', 'fleet_state' - The current state for the fleet.
newFleet ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'instanceType'
  Prelude.Text ->
  -- | 'computeCapacityStatus'
  ComputeCapacityStatus ->
  -- | 'state'
  FleetState ->
  Fleet
newFleet :: Text
-> Text -> Text -> ComputeCapacityStatus -> FleetState -> Fleet
newFleet
  Text
pArn_
  Text
pName_
  Text
pInstanceType_
  ComputeCapacityStatus
pComputeCapacityStatus_
  FleetState
pState_ =
    Fleet' :: Maybe DomainJoinInfo
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe Int
-> Maybe FleetType
-> Maybe VpcConfig
-> Maybe Text
-> Maybe [FleetError]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StreamView
-> Text
-> Text
-> Text
-> ComputeCapacityStatus
-> FleetState
-> Fleet
Fleet'
      { $sel:domainJoinInfo:Fleet' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:iamRoleArn:Fleet' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:disconnectTimeoutInSeconds:Fleet' :: Maybe Int
disconnectTimeoutInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:maxUserDurationInSeconds:Fleet' :: Maybe Int
maxUserDurationInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:createdTime:Fleet' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:idleDisconnectTimeoutInSeconds:Fleet' :: Maybe Int
idleDisconnectTimeoutInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:fleetType:Fleet' :: Maybe FleetType
fleetType = Maybe FleetType
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:Fleet' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:imageArn:Fleet' :: Maybe Text
imageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fleetErrors:Fleet' :: Maybe [FleetError]
fleetErrors = Maybe [FleetError]
forall a. Maybe a
Prelude.Nothing,
        $sel:displayName:Fleet' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:enableDefaultInternetAccess:Fleet' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:imageName:Fleet' :: Maybe Text
imageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:Fleet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:streamView:Fleet' :: Maybe StreamView
streamView = Maybe StreamView
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:Fleet' :: Text
arn = Text
pArn_,
        $sel:name:Fleet' :: Text
name = Text
pName_,
        $sel:instanceType:Fleet' :: Text
instanceType = Text
pInstanceType_,
        $sel:computeCapacityStatus:Fleet' :: ComputeCapacityStatus
computeCapacityStatus = ComputeCapacityStatus
pComputeCapacityStatus_,
        $sel:state:Fleet' :: FleetState
state = FleetState
pState_
      }

-- | The name of the directory and organizational unit (OU) to use to join
-- the fleet to a Microsoft Active Directory domain.
fleet_domainJoinInfo :: Lens.Lens' Fleet (Prelude.Maybe DomainJoinInfo)
fleet_domainJoinInfo :: (Maybe DomainJoinInfo -> f (Maybe DomainJoinInfo))
-> Fleet -> f Fleet
fleet_domainJoinInfo = (Fleet -> Maybe DomainJoinInfo)
-> (Fleet -> Maybe DomainJoinInfo -> Fleet)
-> Lens Fleet Fleet (Maybe DomainJoinInfo) (Maybe DomainJoinInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe DomainJoinInfo
domainJoinInfo :: Maybe DomainJoinInfo
$sel:domainJoinInfo:Fleet' :: Fleet -> Maybe DomainJoinInfo
domainJoinInfo} -> Maybe DomainJoinInfo
domainJoinInfo) (\s :: Fleet
s@Fleet' {} Maybe DomainJoinInfo
a -> Fleet
s {$sel:domainJoinInfo:Fleet' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
a} :: Fleet)

-- | The ARN of the IAM role that is applied to the fleet. To assume a role,
-- the fleet instance calls the AWS Security Token Service (STS)
-- @AssumeRole@ API operation and passes the ARN of the role to use. The
-- operation creates a new session with temporary credentials. AppStream
-- 2.0 retrieves the temporary credentials and creates the
-- __appstream_machine_role__ credential profile on the instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
-- in the /Amazon AppStream 2.0 Administration Guide/.
fleet_iamRoleArn :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_iamRoleArn :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_iamRoleArn = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:Fleet' :: Fleet -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:iamRoleArn:Fleet' :: Maybe Text
iamRoleArn = Maybe Text
a} :: Fleet)

-- | The amount of time that a streaming session remains active after users
-- disconnect. If they try to reconnect to the streaming session after a
-- disconnection or network interruption within this time interval, they
-- are connected to their previous session. Otherwise, they are connected
-- to a new session with a new streaming instance.
--
-- Specify a value between 60 and 360000.
fleet_disconnectTimeoutInSeconds :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Int)
fleet_disconnectTimeoutInSeconds :: (Maybe Int -> f (Maybe Int)) -> Fleet -> f Fleet
fleet_disconnectTimeoutInSeconds = (Fleet -> Maybe Int)
-> (Fleet -> Maybe Int -> Fleet)
-> Lens Fleet Fleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Int
disconnectTimeoutInSeconds :: Maybe Int
$sel:disconnectTimeoutInSeconds:Fleet' :: Fleet -> Maybe Int
disconnectTimeoutInSeconds} -> Maybe Int
disconnectTimeoutInSeconds) (\s :: Fleet
s@Fleet' {} Maybe Int
a -> Fleet
s {$sel:disconnectTimeoutInSeconds:Fleet' :: Maybe Int
disconnectTimeoutInSeconds = Maybe Int
a} :: Fleet)

-- | The maximum amount of time that a streaming session can remain active,
-- in seconds. If users are still connected to a streaming instance five
-- minutes before this limit is reached, they are prompted to save any open
-- documents before being disconnected. After this time elapses, the
-- instance is terminated and replaced by a new instance.
--
-- Specify a value between 600 and 360000.
fleet_maxUserDurationInSeconds :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Int)
fleet_maxUserDurationInSeconds :: (Maybe Int -> f (Maybe Int)) -> Fleet -> f Fleet
fleet_maxUserDurationInSeconds = (Fleet -> Maybe Int)
-> (Fleet -> Maybe Int -> Fleet)
-> Lens Fleet Fleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Int
maxUserDurationInSeconds :: Maybe Int
$sel:maxUserDurationInSeconds:Fleet' :: Fleet -> Maybe Int
maxUserDurationInSeconds} -> Maybe Int
maxUserDurationInSeconds) (\s :: Fleet
s@Fleet' {} Maybe Int
a -> Fleet
s {$sel:maxUserDurationInSeconds:Fleet' :: Maybe Int
maxUserDurationInSeconds = Maybe Int
a} :: Fleet)

-- | The time the fleet was created.
fleet_createdTime :: Lens.Lens' Fleet (Prelude.Maybe Prelude.UTCTime)
fleet_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Fleet -> f Fleet
fleet_createdTime = (Fleet -> Maybe POSIX)
-> (Fleet -> Maybe POSIX -> Fleet)
-> Lens Fleet Fleet (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:Fleet' :: Fleet -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: Fleet
s@Fleet' {} Maybe POSIX
a -> Fleet
s {$sel:createdTime:Fleet' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: Fleet) ((Maybe POSIX -> f (Maybe POSIX)) -> Fleet -> f Fleet)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Fleet
-> f Fleet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The amount of time that users can be idle (inactive) before they are
-- disconnected from their streaming session and the
-- @DisconnectTimeoutInSeconds@ time interval begins. Users are notified
-- before they are disconnected due to inactivity. If users try to
-- reconnect to the streaming session before the time interval specified in
-- @DisconnectTimeoutInSeconds@ elapses, they are connected to their
-- previous session. Users are considered idle when they stop providing
-- keyboard or mouse input during their streaming session. File uploads and
-- downloads, audio in, audio out, and pixels changing do not qualify as
-- user activity. If users continue to be idle after the time interval in
-- @IdleDisconnectTimeoutInSeconds@ elapses, they are disconnected.
--
-- To prevent users from being disconnected due to inactivity, specify a
-- value of 0. Otherwise, specify a value between 60 and 3600. The default
-- value is 0.
--
-- If you enable this feature, we recommend that you specify a value that
-- corresponds exactly to a whole number of minutes (for example, 60, 120,
-- and 180). If you don\'t do this, the value is rounded to the nearest
-- minute. For example, if you specify a value of 70, users are
-- disconnected after 1 minute of inactivity. If you specify a value that
-- is at the midpoint between two different minutes, the value is rounded
-- up. For example, if you specify a value of 90, users are disconnected
-- after 2 minutes of inactivity.
fleet_idleDisconnectTimeoutInSeconds :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Int)
fleet_idleDisconnectTimeoutInSeconds :: (Maybe Int -> f (Maybe Int)) -> Fleet -> f Fleet
fleet_idleDisconnectTimeoutInSeconds = (Fleet -> Maybe Int)
-> (Fleet -> Maybe Int -> Fleet)
-> Lens Fleet Fleet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Int
idleDisconnectTimeoutInSeconds :: Maybe Int
$sel:idleDisconnectTimeoutInSeconds:Fleet' :: Fleet -> Maybe Int
idleDisconnectTimeoutInSeconds} -> Maybe Int
idleDisconnectTimeoutInSeconds) (\s :: Fleet
s@Fleet' {} Maybe Int
a -> Fleet
s {$sel:idleDisconnectTimeoutInSeconds:Fleet' :: Maybe Int
idleDisconnectTimeoutInSeconds = Maybe Int
a} :: Fleet)

-- | The fleet type.
--
-- [ALWAYS_ON]
--     Provides users with instant-on access to their apps. You are charged
--     for all running instances in your fleet, even if no users are
--     streaming apps.
--
-- [ON_DEMAND]
--     Provide users with access to applications after they connect, which
--     takes one to two minutes. You are charged for instance streaming
--     when users are connected and a small hourly fee for instances that
--     are not streaming apps.
fleet_fleetType :: Lens.Lens' Fleet (Prelude.Maybe FleetType)
fleet_fleetType :: (Maybe FleetType -> f (Maybe FleetType)) -> Fleet -> f Fleet
fleet_fleetType = (Fleet -> Maybe FleetType)
-> (Fleet -> Maybe FleetType -> Fleet)
-> Lens Fleet Fleet (Maybe FleetType) (Maybe FleetType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe FleetType
fleetType :: Maybe FleetType
$sel:fleetType:Fleet' :: Fleet -> Maybe FleetType
fleetType} -> Maybe FleetType
fleetType) (\s :: Fleet
s@Fleet' {} Maybe FleetType
a -> Fleet
s {$sel:fleetType:Fleet' :: Maybe FleetType
fleetType = Maybe FleetType
a} :: Fleet)

-- | The VPC configuration for the fleet.
fleet_vpcConfig :: Lens.Lens' Fleet (Prelude.Maybe VpcConfig)
fleet_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig)) -> Fleet -> f Fleet
fleet_vpcConfig = (Fleet -> Maybe VpcConfig)
-> (Fleet -> Maybe VpcConfig -> Fleet)
-> Lens Fleet Fleet (Maybe VpcConfig) (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:Fleet' :: Fleet -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: Fleet
s@Fleet' {} Maybe VpcConfig
a -> Fleet
s {$sel:vpcConfig:Fleet' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: Fleet)

-- | The ARN for the public, private, or shared image.
fleet_imageArn :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_imageArn :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_imageArn = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
imageArn :: Maybe Text
$sel:imageArn:Fleet' :: Fleet -> Maybe Text
imageArn} -> Maybe Text
imageArn) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:imageArn:Fleet' :: Maybe Text
imageArn = Maybe Text
a} :: Fleet)

-- | The fleet errors.
fleet_fleetErrors :: Lens.Lens' Fleet (Prelude.Maybe [FleetError])
fleet_fleetErrors :: (Maybe [FleetError] -> f (Maybe [FleetError])) -> Fleet -> f Fleet
fleet_fleetErrors = (Fleet -> Maybe [FleetError])
-> (Fleet -> Maybe [FleetError] -> Fleet)
-> Lens Fleet Fleet (Maybe [FleetError]) (Maybe [FleetError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe [FleetError]
fleetErrors :: Maybe [FleetError]
$sel:fleetErrors:Fleet' :: Fleet -> Maybe [FleetError]
fleetErrors} -> Maybe [FleetError]
fleetErrors) (\s :: Fleet
s@Fleet' {} Maybe [FleetError]
a -> Fleet
s {$sel:fleetErrors:Fleet' :: Maybe [FleetError]
fleetErrors = Maybe [FleetError]
a} :: Fleet) ((Maybe [FleetError] -> f (Maybe [FleetError]))
 -> Fleet -> f Fleet)
-> ((Maybe [FleetError] -> f (Maybe [FleetError]))
    -> Maybe [FleetError] -> f (Maybe [FleetError]))
-> (Maybe [FleetError] -> f (Maybe [FleetError]))
-> Fleet
-> f Fleet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [FleetError] [FleetError] [FleetError] [FleetError]
-> Iso
     (Maybe [FleetError])
     (Maybe [FleetError])
     (Maybe [FleetError])
     (Maybe [FleetError])
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 [FleetError] [FleetError] [FleetError] [FleetError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The fleet name to display.
fleet_displayName :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_displayName :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_displayName = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
displayName :: Maybe Text
$sel:displayName:Fleet' :: Fleet -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:displayName:Fleet' :: Maybe Text
displayName = Maybe Text
a} :: Fleet)

-- | Indicates whether default internet access is enabled for the fleet.
fleet_enableDefaultInternetAccess :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Bool)
fleet_enableDefaultInternetAccess :: (Maybe Bool -> f (Maybe Bool)) -> Fleet -> f Fleet
fleet_enableDefaultInternetAccess = (Fleet -> Maybe Bool)
-> (Fleet -> Maybe Bool -> Fleet)
-> Lens Fleet Fleet (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Bool
enableDefaultInternetAccess :: Maybe Bool
$sel:enableDefaultInternetAccess:Fleet' :: Fleet -> Maybe Bool
enableDefaultInternetAccess} -> Maybe Bool
enableDefaultInternetAccess) (\s :: Fleet
s@Fleet' {} Maybe Bool
a -> Fleet
s {$sel:enableDefaultInternetAccess:Fleet' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
a} :: Fleet)

-- | The name of the image used to create the fleet.
fleet_imageName :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_imageName :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_imageName = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
imageName :: Maybe Text
$sel:imageName:Fleet' :: Fleet -> Maybe Text
imageName} -> Maybe Text
imageName) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:imageName:Fleet' :: Maybe Text
imageName = Maybe Text
a} :: Fleet)

-- | The description to display.
fleet_description :: Lens.Lens' Fleet (Prelude.Maybe Prelude.Text)
fleet_description :: (Maybe Text -> f (Maybe Text)) -> Fleet -> f Fleet
fleet_description = (Fleet -> Maybe Text)
-> (Fleet -> Maybe Text -> Fleet)
-> Lens Fleet Fleet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe Text
description :: Maybe Text
$sel:description:Fleet' :: Fleet -> Maybe Text
description} -> Maybe Text
description) (\s :: Fleet
s@Fleet' {} Maybe Text
a -> Fleet
s {$sel:description:Fleet' :: Maybe Text
description = Maybe Text
a} :: Fleet)

-- | The AppStream 2.0 view that is displayed to your users when they stream
-- from the fleet. When @APP@ is specified, only the windows of
-- applications opened by users display. When @DESKTOP@ is specified, the
-- standard desktop that is provided by the operating system displays.
--
-- The default value is @APP@.
fleet_streamView :: Lens.Lens' Fleet (Prelude.Maybe StreamView)
fleet_streamView :: (Maybe StreamView -> f (Maybe StreamView)) -> Fleet -> f Fleet
fleet_streamView = (Fleet -> Maybe StreamView)
-> (Fleet -> Maybe StreamView -> Fleet)
-> Lens Fleet Fleet (Maybe StreamView) (Maybe StreamView)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Maybe StreamView
streamView :: Maybe StreamView
$sel:streamView:Fleet' :: Fleet -> Maybe StreamView
streamView} -> Maybe StreamView
streamView) (\s :: Fleet
s@Fleet' {} Maybe StreamView
a -> Fleet
s {$sel:streamView:Fleet' :: Maybe StreamView
streamView = Maybe StreamView
a} :: Fleet)

-- | The Amazon Resource Name (ARN) for the fleet.
fleet_arn :: Lens.Lens' Fleet Prelude.Text
fleet_arn :: (Text -> f Text) -> Fleet -> f Fleet
fleet_arn = (Fleet -> Text)
-> (Fleet -> Text -> Fleet) -> Lens Fleet Fleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Text
arn :: Text
$sel:arn:Fleet' :: Fleet -> Text
arn} -> Text
arn) (\s :: Fleet
s@Fleet' {} Text
a -> Fleet
s {$sel:arn:Fleet' :: Text
arn = Text
a} :: Fleet)

-- | The name of the fleet.
fleet_name :: Lens.Lens' Fleet Prelude.Text
fleet_name :: (Text -> f Text) -> Fleet -> f Fleet
fleet_name = (Fleet -> Text)
-> (Fleet -> Text -> Fleet) -> Lens Fleet Fleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Text
name :: Text
$sel:name:Fleet' :: Fleet -> Text
name} -> Text
name) (\s :: Fleet
s@Fleet' {} Text
a -> Fleet
s {$sel:name:Fleet' :: Text
name = Text
a} :: Fleet)

-- | The instance type to use when launching fleet instances. The following
-- instance types are available:
--
-- -   stream.standard.small
--
-- -   stream.standard.medium
--
-- -   stream.standard.large
--
-- -   stream.compute.large
--
-- -   stream.compute.xlarge
--
-- -   stream.compute.2xlarge
--
-- -   stream.compute.4xlarge
--
-- -   stream.compute.8xlarge
--
-- -   stream.memory.large
--
-- -   stream.memory.xlarge
--
-- -   stream.memory.2xlarge
--
-- -   stream.memory.4xlarge
--
-- -   stream.memory.8xlarge
--
-- -   stream.memory.z1d.large
--
-- -   stream.memory.z1d.xlarge
--
-- -   stream.memory.z1d.2xlarge
--
-- -   stream.memory.z1d.3xlarge
--
-- -   stream.memory.z1d.6xlarge
--
-- -   stream.memory.z1d.12xlarge
--
-- -   stream.graphics-design.large
--
-- -   stream.graphics-design.xlarge
--
-- -   stream.graphics-design.2xlarge
--
-- -   stream.graphics-design.4xlarge
--
-- -   stream.graphics-desktop.2xlarge
--
-- -   stream.graphics.g4dn.xlarge
--
-- -   stream.graphics.g4dn.2xlarge
--
-- -   stream.graphics.g4dn.4xlarge
--
-- -   stream.graphics.g4dn.8xlarge
--
-- -   stream.graphics.g4dn.12xlarge
--
-- -   stream.graphics.g4dn.16xlarge
--
-- -   stream.graphics-pro.4xlarge
--
-- -   stream.graphics-pro.8xlarge
--
-- -   stream.graphics-pro.16xlarge
fleet_instanceType :: Lens.Lens' Fleet Prelude.Text
fleet_instanceType :: (Text -> f Text) -> Fleet -> f Fleet
fleet_instanceType = (Fleet -> Text)
-> (Fleet -> Text -> Fleet) -> Lens Fleet Fleet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {Text
instanceType :: Text
$sel:instanceType:Fleet' :: Fleet -> Text
instanceType} -> Text
instanceType) (\s :: Fleet
s@Fleet' {} Text
a -> Fleet
s {$sel:instanceType:Fleet' :: Text
instanceType = Text
a} :: Fleet)

-- | The capacity status for the fleet.
fleet_computeCapacityStatus :: Lens.Lens' Fleet ComputeCapacityStatus
fleet_computeCapacityStatus :: (ComputeCapacityStatus -> f ComputeCapacityStatus)
-> Fleet -> f Fleet
fleet_computeCapacityStatus = (Fleet -> ComputeCapacityStatus)
-> (Fleet -> ComputeCapacityStatus -> Fleet)
-> Lens Fleet Fleet ComputeCapacityStatus ComputeCapacityStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {ComputeCapacityStatus
computeCapacityStatus :: ComputeCapacityStatus
$sel:computeCapacityStatus:Fleet' :: Fleet -> ComputeCapacityStatus
computeCapacityStatus} -> ComputeCapacityStatus
computeCapacityStatus) (\s :: Fleet
s@Fleet' {} ComputeCapacityStatus
a -> Fleet
s {$sel:computeCapacityStatus:Fleet' :: ComputeCapacityStatus
computeCapacityStatus = ComputeCapacityStatus
a} :: Fleet)

-- | The current state for the fleet.
fleet_state :: Lens.Lens' Fleet FleetState
fleet_state :: (FleetState -> f FleetState) -> Fleet -> f Fleet
fleet_state = (Fleet -> FleetState)
-> (Fleet -> FleetState -> Fleet)
-> Lens Fleet Fleet FleetState FleetState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fleet' {FleetState
state :: FleetState
$sel:state:Fleet' :: Fleet -> FleetState
state} -> FleetState
state) (\s :: Fleet
s@Fleet' {} FleetState
a -> Fleet
s {$sel:state:Fleet' :: FleetState
state = FleetState
a} :: Fleet)

instance Core.FromJSON Fleet where
  parseJSON :: Value -> Parser Fleet
parseJSON =
    String -> (Object -> Parser Fleet) -> Value -> Parser Fleet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Fleet"
      ( \Object
x ->
          Maybe DomainJoinInfo
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe Int
-> Maybe FleetType
-> Maybe VpcConfig
-> Maybe Text
-> Maybe [FleetError]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StreamView
-> Text
-> Text
-> Text
-> ComputeCapacityStatus
-> FleetState
-> Fleet
Fleet'
            (Maybe DomainJoinInfo
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe POSIX
 -> Maybe Int
 -> Maybe FleetType
 -> Maybe VpcConfig
 -> Maybe Text
 -> Maybe [FleetError]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe StreamView
 -> Text
 -> Text
 -> Text
 -> ComputeCapacityStatus
 -> FleetState
 -> Fleet)
-> Parser (Maybe DomainJoinInfo)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DomainJoinInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainJoinInfo")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IamRoleArn")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisconnectTimeoutInSeconds")
            Parser
  (Maybe Int
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Int)
-> Parser
     (Maybe POSIX
      -> Maybe Int
      -> Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxUserDurationInSeconds")
            Parser
  (Maybe POSIX
   -> Maybe Int
   -> Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Int
      -> Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe Int
   -> Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Int)
-> Parser
     (Maybe FleetType
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdleDisconnectTimeoutInSeconds")
            Parser
  (Maybe FleetType
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe FleetType)
-> Parser
     (Maybe VpcConfig
      -> Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FleetType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetType")
            Parser
  (Maybe VpcConfig
   -> Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe VpcConfig)
-> Parser
     (Maybe Text
      -> Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcConfig")
            Parser
  (Maybe Text
   -> Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Text)
-> Parser
     (Maybe [FleetError]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImageArn")
            Parser
  (Maybe [FleetError]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe [FleetError])
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [FleetError]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetErrors" Parser (Maybe (Maybe [FleetError]))
-> Maybe [FleetError] -> Parser (Maybe [FleetError])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [FleetError]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisplayName")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableDefaultInternetAccess")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImageName")
            Parser
  (Maybe Text
   -> Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe Text)
-> Parser
     (Maybe StreamView
      -> Text
      -> Text
      -> Text
      -> ComputeCapacityStatus
      -> FleetState
      -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser
  (Maybe StreamView
   -> Text
   -> Text
   -> Text
   -> ComputeCapacityStatus
   -> FleetState
   -> Fleet)
-> Parser (Maybe StreamView)
-> Parser
     (Text
      -> Text -> Text -> ComputeCapacityStatus -> FleetState -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamView)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StreamView")
            Parser
  (Text
   -> Text -> Text -> ComputeCapacityStatus -> FleetState -> Fleet)
-> Parser Text
-> Parser
     (Text -> Text -> ComputeCapacityStatus -> FleetState -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
            Parser
  (Text -> Text -> ComputeCapacityStatus -> FleetState -> Fleet)
-> Parser Text
-> Parser (Text -> ComputeCapacityStatus -> FleetState -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
            Parser (Text -> ComputeCapacityStatus -> FleetState -> Fleet)
-> Parser Text
-> Parser (ComputeCapacityStatus -> FleetState -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"InstanceType")
            Parser (ComputeCapacityStatus -> FleetState -> Fleet)
-> Parser ComputeCapacityStatus -> Parser (FleetState -> Fleet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ComputeCapacityStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ComputeCapacityStatus")
            Parser (FleetState -> Fleet) -> Parser FleetState -> Parser Fleet
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser FleetState
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"State")
      )

instance Prelude.Hashable Fleet

instance Prelude.NFData Fleet