{-# 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.Nimble.Types.StreamingImage
-- 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.Nimble.Types.StreamingImage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types.StreamingImageEncryptionConfiguration
import Amazonka.Nimble.Types.StreamingImageState
import Amazonka.Nimble.Types.StreamingImageStatusCode
import qualified Amazonka.Prelude as Prelude

-- | Represents a streaming image resource.
--
-- Streaming images are used by studio users to select which operating
-- system and software they want to use in a Nimble Studio streaming
-- session.
--
-- Amazon provides a number of streaming images that include popular
-- 3rd-party software.
--
-- You can create your own streaming images using an Amazon EC2 machine
-- image that you create for this purpose. You can also include software
-- that your users require.
--
-- /See:/ 'newStreamingImage' smart constructor.
data StreamingImage = StreamingImage'
  { -- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
    -- uniquely identifies it. ARNs are unique across all Regions.
    StreamingImage -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A human-readable description of the streaming image.
    StreamingImage -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The ID of an EC2 machine image with which to create the streaming image.
    StreamingImage -> Maybe Text
ec2ImageId :: Prelude.Maybe Prelude.Text,
    -- | The encryption configuration.
    StreamingImage -> Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe StreamingImageEncryptionConfiguration,
    -- | The list of EULAs that must be accepted before a Streaming Session can
    -- be started using this streaming image.
    StreamingImage -> Maybe [Text]
eulaIds :: Prelude.Maybe [Prelude.Text],
    -- | A friendly name for a streaming image resource.
    StreamingImage -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The owner of the streaming image, either the @studioId@ that contains
    -- the streaming image, or @amazon@ for images that are provided by Amazon
    -- Nimble Studio.
    StreamingImage -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The platform of the streaming image, either Windows or Linux.
    StreamingImage -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
    -- | The current state.
    StreamingImage -> Maybe StreamingImageState
state :: Prelude.Maybe StreamingImageState,
    -- | The status code.
    StreamingImage -> Maybe StreamingImageStatusCode
statusCode :: Prelude.Maybe StreamingImageStatusCode,
    -- | The status message for the streaming image.
    StreamingImage -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The ID of the streaming image.
    StreamingImage -> Maybe Text
streamingImageId :: Prelude.Maybe Prelude.Text,
    -- | A collection of labels, in the form of key-value pairs, that apply to
    -- this resource.
    StreamingImage -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (StreamingImage -> StreamingImage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingImage -> StreamingImage -> Bool
$c/= :: StreamingImage -> StreamingImage -> Bool
== :: StreamingImage -> StreamingImage -> Bool
$c== :: StreamingImage -> StreamingImage -> Bool
Prelude.Eq, Int -> StreamingImage -> ShowS
[StreamingImage] -> ShowS
StreamingImage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingImage] -> ShowS
$cshowList :: [StreamingImage] -> ShowS
show :: StreamingImage -> String
$cshow :: StreamingImage -> String
showsPrec :: Int -> StreamingImage -> ShowS
$cshowsPrec :: Int -> StreamingImage -> ShowS
Prelude.Show, forall x. Rep StreamingImage x -> StreamingImage
forall x. StreamingImage -> Rep StreamingImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamingImage x -> StreamingImage
$cfrom :: forall x. StreamingImage -> Rep StreamingImage x
Prelude.Generic)

-- |
-- Create a value of 'StreamingImage' 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:
--
-- 'arn', 'streamingImage_arn' - The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
--
-- 'description', 'streamingImage_description' - A human-readable description of the streaming image.
--
-- 'ec2ImageId', 'streamingImage_ec2ImageId' - The ID of an EC2 machine image with which to create the streaming image.
--
-- 'encryptionConfiguration', 'streamingImage_encryptionConfiguration' - The encryption configuration.
--
-- 'eulaIds', 'streamingImage_eulaIds' - The list of EULAs that must be accepted before a Streaming Session can
-- be started using this streaming image.
--
-- 'name', 'streamingImage_name' - A friendly name for a streaming image resource.
--
-- 'owner', 'streamingImage_owner' - The owner of the streaming image, either the @studioId@ that contains
-- the streaming image, or @amazon@ for images that are provided by Amazon
-- Nimble Studio.
--
-- 'platform', 'streamingImage_platform' - The platform of the streaming image, either Windows or Linux.
--
-- 'state', 'streamingImage_state' - The current state.
--
-- 'statusCode', 'streamingImage_statusCode' - The status code.
--
-- 'statusMessage', 'streamingImage_statusMessage' - The status message for the streaming image.
--
-- 'streamingImageId', 'streamingImage_streamingImageId' - The ID of the streaming image.
--
-- 'tags', 'streamingImage_tags' - A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
newStreamingImage ::
  StreamingImage
newStreamingImage :: StreamingImage
newStreamingImage =
  StreamingImage'
    { $sel:arn:StreamingImage' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:StreamingImage' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2ImageId:StreamingImage' :: Maybe Text
ec2ImageId = forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionConfiguration:StreamingImage' :: Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:eulaIds:StreamingImage' :: Maybe [Text]
eulaIds = forall a. Maybe a
Prelude.Nothing,
      $sel:name:StreamingImage' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing,
      $sel:owner:StreamingImage' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
      $sel:platform:StreamingImage' :: Maybe Text
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:state:StreamingImage' :: Maybe StreamingImageState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:StreamingImage' :: Maybe StreamingImageStatusCode
statusCode = forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:StreamingImage' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:streamingImageId:StreamingImage' :: Maybe Text
streamingImageId = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StreamingImage' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
streamingImage_arn :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_arn :: Lens' StreamingImage (Maybe Text)
streamingImage_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
arn :: Maybe Text
$sel:arn:StreamingImage' :: StreamingImage -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:arn:StreamingImage' :: Maybe Text
arn = Maybe Text
a} :: StreamingImage)

-- | A human-readable description of the streaming image.
streamingImage_description :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_description :: Lens' StreamingImage (Maybe Text)
streamingImage_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: StreamingImage
s@StreamingImage' {} Maybe (Sensitive Text)
a -> StreamingImage
s {$sel:description:StreamingImage' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: StreamingImage) 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. Iso' (Sensitive a) a
Data._Sensitive

-- | The ID of an EC2 machine image with which to create the streaming image.
streamingImage_ec2ImageId :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_ec2ImageId :: Lens' StreamingImage (Maybe Text)
streamingImage_ec2ImageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
ec2ImageId :: Maybe Text
$sel:ec2ImageId:StreamingImage' :: StreamingImage -> Maybe Text
ec2ImageId} -> Maybe Text
ec2ImageId) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:ec2ImageId:StreamingImage' :: Maybe Text
ec2ImageId = Maybe Text
a} :: StreamingImage)

-- | The encryption configuration.
streamingImage_encryptionConfiguration :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageEncryptionConfiguration)
streamingImage_encryptionConfiguration :: Lens' StreamingImage (Maybe StreamingImageEncryptionConfiguration)
streamingImage_encryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration :: Maybe StreamingImageEncryptionConfiguration
$sel:encryptionConfiguration:StreamingImage' :: StreamingImage -> Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration} -> Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration) (\s :: StreamingImage
s@StreamingImage' {} Maybe StreamingImageEncryptionConfiguration
a -> StreamingImage
s {$sel:encryptionConfiguration:StreamingImage' :: Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration = Maybe StreamingImageEncryptionConfiguration
a} :: StreamingImage)

-- | The list of EULAs that must be accepted before a Streaming Session can
-- be started using this streaming image.
streamingImage_eulaIds :: Lens.Lens' StreamingImage (Prelude.Maybe [Prelude.Text])
streamingImage_eulaIds :: Lens' StreamingImage (Maybe [Text])
streamingImage_eulaIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe [Text]
eulaIds :: Maybe [Text]
$sel:eulaIds:StreamingImage' :: StreamingImage -> Maybe [Text]
eulaIds} -> Maybe [Text]
eulaIds) (\s :: StreamingImage
s@StreamingImage' {} Maybe [Text]
a -> StreamingImage
s {$sel:eulaIds:StreamingImage' :: Maybe [Text]
eulaIds = Maybe [Text]
a} :: StreamingImage) 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 friendly name for a streaming image resource.
streamingImage_name :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_name :: Lens' StreamingImage (Maybe Text)
streamingImage_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: StreamingImage
s@StreamingImage' {} Maybe (Sensitive Text)
a -> StreamingImage
s {$sel:name:StreamingImage' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: StreamingImage) 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. Iso' (Sensitive a) a
Data._Sensitive

-- | The owner of the streaming image, either the @studioId@ that contains
-- the streaming image, or @amazon@ for images that are provided by Amazon
-- Nimble Studio.
streamingImage_owner :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_owner :: Lens' StreamingImage (Maybe Text)
streamingImage_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
owner :: Maybe Text
$sel:owner:StreamingImage' :: StreamingImage -> Maybe Text
owner} -> Maybe Text
owner) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:owner:StreamingImage' :: Maybe Text
owner = Maybe Text
a} :: StreamingImage)

-- | The platform of the streaming image, either Windows or Linux.
streamingImage_platform :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_platform :: Lens' StreamingImage (Maybe Text)
streamingImage_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
platform :: Maybe Text
$sel:platform:StreamingImage' :: StreamingImage -> Maybe Text
platform} -> Maybe Text
platform) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:platform:StreamingImage' :: Maybe Text
platform = Maybe Text
a} :: StreamingImage)

-- | The current state.
streamingImage_state :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageState)
streamingImage_state :: Lens' StreamingImage (Maybe StreamingImageState)
streamingImage_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe StreamingImageState
state :: Maybe StreamingImageState
$sel:state:StreamingImage' :: StreamingImage -> Maybe StreamingImageState
state} -> Maybe StreamingImageState
state) (\s :: StreamingImage
s@StreamingImage' {} Maybe StreamingImageState
a -> StreamingImage
s {$sel:state:StreamingImage' :: Maybe StreamingImageState
state = Maybe StreamingImageState
a} :: StreamingImage)

-- | The status code.
streamingImage_statusCode :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageStatusCode)
streamingImage_statusCode :: Lens' StreamingImage (Maybe StreamingImageStatusCode)
streamingImage_statusCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe StreamingImageStatusCode
statusCode :: Maybe StreamingImageStatusCode
$sel:statusCode:StreamingImage' :: StreamingImage -> Maybe StreamingImageStatusCode
statusCode} -> Maybe StreamingImageStatusCode
statusCode) (\s :: StreamingImage
s@StreamingImage' {} Maybe StreamingImageStatusCode
a -> StreamingImage
s {$sel:statusCode:StreamingImage' :: Maybe StreamingImageStatusCode
statusCode = Maybe StreamingImageStatusCode
a} :: StreamingImage)

-- | The status message for the streaming image.
streamingImage_statusMessage :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_statusMessage :: Lens' StreamingImage (Maybe Text)
streamingImage_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:StreamingImage' :: StreamingImage -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:statusMessage:StreamingImage' :: Maybe Text
statusMessage = Maybe Text
a} :: StreamingImage)

-- | The ID of the streaming image.
streamingImage_streamingImageId :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_streamingImageId :: Lens' StreamingImage (Maybe Text)
streamingImage_streamingImageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
streamingImageId :: Maybe Text
$sel:streamingImageId:StreamingImage' :: StreamingImage -> Maybe Text
streamingImageId} -> Maybe Text
streamingImageId) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:streamingImageId:StreamingImage' :: Maybe Text
streamingImageId = Maybe Text
a} :: StreamingImage)

-- | A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
streamingImage_tags :: Lens.Lens' StreamingImage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
streamingImage_tags :: Lens' StreamingImage (Maybe (HashMap Text Text))
streamingImage_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StreamingImage' :: StreamingImage -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StreamingImage
s@StreamingImage' {} Maybe (HashMap Text Text)
a -> StreamingImage
s {$sel:tags:StreamingImage' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StreamingImage) 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

instance Data.FromJSON StreamingImage where
  parseJSON :: Value -> Parser StreamingImage
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"StreamingImage"
      ( \Object
x ->
          Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe StreamingImageEncryptionConfiguration
-> Maybe [Text]
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe StreamingImageState
-> Maybe StreamingImageStatusCode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> StreamingImage
StreamingImage'
            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
"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
"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
"ec2ImageId")
            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
"encryptionConfiguration")
            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
"eulaIds" 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
"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
"owner")
            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
"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
"statusCode")
            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
"statusMessage")
            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
"streamingImageId")
            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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable StreamingImage where
  hashWithSalt :: Int -> StreamingImage -> Int
hashWithSalt Int
_salt StreamingImage' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe StreamingImageEncryptionConfiguration
Maybe StreamingImageState
Maybe StreamingImageStatusCode
tags :: Maybe (HashMap Text Text)
streamingImageId :: Maybe Text
statusMessage :: Maybe Text
statusCode :: Maybe StreamingImageStatusCode
state :: Maybe StreamingImageState
platform :: Maybe Text
owner :: Maybe Text
name :: Maybe (Sensitive Text)
eulaIds :: Maybe [Text]
encryptionConfiguration :: Maybe StreamingImageEncryptionConfiguration
ec2ImageId :: Maybe Text
description :: Maybe (Sensitive Text)
arn :: Maybe Text
$sel:tags:StreamingImage' :: StreamingImage -> Maybe (HashMap Text Text)
$sel:streamingImageId:StreamingImage' :: StreamingImage -> Maybe Text
$sel:statusMessage:StreamingImage' :: StreamingImage -> Maybe Text
$sel:statusCode:StreamingImage' :: StreamingImage -> Maybe StreamingImageStatusCode
$sel:state:StreamingImage' :: StreamingImage -> Maybe StreamingImageState
$sel:platform:StreamingImage' :: StreamingImage -> Maybe Text
$sel:owner:StreamingImage' :: StreamingImage -> Maybe Text
$sel:name:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
$sel:eulaIds:StreamingImage' :: StreamingImage -> Maybe [Text]
$sel:encryptionConfiguration:StreamingImage' :: StreamingImage -> Maybe StreamingImageEncryptionConfiguration
$sel:ec2ImageId:StreamingImage' :: StreamingImage -> Maybe Text
$sel:description:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
$sel:arn:StreamingImage' :: StreamingImage -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2ImageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
eulaIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingImageState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingImageStatusCode
statusCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamingImageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags

instance Prelude.NFData StreamingImage where
  rnf :: StreamingImage -> ()
rnf StreamingImage' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe StreamingImageEncryptionConfiguration
Maybe StreamingImageState
Maybe StreamingImageStatusCode
tags :: Maybe (HashMap Text Text)
streamingImageId :: Maybe Text
statusMessage :: Maybe Text
statusCode :: Maybe StreamingImageStatusCode
state :: Maybe StreamingImageState
platform :: Maybe Text
owner :: Maybe Text
name :: Maybe (Sensitive Text)
eulaIds :: Maybe [Text]
encryptionConfiguration :: Maybe StreamingImageEncryptionConfiguration
ec2ImageId :: Maybe Text
description :: Maybe (Sensitive Text)
arn :: Maybe Text
$sel:tags:StreamingImage' :: StreamingImage -> Maybe (HashMap Text Text)
$sel:streamingImageId:StreamingImage' :: StreamingImage -> Maybe Text
$sel:statusMessage:StreamingImage' :: StreamingImage -> Maybe Text
$sel:statusCode:StreamingImage' :: StreamingImage -> Maybe StreamingImageStatusCode
$sel:state:StreamingImage' :: StreamingImage -> Maybe StreamingImageState
$sel:platform:StreamingImage' :: StreamingImage -> Maybe Text
$sel:owner:StreamingImage' :: StreamingImage -> Maybe Text
$sel:name:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
$sel:eulaIds:StreamingImage' :: StreamingImage -> Maybe [Text]
$sel:encryptionConfiguration:StreamingImage' :: StreamingImage -> Maybe StreamingImageEncryptionConfiguration
$sel:ec2ImageId:StreamingImage' :: StreamingImage -> Maybe Text
$sel:description:StreamingImage' :: StreamingImage -> Maybe (Sensitive Text)
$sel:arn:StreamingImage' :: StreamingImage -> Maybe Text
..} =
    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 (Sensitive Text)
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2ImageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
eulaIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingImageState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingImageStatusCode
statusCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamingImageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags