{-# 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.EMR.CreateStudio
(
CreateStudio (..),
newCreateStudio,
createStudio_idpAuthUrl,
createStudio_idpRelayStateParameterName,
createStudio_userRole,
createStudio_description,
createStudio_tags,
createStudio_name,
createStudio_authMode,
createStudio_vpcId,
createStudio_subnetIds,
createStudio_serviceRole,
createStudio_workspaceSecurityGroupId,
createStudio_engineSecurityGroupId,
createStudio_defaultS3Location,
CreateStudioResponse (..),
newCreateStudioResponse,
createStudioResponse_studioId,
createStudioResponse_url,
createStudioResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types
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 CreateStudio = CreateStudio'
{
CreateStudio -> Maybe Text
idpAuthUrl :: Prelude.Maybe Prelude.Text,
CreateStudio -> Maybe Text
idpRelayStateParameterName :: Prelude.Maybe Prelude.Text,
CreateStudio -> Maybe Text
userRole :: Prelude.Maybe Prelude.Text,
CreateStudio -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateStudio -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateStudio -> Text
name :: Prelude.Text,
CreateStudio -> AuthMode
authMode :: AuthMode,
CreateStudio -> Text
vpcId :: Prelude.Text,
CreateStudio -> [Text]
subnetIds :: [Prelude.Text],
CreateStudio -> Text
serviceRole :: Prelude.Text,
CreateStudio -> Text
workspaceSecurityGroupId :: Prelude.Text,
CreateStudio -> Text
engineSecurityGroupId :: Prelude.Text,
CreateStudio -> Text
defaultS3Location :: Prelude.Text
}
deriving (CreateStudio -> CreateStudio -> Bool
(CreateStudio -> CreateStudio -> Bool)
-> (CreateStudio -> CreateStudio -> Bool) -> Eq CreateStudio
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStudio -> CreateStudio -> Bool
$c/= :: CreateStudio -> CreateStudio -> Bool
== :: CreateStudio -> CreateStudio -> Bool
$c== :: CreateStudio -> CreateStudio -> Bool
Prelude.Eq, ReadPrec [CreateStudio]
ReadPrec CreateStudio
Int -> ReadS CreateStudio
ReadS [CreateStudio]
(Int -> ReadS CreateStudio)
-> ReadS [CreateStudio]
-> ReadPrec CreateStudio
-> ReadPrec [CreateStudio]
-> Read CreateStudio
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStudio]
$creadListPrec :: ReadPrec [CreateStudio]
readPrec :: ReadPrec CreateStudio
$creadPrec :: ReadPrec CreateStudio
readList :: ReadS [CreateStudio]
$creadList :: ReadS [CreateStudio]
readsPrec :: Int -> ReadS CreateStudio
$creadsPrec :: Int -> ReadS CreateStudio
Prelude.Read, Int -> CreateStudio -> ShowS
[CreateStudio] -> ShowS
CreateStudio -> String
(Int -> CreateStudio -> ShowS)
-> (CreateStudio -> String)
-> ([CreateStudio] -> ShowS)
-> Show CreateStudio
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStudio] -> ShowS
$cshowList :: [CreateStudio] -> ShowS
show :: CreateStudio -> String
$cshow :: CreateStudio -> String
showsPrec :: Int -> CreateStudio -> ShowS
$cshowsPrec :: Int -> CreateStudio -> ShowS
Prelude.Show, (forall x. CreateStudio -> Rep CreateStudio x)
-> (forall x. Rep CreateStudio x -> CreateStudio)
-> Generic CreateStudio
forall x. Rep CreateStudio x -> CreateStudio
forall x. CreateStudio -> Rep CreateStudio x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStudio x -> CreateStudio
$cfrom :: forall x. CreateStudio -> Rep CreateStudio x
Prelude.Generic)
newCreateStudio ::
Prelude.Text ->
AuthMode ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateStudio
newCreateStudio :: Text
-> AuthMode -> Text -> Text -> Text -> Text -> Text -> CreateStudio
newCreateStudio
Text
pName_
AuthMode
pAuthMode_
Text
pVpcId_
Text
pServiceRole_
Text
pWorkspaceSecurityGroupId_
Text
pEngineSecurityGroupId_
Text
pDefaultS3Location_ =
CreateStudio' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> AuthMode
-> Text
-> [Text]
-> Text
-> Text
-> Text
-> Text
-> CreateStudio
CreateStudio'
{ $sel:idpAuthUrl:CreateStudio' :: Maybe Text
idpAuthUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:idpRelayStateParameterName:CreateStudio' :: Maybe Text
idpRelayStateParameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userRole:CreateStudio' :: Maybe Text
userRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateStudio' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStudio' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateStudio' :: Text
name = Text
pName_,
$sel:authMode:CreateStudio' :: AuthMode
authMode = AuthMode
pAuthMode_,
$sel:vpcId:CreateStudio' :: Text
vpcId = Text
pVpcId_,
$sel:subnetIds:CreateStudio' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:serviceRole:CreateStudio' :: Text
serviceRole = Text
pServiceRole_,
$sel:workspaceSecurityGroupId:CreateStudio' :: Text
workspaceSecurityGroupId =
Text
pWorkspaceSecurityGroupId_,
$sel:engineSecurityGroupId:CreateStudio' :: Text
engineSecurityGroupId = Text
pEngineSecurityGroupId_,
$sel:defaultS3Location:CreateStudio' :: Text
defaultS3Location = Text
pDefaultS3Location_
}
createStudio_idpAuthUrl :: Lens.Lens' CreateStudio (Prelude.Maybe Prelude.Text)
createStudio_idpAuthUrl :: (Maybe Text -> f (Maybe Text)) -> CreateStudio -> f CreateStudio
createStudio_idpAuthUrl = (CreateStudio -> Maybe Text)
-> (CreateStudio -> Maybe Text -> CreateStudio)
-> Lens CreateStudio CreateStudio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Maybe Text
idpAuthUrl :: Maybe Text
$sel:idpAuthUrl:CreateStudio' :: CreateStudio -> Maybe Text
idpAuthUrl} -> Maybe Text
idpAuthUrl) (\s :: CreateStudio
s@CreateStudio' {} Maybe Text
a -> CreateStudio
s {$sel:idpAuthUrl:CreateStudio' :: Maybe Text
idpAuthUrl = Maybe Text
a} :: CreateStudio)
createStudio_idpRelayStateParameterName :: Lens.Lens' CreateStudio (Prelude.Maybe Prelude.Text)
createStudio_idpRelayStateParameterName :: (Maybe Text -> f (Maybe Text)) -> CreateStudio -> f CreateStudio
createStudio_idpRelayStateParameterName = (CreateStudio -> Maybe Text)
-> (CreateStudio -> Maybe Text -> CreateStudio)
-> Lens CreateStudio CreateStudio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Maybe Text
idpRelayStateParameterName :: Maybe Text
$sel:idpRelayStateParameterName:CreateStudio' :: CreateStudio -> Maybe Text
idpRelayStateParameterName} -> Maybe Text
idpRelayStateParameterName) (\s :: CreateStudio
s@CreateStudio' {} Maybe Text
a -> CreateStudio
s {$sel:idpRelayStateParameterName:CreateStudio' :: Maybe Text
idpRelayStateParameterName = Maybe Text
a} :: CreateStudio)
createStudio_userRole :: Lens.Lens' CreateStudio (Prelude.Maybe Prelude.Text)
createStudio_userRole :: (Maybe Text -> f (Maybe Text)) -> CreateStudio -> f CreateStudio
createStudio_userRole = (CreateStudio -> Maybe Text)
-> (CreateStudio -> Maybe Text -> CreateStudio)
-> Lens CreateStudio CreateStudio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Maybe Text
userRole :: Maybe Text
$sel:userRole:CreateStudio' :: CreateStudio -> Maybe Text
userRole} -> Maybe Text
userRole) (\s :: CreateStudio
s@CreateStudio' {} Maybe Text
a -> CreateStudio
s {$sel:userRole:CreateStudio' :: Maybe Text
userRole = Maybe Text
a} :: CreateStudio)
createStudio_description :: Lens.Lens' CreateStudio (Prelude.Maybe Prelude.Text)
createStudio_description :: (Maybe Text -> f (Maybe Text)) -> CreateStudio -> f CreateStudio
createStudio_description = (CreateStudio -> Maybe Text)
-> (CreateStudio -> Maybe Text -> CreateStudio)
-> Lens CreateStudio CreateStudio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Maybe Text
description :: Maybe Text
$sel:description:CreateStudio' :: CreateStudio -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateStudio
s@CreateStudio' {} Maybe Text
a -> CreateStudio
s {$sel:description:CreateStudio' :: Maybe Text
description = Maybe Text
a} :: CreateStudio)
createStudio_tags :: Lens.Lens' CreateStudio (Prelude.Maybe [Tag])
createStudio_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateStudio -> f CreateStudio
createStudio_tags = (CreateStudio -> Maybe [Tag])
-> (CreateStudio -> Maybe [Tag] -> CreateStudio)
-> Lens CreateStudio CreateStudio (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateStudio' :: CreateStudio -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateStudio
s@CreateStudio' {} Maybe [Tag]
a -> CreateStudio
s {$sel:tags:CreateStudio' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateStudio) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateStudio -> f CreateStudio)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateStudio
-> f CreateStudio
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudio_name :: Lens.Lens' CreateStudio Prelude.Text
createStudio_name :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_name = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
name :: Text
$sel:name:CreateStudio' :: CreateStudio -> Text
name} -> Text
name) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:name:CreateStudio' :: Text
name = Text
a} :: CreateStudio)
createStudio_authMode :: Lens.Lens' CreateStudio AuthMode
createStudio_authMode :: (AuthMode -> f AuthMode) -> CreateStudio -> f CreateStudio
createStudio_authMode = (CreateStudio -> AuthMode)
-> (CreateStudio -> AuthMode -> CreateStudio)
-> Lens CreateStudio CreateStudio AuthMode AuthMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {AuthMode
authMode :: AuthMode
$sel:authMode:CreateStudio' :: CreateStudio -> AuthMode
authMode} -> AuthMode
authMode) (\s :: CreateStudio
s@CreateStudio' {} AuthMode
a -> CreateStudio
s {$sel:authMode:CreateStudio' :: AuthMode
authMode = AuthMode
a} :: CreateStudio)
createStudio_vpcId :: Lens.Lens' CreateStudio Prelude.Text
createStudio_vpcId :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_vpcId = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
vpcId :: Text
$sel:vpcId:CreateStudio' :: CreateStudio -> Text
vpcId} -> Text
vpcId) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:vpcId:CreateStudio' :: Text
vpcId = Text
a} :: CreateStudio)
createStudio_subnetIds :: Lens.Lens' CreateStudio [Prelude.Text]
createStudio_subnetIds :: ([Text] -> f [Text]) -> CreateStudio -> f CreateStudio
createStudio_subnetIds = (CreateStudio -> [Text])
-> (CreateStudio -> [Text] -> CreateStudio)
-> Lens CreateStudio CreateStudio [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {[Text]
subnetIds :: [Text]
$sel:subnetIds:CreateStudio' :: CreateStudio -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: CreateStudio
s@CreateStudio' {} [Text]
a -> CreateStudio
s {$sel:subnetIds:CreateStudio' :: [Text]
subnetIds = [Text]
a} :: CreateStudio) (([Text] -> f [Text]) -> CreateStudio -> f CreateStudio)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateStudio
-> f CreateStudio
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudio_serviceRole :: Lens.Lens' CreateStudio Prelude.Text
createStudio_serviceRole :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_serviceRole = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
serviceRole :: Text
$sel:serviceRole:CreateStudio' :: CreateStudio -> Text
serviceRole} -> Text
serviceRole) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:serviceRole:CreateStudio' :: Text
serviceRole = Text
a} :: CreateStudio)
createStudio_workspaceSecurityGroupId :: Lens.Lens' CreateStudio Prelude.Text
createStudio_workspaceSecurityGroupId :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_workspaceSecurityGroupId = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
workspaceSecurityGroupId :: Text
$sel:workspaceSecurityGroupId:CreateStudio' :: CreateStudio -> Text
workspaceSecurityGroupId} -> Text
workspaceSecurityGroupId) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:workspaceSecurityGroupId:CreateStudio' :: Text
workspaceSecurityGroupId = Text
a} :: CreateStudio)
createStudio_engineSecurityGroupId :: Lens.Lens' CreateStudio Prelude.Text
createStudio_engineSecurityGroupId :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_engineSecurityGroupId = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
engineSecurityGroupId :: Text
$sel:engineSecurityGroupId:CreateStudio' :: CreateStudio -> Text
engineSecurityGroupId} -> Text
engineSecurityGroupId) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:engineSecurityGroupId:CreateStudio' :: Text
engineSecurityGroupId = Text
a} :: CreateStudio)
createStudio_defaultS3Location :: Lens.Lens' CreateStudio Prelude.Text
createStudio_defaultS3Location :: (Text -> f Text) -> CreateStudio -> f CreateStudio
createStudio_defaultS3Location = (CreateStudio -> Text)
-> (CreateStudio -> Text -> CreateStudio)
-> Lens CreateStudio CreateStudio Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudio' {Text
defaultS3Location :: Text
$sel:defaultS3Location:CreateStudio' :: CreateStudio -> Text
defaultS3Location} -> Text
defaultS3Location) (\s :: CreateStudio
s@CreateStudio' {} Text
a -> CreateStudio
s {$sel:defaultS3Location:CreateStudio' :: Text
defaultS3Location = Text
a} :: CreateStudio)
instance Core.AWSRequest CreateStudio where
type AWSResponse CreateStudio = CreateStudioResponse
request :: CreateStudio -> Request CreateStudio
request = Service -> CreateStudio -> Request CreateStudio
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateStudio
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStudio)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateStudio))
-> Logger
-> Service
-> Proxy CreateStudio
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStudio)))
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 Text -> Maybe Text -> Int -> CreateStudioResponse
CreateStudioResponse'
(Maybe Text -> Maybe Text -> Int -> CreateStudioResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateStudioResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StudioId")
Either String (Maybe Text -> Int -> CreateStudioResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateStudioResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Url")
Either String (Int -> CreateStudioResponse)
-> Either String Int -> Either String CreateStudioResponse
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 CreateStudio
instance Prelude.NFData CreateStudio
instance Core.ToHeaders CreateStudio where
toHeaders :: CreateStudio -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateStudio -> 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
"ElasticMapReduce.CreateStudio" ::
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 CreateStudio where
toJSON :: CreateStudio -> Value
toJSON CreateStudio' {[Text]
Maybe [Tag]
Maybe Text
Text
AuthMode
defaultS3Location :: Text
engineSecurityGroupId :: Text
workspaceSecurityGroupId :: Text
serviceRole :: Text
subnetIds :: [Text]
vpcId :: Text
authMode :: AuthMode
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
userRole :: Maybe Text
idpRelayStateParameterName :: Maybe Text
idpAuthUrl :: Maybe Text
$sel:defaultS3Location:CreateStudio' :: CreateStudio -> Text
$sel:engineSecurityGroupId:CreateStudio' :: CreateStudio -> Text
$sel:workspaceSecurityGroupId:CreateStudio' :: CreateStudio -> Text
$sel:serviceRole:CreateStudio' :: CreateStudio -> Text
$sel:subnetIds:CreateStudio' :: CreateStudio -> [Text]
$sel:vpcId:CreateStudio' :: CreateStudio -> Text
$sel:authMode:CreateStudio' :: CreateStudio -> AuthMode
$sel:name:CreateStudio' :: CreateStudio -> Text
$sel:tags:CreateStudio' :: CreateStudio -> Maybe [Tag]
$sel:description:CreateStudio' :: CreateStudio -> Maybe Text
$sel:userRole:CreateStudio' :: CreateStudio -> Maybe Text
$sel:idpRelayStateParameterName:CreateStudio' :: CreateStudio -> Maybe Text
$sel:idpAuthUrl:CreateStudio' :: CreateStudio -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IdpAuthUrl" 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
idpAuthUrl,
(Text
"IdpRelayStateParameterName" 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
idpRelayStateParameterName,
(Text
"UserRole" 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
userRole,
(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 -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AuthMode" Text -> AuthMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AuthMode
authMode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SubnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnetIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceRole),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"WorkspaceSecurityGroupId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workspaceSecurityGroupId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"EngineSecurityGroupId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
engineSecurityGroupId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DefaultS3Location" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
defaultS3Location)
]
)
instance Core.ToPath CreateStudio where
toPath :: CreateStudio -> ByteString
toPath = ByteString -> CreateStudio -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateStudio where
toQuery :: CreateStudio -> QueryString
toQuery = QueryString -> CreateStudio -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateStudioResponse = CreateStudioResponse'
{
CreateStudioResponse -> Maybe Text
studioId :: Prelude.Maybe Prelude.Text,
CreateStudioResponse -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
CreateStudioResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStudioResponse -> CreateStudioResponse -> Bool
(CreateStudioResponse -> CreateStudioResponse -> Bool)
-> (CreateStudioResponse -> CreateStudioResponse -> Bool)
-> Eq CreateStudioResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStudioResponse -> CreateStudioResponse -> Bool
$c/= :: CreateStudioResponse -> CreateStudioResponse -> Bool
== :: CreateStudioResponse -> CreateStudioResponse -> Bool
$c== :: CreateStudioResponse -> CreateStudioResponse -> Bool
Prelude.Eq, ReadPrec [CreateStudioResponse]
ReadPrec CreateStudioResponse
Int -> ReadS CreateStudioResponse
ReadS [CreateStudioResponse]
(Int -> ReadS CreateStudioResponse)
-> ReadS [CreateStudioResponse]
-> ReadPrec CreateStudioResponse
-> ReadPrec [CreateStudioResponse]
-> Read CreateStudioResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStudioResponse]
$creadListPrec :: ReadPrec [CreateStudioResponse]
readPrec :: ReadPrec CreateStudioResponse
$creadPrec :: ReadPrec CreateStudioResponse
readList :: ReadS [CreateStudioResponse]
$creadList :: ReadS [CreateStudioResponse]
readsPrec :: Int -> ReadS CreateStudioResponse
$creadsPrec :: Int -> ReadS CreateStudioResponse
Prelude.Read, Int -> CreateStudioResponse -> ShowS
[CreateStudioResponse] -> ShowS
CreateStudioResponse -> String
(Int -> CreateStudioResponse -> ShowS)
-> (CreateStudioResponse -> String)
-> ([CreateStudioResponse] -> ShowS)
-> Show CreateStudioResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStudioResponse] -> ShowS
$cshowList :: [CreateStudioResponse] -> ShowS
show :: CreateStudioResponse -> String
$cshow :: CreateStudioResponse -> String
showsPrec :: Int -> CreateStudioResponse -> ShowS
$cshowsPrec :: Int -> CreateStudioResponse -> ShowS
Prelude.Show, (forall x. CreateStudioResponse -> Rep CreateStudioResponse x)
-> (forall x. Rep CreateStudioResponse x -> CreateStudioResponse)
-> Generic CreateStudioResponse
forall x. Rep CreateStudioResponse x -> CreateStudioResponse
forall x. CreateStudioResponse -> Rep CreateStudioResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStudioResponse x -> CreateStudioResponse
$cfrom :: forall x. CreateStudioResponse -> Rep CreateStudioResponse x
Prelude.Generic)
newCreateStudioResponse ::
Prelude.Int ->
CreateStudioResponse
newCreateStudioResponse :: Int -> CreateStudioResponse
newCreateStudioResponse Int
pHttpStatus_ =
CreateStudioResponse' :: Maybe Text -> Maybe Text -> Int -> CreateStudioResponse
CreateStudioResponse'
{ $sel:studioId:CreateStudioResponse' :: Maybe Text
studioId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:CreateStudioResponse' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStudioResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStudioResponse_studioId :: Lens.Lens' CreateStudioResponse (Prelude.Maybe Prelude.Text)
createStudioResponse_studioId :: (Maybe Text -> f (Maybe Text))
-> CreateStudioResponse -> f CreateStudioResponse
createStudioResponse_studioId = (CreateStudioResponse -> Maybe Text)
-> (CreateStudioResponse -> Maybe Text -> CreateStudioResponse)
-> Lens
CreateStudioResponse CreateStudioResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioResponse' {Maybe Text
studioId :: Maybe Text
$sel:studioId:CreateStudioResponse' :: CreateStudioResponse -> Maybe Text
studioId} -> Maybe Text
studioId) (\s :: CreateStudioResponse
s@CreateStudioResponse' {} Maybe Text
a -> CreateStudioResponse
s {$sel:studioId:CreateStudioResponse' :: Maybe Text
studioId = Maybe Text
a} :: CreateStudioResponse)
createStudioResponse_url :: Lens.Lens' CreateStudioResponse (Prelude.Maybe Prelude.Text)
createStudioResponse_url :: (Maybe Text -> f (Maybe Text))
-> CreateStudioResponse -> f CreateStudioResponse
createStudioResponse_url = (CreateStudioResponse -> Maybe Text)
-> (CreateStudioResponse -> Maybe Text -> CreateStudioResponse)
-> Lens
CreateStudioResponse CreateStudioResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioResponse' {Maybe Text
url :: Maybe Text
$sel:url:CreateStudioResponse' :: CreateStudioResponse -> Maybe Text
url} -> Maybe Text
url) (\s :: CreateStudioResponse
s@CreateStudioResponse' {} Maybe Text
a -> CreateStudioResponse
s {$sel:url:CreateStudioResponse' :: Maybe Text
url = Maybe Text
a} :: CreateStudioResponse)
createStudioResponse_httpStatus :: Lens.Lens' CreateStudioResponse Prelude.Int
createStudioResponse_httpStatus :: (Int -> f Int) -> CreateStudioResponse -> f CreateStudioResponse
createStudioResponse_httpStatus = (CreateStudioResponse -> Int)
-> (CreateStudioResponse -> Int -> CreateStudioResponse)
-> Lens CreateStudioResponse CreateStudioResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStudioResponse' :: CreateStudioResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStudioResponse
s@CreateStudioResponse' {} Int
a -> CreateStudioResponse
s {$sel:httpStatus:CreateStudioResponse' :: Int
httpStatus = Int
a} :: CreateStudioResponse)
instance Prelude.NFData CreateStudioResponse