{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppStream.CreateStack
(
CreateStack (..),
newCreateStack,
createStack_userSettings,
createStack_applicationSettings,
createStack_feedbackURL,
createStack_storageConnectors,
createStack_accessEndpoints,
createStack_displayName,
createStack_embedHostDomains,
createStack_description,
createStack_tags,
createStack_redirectURL,
createStack_name,
CreateStackResponse (..),
newCreateStackResponse,
createStackResponse_stack,
createStackResponse_httpStatus,
)
where
import Amazonka.AppStream.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateStack = CreateStack'
{
CreateStack -> Maybe (NonEmpty UserSetting)
userSettings :: Prelude.Maybe (Prelude.NonEmpty UserSetting),
CreateStack -> Maybe ApplicationSettings
applicationSettings :: Prelude.Maybe ApplicationSettings,
CreateStack -> Maybe Text
feedbackURL :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe [StorageConnector]
storageConnectors :: Prelude.Maybe [StorageConnector],
CreateStack -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Prelude.Maybe (Prelude.NonEmpty AccessEndpoint),
CreateStack -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe (NonEmpty Text)
embedHostDomains :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateStack -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateStack -> Maybe Text
redirectURL :: Prelude.Maybe Prelude.Text,
CreateStack -> Text
name :: Prelude.Text
}
deriving (CreateStack -> CreateStack -> Bool
(CreateStack -> CreateStack -> Bool)
-> (CreateStack -> CreateStack -> Bool) -> Eq CreateStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStack -> CreateStack -> Bool
$c/= :: CreateStack -> CreateStack -> Bool
== :: CreateStack -> CreateStack -> Bool
$c== :: CreateStack -> CreateStack -> Bool
Prelude.Eq, ReadPrec [CreateStack]
ReadPrec CreateStack
Int -> ReadS CreateStack
ReadS [CreateStack]
(Int -> ReadS CreateStack)
-> ReadS [CreateStack]
-> ReadPrec CreateStack
-> ReadPrec [CreateStack]
-> Read CreateStack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStack]
$creadListPrec :: ReadPrec [CreateStack]
readPrec :: ReadPrec CreateStack
$creadPrec :: ReadPrec CreateStack
readList :: ReadS [CreateStack]
$creadList :: ReadS [CreateStack]
readsPrec :: Int -> ReadS CreateStack
$creadsPrec :: Int -> ReadS CreateStack
Prelude.Read, Int -> CreateStack -> ShowS
[CreateStack] -> ShowS
CreateStack -> String
(Int -> CreateStack -> ShowS)
-> (CreateStack -> String)
-> ([CreateStack] -> ShowS)
-> Show CreateStack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStack] -> ShowS
$cshowList :: [CreateStack] -> ShowS
show :: CreateStack -> String
$cshow :: CreateStack -> String
showsPrec :: Int -> CreateStack -> ShowS
$cshowsPrec :: Int -> CreateStack -> ShowS
Prelude.Show, (forall x. CreateStack -> Rep CreateStack x)
-> (forall x. Rep CreateStack x -> CreateStack)
-> Generic CreateStack
forall x. Rep CreateStack x -> CreateStack
forall x. CreateStack -> Rep CreateStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStack x -> CreateStack
$cfrom :: forall x. CreateStack -> Rep CreateStack x
Prelude.Generic)
newCreateStack ::
Prelude.Text ->
CreateStack
newCreateStack :: Text -> CreateStack
newCreateStack Text
pName_ =
CreateStack' :: Maybe (NonEmpty UserSetting)
-> Maybe ApplicationSettings
-> Maybe Text
-> Maybe [StorageConnector]
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> CreateStack
CreateStack'
{ $sel:userSettings:CreateStack' :: Maybe (NonEmpty UserSetting)
userSettings = Maybe (NonEmpty UserSetting)
forall a. Maybe a
Prelude.Nothing,
$sel:applicationSettings:CreateStack' :: Maybe ApplicationSettings
applicationSettings = Maybe ApplicationSettings
forall a. Maybe a
Prelude.Nothing,
$sel:feedbackURL:CreateStack' :: Maybe Text
feedbackURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:storageConnectors:CreateStack' :: Maybe [StorageConnector]
storageConnectors = Maybe [StorageConnector]
forall a. Maybe a
Prelude.Nothing,
$sel:accessEndpoints:CreateStack' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:CreateStack' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:embedHostDomains:CreateStack' :: Maybe (NonEmpty Text)
embedHostDomains = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateStack' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStack' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:redirectURL:CreateStack' :: Maybe Text
redirectURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateStack' :: Text
name = Text
pName_
}
createStack_userSettings :: Lens.Lens' CreateStack (Prelude.Maybe (Prelude.NonEmpty UserSetting))
createStack_userSettings :: (Maybe (NonEmpty UserSetting) -> f (Maybe (NonEmpty UserSetting)))
-> CreateStack -> f CreateStack
createStack_userSettings = (CreateStack -> Maybe (NonEmpty UserSetting))
-> (CreateStack -> Maybe (NonEmpty UserSetting) -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe (NonEmpty UserSetting))
(Maybe (NonEmpty UserSetting))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe (NonEmpty UserSetting)
userSettings :: Maybe (NonEmpty UserSetting)
$sel:userSettings:CreateStack' :: CreateStack -> Maybe (NonEmpty UserSetting)
userSettings} -> Maybe (NonEmpty UserSetting)
userSettings) (\s :: CreateStack
s@CreateStack' {} Maybe (NonEmpty UserSetting)
a -> CreateStack
s {$sel:userSettings:CreateStack' :: Maybe (NonEmpty UserSetting)
userSettings = Maybe (NonEmpty UserSetting)
a} :: CreateStack) ((Maybe (NonEmpty UserSetting) -> f (Maybe (NonEmpty UserSetting)))
-> CreateStack -> f CreateStack)
-> ((Maybe (NonEmpty UserSetting)
-> f (Maybe (NonEmpty UserSetting)))
-> Maybe (NonEmpty UserSetting)
-> f (Maybe (NonEmpty UserSetting)))
-> (Maybe (NonEmpty UserSetting)
-> f (Maybe (NonEmpty UserSetting)))
-> CreateStack
-> f CreateStack
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
createStack_applicationSettings :: Lens.Lens' CreateStack (Prelude.Maybe ApplicationSettings)
createStack_applicationSettings :: (Maybe ApplicationSettings -> f (Maybe ApplicationSettings))
-> CreateStack -> f CreateStack
createStack_applicationSettings = (CreateStack -> Maybe ApplicationSettings)
-> (CreateStack -> Maybe ApplicationSettings -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe ApplicationSettings)
(Maybe ApplicationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe ApplicationSettings
applicationSettings :: Maybe ApplicationSettings
$sel:applicationSettings:CreateStack' :: CreateStack -> Maybe ApplicationSettings
applicationSettings} -> Maybe ApplicationSettings
applicationSettings) (\s :: CreateStack
s@CreateStack' {} Maybe ApplicationSettings
a -> CreateStack
s {$sel:applicationSettings:CreateStack' :: Maybe ApplicationSettings
applicationSettings = Maybe ApplicationSettings
a} :: CreateStack)
createStack_feedbackURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_feedbackURL :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_feedbackURL = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
feedbackURL :: Maybe Text
$sel:feedbackURL:CreateStack' :: CreateStack -> Maybe Text
feedbackURL} -> Maybe Text
feedbackURL) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:feedbackURL:CreateStack' :: Maybe Text
feedbackURL = Maybe Text
a} :: CreateStack)
createStack_storageConnectors :: Lens.Lens' CreateStack (Prelude.Maybe [StorageConnector])
createStack_storageConnectors :: (Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> CreateStack -> f CreateStack
createStack_storageConnectors = (CreateStack -> Maybe [StorageConnector])
-> (CreateStack -> Maybe [StorageConnector] -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe [StorageConnector])
(Maybe [StorageConnector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [StorageConnector]
storageConnectors :: Maybe [StorageConnector]
$sel:storageConnectors:CreateStack' :: CreateStack -> Maybe [StorageConnector]
storageConnectors} -> Maybe [StorageConnector]
storageConnectors) (\s :: CreateStack
s@CreateStack' {} Maybe [StorageConnector]
a -> CreateStack
s {$sel:storageConnectors:CreateStack' :: Maybe [StorageConnector]
storageConnectors = Maybe [StorageConnector]
a} :: CreateStack) ((Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> CreateStack -> f CreateStack)
-> ((Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> (Maybe [StorageConnector] -> f (Maybe [StorageConnector]))
-> CreateStack
-> f CreateStack
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
createStack_accessEndpoints :: Lens.Lens' CreateStack (Prelude.Maybe (Prelude.NonEmpty AccessEndpoint))
createStack_accessEndpoints :: (Maybe (NonEmpty AccessEndpoint)
-> f (Maybe (NonEmpty AccessEndpoint)))
-> CreateStack -> f CreateStack
createStack_accessEndpoints = (CreateStack -> Maybe (NonEmpty AccessEndpoint))
-> (CreateStack -> Maybe (NonEmpty AccessEndpoint) -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe (NonEmpty AccessEndpoint))
(Maybe (NonEmpty AccessEndpoint))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
$sel:accessEndpoints:CreateStack' :: CreateStack -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints} -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints) (\s :: CreateStack
s@CreateStack' {} Maybe (NonEmpty AccessEndpoint)
a -> CreateStack
s {$sel:accessEndpoints:CreateStack' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
a} :: CreateStack) ((Maybe (NonEmpty AccessEndpoint)
-> f (Maybe (NonEmpty AccessEndpoint)))
-> CreateStack -> f CreateStack)
-> ((Maybe (NonEmpty AccessEndpoint)
-> f (Maybe (NonEmpty AccessEndpoint)))
-> Maybe (NonEmpty AccessEndpoint)
-> f (Maybe (NonEmpty AccessEndpoint)))
-> (Maybe (NonEmpty AccessEndpoint)
-> f (Maybe (NonEmpty AccessEndpoint)))
-> CreateStack
-> f CreateStack
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
createStack_displayName :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_displayName :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_displayName = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
displayName :: Maybe Text
$sel:displayName:CreateStack' :: CreateStack -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:displayName:CreateStack' :: Maybe Text
displayName = Maybe Text
a} :: CreateStack)
createStack_embedHostDomains :: Lens.Lens' CreateStack (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createStack_embedHostDomains :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStack -> f CreateStack
createStack_embedHostDomains = (CreateStack -> Maybe (NonEmpty Text))
-> (CreateStack -> Maybe (NonEmpty Text) -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe (NonEmpty Text)
embedHostDomains :: Maybe (NonEmpty Text)
$sel:embedHostDomains:CreateStack' :: CreateStack -> Maybe (NonEmpty Text)
embedHostDomains} -> Maybe (NonEmpty Text)
embedHostDomains) (\s :: CreateStack
s@CreateStack' {} Maybe (NonEmpty Text)
a -> CreateStack
s {$sel:embedHostDomains:CreateStack' :: Maybe (NonEmpty Text)
embedHostDomains = Maybe (NonEmpty Text)
a} :: CreateStack) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStack -> f CreateStack)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStack
-> f CreateStack
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
createStack_description :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_description :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_description = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
description :: Maybe Text
$sel:description:CreateStack' :: CreateStack -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:description:CreateStack' :: Maybe Text
description = Maybe Text
a} :: CreateStack)
createStack_tags :: Lens.Lens' CreateStack (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createStack_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateStack -> f CreateStack
createStack_tags = (CreateStack -> Maybe (HashMap Text Text))
-> (CreateStack -> Maybe (HashMap Text Text) -> CreateStack)
-> Lens
CreateStack
CreateStack
(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 (\CreateStack' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateStack' :: CreateStack -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateStack
s@CreateStack' {} Maybe (HashMap Text Text)
a -> CreateStack
s {$sel:tags:CreateStack' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateStack) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateStack -> f CreateStack)
-> ((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)))
-> CreateStack
-> f CreateStack
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
createStack_redirectURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_redirectURL :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_redirectURL = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
redirectURL :: Maybe Text
$sel:redirectURL:CreateStack' :: CreateStack -> Maybe Text
redirectURL} -> Maybe Text
redirectURL) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:redirectURL:CreateStack' :: Maybe Text
redirectURL = Maybe Text
a} :: CreateStack)
createStack_name :: Lens.Lens' CreateStack Prelude.Text
createStack_name :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_name = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
name :: Text
$sel:name:CreateStack' :: CreateStack -> Text
name} -> Text
name) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:name:CreateStack' :: Text
name = Text
a} :: CreateStack)
instance Core.AWSRequest CreateStack where
type AWSResponse CreateStack = CreateStackResponse
request :: CreateStack -> Request CreateStack
request = Service -> CreateStack -> Request CreateStack
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateStack))
-> Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Stack -> Int -> CreateStackResponse
CreateStackResponse'
(Maybe Stack -> Int -> CreateStackResponse)
-> Either String (Maybe Stack)
-> Either String (Int -> CreateStackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Stack)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Stack")
Either String (Int -> CreateStackResponse)
-> Either String Int -> Either String CreateStackResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateStack
instance Prelude.NFData CreateStack
instance Core.ToHeaders CreateStack where
toHeaders :: CreateStack -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateStack -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"PhotonAdminProxyService.CreateStack" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateStack where
toJSON :: CreateStack -> Value
toJSON CreateStack' {Maybe [StorageConnector]
Maybe (NonEmpty Text)
Maybe (NonEmpty AccessEndpoint)
Maybe (NonEmpty UserSetting)
Maybe Text
Maybe (HashMap Text Text)
Maybe ApplicationSettings
Text
name :: Text
redirectURL :: Maybe Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
embedHostDomains :: Maybe (NonEmpty Text)
displayName :: Maybe Text
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
storageConnectors :: Maybe [StorageConnector]
feedbackURL :: Maybe Text
applicationSettings :: Maybe ApplicationSettings
userSettings :: Maybe (NonEmpty UserSetting)
$sel:name:CreateStack' :: CreateStack -> Text
$sel:redirectURL:CreateStack' :: CreateStack -> Maybe Text
$sel:tags:CreateStack' :: CreateStack -> Maybe (HashMap Text Text)
$sel:description:CreateStack' :: CreateStack -> Maybe Text
$sel:embedHostDomains:CreateStack' :: CreateStack -> Maybe (NonEmpty Text)
$sel:displayName:CreateStack' :: CreateStack -> Maybe Text
$sel:accessEndpoints:CreateStack' :: CreateStack -> Maybe (NonEmpty AccessEndpoint)
$sel:storageConnectors:CreateStack' :: CreateStack -> Maybe [StorageConnector]
$sel:feedbackURL:CreateStack' :: CreateStack -> Maybe Text
$sel:applicationSettings:CreateStack' :: CreateStack -> Maybe ApplicationSettings
$sel:userSettings:CreateStack' :: CreateStack -> Maybe (NonEmpty UserSetting)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UserSettings" Text -> NonEmpty UserSetting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty UserSetting -> Pair)
-> Maybe (NonEmpty UserSetting) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty UserSetting)
userSettings,
(Text
"ApplicationSettings" Text -> ApplicationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ApplicationSettings -> Pair)
-> Maybe ApplicationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationSettings
applicationSettings,
(Text
"FeedbackURL" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
feedbackURL,
(Text
"StorageConnectors" Text -> [StorageConnector] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([StorageConnector] -> Pair)
-> Maybe [StorageConnector] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StorageConnector]
storageConnectors,
(Text
"AccessEndpoints" Text -> NonEmpty AccessEndpoint -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty AccessEndpoint -> Pair)
-> Maybe (NonEmpty AccessEndpoint) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty AccessEndpoint)
accessEndpoints,
(Text
"DisplayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
(Text
"EmbedHostDomains" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
embedHostDomains,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
(Text
"RedirectURL" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
redirectURL,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreateStack where
toPath :: CreateStack -> ByteString
toPath = ByteString -> CreateStack -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateStack where
toQuery :: CreateStack -> QueryString
toQuery = QueryString -> CreateStack -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateStackResponse = CreateStackResponse'
{
CreateStackResponse -> Maybe Stack
stack :: Prelude.Maybe Stack,
CreateStackResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStackResponse -> CreateStackResponse -> Bool
(CreateStackResponse -> CreateStackResponse -> Bool)
-> (CreateStackResponse -> CreateStackResponse -> Bool)
-> Eq CreateStackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStackResponse -> CreateStackResponse -> Bool
$c/= :: CreateStackResponse -> CreateStackResponse -> Bool
== :: CreateStackResponse -> CreateStackResponse -> Bool
$c== :: CreateStackResponse -> CreateStackResponse -> Bool
Prelude.Eq, ReadPrec [CreateStackResponse]
ReadPrec CreateStackResponse
Int -> ReadS CreateStackResponse
ReadS [CreateStackResponse]
(Int -> ReadS CreateStackResponse)
-> ReadS [CreateStackResponse]
-> ReadPrec CreateStackResponse
-> ReadPrec [CreateStackResponse]
-> Read CreateStackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStackResponse]
$creadListPrec :: ReadPrec [CreateStackResponse]
readPrec :: ReadPrec CreateStackResponse
$creadPrec :: ReadPrec CreateStackResponse
readList :: ReadS [CreateStackResponse]
$creadList :: ReadS [CreateStackResponse]
readsPrec :: Int -> ReadS CreateStackResponse
$creadsPrec :: Int -> ReadS CreateStackResponse
Prelude.Read, Int -> CreateStackResponse -> ShowS
[CreateStackResponse] -> ShowS
CreateStackResponse -> String
(Int -> CreateStackResponse -> ShowS)
-> (CreateStackResponse -> String)
-> ([CreateStackResponse] -> ShowS)
-> Show CreateStackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStackResponse] -> ShowS
$cshowList :: [CreateStackResponse] -> ShowS
show :: CreateStackResponse -> String
$cshow :: CreateStackResponse -> String
showsPrec :: Int -> CreateStackResponse -> ShowS
$cshowsPrec :: Int -> CreateStackResponse -> ShowS
Prelude.Show, (forall x. CreateStackResponse -> Rep CreateStackResponse x)
-> (forall x. Rep CreateStackResponse x -> CreateStackResponse)
-> Generic CreateStackResponse
forall x. Rep CreateStackResponse x -> CreateStackResponse
forall x. CreateStackResponse -> Rep CreateStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStackResponse x -> CreateStackResponse
$cfrom :: forall x. CreateStackResponse -> Rep CreateStackResponse x
Prelude.Generic)
newCreateStackResponse ::
Prelude.Int ->
CreateStackResponse
newCreateStackResponse :: Int -> CreateStackResponse
newCreateStackResponse Int
pHttpStatus_ =
CreateStackResponse' :: Maybe Stack -> Int -> CreateStackResponse
CreateStackResponse'
{ $sel:stack:CreateStackResponse' :: Maybe Stack
stack = Maybe Stack
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStackResponse_stack :: Lens.Lens' CreateStackResponse (Prelude.Maybe Stack)
createStackResponse_stack :: (Maybe Stack -> f (Maybe Stack))
-> CreateStackResponse -> f CreateStackResponse
createStackResponse_stack = (CreateStackResponse -> Maybe Stack)
-> (CreateStackResponse -> Maybe Stack -> CreateStackResponse)
-> Lens
CreateStackResponse CreateStackResponse (Maybe Stack) (Maybe Stack)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Maybe Stack
stack :: Maybe Stack
$sel:stack:CreateStackResponse' :: CreateStackResponse -> Maybe Stack
stack} -> Maybe Stack
stack) (\s :: CreateStackResponse
s@CreateStackResponse' {} Maybe Stack
a -> CreateStackResponse
s {$sel:stack:CreateStackResponse' :: Maybe Stack
stack = Maybe Stack
a} :: CreateStackResponse)
createStackResponse_httpStatus :: Lens.Lens' CreateStackResponse Prelude.Int
createStackResponse_httpStatus :: (Int -> f Int) -> CreateStackResponse -> f CreateStackResponse
createStackResponse_httpStatus = (CreateStackResponse -> Int)
-> (CreateStackResponse -> Int -> CreateStackResponse)
-> Lens CreateStackResponse CreateStackResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStackResponse' :: CreateStackResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStackResponse
s@CreateStackResponse' {} Int
a -> CreateStackResponse
s {$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
a} :: CreateStackResponse)
instance Prelude.NFData CreateStackResponse