{-# 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.ECS.Types.Container
-- 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.ECS.Types.Container where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECS.Types.HealthStatus
import Amazonka.ECS.Types.ManagedAgent
import Amazonka.ECS.Types.NetworkBinding
import Amazonka.ECS.Types.NetworkInterface
import qualified Amazonka.Prelude as Prelude

-- | A Docker container that\'s part of a task.
--
-- /See:/ 'newContainer' smart constructor.
data Container = Container'
  { -- | The Amazon Resource Name (ARN) of the container.
    Container -> Maybe Text
containerArn :: Prelude.Maybe Prelude.Text,
    -- | The number of CPU units set for the container. The value is @0@ if no
    -- value was specified in the container definition when the task definition
    -- was registered.
    Container -> Maybe Text
cpu :: Prelude.Maybe Prelude.Text,
    -- | The exit code returned from the container.
    Container -> Maybe Int
exitCode :: Prelude.Maybe Prelude.Int,
    -- | The IDs of each GPU assigned to the container.
    Container -> Maybe [Text]
gpuIds :: Prelude.Maybe [Prelude.Text],
    -- | The health status of the container. If health checks aren\'t configured
    -- for this container in its task definition, then it reports the health
    -- status as @UNKNOWN@.
    Container -> Maybe HealthStatus
healthStatus :: Prelude.Maybe HealthStatus,
    -- | The image used for the container.
    Container -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The container image manifest digest.
    --
    -- The @imageDigest@ is only returned if the container is using an image
    -- hosted in Amazon ECR, otherwise it is omitted.
    Container -> Maybe Text
imageDigest :: Prelude.Maybe Prelude.Text,
    -- | The last known status of the container.
    Container -> Maybe Text
lastStatus :: Prelude.Maybe Prelude.Text,
    -- | The details of any Amazon ECS managed agents associated with the
    -- container.
    Container -> Maybe [ManagedAgent]
managedAgents :: Prelude.Maybe [ManagedAgent],
    -- | The hard limit (in MiB) of memory set for the container.
    Container -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
    -- | The soft limit (in MiB) of memory set for the container.
    Container -> Maybe Text
memoryReservation :: Prelude.Maybe Prelude.Text,
    -- | The name of the container.
    Container -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The network bindings associated with the container.
    Container -> Maybe [NetworkBinding]
networkBindings :: Prelude.Maybe [NetworkBinding],
    -- | The network interfaces associated with the container.
    Container -> Maybe [NetworkInterface]
networkInterfaces :: Prelude.Maybe [NetworkInterface],
    -- | A short (255 max characters) human-readable string to provide additional
    -- details about a running or stopped container.
    Container -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Docker container.
    Container -> Maybe Text
runtimeId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the task.
    Container -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text
  }
  deriving (Container -> Container -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Container -> Container -> Bool
$c/= :: Container -> Container -> Bool
== :: Container -> Container -> Bool
$c== :: Container -> Container -> Bool
Prelude.Eq, ReadPrec [Container]
ReadPrec Container
Int -> ReadS Container
ReadS [Container]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Container]
$creadListPrec :: ReadPrec [Container]
readPrec :: ReadPrec Container
$creadPrec :: ReadPrec Container
readList :: ReadS [Container]
$creadList :: ReadS [Container]
readsPrec :: Int -> ReadS Container
$creadsPrec :: Int -> ReadS Container
Prelude.Read, Int -> Container -> ShowS
[Container] -> ShowS
Container -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Container] -> ShowS
$cshowList :: [Container] -> ShowS
show :: Container -> String
$cshow :: Container -> String
showsPrec :: Int -> Container -> ShowS
$cshowsPrec :: Int -> Container -> ShowS
Prelude.Show, forall x. Rep Container x -> Container
forall x. Container -> Rep Container x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Container x -> Container
$cfrom :: forall x. Container -> Rep Container x
Prelude.Generic)

-- |
-- Create a value of 'Container' 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:
--
-- 'containerArn', 'container_containerArn' - The Amazon Resource Name (ARN) of the container.
--
-- 'cpu', 'container_cpu' - The number of CPU units set for the container. The value is @0@ if no
-- value was specified in the container definition when the task definition
-- was registered.
--
-- 'exitCode', 'container_exitCode' - The exit code returned from the container.
--
-- 'gpuIds', 'container_gpuIds' - The IDs of each GPU assigned to the container.
--
-- 'healthStatus', 'container_healthStatus' - The health status of the container. If health checks aren\'t configured
-- for this container in its task definition, then it reports the health
-- status as @UNKNOWN@.
--
-- 'image', 'container_image' - The image used for the container.
--
-- 'imageDigest', 'container_imageDigest' - The container image manifest digest.
--
-- The @imageDigest@ is only returned if the container is using an image
-- hosted in Amazon ECR, otherwise it is omitted.
--
-- 'lastStatus', 'container_lastStatus' - The last known status of the container.
--
-- 'managedAgents', 'container_managedAgents' - The details of any Amazon ECS managed agents associated with the
-- container.
--
-- 'memory', 'container_memory' - The hard limit (in MiB) of memory set for the container.
--
-- 'memoryReservation', 'container_memoryReservation' - The soft limit (in MiB) of memory set for the container.
--
-- 'name', 'container_name' - The name of the container.
--
-- 'networkBindings', 'container_networkBindings' - The network bindings associated with the container.
--
-- 'networkInterfaces', 'container_networkInterfaces' - The network interfaces associated with the container.
--
-- 'reason', 'container_reason' - A short (255 max characters) human-readable string to provide additional
-- details about a running or stopped container.
--
-- 'runtimeId', 'container_runtimeId' - The ID of the Docker container.
--
-- 'taskArn', 'container_taskArn' - The ARN of the task.
newContainer ::
  Container
newContainer :: Container
newContainer =
  Container'
    { $sel:containerArn:Container' :: Maybe Text
containerArn = forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:Container' :: Maybe Text
cpu = forall a. Maybe a
Prelude.Nothing,
      $sel:exitCode:Container' :: Maybe Int
exitCode = forall a. Maybe a
Prelude.Nothing,
      $sel:gpuIds:Container' :: Maybe [Text]
gpuIds = forall a. Maybe a
Prelude.Nothing,
      $sel:healthStatus:Container' :: Maybe HealthStatus
healthStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:image:Container' :: Maybe Text
image = forall a. Maybe a
Prelude.Nothing,
      $sel:imageDigest:Container' :: Maybe Text
imageDigest = forall a. Maybe a
Prelude.Nothing,
      $sel:lastStatus:Container' :: Maybe Text
lastStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:managedAgents:Container' :: Maybe [ManagedAgent]
managedAgents = forall a. Maybe a
Prelude.Nothing,
      $sel:memory:Container' :: Maybe Text
memory = forall a. Maybe a
Prelude.Nothing,
      $sel:memoryReservation:Container' :: Maybe Text
memoryReservation = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Container' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:networkBindings:Container' :: Maybe [NetworkBinding]
networkBindings = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaces:Container' :: Maybe [NetworkInterface]
networkInterfaces = forall a. Maybe a
Prelude.Nothing,
      $sel:reason:Container' :: Maybe Text
reason = forall a. Maybe a
Prelude.Nothing,
      $sel:runtimeId:Container' :: Maybe Text
runtimeId = forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:Container' :: Maybe Text
taskArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the container.
container_containerArn :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_containerArn :: Lens' Container (Maybe Text)
container_containerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
containerArn :: Maybe Text
$sel:containerArn:Container' :: Container -> Maybe Text
containerArn} -> Maybe Text
containerArn) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:containerArn:Container' :: Maybe Text
containerArn = Maybe Text
a} :: Container)

-- | The number of CPU units set for the container. The value is @0@ if no
-- value was specified in the container definition when the task definition
-- was registered.
container_cpu :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_cpu :: Lens' Container (Maybe Text)
container_cpu = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
cpu :: Maybe Text
$sel:cpu:Container' :: Container -> Maybe Text
cpu} -> Maybe Text
cpu) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:cpu:Container' :: Maybe Text
cpu = Maybe Text
a} :: Container)

-- | The exit code returned from the container.
container_exitCode :: Lens.Lens' Container (Prelude.Maybe Prelude.Int)
container_exitCode :: Lens' Container (Maybe Int)
container_exitCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Int
exitCode :: Maybe Int
$sel:exitCode:Container' :: Container -> Maybe Int
exitCode} -> Maybe Int
exitCode) (\s :: Container
s@Container' {} Maybe Int
a -> Container
s {$sel:exitCode:Container' :: Maybe Int
exitCode = Maybe Int
a} :: Container)

-- | The IDs of each GPU assigned to the container.
container_gpuIds :: Lens.Lens' Container (Prelude.Maybe [Prelude.Text])
container_gpuIds :: Lens' Container (Maybe [Text])
container_gpuIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe [Text]
gpuIds :: Maybe [Text]
$sel:gpuIds:Container' :: Container -> Maybe [Text]
gpuIds} -> Maybe [Text]
gpuIds) (\s :: Container
s@Container' {} Maybe [Text]
a -> Container
s {$sel:gpuIds:Container' :: Maybe [Text]
gpuIds = Maybe [Text]
a} :: Container) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The health status of the container. If health checks aren\'t configured
-- for this container in its task definition, then it reports the health
-- status as @UNKNOWN@.
container_healthStatus :: Lens.Lens' Container (Prelude.Maybe HealthStatus)
container_healthStatus :: Lens' Container (Maybe HealthStatus)
container_healthStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe HealthStatus
healthStatus :: Maybe HealthStatus
$sel:healthStatus:Container' :: Container -> Maybe HealthStatus
healthStatus} -> Maybe HealthStatus
healthStatus) (\s :: Container
s@Container' {} Maybe HealthStatus
a -> Container
s {$sel:healthStatus:Container' :: Maybe HealthStatus
healthStatus = Maybe HealthStatus
a} :: Container)

-- | The image used for the container.
container_image :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_image :: Lens' Container (Maybe Text)
container_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
image :: Maybe Text
$sel:image:Container' :: Container -> Maybe Text
image} -> Maybe Text
image) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:image:Container' :: Maybe Text
image = Maybe Text
a} :: Container)

-- | The container image manifest digest.
--
-- The @imageDigest@ is only returned if the container is using an image
-- hosted in Amazon ECR, otherwise it is omitted.
container_imageDigest :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_imageDigest :: Lens' Container (Maybe Text)
container_imageDigest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
imageDigest :: Maybe Text
$sel:imageDigest:Container' :: Container -> Maybe Text
imageDigest} -> Maybe Text
imageDigest) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:imageDigest:Container' :: Maybe Text
imageDigest = Maybe Text
a} :: Container)

-- | The last known status of the container.
container_lastStatus :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_lastStatus :: Lens' Container (Maybe Text)
container_lastStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
lastStatus :: Maybe Text
$sel:lastStatus:Container' :: Container -> Maybe Text
lastStatus} -> Maybe Text
lastStatus) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:lastStatus:Container' :: Maybe Text
lastStatus = Maybe Text
a} :: Container)

-- | The details of any Amazon ECS managed agents associated with the
-- container.
container_managedAgents :: Lens.Lens' Container (Prelude.Maybe [ManagedAgent])
container_managedAgents :: Lens' Container (Maybe [ManagedAgent])
container_managedAgents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe [ManagedAgent]
managedAgents :: Maybe [ManagedAgent]
$sel:managedAgents:Container' :: Container -> Maybe [ManagedAgent]
managedAgents} -> Maybe [ManagedAgent]
managedAgents) (\s :: Container
s@Container' {} Maybe [ManagedAgent]
a -> Container
s {$sel:managedAgents:Container' :: Maybe [ManagedAgent]
managedAgents = Maybe [ManagedAgent]
a} :: Container) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The hard limit (in MiB) of memory set for the container.
container_memory :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_memory :: Lens' Container (Maybe Text)
container_memory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
memory :: Maybe Text
$sel:memory:Container' :: Container -> Maybe Text
memory} -> Maybe Text
memory) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:memory:Container' :: Maybe Text
memory = Maybe Text
a} :: Container)

-- | The soft limit (in MiB) of memory set for the container.
container_memoryReservation :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_memoryReservation :: Lens' Container (Maybe Text)
container_memoryReservation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
memoryReservation :: Maybe Text
$sel:memoryReservation:Container' :: Container -> Maybe Text
memoryReservation} -> Maybe Text
memoryReservation) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:memoryReservation:Container' :: Maybe Text
memoryReservation = Maybe Text
a} :: Container)

-- | The name of the container.
container_name :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_name :: Lens' Container (Maybe Text)
container_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
name :: Maybe Text
$sel:name:Container' :: Container -> Maybe Text
name} -> Maybe Text
name) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:name:Container' :: Maybe Text
name = Maybe Text
a} :: Container)

-- | The network bindings associated with the container.
container_networkBindings :: Lens.Lens' Container (Prelude.Maybe [NetworkBinding])
container_networkBindings :: Lens' Container (Maybe [NetworkBinding])
container_networkBindings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe [NetworkBinding]
networkBindings :: Maybe [NetworkBinding]
$sel:networkBindings:Container' :: Container -> Maybe [NetworkBinding]
networkBindings} -> Maybe [NetworkBinding]
networkBindings) (\s :: Container
s@Container' {} Maybe [NetworkBinding]
a -> Container
s {$sel:networkBindings:Container' :: Maybe [NetworkBinding]
networkBindings = Maybe [NetworkBinding]
a} :: Container) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The network interfaces associated with the container.
container_networkInterfaces :: Lens.Lens' Container (Prelude.Maybe [NetworkInterface])
container_networkInterfaces :: Lens' Container (Maybe [NetworkInterface])
container_networkInterfaces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe [NetworkInterface]
networkInterfaces :: Maybe [NetworkInterface]
$sel:networkInterfaces:Container' :: Container -> Maybe [NetworkInterface]
networkInterfaces} -> Maybe [NetworkInterface]
networkInterfaces) (\s :: Container
s@Container' {} Maybe [NetworkInterface]
a -> Container
s {$sel:networkInterfaces:Container' :: Maybe [NetworkInterface]
networkInterfaces = Maybe [NetworkInterface]
a} :: Container) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A short (255 max characters) human-readable string to provide additional
-- details about a running or stopped container.
container_reason :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_reason :: Lens' Container (Maybe Text)
container_reason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
reason :: Maybe Text
$sel:reason:Container' :: Container -> Maybe Text
reason} -> Maybe Text
reason) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:reason:Container' :: Maybe Text
reason = Maybe Text
a} :: Container)

-- | The ID of the Docker container.
container_runtimeId :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_runtimeId :: Lens' Container (Maybe Text)
container_runtimeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
runtimeId :: Maybe Text
$sel:runtimeId:Container' :: Container -> Maybe Text
runtimeId} -> Maybe Text
runtimeId) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:runtimeId:Container' :: Maybe Text
runtimeId = Maybe Text
a} :: Container)

-- | The ARN of the task.
container_taskArn :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_taskArn :: Lens' Container (Maybe Text)
container_taskArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:Container' :: Container -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:taskArn:Container' :: Maybe Text
taskArn = Maybe Text
a} :: Container)

instance Data.FromJSON Container where
  parseJSON :: Value -> Parser Container
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Container"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe HealthStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ManagedAgent]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [NetworkBinding]
-> Maybe [NetworkInterface]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Container
Container'
            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
"containerArn")
            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
"cpu")
            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
"exitCode")
            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
"gpuIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"healthStatus")
            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
"image")
            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
"imageDigest")
            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
"lastStatus")
            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
"managedAgents" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"memory")
            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
"memoryReservation")
            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
"name")
            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
"networkBindings"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"networkInterfaces"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"reason")
            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
"runtimeId")
            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
"taskArn")
      )

instance Prelude.Hashable Container where
  hashWithSalt :: Int -> Container -> Int
hashWithSalt Int
_salt Container' {Maybe Int
Maybe [Text]
Maybe [ManagedAgent]
Maybe [NetworkInterface]
Maybe [NetworkBinding]
Maybe Text
Maybe HealthStatus
taskArn :: Maybe Text
runtimeId :: Maybe Text
reason :: Maybe Text
networkInterfaces :: Maybe [NetworkInterface]
networkBindings :: Maybe [NetworkBinding]
name :: Maybe Text
memoryReservation :: Maybe Text
memory :: Maybe Text
managedAgents :: Maybe [ManagedAgent]
lastStatus :: Maybe Text
imageDigest :: Maybe Text
image :: Maybe Text
healthStatus :: Maybe HealthStatus
gpuIds :: Maybe [Text]
exitCode :: Maybe Int
cpu :: Maybe Text
containerArn :: Maybe Text
$sel:taskArn:Container' :: Container -> Maybe Text
$sel:runtimeId:Container' :: Container -> Maybe Text
$sel:reason:Container' :: Container -> Maybe Text
$sel:networkInterfaces:Container' :: Container -> Maybe [NetworkInterface]
$sel:networkBindings:Container' :: Container -> Maybe [NetworkBinding]
$sel:name:Container' :: Container -> Maybe Text
$sel:memoryReservation:Container' :: Container -> Maybe Text
$sel:memory:Container' :: Container -> Maybe Text
$sel:managedAgents:Container' :: Container -> Maybe [ManagedAgent]
$sel:lastStatus:Container' :: Container -> Maybe Text
$sel:imageDigest:Container' :: Container -> Maybe Text
$sel:image:Container' :: Container -> Maybe Text
$sel:healthStatus:Container' :: Container -> Maybe HealthStatus
$sel:gpuIds:Container' :: Container -> Maybe [Text]
$sel:exitCode:Container' :: Container -> Maybe Int
$sel:cpu:Container' :: Container -> Maybe Text
$sel:containerArn:Container' :: Container -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
containerArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cpu
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
exitCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
gpuIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HealthStatus
healthStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
image
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageDigest
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ManagedAgent]
managedAgents
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
memory
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
memoryReservation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NetworkBinding]
networkBindings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NetworkInterface]
networkInterfaces
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runtimeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
taskArn

instance Prelude.NFData Container where
  rnf :: Container -> ()
rnf Container' {Maybe Int
Maybe [Text]
Maybe [ManagedAgent]
Maybe [NetworkInterface]
Maybe [NetworkBinding]
Maybe Text
Maybe HealthStatus
taskArn :: Maybe Text
runtimeId :: Maybe Text
reason :: Maybe Text
networkInterfaces :: Maybe [NetworkInterface]
networkBindings :: Maybe [NetworkBinding]
name :: Maybe Text
memoryReservation :: Maybe Text
memory :: Maybe Text
managedAgents :: Maybe [ManagedAgent]
lastStatus :: Maybe Text
imageDigest :: Maybe Text
image :: Maybe Text
healthStatus :: Maybe HealthStatus
gpuIds :: Maybe [Text]
exitCode :: Maybe Int
cpu :: Maybe Text
containerArn :: Maybe Text
$sel:taskArn:Container' :: Container -> Maybe Text
$sel:runtimeId:Container' :: Container -> Maybe Text
$sel:reason:Container' :: Container -> Maybe Text
$sel:networkInterfaces:Container' :: Container -> Maybe [NetworkInterface]
$sel:networkBindings:Container' :: Container -> Maybe [NetworkBinding]
$sel:name:Container' :: Container -> Maybe Text
$sel:memoryReservation:Container' :: Container -> Maybe Text
$sel:memory:Container' :: Container -> Maybe Text
$sel:managedAgents:Container' :: Container -> Maybe [ManagedAgent]
$sel:lastStatus:Container' :: Container -> Maybe Text
$sel:imageDigest:Container' :: Container -> Maybe Text
$sel:image:Container' :: Container -> Maybe Text
$sel:healthStatus:Container' :: Container -> Maybe HealthStatus
$sel:gpuIds:Container' :: Container -> Maybe [Text]
$sel:exitCode:Container' :: Container -> Maybe Int
$sel:cpu:Container' :: Container -> Maybe Text
$sel:containerArn:Container' :: Container -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
containerArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cpu
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
exitCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
gpuIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HealthStatus
healthStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
image
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageDigest
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ManagedAgent]
managedAgents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
memory
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
memoryReservation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [NetworkBinding]
networkBindings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [NetworkInterface]
networkInterfaces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runtimeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskArn