{-# 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.Panorama.Types.ApplicationInstance
-- 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.Panorama.Types.ApplicationInstance where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Panorama.Types.ApplicationInstanceHealthStatus
import Amazonka.Panorama.Types.ApplicationInstanceStatus
import qualified Amazonka.Prelude as Prelude

-- | An application instance on a device.
--
-- /See:/ 'newApplicationInstance' smart constructor.
data ApplicationInstance = ApplicationInstance'
  { -- | The application instance\'s status.
    ApplicationInstance -> Maybe ApplicationInstanceStatus
status :: Prelude.Maybe ApplicationInstanceStatus,
    -- | The application instance\'s status description.
    ApplicationInstance -> Maybe Text
statusDescription :: Prelude.Maybe Prelude.Text,
    -- | The application instance\'s ARN.
    ApplicationInstance -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the application instance was created.
    ApplicationInstance -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The device\'s ID.
    ApplicationInstance -> Maybe Text
defaultRuntimeContextDevice :: Prelude.Maybe Prelude.Text,
    -- | The device\'s name.
    ApplicationInstance -> Maybe Text
defaultRuntimeContextDeviceName :: Prelude.Maybe Prelude.Text,
    -- | The application instance\'s name.
    ApplicationInstance -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The application instance\'s health status.
    ApplicationInstance -> Maybe ApplicationInstanceHealthStatus
healthStatus :: Prelude.Maybe ApplicationInstanceHealthStatus,
    -- | The application instance\'s ID.
    ApplicationInstance -> Maybe Text
applicationInstanceId :: Prelude.Maybe Prelude.Text,
    -- | The application instance\'s description.
    ApplicationInstance -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The application instance\'s tags.
    ApplicationInstance -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ApplicationInstance -> ApplicationInstance -> Bool
(ApplicationInstance -> ApplicationInstance -> Bool)
-> (ApplicationInstance -> ApplicationInstance -> Bool)
-> Eq ApplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationInstance -> ApplicationInstance -> Bool
$c/= :: ApplicationInstance -> ApplicationInstance -> Bool
== :: ApplicationInstance -> ApplicationInstance -> Bool
$c== :: ApplicationInstance -> ApplicationInstance -> Bool
Prelude.Eq, ReadPrec [ApplicationInstance]
ReadPrec ApplicationInstance
Int -> ReadS ApplicationInstance
ReadS [ApplicationInstance]
(Int -> ReadS ApplicationInstance)
-> ReadS [ApplicationInstance]
-> ReadPrec ApplicationInstance
-> ReadPrec [ApplicationInstance]
-> Read ApplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationInstance]
$creadListPrec :: ReadPrec [ApplicationInstance]
readPrec :: ReadPrec ApplicationInstance
$creadPrec :: ReadPrec ApplicationInstance
readList :: ReadS [ApplicationInstance]
$creadList :: ReadS [ApplicationInstance]
readsPrec :: Int -> ReadS ApplicationInstance
$creadsPrec :: Int -> ReadS ApplicationInstance
Prelude.Read, Int -> ApplicationInstance -> ShowS
[ApplicationInstance] -> ShowS
ApplicationInstance -> String
(Int -> ApplicationInstance -> ShowS)
-> (ApplicationInstance -> String)
-> ([ApplicationInstance] -> ShowS)
-> Show ApplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationInstance] -> ShowS
$cshowList :: [ApplicationInstance] -> ShowS
show :: ApplicationInstance -> String
$cshow :: ApplicationInstance -> String
showsPrec :: Int -> ApplicationInstance -> ShowS
$cshowsPrec :: Int -> ApplicationInstance -> ShowS
Prelude.Show, (forall x. ApplicationInstance -> Rep ApplicationInstance x)
-> (forall x. Rep ApplicationInstance x -> ApplicationInstance)
-> Generic ApplicationInstance
forall x. Rep ApplicationInstance x -> ApplicationInstance
forall x. ApplicationInstance -> Rep ApplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationInstance x -> ApplicationInstance
$cfrom :: forall x. ApplicationInstance -> Rep ApplicationInstance x
Prelude.Generic)

-- |
-- Create a value of 'ApplicationInstance' 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:
--
-- 'status', 'applicationInstance_status' - The application instance\'s status.
--
-- 'statusDescription', 'applicationInstance_statusDescription' - The application instance\'s status description.
--
-- 'arn', 'applicationInstance_arn' - The application instance\'s ARN.
--
-- 'createdTime', 'applicationInstance_createdTime' - When the application instance was created.
--
-- 'defaultRuntimeContextDevice', 'applicationInstance_defaultRuntimeContextDevice' - The device\'s ID.
--
-- 'defaultRuntimeContextDeviceName', 'applicationInstance_defaultRuntimeContextDeviceName' - The device\'s name.
--
-- 'name', 'applicationInstance_name' - The application instance\'s name.
--
-- 'healthStatus', 'applicationInstance_healthStatus' - The application instance\'s health status.
--
-- 'applicationInstanceId', 'applicationInstance_applicationInstanceId' - The application instance\'s ID.
--
-- 'description', 'applicationInstance_description' - The application instance\'s description.
--
-- 'tags', 'applicationInstance_tags' - The application instance\'s tags.
newApplicationInstance ::
  ApplicationInstance
newApplicationInstance :: ApplicationInstance
newApplicationInstance =
  ApplicationInstance' :: Maybe ApplicationInstanceStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ApplicationInstanceHealthStatus
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ApplicationInstance
ApplicationInstance'
    { $sel:status:ApplicationInstance' :: Maybe ApplicationInstanceStatus
status = Maybe ApplicationInstanceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:statusDescription:ApplicationInstance' :: Maybe Text
statusDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ApplicationInstance' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:ApplicationInstance' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRuntimeContextDevice:ApplicationInstance' :: Maybe Text
defaultRuntimeContextDevice = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRuntimeContextDeviceName:ApplicationInstance' :: Maybe Text
defaultRuntimeContextDeviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ApplicationInstance' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:healthStatus:ApplicationInstance' :: Maybe ApplicationInstanceHealthStatus
healthStatus = Maybe ApplicationInstanceHealthStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationInstanceId:ApplicationInstance' :: Maybe Text
applicationInstanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ApplicationInstance' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ApplicationInstance' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The application instance\'s status.
applicationInstance_status :: Lens.Lens' ApplicationInstance (Prelude.Maybe ApplicationInstanceStatus)
applicationInstance_status :: (Maybe ApplicationInstanceStatus
 -> f (Maybe ApplicationInstanceStatus))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_status = (ApplicationInstance -> Maybe ApplicationInstanceStatus)
-> (ApplicationInstance
    -> Maybe ApplicationInstanceStatus -> ApplicationInstance)
-> Lens
     ApplicationInstance
     ApplicationInstance
     (Maybe ApplicationInstanceStatus)
     (Maybe ApplicationInstanceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe ApplicationInstanceStatus
status :: Maybe ApplicationInstanceStatus
$sel:status:ApplicationInstance' :: ApplicationInstance -> Maybe ApplicationInstanceStatus
status} -> Maybe ApplicationInstanceStatus
status) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe ApplicationInstanceStatus
a -> ApplicationInstance
s {$sel:status:ApplicationInstance' :: Maybe ApplicationInstanceStatus
status = Maybe ApplicationInstanceStatus
a} :: ApplicationInstance)

-- | The application instance\'s status description.
applicationInstance_statusDescription :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_statusDescription :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_statusDescription = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
statusDescription :: Maybe Text
$sel:statusDescription:ApplicationInstance' :: ApplicationInstance -> Maybe Text
statusDescription} -> Maybe Text
statusDescription) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:statusDescription:ApplicationInstance' :: Maybe Text
statusDescription = Maybe Text
a} :: ApplicationInstance)

-- | The application instance\'s ARN.
applicationInstance_arn :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_arn :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_arn = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
arn :: Maybe Text
$sel:arn:ApplicationInstance' :: ApplicationInstance -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:arn:ApplicationInstance' :: Maybe Text
arn = Maybe Text
a} :: ApplicationInstance)

-- | When the application instance was created.
applicationInstance_createdTime :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.UTCTime)
applicationInstance_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_createdTime = (ApplicationInstance -> Maybe POSIX)
-> (ApplicationInstance -> Maybe POSIX -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:ApplicationInstance' :: ApplicationInstance -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe POSIX
a -> ApplicationInstance
s {$sel:createdTime:ApplicationInstance' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: ApplicationInstance) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApplicationInstance -> f ApplicationInstance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationInstance
-> f ApplicationInstance
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 device\'s ID.
applicationInstance_defaultRuntimeContextDevice :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_defaultRuntimeContextDevice :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_defaultRuntimeContextDevice = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
defaultRuntimeContextDevice :: Maybe Text
$sel:defaultRuntimeContextDevice:ApplicationInstance' :: ApplicationInstance -> Maybe Text
defaultRuntimeContextDevice} -> Maybe Text
defaultRuntimeContextDevice) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:defaultRuntimeContextDevice:ApplicationInstance' :: Maybe Text
defaultRuntimeContextDevice = Maybe Text
a} :: ApplicationInstance)

-- | The device\'s name.
applicationInstance_defaultRuntimeContextDeviceName :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_defaultRuntimeContextDeviceName :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_defaultRuntimeContextDeviceName = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
defaultRuntimeContextDeviceName :: Maybe Text
$sel:defaultRuntimeContextDeviceName:ApplicationInstance' :: ApplicationInstance -> Maybe Text
defaultRuntimeContextDeviceName} -> Maybe Text
defaultRuntimeContextDeviceName) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:defaultRuntimeContextDeviceName:ApplicationInstance' :: Maybe Text
defaultRuntimeContextDeviceName = Maybe Text
a} :: ApplicationInstance)

-- | The application instance\'s name.
applicationInstance_name :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_name :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_name = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
name :: Maybe Text
$sel:name:ApplicationInstance' :: ApplicationInstance -> Maybe Text
name} -> Maybe Text
name) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:name:ApplicationInstance' :: Maybe Text
name = Maybe Text
a} :: ApplicationInstance)

-- | The application instance\'s health status.
applicationInstance_healthStatus :: Lens.Lens' ApplicationInstance (Prelude.Maybe ApplicationInstanceHealthStatus)
applicationInstance_healthStatus :: (Maybe ApplicationInstanceHealthStatus
 -> f (Maybe ApplicationInstanceHealthStatus))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_healthStatus = (ApplicationInstance -> Maybe ApplicationInstanceHealthStatus)
-> (ApplicationInstance
    -> Maybe ApplicationInstanceHealthStatus -> ApplicationInstance)
-> Lens
     ApplicationInstance
     ApplicationInstance
     (Maybe ApplicationInstanceHealthStatus)
     (Maybe ApplicationInstanceHealthStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe ApplicationInstanceHealthStatus
healthStatus :: Maybe ApplicationInstanceHealthStatus
$sel:healthStatus:ApplicationInstance' :: ApplicationInstance -> Maybe ApplicationInstanceHealthStatus
healthStatus} -> Maybe ApplicationInstanceHealthStatus
healthStatus) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe ApplicationInstanceHealthStatus
a -> ApplicationInstance
s {$sel:healthStatus:ApplicationInstance' :: Maybe ApplicationInstanceHealthStatus
healthStatus = Maybe ApplicationInstanceHealthStatus
a} :: ApplicationInstance)

-- | The application instance\'s ID.
applicationInstance_applicationInstanceId :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_applicationInstanceId :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_applicationInstanceId = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
applicationInstanceId :: Maybe Text
$sel:applicationInstanceId:ApplicationInstance' :: ApplicationInstance -> Maybe Text
applicationInstanceId} -> Maybe Text
applicationInstanceId) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:applicationInstanceId:ApplicationInstance' :: Maybe Text
applicationInstanceId = Maybe Text
a} :: ApplicationInstance)

-- | The application instance\'s description.
applicationInstance_description :: Lens.Lens' ApplicationInstance (Prelude.Maybe Prelude.Text)
applicationInstance_description :: (Maybe Text -> f (Maybe Text))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_description = (ApplicationInstance -> Maybe Text)
-> (ApplicationInstance -> Maybe Text -> ApplicationInstance)
-> Lens
     ApplicationInstance ApplicationInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe Text
description :: Maybe Text
$sel:description:ApplicationInstance' :: ApplicationInstance -> Maybe Text
description} -> Maybe Text
description) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe Text
a -> ApplicationInstance
s {$sel:description:ApplicationInstance' :: Maybe Text
description = Maybe Text
a} :: ApplicationInstance)

-- | The application instance\'s tags.
applicationInstance_tags :: Lens.Lens' ApplicationInstance (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
applicationInstance_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ApplicationInstance -> f ApplicationInstance
applicationInstance_tags = (ApplicationInstance -> Maybe (HashMap Text Text))
-> (ApplicationInstance
    -> Maybe (HashMap Text Text) -> ApplicationInstance)
-> Lens
     ApplicationInstance
     ApplicationInstance
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationInstance' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ApplicationInstance' :: ApplicationInstance -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ApplicationInstance
s@ApplicationInstance' {} Maybe (HashMap Text Text)
a -> ApplicationInstance
s {$sel:tags:ApplicationInstance' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ApplicationInstance) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ApplicationInstance -> f ApplicationInstance)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ApplicationInstance
-> f ApplicationInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ApplicationInstance where
  parseJSON :: Value -> Parser ApplicationInstance
parseJSON =
    String
-> (Object -> Parser ApplicationInstance)
-> Value
-> Parser ApplicationInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ApplicationInstance"
      ( \Object
x ->
          Maybe ApplicationInstanceStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ApplicationInstanceHealthStatus
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ApplicationInstance
ApplicationInstance'
            (Maybe ApplicationInstanceStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ApplicationInstanceHealthStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> ApplicationInstance)
-> Parser (Maybe ApplicationInstanceStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ApplicationInstanceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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
"StatusDescription")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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
"DefaultRuntimeContextDevice")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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
"DefaultRuntimeContextDeviceName")
            Parser
  (Maybe Text
   -> Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe ApplicationInstanceHealthStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ApplicationInstance)
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
"Name")
            Parser
  (Maybe ApplicationInstanceHealthStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ApplicationInstance)
-> Parser (Maybe ApplicationInstanceHealthStatus)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe (HashMap Text Text) -> ApplicationInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ApplicationInstanceHealthStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HealthStatus")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe (HashMap Text Text) -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe (HashMap Text Text) -> ApplicationInstance)
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
"ApplicationInstanceId")
            Parser
  (Maybe Text -> Maybe (HashMap Text Text) -> ApplicationInstance)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ApplicationInstance)
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 (HashMap Text Text) -> ApplicationInstance)
-> Parser (Maybe (HashMap Text Text)) -> Parser ApplicationInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ApplicationInstance

instance Prelude.NFData ApplicationInstance