{-# 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.Nimble.CreateStudioComponent
(
CreateStudioComponent (..),
newCreateStudioComponent,
createStudioComponent_clientToken,
createStudioComponent_configuration,
createStudioComponent_description,
createStudioComponent_ec2SecurityGroupIds,
createStudioComponent_initializationScripts,
createStudioComponent_runtimeRoleArn,
createStudioComponent_scriptParameters,
createStudioComponent_secureInitializationRoleArn,
createStudioComponent_subtype,
createStudioComponent_tags,
createStudioComponent_name,
createStudioComponent_studioId,
createStudioComponent_type,
CreateStudioComponentResponse (..),
newCreateStudioComponentResponse,
createStudioComponentResponse_studioComponent,
createStudioComponentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateStudioComponent = CreateStudioComponent'
{
CreateStudioComponent -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateStudioComponent -> Maybe StudioComponentConfiguration
configuration :: Prelude.Maybe StudioComponentConfiguration,
CreateStudioComponent -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
CreateStudioComponent -> Maybe [Text]
ec2SecurityGroupIds :: Prelude.Maybe [Prelude.Text],
CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
initializationScripts :: Prelude.Maybe [StudioComponentInitializationScript],
CreateStudioComponent -> Maybe Text
runtimeRoleArn :: Prelude.Maybe Prelude.Text,
CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters :: Prelude.Maybe (Data.Sensitive [ScriptParameterKeyValue]),
CreateStudioComponent -> Maybe Text
secureInitializationRoleArn :: Prelude.Maybe Prelude.Text,
CreateStudioComponent -> Maybe StudioComponentSubtype
subtype :: Prelude.Maybe StudioComponentSubtype,
CreateStudioComponent -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateStudioComponent -> Sensitive Text
name :: Data.Sensitive Prelude.Text,
CreateStudioComponent -> Text
studioId :: Prelude.Text,
CreateStudioComponent -> StudioComponentType
type' :: StudioComponentType
}
deriving (CreateStudioComponent -> CreateStudioComponent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStudioComponent -> CreateStudioComponent -> Bool
$c/= :: CreateStudioComponent -> CreateStudioComponent -> Bool
== :: CreateStudioComponent -> CreateStudioComponent -> Bool
$c== :: CreateStudioComponent -> CreateStudioComponent -> Bool
Prelude.Eq, Int -> CreateStudioComponent -> ShowS
[CreateStudioComponent] -> ShowS
CreateStudioComponent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStudioComponent] -> ShowS
$cshowList :: [CreateStudioComponent] -> ShowS
show :: CreateStudioComponent -> String
$cshow :: CreateStudioComponent -> String
showsPrec :: Int -> CreateStudioComponent -> ShowS
$cshowsPrec :: Int -> CreateStudioComponent -> ShowS
Prelude.Show, forall x. Rep CreateStudioComponent x -> CreateStudioComponent
forall x. CreateStudioComponent -> Rep CreateStudioComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStudioComponent x -> CreateStudioComponent
$cfrom :: forall x. CreateStudioComponent -> Rep CreateStudioComponent x
Prelude.Generic)
newCreateStudioComponent ::
Prelude.Text ->
Prelude.Text ->
StudioComponentType ->
CreateStudioComponent
newCreateStudioComponent :: Text -> Text -> StudioComponentType -> CreateStudioComponent
newCreateStudioComponent Text
pName_ Text
pStudioId_ StudioComponentType
pType_ =
CreateStudioComponent'
{ $sel:clientToken:CreateStudioComponent' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:CreateStudioComponent' :: Maybe StudioComponentConfiguration
configuration = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateStudioComponent' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: Maybe [Text]
ec2SecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
$sel:initializationScripts:CreateStudioComponent' :: Maybe [StudioComponentInitializationScript]
initializationScripts = forall a. Maybe a
Prelude.Nothing,
$sel:runtimeRoleArn:CreateStudioComponent' :: Maybe Text
runtimeRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:scriptParameters:CreateStudioComponent' :: Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters = forall a. Maybe a
Prelude.Nothing,
$sel:secureInitializationRoleArn:CreateStudioComponent' :: Maybe Text
secureInitializationRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:subtype:CreateStudioComponent' :: Maybe StudioComponentSubtype
subtype = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStudioComponent' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateStudioComponent' :: Sensitive Text
name = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pName_,
$sel:studioId:CreateStudioComponent' :: Text
studioId = Text
pStudioId_,
$sel:type':CreateStudioComponent' :: StudioComponentType
type' = StudioComponentType
pType_
}
createStudioComponent_clientToken :: Lens.Lens' CreateStudioComponent (Prelude.Maybe Prelude.Text)
createStudioComponent_clientToken :: Lens' CreateStudioComponent (Maybe Text)
createStudioComponent_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe Text
a -> CreateStudioComponent
s {$sel:clientToken:CreateStudioComponent' :: Maybe Text
clientToken = Maybe Text
a} :: CreateStudioComponent)
createStudioComponent_configuration :: Lens.Lens' CreateStudioComponent (Prelude.Maybe StudioComponentConfiguration)
createStudioComponent_configuration :: Lens' CreateStudioComponent (Maybe StudioComponentConfiguration)
createStudioComponent_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe StudioComponentConfiguration
configuration :: Maybe StudioComponentConfiguration
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
configuration} -> Maybe StudioComponentConfiguration
configuration) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe StudioComponentConfiguration
a -> CreateStudioComponent
s {$sel:configuration:CreateStudioComponent' :: Maybe StudioComponentConfiguration
configuration = Maybe StudioComponentConfiguration
a} :: CreateStudioComponent)
createStudioComponent_description :: Lens.Lens' CreateStudioComponent (Prelude.Maybe Prelude.Text)
createStudioComponent_description :: Lens' CreateStudioComponent (Maybe Text)
createStudioComponent_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe (Sensitive Text)
a -> CreateStudioComponent
s {$sel:description:CreateStudioComponent' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive
createStudioComponent_ec2SecurityGroupIds :: Lens.Lens' CreateStudioComponent (Prelude.Maybe [Prelude.Text])
createStudioComponent_ec2SecurityGroupIds :: Lens' CreateStudioComponent (Maybe [Text])
createStudioComponent_ec2SecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe [Text]
ec2SecurityGroupIds :: Maybe [Text]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
ec2SecurityGroupIds} -> Maybe [Text]
ec2SecurityGroupIds) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe [Text]
a -> CreateStudioComponent
s {$sel:ec2SecurityGroupIds:CreateStudioComponent' :: Maybe [Text]
ec2SecurityGroupIds = Maybe [Text]
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudioComponent_initializationScripts :: Lens.Lens' CreateStudioComponent (Prelude.Maybe [StudioComponentInitializationScript])
createStudioComponent_initializationScripts :: Lens'
CreateStudioComponent (Maybe [StudioComponentInitializationScript])
createStudioComponent_initializationScripts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe [StudioComponentInitializationScript]
initializationScripts :: Maybe [StudioComponentInitializationScript]
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
initializationScripts} -> Maybe [StudioComponentInitializationScript]
initializationScripts) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe [StudioComponentInitializationScript]
a -> CreateStudioComponent
s {$sel:initializationScripts:CreateStudioComponent' :: Maybe [StudioComponentInitializationScript]
initializationScripts = Maybe [StudioComponentInitializationScript]
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudioComponent_runtimeRoleArn :: Lens.Lens' CreateStudioComponent (Prelude.Maybe Prelude.Text)
createStudioComponent_runtimeRoleArn :: Lens' CreateStudioComponent (Maybe Text)
createStudioComponent_runtimeRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe Text
runtimeRoleArn :: Maybe Text
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
runtimeRoleArn} -> Maybe Text
runtimeRoleArn) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe Text
a -> CreateStudioComponent
s {$sel:runtimeRoleArn:CreateStudioComponent' :: Maybe Text
runtimeRoleArn = Maybe Text
a} :: CreateStudioComponent)
createStudioComponent_scriptParameters :: Lens.Lens' CreateStudioComponent (Prelude.Maybe [ScriptParameterKeyValue])
createStudioComponent_scriptParameters :: Lens' CreateStudioComponent (Maybe [ScriptParameterKeyValue])
createStudioComponent_scriptParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters} -> Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe (Sensitive [ScriptParameterKeyValue])
a -> CreateStudioComponent
s {$sel:scriptParameters:CreateStudioComponent' :: Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters = Maybe (Sensitive [ScriptParameterKeyValue])
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createStudioComponent_secureInitializationRoleArn :: Lens.Lens' CreateStudioComponent (Prelude.Maybe Prelude.Text)
createStudioComponent_secureInitializationRoleArn :: Lens' CreateStudioComponent (Maybe Text)
createStudioComponent_secureInitializationRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe Text
secureInitializationRoleArn :: Maybe Text
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
secureInitializationRoleArn} -> Maybe Text
secureInitializationRoleArn) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe Text
a -> CreateStudioComponent
s {$sel:secureInitializationRoleArn:CreateStudioComponent' :: Maybe Text
secureInitializationRoleArn = Maybe Text
a} :: CreateStudioComponent)
createStudioComponent_subtype :: Lens.Lens' CreateStudioComponent (Prelude.Maybe StudioComponentSubtype)
createStudioComponent_subtype :: Lens' CreateStudioComponent (Maybe StudioComponentSubtype)
createStudioComponent_subtype = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe StudioComponentSubtype
subtype :: Maybe StudioComponentSubtype
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
subtype} -> Maybe StudioComponentSubtype
subtype) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe StudioComponentSubtype
a -> CreateStudioComponent
s {$sel:subtype:CreateStudioComponent' :: Maybe StudioComponentSubtype
subtype = Maybe StudioComponentSubtype
a} :: CreateStudioComponent)
createStudioComponent_tags :: Lens.Lens' CreateStudioComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createStudioComponent_tags :: Lens' CreateStudioComponent (Maybe (HashMap Text Text))
createStudioComponent_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe (HashMap Text Text)
a -> CreateStudioComponent
s {$sel:tags:CreateStudioComponent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudioComponent_name :: Lens.Lens' CreateStudioComponent Prelude.Text
createStudioComponent_name :: Lens' CreateStudioComponent Text
createStudioComponent_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Sensitive Text
name :: Sensitive Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
name} -> Sensitive Text
name) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Sensitive Text
a -> CreateStudioComponent
s {$sel:name:CreateStudioComponent' :: Sensitive Text
name = Sensitive Text
a} :: CreateStudioComponent) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
createStudioComponent_studioId :: Lens.Lens' CreateStudioComponent Prelude.Text
createStudioComponent_studioId :: Lens' CreateStudioComponent Text
createStudioComponent_studioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Text
studioId :: Text
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
studioId} -> Text
studioId) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Text
a -> CreateStudioComponent
s {$sel:studioId:CreateStudioComponent' :: Text
studioId = Text
a} :: CreateStudioComponent)
createStudioComponent_type :: Lens.Lens' CreateStudioComponent StudioComponentType
createStudioComponent_type :: Lens' CreateStudioComponent StudioComponentType
createStudioComponent_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {StudioComponentType
type' :: StudioComponentType
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
type'} -> StudioComponentType
type') (\s :: CreateStudioComponent
s@CreateStudioComponent' {} StudioComponentType
a -> CreateStudioComponent
s {$sel:type':CreateStudioComponent' :: StudioComponentType
type' = StudioComponentType
a} :: CreateStudioComponent)
instance Core.AWSRequest CreateStudioComponent where
type
AWSResponse CreateStudioComponent =
CreateStudioComponentResponse
request :: (Service -> Service)
-> CreateStudioComponent -> Request CreateStudioComponent
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateStudioComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateStudioComponent)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe StudioComponent -> Int -> CreateStudioComponentResponse
CreateStudioComponentResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"studioComponent")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateStudioComponent where
hashWithSalt :: Int -> CreateStudioComponent -> Int
hashWithSalt Int
_salt CreateStudioComponent' {Maybe [Text]
Maybe [StudioComponentInitializationScript]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive [ScriptParameterKeyValue])
Maybe (Sensitive Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
Sensitive Text
StudioComponentType
type' :: StudioComponentType
studioId :: Text
name :: Sensitive Text
tags :: Maybe (HashMap Text Text)
subtype :: Maybe StudioComponentSubtype
secureInitializationRoleArn :: Maybe Text
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
runtimeRoleArn :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
ec2SecurityGroupIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
configuration :: Maybe StudioComponentConfiguration
clientToken :: Maybe Text
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StudioComponentConfiguration
configuration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
ec2SecurityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [StudioComponentInitializationScript]
initializationScripts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runtimeRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secureInitializationRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StudioComponentSubtype
subtype
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StudioComponentType
type'
instance Prelude.NFData CreateStudioComponent where
rnf :: CreateStudioComponent -> ()
rnf CreateStudioComponent' {Maybe [Text]
Maybe [StudioComponentInitializationScript]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive [ScriptParameterKeyValue])
Maybe (Sensitive Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
Sensitive Text
StudioComponentType
type' :: StudioComponentType
studioId :: Text
name :: Sensitive Text
tags :: Maybe (HashMap Text Text)
subtype :: Maybe StudioComponentSubtype
secureInitializationRoleArn :: Maybe Text
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
runtimeRoleArn :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
ec2SecurityGroupIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
configuration :: Maybe StudioComponentConfiguration
clientToken :: Maybe Text
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StudioComponentConfiguration
configuration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
ec2SecurityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StudioComponentInitializationScript]
initializationScripts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runtimeRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secureInitializationRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StudioComponentSubtype
subtype
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StudioComponentType
type'
instance Data.ToHeaders CreateStudioComponent where
toHeaders :: CreateStudioComponent -> ResponseHeaders
toHeaders CreateStudioComponent' {Maybe [Text]
Maybe [StudioComponentInitializationScript]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive [ScriptParameterKeyValue])
Maybe (Sensitive Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
Sensitive Text
StudioComponentType
type' :: StudioComponentType
studioId :: Text
name :: Sensitive Text
tags :: Maybe (HashMap Text Text)
subtype :: Maybe StudioComponentSubtype
secureInitializationRoleArn :: Maybe Text
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
runtimeRoleArn :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
ec2SecurityGroupIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
configuration :: Maybe StudioComponentConfiguration
clientToken :: Maybe Text
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Client-Token" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
clientToken,
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
]
instance Data.ToJSON CreateStudioComponent where
toJSON :: CreateStudioComponent -> Value
toJSON CreateStudioComponent' {Maybe [Text]
Maybe [StudioComponentInitializationScript]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive [ScriptParameterKeyValue])
Maybe (Sensitive Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
Sensitive Text
StudioComponentType
type' :: StudioComponentType
studioId :: Text
name :: Sensitive Text
tags :: Maybe (HashMap Text Text)
subtype :: Maybe StudioComponentSubtype
secureInitializationRoleArn :: Maybe Text
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
runtimeRoleArn :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
ec2SecurityGroupIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
configuration :: Maybe StudioComponentConfiguration
clientToken :: Maybe Text
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"configuration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StudioComponentConfiguration
configuration,
(Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
(Key
"ec2SecurityGroupIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
ec2SecurityGroupIds,
(Key
"initializationScripts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StudioComponentInitializationScript]
initializationScripts,
(Key
"runtimeRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
runtimeRoleArn,
(Key
"scriptParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters,
(Key
"secureInitializationRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secureInitializationRoleArn,
(Key
"subtype" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StudioComponentSubtype
subtype,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= StudioComponentType
type')
]
)
instance Data.ToPath CreateStudioComponent where
toPath :: CreateStudioComponent -> ByteString
toPath CreateStudioComponent' {Maybe [Text]
Maybe [StudioComponentInitializationScript]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive [ScriptParameterKeyValue])
Maybe (Sensitive Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
Sensitive Text
StudioComponentType
type' :: StudioComponentType
studioId :: Text
name :: Sensitive Text
tags :: Maybe (HashMap Text Text)
subtype :: Maybe StudioComponentSubtype
secureInitializationRoleArn :: Maybe Text
scriptParameters :: Maybe (Sensitive [ScriptParameterKeyValue])
runtimeRoleArn :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
ec2SecurityGroupIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
configuration :: Maybe StudioComponentConfiguration
clientToken :: Maybe Text
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Sensitive Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:secureInitializationRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
$sel:runtimeRoleArn:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe [Text]
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe (Sensitive Text)
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-08-01/studios/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
studioId,
ByteString
"/studio-components"
]
instance Data.ToQuery CreateStudioComponent where
toQuery :: CreateStudioComponent -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateStudioComponentResponse = CreateStudioComponentResponse'
{
CreateStudioComponentResponse -> Maybe StudioComponent
studioComponent :: Prelude.Maybe StudioComponent,
CreateStudioComponentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool
$c/= :: CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool
== :: CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool
$c== :: CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool
Prelude.Eq, Int -> CreateStudioComponentResponse -> ShowS
[CreateStudioComponentResponse] -> ShowS
CreateStudioComponentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStudioComponentResponse] -> ShowS
$cshowList :: [CreateStudioComponentResponse] -> ShowS
show :: CreateStudioComponentResponse -> String
$cshow :: CreateStudioComponentResponse -> String
showsPrec :: Int -> CreateStudioComponentResponse -> ShowS
$cshowsPrec :: Int -> CreateStudioComponentResponse -> ShowS
Prelude.Show, forall x.
Rep CreateStudioComponentResponse x
-> CreateStudioComponentResponse
forall x.
CreateStudioComponentResponse
-> Rep CreateStudioComponentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateStudioComponentResponse x
-> CreateStudioComponentResponse
$cfrom :: forall x.
CreateStudioComponentResponse
-> Rep CreateStudioComponentResponse x
Prelude.Generic)
newCreateStudioComponentResponse ::
Prelude.Int ->
CreateStudioComponentResponse
newCreateStudioComponentResponse :: Int -> CreateStudioComponentResponse
newCreateStudioComponentResponse Int
pHttpStatus_ =
CreateStudioComponentResponse'
{ $sel:studioComponent:CreateStudioComponentResponse' :: Maybe StudioComponent
studioComponent =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStudioComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStudioComponentResponse_studioComponent :: Lens.Lens' CreateStudioComponentResponse (Prelude.Maybe StudioComponent)
createStudioComponentResponse_studioComponent :: Lens' CreateStudioComponentResponse (Maybe StudioComponent)
createStudioComponentResponse_studioComponent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponentResponse' {Maybe StudioComponent
studioComponent :: Maybe StudioComponent
$sel:studioComponent:CreateStudioComponentResponse' :: CreateStudioComponentResponse -> Maybe StudioComponent
studioComponent} -> Maybe StudioComponent
studioComponent) (\s :: CreateStudioComponentResponse
s@CreateStudioComponentResponse' {} Maybe StudioComponent
a -> CreateStudioComponentResponse
s {$sel:studioComponent:CreateStudioComponentResponse' :: Maybe StudioComponent
studioComponent = Maybe StudioComponent
a} :: CreateStudioComponentResponse)
createStudioComponentResponse_httpStatus :: Lens.Lens' CreateStudioComponentResponse Prelude.Int
createStudioComponentResponse_httpStatus :: Lens' CreateStudioComponentResponse Int
createStudioComponentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStudioComponentResponse' :: CreateStudioComponentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStudioComponentResponse
s@CreateStudioComponentResponse' {} Int
a -> CreateStudioComponentResponse
s {$sel:httpStatus:CreateStudioComponentResponse' :: Int
httpStatus = Int
a} :: CreateStudioComponentResponse)
instance Prelude.NFData CreateStudioComponentResponse where
rnf :: CreateStudioComponentResponse -> ()
rnf CreateStudioComponentResponse' {Int
Maybe StudioComponent
httpStatus :: Int
studioComponent :: Maybe StudioComponent
$sel:httpStatus:CreateStudioComponentResponse' :: CreateStudioComponentResponse -> Int
$sel:studioComponent:CreateStudioComponentResponse' :: CreateStudioComponentResponse -> Maybe StudioComponent
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe StudioComponent
studioComponent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus