{-# 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.OpsWorks.Types.InstancesCount
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.OpsWorks.Types.InstancesCount where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Describes how many instances a stack has for each status.
--
-- /See:/ 'newInstancesCount' smart constructor.
data InstancesCount = InstancesCount'
  { -- | The number of instances in the Assigning state.
    InstancesCount -> Maybe Int
assigning :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @booting@ status.
    InstancesCount -> Maybe Int
booting :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @connection_lost@ status.
    InstancesCount -> Maybe Int
connectionLost :: Prelude.Maybe Prelude.Int,
    -- | The number of instances in the Deregistering state.
    InstancesCount -> Maybe Int
deregistering :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @online@ status.
    InstancesCount -> Maybe Int
online :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @pending@ status.
    InstancesCount -> Maybe Int
pending :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @rebooting@ status.
    InstancesCount -> Maybe Int
rebooting :: Prelude.Maybe Prelude.Int,
    -- | The number of instances in the Registered state.
    InstancesCount -> Maybe Int
registered :: Prelude.Maybe Prelude.Int,
    -- | The number of instances in the Registering state.
    InstancesCount -> Maybe Int
registering :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @requested@ status.
    InstancesCount -> Maybe Int
requested :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @running_setup@ status.
    InstancesCount -> Maybe Int
runningSetup :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @setup_failed@ status.
    InstancesCount -> Maybe Int
setupFailed :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @shutting_down@ status.
    InstancesCount -> Maybe Int
shuttingDown :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @start_failed@ status.
    InstancesCount -> Maybe Int
startFailed :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @stop_failed@ status.
    InstancesCount -> Maybe Int
stopFailed :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @stopped@ status.
    InstancesCount -> Maybe Int
stopped :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @stopping@ status.
    InstancesCount -> Maybe Int
stopping :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @terminated@ status.
    InstancesCount -> Maybe Int
terminated :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with @terminating@ status.
    InstancesCount -> Maybe Int
terminating :: Prelude.Maybe Prelude.Int,
    -- | The number of instances in the Unassigning state.
    InstancesCount -> Maybe Int
unassigning :: Prelude.Maybe Prelude.Int
  }
  deriving (InstancesCount -> InstancesCount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstancesCount -> InstancesCount -> Bool
$c/= :: InstancesCount -> InstancesCount -> Bool
== :: InstancesCount -> InstancesCount -> Bool
$c== :: InstancesCount -> InstancesCount -> Bool
Prelude.Eq, ReadPrec [InstancesCount]
ReadPrec InstancesCount
Int -> ReadS InstancesCount
ReadS [InstancesCount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstancesCount]
$creadListPrec :: ReadPrec [InstancesCount]
readPrec :: ReadPrec InstancesCount
$creadPrec :: ReadPrec InstancesCount
readList :: ReadS [InstancesCount]
$creadList :: ReadS [InstancesCount]
readsPrec :: Int -> ReadS InstancesCount
$creadsPrec :: Int -> ReadS InstancesCount
Prelude.Read, Int -> InstancesCount -> ShowS
[InstancesCount] -> ShowS
InstancesCount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstancesCount] -> ShowS
$cshowList :: [InstancesCount] -> ShowS
show :: InstancesCount -> String
$cshow :: InstancesCount -> String
showsPrec :: Int -> InstancesCount -> ShowS
$cshowsPrec :: Int -> InstancesCount -> ShowS
Prelude.Show, forall x. Rep InstancesCount x -> InstancesCount
forall x. InstancesCount -> Rep InstancesCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstancesCount x -> InstancesCount
$cfrom :: forall x. InstancesCount -> Rep InstancesCount x
Prelude.Generic)

-- |
-- Create a value of 'InstancesCount' 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:
--
-- 'assigning', 'instancesCount_assigning' - The number of instances in the Assigning state.
--
-- 'booting', 'instancesCount_booting' - The number of instances with @booting@ status.
--
-- 'connectionLost', 'instancesCount_connectionLost' - The number of instances with @connection_lost@ status.
--
-- 'deregistering', 'instancesCount_deregistering' - The number of instances in the Deregistering state.
--
-- 'online', 'instancesCount_online' - The number of instances with @online@ status.
--
-- 'pending', 'instancesCount_pending' - The number of instances with @pending@ status.
--
-- 'rebooting', 'instancesCount_rebooting' - The number of instances with @rebooting@ status.
--
-- 'registered', 'instancesCount_registered' - The number of instances in the Registered state.
--
-- 'registering', 'instancesCount_registering' - The number of instances in the Registering state.
--
-- 'requested', 'instancesCount_requested' - The number of instances with @requested@ status.
--
-- 'runningSetup', 'instancesCount_runningSetup' - The number of instances with @running_setup@ status.
--
-- 'setupFailed', 'instancesCount_setupFailed' - The number of instances with @setup_failed@ status.
--
-- 'shuttingDown', 'instancesCount_shuttingDown' - The number of instances with @shutting_down@ status.
--
-- 'startFailed', 'instancesCount_startFailed' - The number of instances with @start_failed@ status.
--
-- 'stopFailed', 'instancesCount_stopFailed' - The number of instances with @stop_failed@ status.
--
-- 'stopped', 'instancesCount_stopped' - The number of instances with @stopped@ status.
--
-- 'stopping', 'instancesCount_stopping' - The number of instances with @stopping@ status.
--
-- 'terminated', 'instancesCount_terminated' - The number of instances with @terminated@ status.
--
-- 'terminating', 'instancesCount_terminating' - The number of instances with @terminating@ status.
--
-- 'unassigning', 'instancesCount_unassigning' - The number of instances in the Unassigning state.
newInstancesCount ::
  InstancesCount
newInstancesCount :: InstancesCount
newInstancesCount =
  InstancesCount'
    { $sel:assigning:InstancesCount' :: Maybe Int
assigning = forall a. Maybe a
Prelude.Nothing,
      $sel:booting:InstancesCount' :: Maybe Int
booting = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionLost:InstancesCount' :: Maybe Int
connectionLost = forall a. Maybe a
Prelude.Nothing,
      $sel:deregistering:InstancesCount' :: Maybe Int
deregistering = forall a. Maybe a
Prelude.Nothing,
      $sel:online:InstancesCount' :: Maybe Int
online = forall a. Maybe a
Prelude.Nothing,
      $sel:pending:InstancesCount' :: Maybe Int
pending = forall a. Maybe a
Prelude.Nothing,
      $sel:rebooting:InstancesCount' :: Maybe Int
rebooting = forall a. Maybe a
Prelude.Nothing,
      $sel:registered:InstancesCount' :: Maybe Int
registered = forall a. Maybe a
Prelude.Nothing,
      $sel:registering:InstancesCount' :: Maybe Int
registering = forall a. Maybe a
Prelude.Nothing,
      $sel:requested:InstancesCount' :: Maybe Int
requested = forall a. Maybe a
Prelude.Nothing,
      $sel:runningSetup:InstancesCount' :: Maybe Int
runningSetup = forall a. Maybe a
Prelude.Nothing,
      $sel:setupFailed:InstancesCount' :: Maybe Int
setupFailed = forall a. Maybe a
Prelude.Nothing,
      $sel:shuttingDown:InstancesCount' :: Maybe Int
shuttingDown = forall a. Maybe a
Prelude.Nothing,
      $sel:startFailed:InstancesCount' :: Maybe Int
startFailed = forall a. Maybe a
Prelude.Nothing,
      $sel:stopFailed:InstancesCount' :: Maybe Int
stopFailed = forall a. Maybe a
Prelude.Nothing,
      $sel:stopped:InstancesCount' :: Maybe Int
stopped = forall a. Maybe a
Prelude.Nothing,
      $sel:stopping:InstancesCount' :: Maybe Int
stopping = forall a. Maybe a
Prelude.Nothing,
      $sel:terminated:InstancesCount' :: Maybe Int
terminated = forall a. Maybe a
Prelude.Nothing,
      $sel:terminating:InstancesCount' :: Maybe Int
terminating = forall a. Maybe a
Prelude.Nothing,
      $sel:unassigning:InstancesCount' :: Maybe Int
unassigning = forall a. Maybe a
Prelude.Nothing
    }

-- | The number of instances in the Assigning state.
instancesCount_assigning :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_assigning :: Lens' InstancesCount (Maybe Int)
instancesCount_assigning = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
assigning :: Maybe Int
$sel:assigning:InstancesCount' :: InstancesCount -> Maybe Int
assigning} -> Maybe Int
assigning) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:assigning:InstancesCount' :: Maybe Int
assigning = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @booting@ status.
instancesCount_booting :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_booting :: Lens' InstancesCount (Maybe Int)
instancesCount_booting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
booting :: Maybe Int
$sel:booting:InstancesCount' :: InstancesCount -> Maybe Int
booting} -> Maybe Int
booting) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:booting:InstancesCount' :: Maybe Int
booting = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @connection_lost@ status.
instancesCount_connectionLost :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_connectionLost :: Lens' InstancesCount (Maybe Int)
instancesCount_connectionLost = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
connectionLost :: Maybe Int
$sel:connectionLost:InstancesCount' :: InstancesCount -> Maybe Int
connectionLost} -> Maybe Int
connectionLost) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:connectionLost:InstancesCount' :: Maybe Int
connectionLost = Maybe Int
a} :: InstancesCount)

-- | The number of instances in the Deregistering state.
instancesCount_deregistering :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_deregistering :: Lens' InstancesCount (Maybe Int)
instancesCount_deregistering = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
deregistering :: Maybe Int
$sel:deregistering:InstancesCount' :: InstancesCount -> Maybe Int
deregistering} -> Maybe Int
deregistering) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:deregistering:InstancesCount' :: Maybe Int
deregistering = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @online@ status.
instancesCount_online :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_online :: Lens' InstancesCount (Maybe Int)
instancesCount_online = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
online :: Maybe Int
$sel:online:InstancesCount' :: InstancesCount -> Maybe Int
online} -> Maybe Int
online) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:online:InstancesCount' :: Maybe Int
online = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @pending@ status.
instancesCount_pending :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_pending :: Lens' InstancesCount (Maybe Int)
instancesCount_pending = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
pending :: Maybe Int
$sel:pending:InstancesCount' :: InstancesCount -> Maybe Int
pending} -> Maybe Int
pending) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:pending:InstancesCount' :: Maybe Int
pending = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @rebooting@ status.
instancesCount_rebooting :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_rebooting :: Lens' InstancesCount (Maybe Int)
instancesCount_rebooting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
rebooting :: Maybe Int
$sel:rebooting:InstancesCount' :: InstancesCount -> Maybe Int
rebooting} -> Maybe Int
rebooting) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:rebooting:InstancesCount' :: Maybe Int
rebooting = Maybe Int
a} :: InstancesCount)

-- | The number of instances in the Registered state.
instancesCount_registered :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_registered :: Lens' InstancesCount (Maybe Int)
instancesCount_registered = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
registered :: Maybe Int
$sel:registered:InstancesCount' :: InstancesCount -> Maybe Int
registered} -> Maybe Int
registered) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:registered:InstancesCount' :: Maybe Int
registered = Maybe Int
a} :: InstancesCount)

-- | The number of instances in the Registering state.
instancesCount_registering :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_registering :: Lens' InstancesCount (Maybe Int)
instancesCount_registering = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
registering :: Maybe Int
$sel:registering:InstancesCount' :: InstancesCount -> Maybe Int
registering} -> Maybe Int
registering) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:registering:InstancesCount' :: Maybe Int
registering = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @requested@ status.
instancesCount_requested :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_requested :: Lens' InstancesCount (Maybe Int)
instancesCount_requested = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
requested :: Maybe Int
$sel:requested:InstancesCount' :: InstancesCount -> Maybe Int
requested} -> Maybe Int
requested) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:requested:InstancesCount' :: Maybe Int
requested = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @running_setup@ status.
instancesCount_runningSetup :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_runningSetup :: Lens' InstancesCount (Maybe Int)
instancesCount_runningSetup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
runningSetup :: Maybe Int
$sel:runningSetup:InstancesCount' :: InstancesCount -> Maybe Int
runningSetup} -> Maybe Int
runningSetup) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:runningSetup:InstancesCount' :: Maybe Int
runningSetup = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @setup_failed@ status.
instancesCount_setupFailed :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_setupFailed :: Lens' InstancesCount (Maybe Int)
instancesCount_setupFailed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
setupFailed :: Maybe Int
$sel:setupFailed:InstancesCount' :: InstancesCount -> Maybe Int
setupFailed} -> Maybe Int
setupFailed) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:setupFailed:InstancesCount' :: Maybe Int
setupFailed = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @shutting_down@ status.
instancesCount_shuttingDown :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_shuttingDown :: Lens' InstancesCount (Maybe Int)
instancesCount_shuttingDown = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
shuttingDown :: Maybe Int
$sel:shuttingDown:InstancesCount' :: InstancesCount -> Maybe Int
shuttingDown} -> Maybe Int
shuttingDown) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:shuttingDown:InstancesCount' :: Maybe Int
shuttingDown = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @start_failed@ status.
instancesCount_startFailed :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_startFailed :: Lens' InstancesCount (Maybe Int)
instancesCount_startFailed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
startFailed :: Maybe Int
$sel:startFailed:InstancesCount' :: InstancesCount -> Maybe Int
startFailed} -> Maybe Int
startFailed) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:startFailed:InstancesCount' :: Maybe Int
startFailed = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @stop_failed@ status.
instancesCount_stopFailed :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_stopFailed :: Lens' InstancesCount (Maybe Int)
instancesCount_stopFailed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
stopFailed :: Maybe Int
$sel:stopFailed:InstancesCount' :: InstancesCount -> Maybe Int
stopFailed} -> Maybe Int
stopFailed) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:stopFailed:InstancesCount' :: Maybe Int
stopFailed = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @stopped@ status.
instancesCount_stopped :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_stopped :: Lens' InstancesCount (Maybe Int)
instancesCount_stopped = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
stopped :: Maybe Int
$sel:stopped:InstancesCount' :: InstancesCount -> Maybe Int
stopped} -> Maybe Int
stopped) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:stopped:InstancesCount' :: Maybe Int
stopped = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @stopping@ status.
instancesCount_stopping :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_stopping :: Lens' InstancesCount (Maybe Int)
instancesCount_stopping = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
stopping :: Maybe Int
$sel:stopping:InstancesCount' :: InstancesCount -> Maybe Int
stopping} -> Maybe Int
stopping) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:stopping:InstancesCount' :: Maybe Int
stopping = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @terminated@ status.
instancesCount_terminated :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_terminated :: Lens' InstancesCount (Maybe Int)
instancesCount_terminated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
terminated :: Maybe Int
$sel:terminated:InstancesCount' :: InstancesCount -> Maybe Int
terminated} -> Maybe Int
terminated) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:terminated:InstancesCount' :: Maybe Int
terminated = Maybe Int
a} :: InstancesCount)

-- | The number of instances with @terminating@ status.
instancesCount_terminating :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_terminating :: Lens' InstancesCount (Maybe Int)
instancesCount_terminating = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
terminating :: Maybe Int
$sel:terminating:InstancesCount' :: InstancesCount -> Maybe Int
terminating} -> Maybe Int
terminating) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:terminating:InstancesCount' :: Maybe Int
terminating = Maybe Int
a} :: InstancesCount)

-- | The number of instances in the Unassigning state.
instancesCount_unassigning :: Lens.Lens' InstancesCount (Prelude.Maybe Prelude.Int)
instancesCount_unassigning :: Lens' InstancesCount (Maybe Int)
instancesCount_unassigning = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancesCount' {Maybe Int
unassigning :: Maybe Int
$sel:unassigning:InstancesCount' :: InstancesCount -> Maybe Int
unassigning} -> Maybe Int
unassigning) (\s :: InstancesCount
s@InstancesCount' {} Maybe Int
a -> InstancesCount
s {$sel:unassigning:InstancesCount' :: Maybe Int
unassigning = Maybe Int
a} :: InstancesCount)

instance Data.FromJSON InstancesCount where
  parseJSON :: Value -> Parser InstancesCount
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"InstancesCount"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstancesCount
InstancesCount'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Assigning")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Booting")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConnectionLost")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Deregistering")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Online")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Pending")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Rebooting")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Registered")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Registering")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Requested")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RunningSetup")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SetupFailed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ShuttingDown")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StartFailed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StopFailed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Stopped")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Stopping")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Terminated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Terminating")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Unassigning")
      )

instance Prelude.Hashable InstancesCount where
  hashWithSalt :: Int -> InstancesCount -> Int
hashWithSalt Int
_salt InstancesCount' {Maybe Int
unassigning :: Maybe Int
terminating :: Maybe Int
terminated :: Maybe Int
stopping :: Maybe Int
stopped :: Maybe Int
stopFailed :: Maybe Int
startFailed :: Maybe Int
shuttingDown :: Maybe Int
setupFailed :: Maybe Int
runningSetup :: Maybe Int
requested :: Maybe Int
registering :: Maybe Int
registered :: Maybe Int
rebooting :: Maybe Int
pending :: Maybe Int
online :: Maybe Int
deregistering :: Maybe Int
connectionLost :: Maybe Int
booting :: Maybe Int
assigning :: Maybe Int
$sel:unassigning:InstancesCount' :: InstancesCount -> Maybe Int
$sel:terminating:InstancesCount' :: InstancesCount -> Maybe Int
$sel:terminated:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopping:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopped:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:startFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:shuttingDown:InstancesCount' :: InstancesCount -> Maybe Int
$sel:setupFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:runningSetup:InstancesCount' :: InstancesCount -> Maybe Int
$sel:requested:InstancesCount' :: InstancesCount -> Maybe Int
$sel:registering:InstancesCount' :: InstancesCount -> Maybe Int
$sel:registered:InstancesCount' :: InstancesCount -> Maybe Int
$sel:rebooting:InstancesCount' :: InstancesCount -> Maybe Int
$sel:pending:InstancesCount' :: InstancesCount -> Maybe Int
$sel:online:InstancesCount' :: InstancesCount -> Maybe Int
$sel:deregistering:InstancesCount' :: InstancesCount -> Maybe Int
$sel:connectionLost:InstancesCount' :: InstancesCount -> Maybe Int
$sel:booting:InstancesCount' :: InstancesCount -> Maybe Int
$sel:assigning:InstancesCount' :: InstancesCount -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
assigning
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
booting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
connectionLost
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
deregistering
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
online
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pending
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
rebooting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
registered
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
registering
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
requested
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
runningSetup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
setupFailed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
shuttingDown
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
startFailed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
stopFailed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
stopped
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
stopping
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
terminated
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
terminating
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
unassigning

instance Prelude.NFData InstancesCount where
  rnf :: InstancesCount -> ()
rnf InstancesCount' {Maybe Int
unassigning :: Maybe Int
terminating :: Maybe Int
terminated :: Maybe Int
stopping :: Maybe Int
stopped :: Maybe Int
stopFailed :: Maybe Int
startFailed :: Maybe Int
shuttingDown :: Maybe Int
setupFailed :: Maybe Int
runningSetup :: Maybe Int
requested :: Maybe Int
registering :: Maybe Int
registered :: Maybe Int
rebooting :: Maybe Int
pending :: Maybe Int
online :: Maybe Int
deregistering :: Maybe Int
connectionLost :: Maybe Int
booting :: Maybe Int
assigning :: Maybe Int
$sel:unassigning:InstancesCount' :: InstancesCount -> Maybe Int
$sel:terminating:InstancesCount' :: InstancesCount -> Maybe Int
$sel:terminated:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopping:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopped:InstancesCount' :: InstancesCount -> Maybe Int
$sel:stopFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:startFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:shuttingDown:InstancesCount' :: InstancesCount -> Maybe Int
$sel:setupFailed:InstancesCount' :: InstancesCount -> Maybe Int
$sel:runningSetup:InstancesCount' :: InstancesCount -> Maybe Int
$sel:requested:InstancesCount' :: InstancesCount -> Maybe Int
$sel:registering:InstancesCount' :: InstancesCount -> Maybe Int
$sel:registered:InstancesCount' :: InstancesCount -> Maybe Int
$sel:rebooting:InstancesCount' :: InstancesCount -> Maybe Int
$sel:pending:InstancesCount' :: InstancesCount -> Maybe Int
$sel:online:InstancesCount' :: InstancesCount -> Maybe Int
$sel:deregistering:InstancesCount' :: InstancesCount -> Maybe Int
$sel:connectionLost:InstancesCount' :: InstancesCount -> Maybe Int
$sel:booting:InstancesCount' :: InstancesCount -> Maybe Int
$sel:assigning:InstancesCount' :: InstancesCount -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
assigning
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
booting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
connectionLost
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
deregistering
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
online
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pending
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
rebooting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
registered
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
registering
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
requested
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
runningSetup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
setupFailed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
shuttingDown
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
startFailed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
stopFailed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
stopped
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
stopping
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
terminated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
terminating
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
unassigning