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

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

-- |
-- Module      : Amazonka.AppStream.Types.Image
-- 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.AppStream.Types.Image where

import Amazonka.AppStream.Types.Application
import Amazonka.AppStream.Types.ImagePermissions
import Amazonka.AppStream.Types.ImageState
import Amazonka.AppStream.Types.ImageStateChangeReason
import Amazonka.AppStream.Types.PlatformType
import Amazonka.AppStream.Types.ResourceError
import Amazonka.AppStream.Types.VisibilityType
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 an image.
--
-- /See:/ 'newImage' smart constructor.
data Image = Image'
  { -- | The applications associated with the image.
    Image -> Maybe [Application]
applications :: Prelude.Maybe [Application],
    -- | The version of the AppStream 2.0 agent to use for instances that are
    -- launched from this image.
    Image -> Maybe Text
appstreamAgentVersion :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the image.
    Image -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the image from which this image was created.
    Image -> Maybe Text
baseImageArn :: Prelude.Maybe Prelude.Text,
    -- | The time the image was created.
    Image -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The description to display.
    Image -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The image name to display.
    Image -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The name of the image builder that was used to create the private image.
    -- If the image is shared, this value is null.
    Image -> Maybe Text
imageBuilderName :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether an image builder can be launched from this image.
    Image -> Maybe Bool
imageBuilderSupported :: Prelude.Maybe Prelude.Bool,
    -- | Describes the errors that are returned when a new image can\'t be
    -- created.
    Image -> Maybe [ResourceError]
imageErrors :: Prelude.Maybe [ResourceError],
    -- | The permissions to provide to the destination AWS account for the
    -- specified image.
    Image -> Maybe ImagePermissions
imagePermissions :: Prelude.Maybe ImagePermissions,
    -- | The operating system platform of the image.
    Image -> Maybe PlatformType
platform :: Prelude.Maybe PlatformType,
    -- | The release date of the public base image. For private images, this date
    -- is the release date of the base image from which the image was created.
    Image -> Maybe POSIX
publicBaseImageReleasedDate :: Prelude.Maybe Data.POSIX,
    -- | The image starts in the @PENDING@ state. If image creation succeeds, the
    -- state is @AVAILABLE@. If image creation fails, the state is @FAILED@.
    Image -> Maybe ImageState
state :: Prelude.Maybe ImageState,
    -- | The reason why the last state change occurred.
    Image -> Maybe ImageStateChangeReason
stateChangeReason :: Prelude.Maybe ImageStateChangeReason,
    -- | Indicates whether the image is public or private.
    Image -> Maybe VisibilityType
visibility :: Prelude.Maybe VisibilityType,
    -- | The name of the image.
    Image -> Text
name :: Prelude.Text
  }
  deriving (Image -> Image -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Image -> Image -> Bool
$c/= :: Image -> Image -> Bool
== :: Image -> Image -> Bool
$c== :: Image -> Image -> Bool
Prelude.Eq, ReadPrec [Image]
ReadPrec Image
Int -> ReadS Image
ReadS [Image]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Image]
$creadListPrec :: ReadPrec [Image]
readPrec :: ReadPrec Image
$creadPrec :: ReadPrec Image
readList :: ReadS [Image]
$creadList :: ReadS [Image]
readsPrec :: Int -> ReadS Image
$creadsPrec :: Int -> ReadS Image
Prelude.Read, Int -> Image -> ShowS
[Image] -> ShowS
Image -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Image] -> ShowS
$cshowList :: [Image] -> ShowS
show :: Image -> String
$cshow :: Image -> String
showsPrec :: Int -> Image -> ShowS
$cshowsPrec :: Int -> Image -> ShowS
Prelude.Show, forall x. Rep Image x -> Image
forall x. Image -> Rep Image x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Image x -> Image
$cfrom :: forall x. Image -> Rep Image x
Prelude.Generic)

-- |
-- Create a value of 'Image' 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:
--
-- 'applications', 'image_applications' - The applications associated with the image.
--
-- 'appstreamAgentVersion', 'image_appstreamAgentVersion' - The version of the AppStream 2.0 agent to use for instances that are
-- launched from this image.
--
-- 'arn', 'image_arn' - The ARN of the image.
--
-- 'baseImageArn', 'image_baseImageArn' - The ARN of the image from which this image was created.
--
-- 'createdTime', 'image_createdTime' - The time the image was created.
--
-- 'description', 'image_description' - The description to display.
--
-- 'displayName', 'image_displayName' - The image name to display.
--
-- 'imageBuilderName', 'image_imageBuilderName' - The name of the image builder that was used to create the private image.
-- If the image is shared, this value is null.
--
-- 'imageBuilderSupported', 'image_imageBuilderSupported' - Indicates whether an image builder can be launched from this image.
--
-- 'imageErrors', 'image_imageErrors' - Describes the errors that are returned when a new image can\'t be
-- created.
--
-- 'imagePermissions', 'image_imagePermissions' - The permissions to provide to the destination AWS account for the
-- specified image.
--
-- 'platform', 'image_platform' - The operating system platform of the image.
--
-- 'publicBaseImageReleasedDate', 'image_publicBaseImageReleasedDate' - The release date of the public base image. For private images, this date
-- is the release date of the base image from which the image was created.
--
-- 'state', 'image_state' - The image starts in the @PENDING@ state. If image creation succeeds, the
-- state is @AVAILABLE@. If image creation fails, the state is @FAILED@.
--
-- 'stateChangeReason', 'image_stateChangeReason' - The reason why the last state change occurred.
--
-- 'visibility', 'image_visibility' - Indicates whether the image is public or private.
--
-- 'name', 'image_name' - The name of the image.
newImage ::
  -- | 'name'
  Prelude.Text ->
  Image
newImage :: Text -> Image
newImage Text
pName_ =
  Image'
    { $sel:applications:Image' :: Maybe [Application]
applications = forall a. Maybe a
Prelude.Nothing,
      $sel:appstreamAgentVersion:Image' :: Maybe Text
appstreamAgentVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Image' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:baseImageArn:Image' :: Maybe Text
baseImageArn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:Image' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Image' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Image' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:imageBuilderName:Image' :: Maybe Text
imageBuilderName = forall a. Maybe a
Prelude.Nothing,
      $sel:imageBuilderSupported:Image' :: Maybe Bool
imageBuilderSupported = forall a. Maybe a
Prelude.Nothing,
      $sel:imageErrors:Image' :: Maybe [ResourceError]
imageErrors = forall a. Maybe a
Prelude.Nothing,
      $sel:imagePermissions:Image' :: Maybe ImagePermissions
imagePermissions = forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Image' :: Maybe PlatformType
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:publicBaseImageReleasedDate:Image' :: Maybe POSIX
publicBaseImageReleasedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Image' :: Maybe ImageState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:stateChangeReason:Image' :: Maybe ImageStateChangeReason
stateChangeReason = forall a. Maybe a
Prelude.Nothing,
      $sel:visibility:Image' :: Maybe VisibilityType
visibility = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Image' :: Text
name = Text
pName_
    }

-- | The applications associated with the image.
image_applications :: Lens.Lens' Image (Prelude.Maybe [Application])
image_applications :: Lens' Image (Maybe [Application])
image_applications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe [Application]
applications :: Maybe [Application]
$sel:applications:Image' :: Image -> Maybe [Application]
applications} -> Maybe [Application]
applications) (\s :: Image
s@Image' {} Maybe [Application]
a -> Image
s {$sel:applications:Image' :: Maybe [Application]
applications = Maybe [Application]
a} :: Image) 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 version of the AppStream 2.0 agent to use for instances that are
-- launched from this image.
image_appstreamAgentVersion :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_appstreamAgentVersion :: Lens' Image (Maybe Text)
image_appstreamAgentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
appstreamAgentVersion :: Maybe Text
$sel:appstreamAgentVersion:Image' :: Image -> Maybe Text
appstreamAgentVersion} -> Maybe Text
appstreamAgentVersion) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:appstreamAgentVersion:Image' :: Maybe Text
appstreamAgentVersion = Maybe Text
a} :: Image)

-- | The ARN of the image.
image_arn :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_arn :: Lens' Image (Maybe Text)
image_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
arn :: Maybe Text
$sel:arn:Image' :: Image -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:arn:Image' :: Maybe Text
arn = Maybe Text
a} :: Image)

-- | The ARN of the image from which this image was created.
image_baseImageArn :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_baseImageArn :: Lens' Image (Maybe Text)
image_baseImageArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
baseImageArn :: Maybe Text
$sel:baseImageArn:Image' :: Image -> Maybe Text
baseImageArn} -> Maybe Text
baseImageArn) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:baseImageArn:Image' :: Maybe Text
baseImageArn = Maybe Text
a} :: Image)

-- | The time the image was created.
image_createdTime :: Lens.Lens' Image (Prelude.Maybe Prelude.UTCTime)
image_createdTime :: Lens' Image (Maybe UTCTime)
image_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:Image' :: Image -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: Image
s@Image' {} Maybe POSIX
a -> Image
s {$sel:createdTime:Image' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: Image) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

-- | The name of the image builder that was used to create the private image.
-- If the image is shared, this value is null.
image_imageBuilderName :: Lens.Lens' Image (Prelude.Maybe Prelude.Text)
image_imageBuilderName :: Lens' Image (Maybe Text)
image_imageBuilderName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Text
imageBuilderName :: Maybe Text
$sel:imageBuilderName:Image' :: Image -> Maybe Text
imageBuilderName} -> Maybe Text
imageBuilderName) (\s :: Image
s@Image' {} Maybe Text
a -> Image
s {$sel:imageBuilderName:Image' :: Maybe Text
imageBuilderName = Maybe Text
a} :: Image)

-- | Indicates whether an image builder can be launched from this image.
image_imageBuilderSupported :: Lens.Lens' Image (Prelude.Maybe Prelude.Bool)
image_imageBuilderSupported :: Lens' Image (Maybe Bool)
image_imageBuilderSupported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe Bool
imageBuilderSupported :: Maybe Bool
$sel:imageBuilderSupported:Image' :: Image -> Maybe Bool
imageBuilderSupported} -> Maybe Bool
imageBuilderSupported) (\s :: Image
s@Image' {} Maybe Bool
a -> Image
s {$sel:imageBuilderSupported:Image' :: Maybe Bool
imageBuilderSupported = Maybe Bool
a} :: Image)

-- | Describes the errors that are returned when a new image can\'t be
-- created.
image_imageErrors :: Lens.Lens' Image (Prelude.Maybe [ResourceError])
image_imageErrors :: Lens' Image (Maybe [ResourceError])
image_imageErrors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe [ResourceError]
imageErrors :: Maybe [ResourceError]
$sel:imageErrors:Image' :: Image -> Maybe [ResourceError]
imageErrors} -> Maybe [ResourceError]
imageErrors) (\s :: Image
s@Image' {} Maybe [ResourceError]
a -> Image
s {$sel:imageErrors:Image' :: Maybe [ResourceError]
imageErrors = Maybe [ResourceError]
a} :: Image) 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 permissions to provide to the destination AWS account for the
-- specified image.
image_imagePermissions :: Lens.Lens' Image (Prelude.Maybe ImagePermissions)
image_imagePermissions :: Lens' Image (Maybe ImagePermissions)
image_imagePermissions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImagePermissions
imagePermissions :: Maybe ImagePermissions
$sel:imagePermissions:Image' :: Image -> Maybe ImagePermissions
imagePermissions} -> Maybe ImagePermissions
imagePermissions) (\s :: Image
s@Image' {} Maybe ImagePermissions
a -> Image
s {$sel:imagePermissions:Image' :: Maybe ImagePermissions
imagePermissions = Maybe ImagePermissions
a} :: Image)

-- | The operating system platform of the image.
image_platform :: Lens.Lens' Image (Prelude.Maybe PlatformType)
image_platform :: Lens' Image (Maybe PlatformType)
image_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe PlatformType
platform :: Maybe PlatformType
$sel:platform:Image' :: Image -> Maybe PlatformType
platform} -> Maybe PlatformType
platform) (\s :: Image
s@Image' {} Maybe PlatformType
a -> Image
s {$sel:platform:Image' :: Maybe PlatformType
platform = Maybe PlatformType
a} :: Image)

-- | The release date of the public base image. For private images, this date
-- is the release date of the base image from which the image was created.
image_publicBaseImageReleasedDate :: Lens.Lens' Image (Prelude.Maybe Prelude.UTCTime)
image_publicBaseImageReleasedDate :: Lens' Image (Maybe UTCTime)
image_publicBaseImageReleasedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe POSIX
publicBaseImageReleasedDate :: Maybe POSIX
$sel:publicBaseImageReleasedDate:Image' :: Image -> Maybe POSIX
publicBaseImageReleasedDate} -> Maybe POSIX
publicBaseImageReleasedDate) (\s :: Image
s@Image' {} Maybe POSIX
a -> Image
s {$sel:publicBaseImageReleasedDate:Image' :: Maybe POSIX
publicBaseImageReleasedDate = Maybe POSIX
a} :: Image) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The image starts in the @PENDING@ state. If image creation succeeds, the
-- state is @AVAILABLE@. If image creation fails, the state is @FAILED@.
image_state :: Lens.Lens' Image (Prelude.Maybe ImageState)
image_state :: Lens' Image (Maybe ImageState)
image_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageState
state :: Maybe ImageState
$sel:state:Image' :: Image -> Maybe ImageState
state} -> Maybe ImageState
state) (\s :: Image
s@Image' {} Maybe ImageState
a -> Image
s {$sel:state:Image' :: Maybe ImageState
state = Maybe ImageState
a} :: Image)

-- | The reason why the last state change occurred.
image_stateChangeReason :: Lens.Lens' Image (Prelude.Maybe ImageStateChangeReason)
image_stateChangeReason :: Lens' Image (Maybe ImageStateChangeReason)
image_stateChangeReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe ImageStateChangeReason
stateChangeReason :: Maybe ImageStateChangeReason
$sel:stateChangeReason:Image' :: Image -> Maybe ImageStateChangeReason
stateChangeReason} -> Maybe ImageStateChangeReason
stateChangeReason) (\s :: Image
s@Image' {} Maybe ImageStateChangeReason
a -> Image
s {$sel:stateChangeReason:Image' :: Maybe ImageStateChangeReason
stateChangeReason = Maybe ImageStateChangeReason
a} :: Image)

-- | Indicates whether the image is public or private.
image_visibility :: Lens.Lens' Image (Prelude.Maybe VisibilityType)
image_visibility :: Lens' Image (Maybe VisibilityType)
image_visibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Image' {Maybe VisibilityType
visibility :: Maybe VisibilityType
$sel:visibility:Image' :: Image -> Maybe VisibilityType
visibility} -> Maybe VisibilityType
visibility) (\s :: Image
s@Image' {} Maybe VisibilityType
a -> Image
s {$sel:visibility:Image' :: Maybe VisibilityType
visibility = Maybe VisibilityType
a} :: Image)

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

instance Data.FromJSON Image where
  parseJSON :: Value -> Parser Image
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Image"
      ( \Object
x ->
          Maybe [Application]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [ResourceError]
-> Maybe ImagePermissions
-> Maybe PlatformType
-> Maybe POSIX
-> Maybe ImageState
-> Maybe ImageStateChangeReason
-> Maybe VisibilityType
-> Text
-> Image
Image'
            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
"Applications" 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
"AppstreamAgentVersion")
            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
"Arn")
            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
"BaseImageArn")
            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
"CreatedTime")
            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
"Description")
            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
"DisplayName")
            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
"ImageBuilderName")
            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
"ImageBuilderSupported")
            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
"ImageErrors" 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
"ImagePermissions")
            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
"Platform")
            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
"PublicBaseImageReleasedDate")
            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
"State")
            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
"StateChangeReason")
            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
"Visibility")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
      )

instance Prelude.Hashable Image where
  hashWithSalt :: Int -> Image -> Int
hashWithSalt Int
_salt Image' {Maybe Bool
Maybe [ResourceError]
Maybe [Application]
Maybe Text
Maybe POSIX
Maybe ImagePermissions
Maybe ImageState
Maybe ImageStateChangeReason
Maybe PlatformType
Maybe VisibilityType
Text
name :: Text
visibility :: Maybe VisibilityType
stateChangeReason :: Maybe ImageStateChangeReason
state :: Maybe ImageState
publicBaseImageReleasedDate :: Maybe POSIX
platform :: Maybe PlatformType
imagePermissions :: Maybe ImagePermissions
imageErrors :: Maybe [ResourceError]
imageBuilderSupported :: Maybe Bool
imageBuilderName :: Maybe Text
displayName :: Maybe Text
description :: Maybe Text
createdTime :: Maybe POSIX
baseImageArn :: Maybe Text
arn :: Maybe Text
appstreamAgentVersion :: Maybe Text
applications :: Maybe [Application]
$sel:name:Image' :: Image -> Text
$sel:visibility:Image' :: Image -> Maybe VisibilityType
$sel:stateChangeReason:Image' :: Image -> Maybe ImageStateChangeReason
$sel:state:Image' :: Image -> Maybe ImageState
$sel:publicBaseImageReleasedDate:Image' :: Image -> Maybe POSIX
$sel:platform:Image' :: Image -> Maybe PlatformType
$sel:imagePermissions:Image' :: Image -> Maybe ImagePermissions
$sel:imageErrors:Image' :: Image -> Maybe [ResourceError]
$sel:imageBuilderSupported:Image' :: Image -> Maybe Bool
$sel:imageBuilderName:Image' :: Image -> Maybe Text
$sel:displayName:Image' :: Image -> Maybe Text
$sel:description:Image' :: Image -> Maybe Text
$sel:createdTime:Image' :: Image -> Maybe POSIX
$sel:baseImageArn:Image' :: Image -> Maybe Text
$sel:arn:Image' :: Image -> Maybe Text
$sel:appstreamAgentVersion:Image' :: Image -> Maybe Text
$sel:applications:Image' :: Image -> Maybe [Application]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Application]
applications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
appstreamAgentVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
baseImageArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageBuilderName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
imageBuilderSupported
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ResourceError]
imageErrors
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImagePermissions
imagePermissions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PlatformType
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
publicBaseImageReleasedDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageStateChangeReason
stateChangeReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VisibilityType
visibility
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData Image where
  rnf :: Image -> ()
rnf Image' {Maybe Bool
Maybe [ResourceError]
Maybe [Application]
Maybe Text
Maybe POSIX
Maybe ImagePermissions
Maybe ImageState
Maybe ImageStateChangeReason
Maybe PlatformType
Maybe VisibilityType
Text
name :: Text
visibility :: Maybe VisibilityType
stateChangeReason :: Maybe ImageStateChangeReason
state :: Maybe ImageState
publicBaseImageReleasedDate :: Maybe POSIX
platform :: Maybe PlatformType
imagePermissions :: Maybe ImagePermissions
imageErrors :: Maybe [ResourceError]
imageBuilderSupported :: Maybe Bool
imageBuilderName :: Maybe Text
displayName :: Maybe Text
description :: Maybe Text
createdTime :: Maybe POSIX
baseImageArn :: Maybe Text
arn :: Maybe Text
appstreamAgentVersion :: Maybe Text
applications :: Maybe [Application]
$sel:name:Image' :: Image -> Text
$sel:visibility:Image' :: Image -> Maybe VisibilityType
$sel:stateChangeReason:Image' :: Image -> Maybe ImageStateChangeReason
$sel:state:Image' :: Image -> Maybe ImageState
$sel:publicBaseImageReleasedDate:Image' :: Image -> Maybe POSIX
$sel:platform:Image' :: Image -> Maybe PlatformType
$sel:imagePermissions:Image' :: Image -> Maybe ImagePermissions
$sel:imageErrors:Image' :: Image -> Maybe [ResourceError]
$sel:imageBuilderSupported:Image' :: Image -> Maybe Bool
$sel:imageBuilderName:Image' :: Image -> Maybe Text
$sel:displayName:Image' :: Image -> Maybe Text
$sel:description:Image' :: Image -> Maybe Text
$sel:createdTime:Image' :: Image -> Maybe POSIX
$sel:baseImageArn:Image' :: Image -> Maybe Text
$sel:arn:Image' :: Image -> Maybe Text
$sel:appstreamAgentVersion:Image' :: Image -> Maybe Text
$sel:applications:Image' :: Image -> Maybe [Application]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Application]
applications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appstreamAgentVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
baseImageArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageBuilderName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
imageBuilderSupported
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ResourceError]
imageErrors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImagePermissions
imagePermissions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PlatformType
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
publicBaseImageReleasedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageStateChangeReason
stateChangeReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VisibilityType
visibility
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name