{-# 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.WorkSpaces.Types.WorkspaceImage
-- 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.WorkSpaces.Types.WorkspaceImage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.OperatingSystem
import Amazonka.WorkSpaces.Types.UpdateResult
import Amazonka.WorkSpaces.Types.WorkspaceImageRequiredTenancy
import Amazonka.WorkSpaces.Types.WorkspaceImageState

-- | Describes a WorkSpace image.
--
-- /See:/ 'newWorkspaceImage' smart constructor.
data WorkspaceImage = WorkspaceImage'
  { -- | The status of the image.
    WorkspaceImage -> Maybe WorkspaceImageState
state :: Prelude.Maybe WorkspaceImageState,
    -- | The identifier of the Amazon Web Services account that owns the image.
    WorkspaceImage -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
    -- | The operating system that the image is running.
    WorkspaceImage -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
    -- | The date when the image was created. If the image has been shared, the
    -- Amazon Web Services account that the image has been shared with sees the
    -- original creation date of the image.
    WorkspaceImage -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
    -- | Specifies whether the image is running on dedicated hardware. When Bring
    -- Your Own License (BYOL) is enabled, this value is set to @DEDICATED@.
    -- For more information, see
    -- <https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html Bring Your Own Windows Desktop Images>.
    WorkspaceImage -> Maybe WorkspaceImageRequiredTenancy
requiredTenancy :: Prelude.Maybe WorkspaceImageRequiredTenancy,
    -- | The name of the image.
    WorkspaceImage -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The updates (if any) that are available for the specified image.
    WorkspaceImage -> Maybe UpdateResult
updates :: Prelude.Maybe UpdateResult,
    -- | The identifier of the image.
    WorkspaceImage -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | The error code that is returned for the image.
    WorkspaceImage -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
    -- | The text of the error message that is returned for the image.
    WorkspaceImage -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The description of the image.
    WorkspaceImage -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (WorkspaceImage -> WorkspaceImage -> Bool
(WorkspaceImage -> WorkspaceImage -> Bool)
-> (WorkspaceImage -> WorkspaceImage -> Bool) -> Eq WorkspaceImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceImage -> WorkspaceImage -> Bool
$c/= :: WorkspaceImage -> WorkspaceImage -> Bool
== :: WorkspaceImage -> WorkspaceImage -> Bool
$c== :: WorkspaceImage -> WorkspaceImage -> Bool
Prelude.Eq, ReadPrec [WorkspaceImage]
ReadPrec WorkspaceImage
Int -> ReadS WorkspaceImage
ReadS [WorkspaceImage]
(Int -> ReadS WorkspaceImage)
-> ReadS [WorkspaceImage]
-> ReadPrec WorkspaceImage
-> ReadPrec [WorkspaceImage]
-> Read WorkspaceImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceImage]
$creadListPrec :: ReadPrec [WorkspaceImage]
readPrec :: ReadPrec WorkspaceImage
$creadPrec :: ReadPrec WorkspaceImage
readList :: ReadS [WorkspaceImage]
$creadList :: ReadS [WorkspaceImage]
readsPrec :: Int -> ReadS WorkspaceImage
$creadsPrec :: Int -> ReadS WorkspaceImage
Prelude.Read, Int -> WorkspaceImage -> ShowS
[WorkspaceImage] -> ShowS
WorkspaceImage -> String
(Int -> WorkspaceImage -> ShowS)
-> (WorkspaceImage -> String)
-> ([WorkspaceImage] -> ShowS)
-> Show WorkspaceImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceImage] -> ShowS
$cshowList :: [WorkspaceImage] -> ShowS
show :: WorkspaceImage -> String
$cshow :: WorkspaceImage -> String
showsPrec :: Int -> WorkspaceImage -> ShowS
$cshowsPrec :: Int -> WorkspaceImage -> ShowS
Prelude.Show, (forall x. WorkspaceImage -> Rep WorkspaceImage x)
-> (forall x. Rep WorkspaceImage x -> WorkspaceImage)
-> Generic WorkspaceImage
forall x. Rep WorkspaceImage x -> WorkspaceImage
forall x. WorkspaceImage -> Rep WorkspaceImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkspaceImage x -> WorkspaceImage
$cfrom :: forall x. WorkspaceImage -> Rep WorkspaceImage x
Prelude.Generic)

-- |
-- Create a value of 'WorkspaceImage' 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:
--
-- 'state', 'workspaceImage_state' - The status of the image.
--
-- 'ownerAccountId', 'workspaceImage_ownerAccountId' - The identifier of the Amazon Web Services account that owns the image.
--
-- 'operatingSystem', 'workspaceImage_operatingSystem' - The operating system that the image is running.
--
-- 'created', 'workspaceImage_created' - The date when the image was created. If the image has been shared, the
-- Amazon Web Services account that the image has been shared with sees the
-- original creation date of the image.
--
-- 'requiredTenancy', 'workspaceImage_requiredTenancy' - Specifies whether the image is running on dedicated hardware. When Bring
-- Your Own License (BYOL) is enabled, this value is set to @DEDICATED@.
-- For more information, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html Bring Your Own Windows Desktop Images>.
--
-- 'name', 'workspaceImage_name' - The name of the image.
--
-- 'updates', 'workspaceImage_updates' - The updates (if any) that are available for the specified image.
--
-- 'imageId', 'workspaceImage_imageId' - The identifier of the image.
--
-- 'errorCode', 'workspaceImage_errorCode' - The error code that is returned for the image.
--
-- 'errorMessage', 'workspaceImage_errorMessage' - The text of the error message that is returned for the image.
--
-- 'description', 'workspaceImage_description' - The description of the image.
newWorkspaceImage ::
  WorkspaceImage
newWorkspaceImage :: WorkspaceImage
newWorkspaceImage =
  WorkspaceImage' :: Maybe WorkspaceImageState
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe POSIX
-> Maybe WorkspaceImageRequiredTenancy
-> Maybe Text
-> Maybe UpdateResult
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WorkspaceImage
WorkspaceImage'
    { $sel:state:WorkspaceImage' :: Maybe WorkspaceImageState
state = Maybe WorkspaceImageState
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccountId:WorkspaceImage' :: Maybe Text
ownerAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operatingSystem:WorkspaceImage' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
forall a. Maybe a
Prelude.Nothing,
      $sel:created:WorkspaceImage' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:requiredTenancy:WorkspaceImage' :: Maybe WorkspaceImageRequiredTenancy
requiredTenancy = Maybe WorkspaceImageRequiredTenancy
forall a. Maybe a
Prelude.Nothing,
      $sel:name:WorkspaceImage' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updates:WorkspaceImage' :: Maybe UpdateResult
updates = Maybe UpdateResult
forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:WorkspaceImage' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:WorkspaceImage' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:WorkspaceImage' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:WorkspaceImage' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the image.
workspaceImage_state :: Lens.Lens' WorkspaceImage (Prelude.Maybe WorkspaceImageState)
workspaceImage_state :: (Maybe WorkspaceImageState -> f (Maybe WorkspaceImageState))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_state = (WorkspaceImage -> Maybe WorkspaceImageState)
-> (WorkspaceImage -> Maybe WorkspaceImageState -> WorkspaceImage)
-> Lens
     WorkspaceImage
     WorkspaceImage
     (Maybe WorkspaceImageState)
     (Maybe WorkspaceImageState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe WorkspaceImageState
state :: Maybe WorkspaceImageState
$sel:state:WorkspaceImage' :: WorkspaceImage -> Maybe WorkspaceImageState
state} -> Maybe WorkspaceImageState
state) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe WorkspaceImageState
a -> WorkspaceImage
s {$sel:state:WorkspaceImage' :: Maybe WorkspaceImageState
state = Maybe WorkspaceImageState
a} :: WorkspaceImage)

-- | The identifier of the Amazon Web Services account that owns the image.
workspaceImage_ownerAccountId :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.Text)
workspaceImage_ownerAccountId :: (Maybe Text -> f (Maybe Text))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_ownerAccountId = (WorkspaceImage -> Maybe Text)
-> (WorkspaceImage -> Maybe Text -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:WorkspaceImage' :: WorkspaceImage -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe Text
a -> WorkspaceImage
s {$sel:ownerAccountId:WorkspaceImage' :: Maybe Text
ownerAccountId = Maybe Text
a} :: WorkspaceImage)

-- | The operating system that the image is running.
workspaceImage_operatingSystem :: Lens.Lens' WorkspaceImage (Prelude.Maybe OperatingSystem)
workspaceImage_operatingSystem :: (Maybe OperatingSystem -> f (Maybe OperatingSystem))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_operatingSystem = (WorkspaceImage -> Maybe OperatingSystem)
-> (WorkspaceImage -> Maybe OperatingSystem -> WorkspaceImage)
-> Lens
     WorkspaceImage
     WorkspaceImage
     (Maybe OperatingSystem)
     (Maybe OperatingSystem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:WorkspaceImage' :: WorkspaceImage -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe OperatingSystem
a -> WorkspaceImage
s {$sel:operatingSystem:WorkspaceImage' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: WorkspaceImage)

-- | The date when the image was created. If the image has been shared, the
-- Amazon Web Services account that the image has been shared with sees the
-- original creation date of the image.
workspaceImage_created :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.UTCTime)
workspaceImage_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_created = (WorkspaceImage -> Maybe POSIX)
-> (WorkspaceImage -> Maybe POSIX -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe POSIX
created :: Maybe POSIX
$sel:created:WorkspaceImage' :: WorkspaceImage -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe POSIX
a -> WorkspaceImage
s {$sel:created:WorkspaceImage' :: Maybe POSIX
created = Maybe POSIX
a} :: WorkspaceImage) ((Maybe POSIX -> f (Maybe POSIX))
 -> WorkspaceImage -> f WorkspaceImage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceImage
-> f WorkspaceImage
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

-- | Specifies whether the image is running on dedicated hardware. When Bring
-- Your Own License (BYOL) is enabled, this value is set to @DEDICATED@.
-- For more information, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html Bring Your Own Windows Desktop Images>.
workspaceImage_requiredTenancy :: Lens.Lens' WorkspaceImage (Prelude.Maybe WorkspaceImageRequiredTenancy)
workspaceImage_requiredTenancy :: (Maybe WorkspaceImageRequiredTenancy
 -> f (Maybe WorkspaceImageRequiredTenancy))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_requiredTenancy = (WorkspaceImage -> Maybe WorkspaceImageRequiredTenancy)
-> (WorkspaceImage
    -> Maybe WorkspaceImageRequiredTenancy -> WorkspaceImage)
-> Lens
     WorkspaceImage
     WorkspaceImage
     (Maybe WorkspaceImageRequiredTenancy)
     (Maybe WorkspaceImageRequiredTenancy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe WorkspaceImageRequiredTenancy
requiredTenancy :: Maybe WorkspaceImageRequiredTenancy
$sel:requiredTenancy:WorkspaceImage' :: WorkspaceImage -> Maybe WorkspaceImageRequiredTenancy
requiredTenancy} -> Maybe WorkspaceImageRequiredTenancy
requiredTenancy) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe WorkspaceImageRequiredTenancy
a -> WorkspaceImage
s {$sel:requiredTenancy:WorkspaceImage' :: Maybe WorkspaceImageRequiredTenancy
requiredTenancy = Maybe WorkspaceImageRequiredTenancy
a} :: WorkspaceImage)

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

-- | The updates (if any) that are available for the specified image.
workspaceImage_updates :: Lens.Lens' WorkspaceImage (Prelude.Maybe UpdateResult)
workspaceImage_updates :: (Maybe UpdateResult -> f (Maybe UpdateResult))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_updates = (WorkspaceImage -> Maybe UpdateResult)
-> (WorkspaceImage -> Maybe UpdateResult -> WorkspaceImage)
-> Lens
     WorkspaceImage
     WorkspaceImage
     (Maybe UpdateResult)
     (Maybe UpdateResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe UpdateResult
updates :: Maybe UpdateResult
$sel:updates:WorkspaceImage' :: WorkspaceImage -> Maybe UpdateResult
updates} -> Maybe UpdateResult
updates) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe UpdateResult
a -> WorkspaceImage
s {$sel:updates:WorkspaceImage' :: Maybe UpdateResult
updates = Maybe UpdateResult
a} :: WorkspaceImage)

-- | The identifier of the image.
workspaceImage_imageId :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.Text)
workspaceImage_imageId :: (Maybe Text -> f (Maybe Text))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_imageId = (WorkspaceImage -> Maybe Text)
-> (WorkspaceImage -> Maybe Text -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe Text
imageId :: Maybe Text
$sel:imageId:WorkspaceImage' :: WorkspaceImage -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe Text
a -> WorkspaceImage
s {$sel:imageId:WorkspaceImage' :: Maybe Text
imageId = Maybe Text
a} :: WorkspaceImage)

-- | The error code that is returned for the image.
workspaceImage_errorCode :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.Text)
workspaceImage_errorCode :: (Maybe Text -> f (Maybe Text))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_errorCode = (WorkspaceImage -> Maybe Text)
-> (WorkspaceImage -> Maybe Text -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:WorkspaceImage' :: WorkspaceImage -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe Text
a -> WorkspaceImage
s {$sel:errorCode:WorkspaceImage' :: Maybe Text
errorCode = Maybe Text
a} :: WorkspaceImage)

-- | The text of the error message that is returned for the image.
workspaceImage_errorMessage :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.Text)
workspaceImage_errorMessage :: (Maybe Text -> f (Maybe Text))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_errorMessage = (WorkspaceImage -> Maybe Text)
-> (WorkspaceImage -> Maybe Text -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:WorkspaceImage' :: WorkspaceImage -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe Text
a -> WorkspaceImage
s {$sel:errorMessage:WorkspaceImage' :: Maybe Text
errorMessage = Maybe Text
a} :: WorkspaceImage)

-- | The description of the image.
workspaceImage_description :: Lens.Lens' WorkspaceImage (Prelude.Maybe Prelude.Text)
workspaceImage_description :: (Maybe Text -> f (Maybe Text))
-> WorkspaceImage -> f WorkspaceImage
workspaceImage_description = (WorkspaceImage -> Maybe Text)
-> (WorkspaceImage -> Maybe Text -> WorkspaceImage)
-> Lens WorkspaceImage WorkspaceImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceImage' {Maybe Text
description :: Maybe Text
$sel:description:WorkspaceImage' :: WorkspaceImage -> Maybe Text
description} -> Maybe Text
description) (\s :: WorkspaceImage
s@WorkspaceImage' {} Maybe Text
a -> WorkspaceImage
s {$sel:description:WorkspaceImage' :: Maybe Text
description = Maybe Text
a} :: WorkspaceImage)

instance Core.FromJSON WorkspaceImage where
  parseJSON :: Value -> Parser WorkspaceImage
parseJSON =
    String
-> (Object -> Parser WorkspaceImage)
-> Value
-> Parser WorkspaceImage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WorkspaceImage"
      ( \Object
x ->
          Maybe WorkspaceImageState
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe POSIX
-> Maybe WorkspaceImageRequiredTenancy
-> Maybe Text
-> Maybe UpdateResult
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WorkspaceImage
WorkspaceImage'
            (Maybe WorkspaceImageState
 -> Maybe Text
 -> Maybe OperatingSystem
 -> Maybe POSIX
 -> Maybe WorkspaceImageRequiredTenancy
 -> Maybe Text
 -> Maybe UpdateResult
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> WorkspaceImage)
-> Parser (Maybe WorkspaceImageState)
-> Parser
     (Maybe Text
      -> Maybe OperatingSystem
      -> Maybe POSIX
      -> Maybe WorkspaceImageRequiredTenancy
      -> Maybe Text
      -> Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorkspaceImageState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe Text
   -> Maybe OperatingSystem
   -> Maybe POSIX
   -> Maybe WorkspaceImageRequiredTenancy
   -> Maybe Text
   -> Maybe UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe OperatingSystem
      -> Maybe POSIX
      -> Maybe WorkspaceImageRequiredTenancy
      -> Maybe Text
      -> Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
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
"OwnerAccountId")
            Parser
  (Maybe OperatingSystem
   -> Maybe POSIX
   -> Maybe WorkspaceImageRequiredTenancy
   -> Maybe Text
   -> Maybe UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe OperatingSystem)
-> Parser
     (Maybe POSIX
      -> Maybe WorkspaceImageRequiredTenancy
      -> Maybe Text
      -> Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OperatingSystem)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OperatingSystem")
            Parser
  (Maybe POSIX
   -> Maybe WorkspaceImageRequiredTenancy
   -> Maybe Text
   -> Maybe UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe WorkspaceImageRequiredTenancy
      -> Maybe Text
      -> Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
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
"Created")
            Parser
  (Maybe WorkspaceImageRequiredTenancy
   -> Maybe Text
   -> Maybe UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe WorkspaceImageRequiredTenancy)
-> Parser
     (Maybe Text
      -> Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WorkspaceImageRequiredTenancy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequiredTenancy")
            Parser
  (Maybe Text
   -> Maybe UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe UpdateResult
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkspaceImage)
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 UpdateResult
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkspaceImage)
-> Parser (Maybe UpdateResult)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> WorkspaceImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UpdateResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Updates")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> WorkspaceImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> WorkspaceImage)
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
"ImageId")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> WorkspaceImage)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> WorkspaceImage)
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
"ErrorCode")
            Parser (Maybe Text -> Maybe Text -> WorkspaceImage)
-> Parser (Maybe Text) -> Parser (Maybe Text -> WorkspaceImage)
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
"ErrorMessage")
            Parser (Maybe Text -> WorkspaceImage)
-> Parser (Maybe Text) -> Parser WorkspaceImage
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")
      )

instance Prelude.Hashable WorkspaceImage

instance Prelude.NFData WorkspaceImage