{-# 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.Stack
-- 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.AppStream.Types.Stack where

import Amazonka.AppStream.Types.AccessEndpoint
import Amazonka.AppStream.Types.ApplicationSettingsResponse
import Amazonka.AppStream.Types.StackError
import Amazonka.AppStream.Types.StorageConnector
import Amazonka.AppStream.Types.UserSetting
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a stack.
--
-- /See:/ 'newStack' smart constructor.
data Stack = Stack'
  { -- | The actions that are enabled or disabled for users during their
    -- streaming sessions. By default these actions are enabled.
    Stack -> Maybe (NonEmpty UserSetting)
userSettings :: Prelude.Maybe (Prelude.NonEmpty UserSetting),
    -- | The persistent application settings for users of the stack.
    Stack -> Maybe ApplicationSettingsResponse
applicationSettings :: Prelude.Maybe ApplicationSettingsResponse,
    -- | The URL that users are redirected to after they click the Send Feedback
    -- link. If no URL is specified, no Send Feedback link is displayed.
    Stack -> Maybe Text
feedbackURL :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the stack.
    Stack -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time the stack was created.
    Stack -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The storage connectors to enable.
    Stack -> Maybe [StorageConnector]
storageConnectors :: Prelude.Maybe [StorageConnector],
    -- | The list of virtual private cloud (VPC) interface endpoint objects.
    -- Users of the stack can connect to AppStream 2.0 only through the
    -- specified endpoints.
    Stack -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Prelude.Maybe (Prelude.NonEmpty AccessEndpoint),
    -- | The stack name to display.
    Stack -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The errors for the stack.
    Stack -> Maybe [StackError]
stackErrors :: Prelude.Maybe [StackError],
    -- | The domains where AppStream 2.0 streaming sessions can be embedded in an
    -- iframe. You must approve the domains that you want to host embedded
    -- AppStream 2.0 streaming sessions.
    Stack -> Maybe (NonEmpty Text)
embedHostDomains :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The description to display.
    Stack -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The URL that users are redirected to after their streaming session ends.
    Stack -> Maybe Text
redirectURL :: Prelude.Maybe Prelude.Text,
    -- | The name of the stack.
    Stack -> Text
name :: Prelude.Text
  }
  deriving (Stack -> Stack -> Bool
(Stack -> Stack -> Bool) -> (Stack -> Stack -> Bool) -> Eq Stack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Stack -> Stack -> Bool
$c/= :: Stack -> Stack -> Bool
== :: Stack -> Stack -> Bool
$c== :: Stack -> Stack -> Bool
Prelude.Eq, ReadPrec [Stack]
ReadPrec Stack
Int -> ReadS Stack
ReadS [Stack]
(Int -> ReadS Stack)
-> ReadS [Stack]
-> ReadPrec Stack
-> ReadPrec [Stack]
-> Read Stack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Stack]
$creadListPrec :: ReadPrec [Stack]
readPrec :: ReadPrec Stack
$creadPrec :: ReadPrec Stack
readList :: ReadS [Stack]
$creadList :: ReadS [Stack]
readsPrec :: Int -> ReadS Stack
$creadsPrec :: Int -> ReadS Stack
Prelude.Read, Int -> Stack -> ShowS
[Stack] -> ShowS
Stack -> String
(Int -> Stack -> ShowS)
-> (Stack -> String) -> ([Stack] -> ShowS) -> Show Stack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Stack] -> ShowS
$cshowList :: [Stack] -> ShowS
show :: Stack -> String
$cshow :: Stack -> String
showsPrec :: Int -> Stack -> ShowS
$cshowsPrec :: Int -> Stack -> ShowS
Prelude.Show, (forall x. Stack -> Rep Stack x)
-> (forall x. Rep Stack x -> Stack) -> Generic Stack
forall x. Rep Stack x -> Stack
forall x. Stack -> Rep Stack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Stack x -> Stack
$cfrom :: forall x. Stack -> Rep Stack x
Prelude.Generic)

-- |
-- Create a value of 'Stack' 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:
--
-- 'userSettings', 'stack_userSettings' - The actions that are enabled or disabled for users during their
-- streaming sessions. By default these actions are enabled.
--
-- 'applicationSettings', 'stack_applicationSettings' - The persistent application settings for users of the stack.
--
-- 'feedbackURL', 'stack_feedbackURL' - The URL that users are redirected to after they click the Send Feedback
-- link. If no URL is specified, no Send Feedback link is displayed.
--
-- 'arn', 'stack_arn' - The ARN of the stack.
--
-- 'createdTime', 'stack_createdTime' - The time the stack was created.
--
-- 'storageConnectors', 'stack_storageConnectors' - The storage connectors to enable.
--
-- 'accessEndpoints', 'stack_accessEndpoints' - The list of virtual private cloud (VPC) interface endpoint objects.
-- Users of the stack can connect to AppStream 2.0 only through the
-- specified endpoints.
--
-- 'displayName', 'stack_displayName' - The stack name to display.
--
-- 'stackErrors', 'stack_stackErrors' - The errors for the stack.
--
-- 'embedHostDomains', 'stack_embedHostDomains' - The domains where AppStream 2.0 streaming sessions can be embedded in an
-- iframe. You must approve the domains that you want to host embedded
-- AppStream 2.0 streaming sessions.
--
-- 'description', 'stack_description' - The description to display.
--
-- 'redirectURL', 'stack_redirectURL' - The URL that users are redirected to after their streaming session ends.
--
-- 'name', 'stack_name' - The name of the stack.
newStack ::
  -- | 'name'
  Prelude.Text ->
  Stack
newStack :: Text -> Stack
newStack Text
pName_ =
  Stack' :: Maybe (NonEmpty UserSetting)
-> Maybe ApplicationSettingsResponse
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [StorageConnector]
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe Text
-> Maybe [StackError]
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Text
-> Stack
Stack'
    { $sel:userSettings:Stack' :: Maybe (NonEmpty UserSetting)
userSettings = Maybe (NonEmpty UserSetting)
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationSettings:Stack' :: Maybe ApplicationSettingsResponse
applicationSettings = Maybe ApplicationSettingsResponse
forall a. Maybe a
Prelude.Nothing,
      $sel:feedbackURL:Stack' :: Maybe Text
feedbackURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Stack' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:Stack' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:storageConnectors:Stack' :: Maybe [StorageConnector]
storageConnectors = Maybe [StorageConnector]
forall a. Maybe a
Prelude.Nothing,
      $sel:accessEndpoints:Stack' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Stack' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackErrors:Stack' :: Maybe [StackError]
stackErrors = Maybe [StackError]
forall a. Maybe a
Prelude.Nothing,
      $sel:embedHostDomains:Stack' :: Maybe (NonEmpty Text)
embedHostDomains = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Stack' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:redirectURL:Stack' :: Maybe Text
redirectURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Stack' :: Text
name = Text
pName_
    }

-- | The actions that are enabled or disabled for users during their
-- streaming sessions. By default these actions are enabled.
stack_userSettings :: Lens.Lens' Stack (Prelude.Maybe (Prelude.NonEmpty UserSetting))
stack_userSettings :: (Maybe (NonEmpty UserSetting) -> f (Maybe (NonEmpty UserSetting)))
-> Stack -> f Stack
stack_userSettings = (Stack -> Maybe (NonEmpty UserSetting))
-> (Stack -> Maybe (NonEmpty UserSetting) -> Stack)
-> Lens
     Stack
     Stack
     (Maybe (NonEmpty UserSetting))
     (Maybe (NonEmpty UserSetting))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe (NonEmpty UserSetting)
userSettings :: Maybe (NonEmpty UserSetting)
$sel:userSettings:Stack' :: Stack -> Maybe (NonEmpty UserSetting)
userSettings} -> Maybe (NonEmpty UserSetting)
userSettings) (\s :: Stack
s@Stack' {} Maybe (NonEmpty UserSetting)
a -> Stack
s {$sel:userSettings:Stack' :: Maybe (NonEmpty UserSetting)
userSettings = Maybe (NonEmpty UserSetting)
a} :: Stack) ((Maybe (NonEmpty UserSetting) -> f (Maybe (NonEmpty UserSetting)))
 -> Stack -> f Stack)
-> ((Maybe (NonEmpty UserSetting)
     -> f (Maybe (NonEmpty UserSetting)))
    -> Maybe (NonEmpty UserSetting)
    -> f (Maybe (NonEmpty UserSetting)))
-> (Maybe (NonEmpty UserSetting)
    -> f (Maybe (NonEmpty UserSetting)))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
-> Iso
     (Maybe (NonEmpty UserSetting))
     (Maybe (NonEmpty UserSetting))
     (Maybe (NonEmpty UserSetting))
     (Maybe (NonEmpty UserSetting))
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
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
  (NonEmpty UserSetting)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The persistent application settings for users of the stack.
stack_applicationSettings :: Lens.Lens' Stack (Prelude.Maybe ApplicationSettingsResponse)
stack_applicationSettings :: (Maybe ApplicationSettingsResponse
 -> f (Maybe ApplicationSettingsResponse))
-> Stack -> f Stack
stack_applicationSettings = (Stack -> Maybe ApplicationSettingsResponse)
-> (Stack -> Maybe ApplicationSettingsResponse -> Stack)
-> Lens
     Stack
     Stack
     (Maybe ApplicationSettingsResponse)
     (Maybe ApplicationSettingsResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe ApplicationSettingsResponse
applicationSettings :: Maybe ApplicationSettingsResponse
$sel:applicationSettings:Stack' :: Stack -> Maybe ApplicationSettingsResponse
applicationSettings} -> Maybe ApplicationSettingsResponse
applicationSettings) (\s :: Stack
s@Stack' {} Maybe ApplicationSettingsResponse
a -> Stack
s {$sel:applicationSettings:Stack' :: Maybe ApplicationSettingsResponse
applicationSettings = Maybe ApplicationSettingsResponse
a} :: Stack)

-- | The URL that users are redirected to after they click the Send Feedback
-- link. If no URL is specified, no Send Feedback link is displayed.
stack_feedbackURL :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_feedbackURL :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_feedbackURL = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
feedbackURL :: Maybe Text
$sel:feedbackURL:Stack' :: Stack -> Maybe Text
feedbackURL} -> Maybe Text
feedbackURL) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:feedbackURL:Stack' :: Maybe Text
feedbackURL = Maybe Text
a} :: Stack)

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

-- | The time the stack was created.
stack_createdTime :: Lens.Lens' Stack (Prelude.Maybe Prelude.UTCTime)
stack_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Stack -> f Stack
stack_createdTime = (Stack -> Maybe POSIX)
-> (Stack -> Maybe POSIX -> Stack)
-> Lens Stack Stack (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:Stack' :: Stack -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: Stack
s@Stack' {} Maybe POSIX
a -> Stack
s {$sel:createdTime:Stack' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: Stack) ((Maybe POSIX -> f (Maybe POSIX)) -> Stack -> f Stack)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The storage connectors to enable.
stack_storageConnectors :: Lens.Lens' Stack (Prelude.Maybe [StorageConnector])
stack_storageConnectors :: (Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> Stack -> f Stack
stack_storageConnectors = (Stack -> Maybe [StorageConnector])
-> (Stack -> Maybe [StorageConnector] -> Stack)
-> Lens
     Stack Stack (Maybe [StorageConnector]) (Maybe [StorageConnector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [StorageConnector]
storageConnectors :: Maybe [StorageConnector]
$sel:storageConnectors:Stack' :: Stack -> Maybe [StorageConnector]
storageConnectors} -> Maybe [StorageConnector]
storageConnectors) (\s :: Stack
s@Stack' {} Maybe [StorageConnector]
a -> Stack
s {$sel:storageConnectors:Stack' :: Maybe [StorageConnector]
storageConnectors = Maybe [StorageConnector]
a} :: Stack) ((Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
 -> Stack -> f Stack)
-> ((Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
    -> Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> (Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StorageConnector]
  [StorageConnector]
  [StorageConnector]
  [StorageConnector]
-> Iso
     (Maybe [StorageConnector])
     (Maybe [StorageConnector])
     (Maybe [StorageConnector])
     (Maybe [StorageConnector])
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
  [StorageConnector]
  [StorageConnector]
  [StorageConnector]
  [StorageConnector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The list of virtual private cloud (VPC) interface endpoint objects.
-- Users of the stack can connect to AppStream 2.0 only through the
-- specified endpoints.
stack_accessEndpoints :: Lens.Lens' Stack (Prelude.Maybe (Prelude.NonEmpty AccessEndpoint))
stack_accessEndpoints :: (Maybe (NonEmpty AccessEndpoint)
 -> f (Maybe (NonEmpty AccessEndpoint)))
-> Stack -> f Stack
stack_accessEndpoints = (Stack -> Maybe (NonEmpty AccessEndpoint))
-> (Stack -> Maybe (NonEmpty AccessEndpoint) -> Stack)
-> Lens
     Stack
     Stack
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
$sel:accessEndpoints:Stack' :: Stack -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints} -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints) (\s :: Stack
s@Stack' {} Maybe (NonEmpty AccessEndpoint)
a -> Stack
s {$sel:accessEndpoints:Stack' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
a} :: Stack) ((Maybe (NonEmpty AccessEndpoint)
  -> f (Maybe (NonEmpty AccessEndpoint)))
 -> Stack -> f Stack)
-> ((Maybe (NonEmpty AccessEndpoint)
     -> f (Maybe (NonEmpty AccessEndpoint)))
    -> Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> (Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
-> Iso
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
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
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The errors for the stack.
stack_stackErrors :: Lens.Lens' Stack (Prelude.Maybe [StackError])
stack_stackErrors :: (Maybe [StackError] -> f (Maybe [StackError])) -> Stack -> f Stack
stack_stackErrors = (Stack -> Maybe [StackError])
-> (Stack -> Maybe [StackError] -> Stack)
-> Lens Stack Stack (Maybe [StackError]) (Maybe [StackError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [StackError]
stackErrors :: Maybe [StackError]
$sel:stackErrors:Stack' :: Stack -> Maybe [StackError]
stackErrors} -> Maybe [StackError]
stackErrors) (\s :: Stack
s@Stack' {} Maybe [StackError]
a -> Stack
s {$sel:stackErrors:Stack' :: Maybe [StackError]
stackErrors = Maybe [StackError]
a} :: Stack) ((Maybe [StackError] -> f (Maybe [StackError]))
 -> Stack -> f Stack)
-> ((Maybe [StackError] -> f (Maybe [StackError]))
    -> Maybe [StackError] -> f (Maybe [StackError]))
-> (Maybe [StackError] -> f (Maybe [StackError]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [StackError] [StackError] [StackError] [StackError]
-> Iso
     (Maybe [StackError])
     (Maybe [StackError])
     (Maybe [StackError])
     (Maybe [StackError])
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 [StackError] [StackError] [StackError] [StackError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The domains where AppStream 2.0 streaming sessions can be embedded in an
-- iframe. You must approve the domains that you want to host embedded
-- AppStream 2.0 streaming sessions.
stack_embedHostDomains :: Lens.Lens' Stack (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
stack_embedHostDomains :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Stack -> f Stack
stack_embedHostDomains = (Stack -> Maybe (NonEmpty Text))
-> (Stack -> Maybe (NonEmpty Text) -> Stack)
-> Lens Stack Stack (Maybe (NonEmpty Text)) (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe (NonEmpty Text)
embedHostDomains :: Maybe (NonEmpty Text)
$sel:embedHostDomains:Stack' :: Stack -> Maybe (NonEmpty Text)
embedHostDomains} -> Maybe (NonEmpty Text)
embedHostDomains) (\s :: Stack
s@Stack' {} Maybe (NonEmpty Text)
a -> Stack
s {$sel:embedHostDomains:Stack' :: Maybe (NonEmpty Text)
embedHostDomains = Maybe (NonEmpty Text)
a} :: Stack) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> Stack -> f Stack)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The URL that users are redirected to after their streaming session ends.
stack_redirectURL :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_redirectURL :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_redirectURL = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
redirectURL :: Maybe Text
$sel:redirectURL:Stack' :: Stack -> Maybe Text
redirectURL} -> Maybe Text
redirectURL) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:redirectURL:Stack' :: Maybe Text
redirectURL = Maybe Text
a} :: Stack)

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

instance Core.FromJSON Stack where
  parseJSON :: Value -> Parser Stack
parseJSON =
    String -> (Object -> Parser Stack) -> Value -> Parser Stack
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Stack"
      ( \Object
x ->
          Maybe (NonEmpty UserSetting)
-> Maybe ApplicationSettingsResponse
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [StorageConnector]
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe Text
-> Maybe [StackError]
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Text
-> Stack
Stack'
            (Maybe (NonEmpty UserSetting)
 -> Maybe ApplicationSettingsResponse
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [StorageConnector]
 -> Maybe (NonEmpty AccessEndpoint)
 -> Maybe Text
 -> Maybe [StackError]
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Stack)
-> Parser (Maybe (NonEmpty UserSetting))
-> Parser
     (Maybe ApplicationSettingsResponse
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [StorageConnector]
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty UserSetting))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserSettings")
            Parser
  (Maybe ApplicationSettingsResponse
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [StorageConnector]
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe ApplicationSettingsResponse)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [StorageConnector]
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ApplicationSettingsResponse)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationSettings")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [StorageConnector]
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [StorageConnector]
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
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
"FeedbackURL")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [StorageConnector]
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [StorageConnector]
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe [StorageConnector]
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [StorageConnector]
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe [StorageConnector]
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe [StorageConnector])
-> Parser
     (Maybe (NonEmpty AccessEndpoint)
      -> Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [StorageConnector]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StorageConnectors"
                            Parser (Maybe (Maybe [StorageConnector]))
-> Maybe [StorageConnector] -> Parser (Maybe [StorageConnector])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [StorageConnector]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (NonEmpty AccessEndpoint)
   -> Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe (NonEmpty AccessEndpoint))
-> Parser
     (Maybe Text
      -> Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty AccessEndpoint))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccessEndpoints")
            Parser
  (Maybe Text
   -> Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe [StackError]
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Stack)
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
"DisplayName")
            Parser
  (Maybe [StackError]
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Stack)
-> Parser (Maybe [StackError])
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text -> Maybe Text -> Text -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [StackError]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackErrors" Parser (Maybe (Maybe [StackError]))
-> Maybe [StackError] -> Parser (Maybe [StackError])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [StackError]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Text -> Maybe Text -> Text -> Stack)
-> Parser (Maybe (NonEmpty Text))
-> Parser (Maybe Text -> Maybe Text -> Text -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EmbedHostDomains")
            Parser (Maybe Text -> Maybe Text -> Text -> Stack)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Text -> Stack)
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 Text -> Text -> Stack)
-> Parser (Maybe Text) -> Parser (Text -> Stack)
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
"RedirectURL")
            Parser (Text -> Stack) -> Parser Text -> Parser Stack
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance Prelude.Hashable Stack

instance Prelude.NFData Stack