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

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

-- |
--
-- /See:/ 'newStreamingImage' smart constructor.
data StreamingImage = StreamingImage'
  { -- | The current state.
    StreamingImage -> Maybe StreamingImageState
state :: Prelude.Maybe StreamingImageState,
    -- | The platform of the streaming image, either WINDOWS or LINUX.
    StreamingImage -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the resource.
    StreamingImage -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the streaming image.
    StreamingImage -> Maybe Text
streamingImageId :: Prelude.Maybe 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 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,
    -- | A friendly name for a streaming image resource.
    StreamingImage -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The encryption configuration.
    StreamingImage -> Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe StreamingImageEncryptionConfiguration,
    -- | The status message for the streaming image.
    StreamingImage -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | 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 human-readable description of the streaming image.
    StreamingImage -> Maybe Text
description :: 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),
    -- | The status code.
    StreamingImage -> Maybe StreamingImageStatusCode
statusCode :: Prelude.Maybe StreamingImageStatusCode
  }
  deriving (StreamingImage -> StreamingImage -> Bool
(StreamingImage -> StreamingImage -> Bool)
-> (StreamingImage -> StreamingImage -> Bool) -> Eq StreamingImage
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, ReadPrec [StreamingImage]
ReadPrec StreamingImage
Int -> ReadS StreamingImage
ReadS [StreamingImage]
(Int -> ReadS StreamingImage)
-> ReadS [StreamingImage]
-> ReadPrec StreamingImage
-> ReadPrec [StreamingImage]
-> Read StreamingImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingImage]
$creadListPrec :: ReadPrec [StreamingImage]
readPrec :: ReadPrec StreamingImage
$creadPrec :: ReadPrec StreamingImage
readList :: ReadS [StreamingImage]
$creadList :: ReadS [StreamingImage]
readsPrec :: Int -> ReadS StreamingImage
$creadsPrec :: Int -> ReadS StreamingImage
Prelude.Read, Int -> StreamingImage -> ShowS
[StreamingImage] -> ShowS
StreamingImage -> String
(Int -> StreamingImage -> ShowS)
-> (StreamingImage -> String)
-> ([StreamingImage] -> ShowS)
-> Show StreamingImage
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. StreamingImage -> Rep StreamingImage x)
-> (forall x. Rep StreamingImage x -> StreamingImage)
-> Generic StreamingImage
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:
--
-- 'state', 'streamingImage_state' - The current state.
--
-- 'platform', 'streamingImage_platform' - The platform of the streaming image, either WINDOWS or LINUX.
--
-- 'arn', 'streamingImage_arn' - The ARN of the resource.
--
-- 'streamingImageId', 'streamingImage_streamingImageId' - The ID of the streaming image.
--
-- 'ec2ImageId', 'streamingImage_ec2ImageId' - The ID of an EC2 machine image with which to create the streaming image.
--
-- '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.
--
-- 'name', 'streamingImage_name' - A friendly name for a streaming image resource.
--
-- 'encryptionConfiguration', 'streamingImage_encryptionConfiguration' - The encryption configuration.
--
-- 'statusMessage', 'streamingImage_statusMessage' - The status message for the streaming image.
--
-- 'eulaIds', 'streamingImage_eulaIds' - The list of EULAs that must be accepted before a Streaming Session can
-- be started using this streaming image.
--
-- 'description', 'streamingImage_description' - A human-readable description of the streaming image.
--
-- 'tags', 'streamingImage_tags' - A collection of labels, in the form of key:value pairs, that apply to
-- this resource.
--
-- 'statusCode', 'streamingImage_statusCode' - The status code.
newStreamingImage ::
  StreamingImage
newStreamingImage :: StreamingImage
newStreamingImage =
  StreamingImage' :: Maybe StreamingImageState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingImageEncryptionConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StreamingImageStatusCode
-> StreamingImage
StreamingImage'
    { $sel:state:StreamingImage' :: Maybe StreamingImageState
state = Maybe StreamingImageState
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:StreamingImage' :: Maybe Text
platform = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:StreamingImage' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamingImageId:StreamingImage' :: Maybe Text
streamingImageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ec2ImageId:StreamingImage' :: Maybe Text
ec2ImageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:StreamingImage' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:StreamingImage' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionConfiguration:StreamingImage' :: Maybe StreamingImageEncryptionConfiguration
encryptionConfiguration = Maybe StreamingImageEncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:StreamingImage' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eulaIds:StreamingImage' :: Maybe [Text]
eulaIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:StreamingImage' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StreamingImage' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:StreamingImage' :: Maybe StreamingImageStatusCode
statusCode = Maybe StreamingImageStatusCode
forall a. Maybe a
Prelude.Nothing
    }

-- | The current state.
streamingImage_state :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageState)
streamingImage_state :: (Maybe StreamingImageState -> f (Maybe StreamingImageState))
-> StreamingImage -> f StreamingImage
streamingImage_state = (StreamingImage -> Maybe StreamingImageState)
-> (StreamingImage -> Maybe StreamingImageState -> StreamingImage)
-> Lens
     StreamingImage
     StreamingImage
     (Maybe StreamingImageState)
     (Maybe StreamingImageState)
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 platform of the streaming image, either WINDOWS or LINUX.
streamingImage_platform :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_platform :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_platform = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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 ARN of the resource.
streamingImage_arn :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_arn :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_arn = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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)

-- | The ID of the streaming image.
streamingImage_streamingImageId :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_streamingImageId :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_streamingImageId = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_ec2ImageId = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_owner = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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)

-- | A friendly name for a streaming image resource.
streamingImage_name :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_name :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_name = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingImage' {Maybe Text
name :: Maybe Text
$sel:name:StreamingImage' :: StreamingImage -> Maybe Text
name} -> Maybe Text
name) (\s :: StreamingImage
s@StreamingImage' {} Maybe Text
a -> StreamingImage
s {$sel:name:StreamingImage' :: Maybe Text
name = Maybe Text
a} :: StreamingImage)

-- | The encryption configuration.
streamingImage_encryptionConfiguration :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageEncryptionConfiguration)
streamingImage_encryptionConfiguration :: (Maybe StreamingImageEncryptionConfiguration
 -> f (Maybe StreamingImageEncryptionConfiguration))
-> StreamingImage -> f StreamingImage
streamingImage_encryptionConfiguration = (StreamingImage -> Maybe StreamingImageEncryptionConfiguration)
-> (StreamingImage
    -> Maybe StreamingImageEncryptionConfiguration -> StreamingImage)
-> Lens
     StreamingImage
     StreamingImage
     (Maybe StreamingImageEncryptionConfiguration)
     (Maybe StreamingImageEncryptionConfiguration)
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 status message for the streaming image.
streamingImage_statusMessage :: Lens.Lens' StreamingImage (Prelude.Maybe Prelude.Text)
streamingImage_statusMessage :: (Maybe Text -> f (Maybe Text))
-> StreamingImage -> f StreamingImage
streamingImage_statusMessage = (StreamingImage -> Maybe Text)
-> (StreamingImage -> Maybe Text -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe Text) (Maybe Text)
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 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> StreamingImage -> f StreamingImage
streamingImage_eulaIds = (StreamingImage -> Maybe [Text])
-> (StreamingImage -> Maybe [Text] -> StreamingImage)
-> Lens StreamingImage StreamingImage (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> StreamingImage -> f StreamingImage)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StreamingImage
-> f StreamingImage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The status code.
streamingImage_statusCode :: Lens.Lens' StreamingImage (Prelude.Maybe StreamingImageStatusCode)
streamingImage_statusCode :: (Maybe StreamingImageStatusCode
 -> f (Maybe StreamingImageStatusCode))
-> StreamingImage -> f StreamingImage
streamingImage_statusCode = (StreamingImage -> Maybe StreamingImageStatusCode)
-> (StreamingImage
    -> Maybe StreamingImageStatusCode -> StreamingImage)
-> Lens
     StreamingImage
     StreamingImage
     (Maybe StreamingImageStatusCode)
     (Maybe StreamingImageStatusCode)
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)

instance Core.FromJSON StreamingImage where
  parseJSON :: Value -> Parser StreamingImage
parseJSON =
    String
-> (Object -> Parser StreamingImage)
-> Value
-> Parser StreamingImage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"StreamingImage"
      ( \Object
x ->
          Maybe StreamingImageState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingImageEncryptionConfiguration
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StreamingImageStatusCode
-> StreamingImage
StreamingImage'
            (Maybe StreamingImageState
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe StreamingImageEncryptionConfiguration
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe StreamingImageStatusCode
 -> StreamingImage)
-> Parser (Maybe StreamingImageState)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe StreamingImageState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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
"platform")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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
"streamingImageId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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
"ec2ImageId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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
"owner")
            Parser
  (Maybe Text
   -> Maybe StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe StreamingImageEncryptionConfiguration
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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 StreamingImageEncryptionConfiguration
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe StreamingImageEncryptionConfiguration)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe StreamingImageEncryptionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryptionConfiguration")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
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
"statusMessage")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode
      -> StreamingImage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eulaIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingImageStatusCode
   -> StreamingImage)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe StreamingImageStatusCode -> StreamingImage)
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)
   -> Maybe StreamingImageStatusCode -> StreamingImage)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe StreamingImageStatusCode -> StreamingImage)
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)
            Parser (Maybe StreamingImageStatusCode -> StreamingImage)
-> Parser (Maybe StreamingImageStatusCode) -> Parser StreamingImage
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamingImageStatusCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusCode")
      )

instance Prelude.Hashable StreamingImage

instance Prelude.NFData StreamingImage