{-# 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_initializationScripts,
createStudioComponent_clientToken,
createStudioComponent_ec2SecurityGroupIds,
createStudioComponent_subtype,
createStudioComponent_scriptParameters,
createStudioComponent_configuration,
createStudioComponent_description,
createStudioComponent_tags,
createStudioComponent_studioId,
createStudioComponent_name,
createStudioComponent_type,
CreateStudioComponentResponse (..),
newCreateStudioComponentResponse,
createStudioComponentResponse_studioComponent,
createStudioComponentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 [StudioComponentInitializationScript]
initializationScripts :: Prelude.Maybe [StudioComponentInitializationScript],
CreateStudioComponent -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateStudioComponent -> Maybe (NonEmpty Text)
ec2SecurityGroupIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateStudioComponent -> Maybe StudioComponentSubtype
subtype :: Prelude.Maybe StudioComponentSubtype,
CreateStudioComponent -> Maybe [ScriptParameterKeyValue]
scriptParameters :: Prelude.Maybe [ScriptParameterKeyValue],
CreateStudioComponent -> Maybe StudioComponentConfiguration
configuration :: Prelude.Maybe StudioComponentConfiguration,
CreateStudioComponent -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateStudioComponent -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateStudioComponent -> Text
studioId :: Prelude.Text,
CreateStudioComponent -> Text
name :: Prelude.Text,
CreateStudioComponent -> StudioComponentType
type' :: StudioComponentType
}
deriving (CreateStudioComponent -> CreateStudioComponent -> Bool
(CreateStudioComponent -> CreateStudioComponent -> Bool)
-> (CreateStudioComponent -> CreateStudioComponent -> Bool)
-> Eq CreateStudioComponent
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, ReadPrec [CreateStudioComponent]
ReadPrec CreateStudioComponent
Int -> ReadS CreateStudioComponent
ReadS [CreateStudioComponent]
(Int -> ReadS CreateStudioComponent)
-> ReadS [CreateStudioComponent]
-> ReadPrec CreateStudioComponent
-> ReadPrec [CreateStudioComponent]
-> Read CreateStudioComponent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStudioComponent]
$creadListPrec :: ReadPrec [CreateStudioComponent]
readPrec :: ReadPrec CreateStudioComponent
$creadPrec :: ReadPrec CreateStudioComponent
readList :: ReadS [CreateStudioComponent]
$creadList :: ReadS [CreateStudioComponent]
readsPrec :: Int -> ReadS CreateStudioComponent
$creadsPrec :: Int -> ReadS CreateStudioComponent
Prelude.Read, Int -> CreateStudioComponent -> ShowS
[CreateStudioComponent] -> ShowS
CreateStudioComponent -> String
(Int -> CreateStudioComponent -> ShowS)
-> (CreateStudioComponent -> String)
-> ([CreateStudioComponent] -> ShowS)
-> Show CreateStudioComponent
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. CreateStudioComponent -> Rep CreateStudioComponent x)
-> (forall x. Rep CreateStudioComponent x -> CreateStudioComponent)
-> Generic CreateStudioComponent
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
pStudioId_ Text
pName_ StudioComponentType
pType_ =
CreateStudioComponent' :: Maybe [StudioComponentInitializationScript]
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe StudioComponentSubtype
-> Maybe [ScriptParameterKeyValue]
-> Maybe StudioComponentConfiguration
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> StudioComponentType
-> CreateStudioComponent
CreateStudioComponent'
{ $sel:initializationScripts:CreateStudioComponent' :: Maybe [StudioComponentInitializationScript]
initializationScripts =
Maybe [StudioComponentInitializationScript]
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreateStudioComponent' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: Maybe (NonEmpty Text)
ec2SecurityGroupIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:subtype:CreateStudioComponent' :: Maybe StudioComponentSubtype
subtype = Maybe StudioComponentSubtype
forall a. Maybe a
Prelude.Nothing,
$sel:scriptParameters:CreateStudioComponent' :: Maybe [ScriptParameterKeyValue]
scriptParameters = Maybe [ScriptParameterKeyValue]
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:CreateStudioComponent' :: Maybe StudioComponentConfiguration
configuration = Maybe StudioComponentConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateStudioComponent' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStudioComponent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:studioId:CreateStudioComponent' :: Text
studioId = Text
pStudioId_,
$sel:name:CreateStudioComponent' :: Text
name = Text
pName_,
$sel:type':CreateStudioComponent' :: StudioComponentType
type' = StudioComponentType
pType_
}
createStudioComponent_initializationScripts :: Lens.Lens' CreateStudioComponent (Prelude.Maybe [StudioComponentInitializationScript])
createStudioComponent_initializationScripts :: (Maybe [StudioComponentInitializationScript]
-> f (Maybe [StudioComponentInitializationScript]))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_initializationScripts = (CreateStudioComponent
-> Maybe [StudioComponentInitializationScript])
-> (CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
-> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe [StudioComponentInitializationScript])
(Maybe [StudioComponentInitializationScript])
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) ((Maybe [StudioComponentInitializationScript]
-> f (Maybe [StudioComponentInitializationScript]))
-> CreateStudioComponent -> f CreateStudioComponent)
-> ((Maybe [StudioComponentInitializationScript]
-> f (Maybe [StudioComponentInitializationScript]))
-> Maybe [StudioComponentInitializationScript]
-> f (Maybe [StudioComponentInitializationScript]))
-> (Maybe [StudioComponentInitializationScript]
-> f (Maybe [StudioComponentInitializationScript]))
-> CreateStudioComponent
-> f CreateStudioComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
-> Iso
(Maybe [StudioComponentInitializationScript])
(Maybe [StudioComponentInitializationScript])
(Maybe [StudioComponentInitializationScript])
(Maybe [StudioComponentInitializationScript])
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
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
[StudioComponentInitializationScript]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudioComponent_clientToken :: Lens.Lens' CreateStudioComponent (Prelude.Maybe Prelude.Text)
createStudioComponent_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_clientToken = (CreateStudioComponent -> Maybe Text)
-> (CreateStudioComponent -> Maybe Text -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe Text)
(Maybe Text)
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_ec2SecurityGroupIds :: Lens.Lens' CreateStudioComponent (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createStudioComponent_ec2SecurityGroupIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_ec2SecurityGroupIds = (CreateStudioComponent -> Maybe (NonEmpty Text))
-> (CreateStudioComponent
-> Maybe (NonEmpty Text) -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe (NonEmpty Text)
ec2SecurityGroupIds :: Maybe (NonEmpty Text)
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe (NonEmpty Text)
ec2SecurityGroupIds} -> Maybe (NonEmpty Text)
ec2SecurityGroupIds) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe (NonEmpty Text)
a -> CreateStudioComponent
s {$sel:ec2SecurityGroupIds:CreateStudioComponent' :: Maybe (NonEmpty Text)
ec2SecurityGroupIds = Maybe (NonEmpty Text)
a} :: CreateStudioComponent) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStudioComponent -> f CreateStudioComponent)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateStudioComponent
-> f CreateStudioComponent
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
createStudioComponent_subtype :: Lens.Lens' CreateStudioComponent (Prelude.Maybe StudioComponentSubtype)
createStudioComponent_subtype :: (Maybe StudioComponentSubtype -> f (Maybe StudioComponentSubtype))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_subtype = (CreateStudioComponent -> Maybe StudioComponentSubtype)
-> (CreateStudioComponent
-> Maybe StudioComponentSubtype -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe StudioComponentSubtype)
(Maybe StudioComponentSubtype)
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_scriptParameters :: Lens.Lens' CreateStudioComponent (Prelude.Maybe [ScriptParameterKeyValue])
createStudioComponent_scriptParameters :: (Maybe [ScriptParameterKeyValue]
-> f (Maybe [ScriptParameterKeyValue]))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_scriptParameters = (CreateStudioComponent -> Maybe [ScriptParameterKeyValue])
-> (CreateStudioComponent
-> Maybe [ScriptParameterKeyValue] -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe [ScriptParameterKeyValue])
(Maybe [ScriptParameterKeyValue])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe [ScriptParameterKeyValue]
scriptParameters :: Maybe [ScriptParameterKeyValue]
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent -> Maybe [ScriptParameterKeyValue]
scriptParameters} -> Maybe [ScriptParameterKeyValue]
scriptParameters) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe [ScriptParameterKeyValue]
a -> CreateStudioComponent
s {$sel:scriptParameters:CreateStudioComponent' :: Maybe [ScriptParameterKeyValue]
scriptParameters = Maybe [ScriptParameterKeyValue]
a} :: CreateStudioComponent) ((Maybe [ScriptParameterKeyValue]
-> f (Maybe [ScriptParameterKeyValue]))
-> CreateStudioComponent -> f CreateStudioComponent)
-> ((Maybe [ScriptParameterKeyValue]
-> f (Maybe [ScriptParameterKeyValue]))
-> Maybe [ScriptParameterKeyValue]
-> f (Maybe [ScriptParameterKeyValue]))
-> (Maybe [ScriptParameterKeyValue]
-> f (Maybe [ScriptParameterKeyValue]))
-> CreateStudioComponent
-> f CreateStudioComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
-> Iso
(Maybe [ScriptParameterKeyValue])
(Maybe [ScriptParameterKeyValue])
(Maybe [ScriptParameterKeyValue])
(Maybe [ScriptParameterKeyValue])
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
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
[ScriptParameterKeyValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStudioComponent_configuration :: Lens.Lens' CreateStudioComponent (Prelude.Maybe StudioComponentConfiguration)
createStudioComponent_configuration :: (Maybe StudioComponentConfiguration
-> f (Maybe StudioComponentConfiguration))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_configuration = (CreateStudioComponent -> Maybe StudioComponentConfiguration)
-> (CreateStudioComponent
-> Maybe StudioComponentConfiguration -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe StudioComponentConfiguration)
(Maybe StudioComponentConfiguration)
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 :: (Maybe Text -> f (Maybe Text))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_description = (CreateStudioComponent -> Maybe Text)
-> (CreateStudioComponent -> Maybe Text -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Maybe Text
description :: Maybe Text
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Maybe Text
a -> CreateStudioComponent
s {$sel:description:CreateStudioComponent' :: Maybe Text
description = Maybe Text
a} :: CreateStudioComponent)
createStudioComponent_tags :: Lens.Lens' CreateStudioComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createStudioComponent_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_tags = (CreateStudioComponent -> Maybe (HashMap Text Text))
-> (CreateStudioComponent
-> Maybe (HashMap Text Text) -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
(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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateStudioComponent -> f CreateStudioComponent)
-> ((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)))
-> CreateStudioComponent
-> f CreateStudioComponent
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
createStudioComponent_studioId :: Lens.Lens' CreateStudioComponent Prelude.Text
createStudioComponent_studioId :: (Text -> f Text)
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_studioId = (CreateStudioComponent -> Text)
-> (CreateStudioComponent -> Text -> CreateStudioComponent)
-> Lens CreateStudioComponent CreateStudioComponent Text Text
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_name :: Lens.Lens' CreateStudioComponent Prelude.Text
createStudioComponent_name :: (Text -> f Text)
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_name = (CreateStudioComponent -> Text)
-> (CreateStudioComponent -> Text -> CreateStudioComponent)
-> Lens CreateStudioComponent CreateStudioComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStudioComponent' {Text
name :: Text
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Text
name} -> Text
name) (\s :: CreateStudioComponent
s@CreateStudioComponent' {} Text
a -> CreateStudioComponent
s {$sel:name:CreateStudioComponent' :: Text
name = Text
a} :: CreateStudioComponent)
createStudioComponent_type :: Lens.Lens' CreateStudioComponent StudioComponentType
createStudioComponent_type :: (StudioComponentType -> f StudioComponentType)
-> CreateStudioComponent -> f CreateStudioComponent
createStudioComponent_type = (CreateStudioComponent -> StudioComponentType)
-> (CreateStudioComponent
-> StudioComponentType -> CreateStudioComponent)
-> Lens
CreateStudioComponent
CreateStudioComponent
StudioComponentType
StudioComponentType
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 :: CreateStudioComponent -> Request CreateStudioComponent
request = Service -> CreateStudioComponent -> Request CreateStudioComponent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateStudioComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateStudioComponent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateStudioComponent))
-> Logger
-> Service
-> Proxy CreateStudioComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateStudioComponent)))
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 StudioComponent -> Int -> CreateStudioComponentResponse
CreateStudioComponentResponse'
(Maybe StudioComponent -> Int -> CreateStudioComponentResponse)
-> Either String (Maybe StudioComponent)
-> Either String (Int -> CreateStudioComponentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe StudioComponent)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"studioComponent")
Either String (Int -> CreateStudioComponentResponse)
-> Either String Int -> Either String CreateStudioComponentResponse
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 CreateStudioComponent
instance Prelude.NFData CreateStudioComponent
instance Core.ToHeaders CreateStudioComponent where
toHeaders :: CreateStudioComponent -> ResponseHeaders
toHeaders CreateStudioComponent' {Maybe [ScriptParameterKeyValue]
Maybe [StudioComponentInitializationScript]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
StudioComponentType
type' :: StudioComponentType
name :: Text
studioId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
configuration :: Maybe StudioComponentConfiguration
scriptParameters :: Maybe [ScriptParameterKeyValue]
subtype :: Maybe StudioComponentSubtype
ec2SecurityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent -> Maybe [ScriptParameterKeyValue]
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe (NonEmpty Text)
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientToken,
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 CreateStudioComponent where
toJSON :: CreateStudioComponent -> Value
toJSON CreateStudioComponent' {Maybe [ScriptParameterKeyValue]
Maybe [StudioComponentInitializationScript]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
StudioComponentType
type' :: StudioComponentType
name :: Text
studioId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
configuration :: Maybe StudioComponentConfiguration
scriptParameters :: Maybe [ScriptParameterKeyValue]
subtype :: Maybe StudioComponentSubtype
ec2SecurityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent -> Maybe [ScriptParameterKeyValue]
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe (NonEmpty Text)
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"initializationScripts" Text -> [StudioComponentInitializationScript] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([StudioComponentInitializationScript] -> Pair)
-> Maybe [StudioComponentInitializationScript] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StudioComponentInitializationScript]
initializationScripts,
(Text
"ec2SecurityGroupIds" 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)
ec2SecurityGroupIds,
(Text
"subtype" Text -> StudioComponentSubtype -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (StudioComponentSubtype -> Pair)
-> Maybe StudioComponentSubtype -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StudioComponentSubtype
subtype,
(Text
"scriptParameters" Text -> [ScriptParameterKeyValue] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ScriptParameterKeyValue] -> Pair)
-> Maybe [ScriptParameterKeyValue] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScriptParameterKeyValue]
scriptParameters,
(Text
"configuration" Text -> StudioComponentConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (StudioComponentConfiguration -> Pair)
-> Maybe StudioComponentConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StudioComponentConfiguration
configuration,
(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,
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
"type" Text -> StudioComponentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= StudioComponentType
type')
]
)
instance Core.ToPath CreateStudioComponent where
toPath :: CreateStudioComponent -> ByteString
toPath CreateStudioComponent' {Maybe [ScriptParameterKeyValue]
Maybe [StudioComponentInitializationScript]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe StudioComponentConfiguration
Maybe StudioComponentSubtype
Text
StudioComponentType
type' :: StudioComponentType
name :: Text
studioId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
configuration :: Maybe StudioComponentConfiguration
scriptParameters :: Maybe [ScriptParameterKeyValue]
subtype :: Maybe StudioComponentSubtype
ec2SecurityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
initializationScripts :: Maybe [StudioComponentInitializationScript]
$sel:type':CreateStudioComponent' :: CreateStudioComponent -> StudioComponentType
$sel:name:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:studioId:CreateStudioComponent' :: CreateStudioComponent -> Text
$sel:tags:CreateStudioComponent' :: CreateStudioComponent -> Maybe (HashMap Text Text)
$sel:description:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:configuration:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentConfiguration
$sel:scriptParameters:CreateStudioComponent' :: CreateStudioComponent -> Maybe [ScriptParameterKeyValue]
$sel:subtype:CreateStudioComponent' :: CreateStudioComponent -> Maybe StudioComponentSubtype
$sel:ec2SecurityGroupIds:CreateStudioComponent' :: CreateStudioComponent -> Maybe (NonEmpty Text)
$sel:clientToken:CreateStudioComponent' :: CreateStudioComponent -> Maybe Text
$sel:initializationScripts:CreateStudioComponent' :: CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-08-01/studios/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
ByteString
"/studio-components"
]
instance Core.ToQuery CreateStudioComponent where
toQuery :: CreateStudioComponent -> QueryString
toQuery = QueryString -> CreateStudioComponent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool)
-> (CreateStudioComponentResponse
-> CreateStudioComponentResponse -> Bool)
-> Eq CreateStudioComponentResponse
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, ReadPrec [CreateStudioComponentResponse]
ReadPrec CreateStudioComponentResponse
Int -> ReadS CreateStudioComponentResponse
ReadS [CreateStudioComponentResponse]
(Int -> ReadS CreateStudioComponentResponse)
-> ReadS [CreateStudioComponentResponse]
-> ReadPrec CreateStudioComponentResponse
-> ReadPrec [CreateStudioComponentResponse]
-> Read CreateStudioComponentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStudioComponentResponse]
$creadListPrec :: ReadPrec [CreateStudioComponentResponse]
readPrec :: ReadPrec CreateStudioComponentResponse
$creadPrec :: ReadPrec CreateStudioComponentResponse
readList :: ReadS [CreateStudioComponentResponse]
$creadList :: ReadS [CreateStudioComponentResponse]
readsPrec :: Int -> ReadS CreateStudioComponentResponse
$creadsPrec :: Int -> ReadS CreateStudioComponentResponse
Prelude.Read, Int -> CreateStudioComponentResponse -> ShowS
[CreateStudioComponentResponse] -> ShowS
CreateStudioComponentResponse -> String
(Int -> CreateStudioComponentResponse -> ShowS)
-> (CreateStudioComponentResponse -> String)
-> ([CreateStudioComponentResponse] -> ShowS)
-> Show CreateStudioComponentResponse
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.
CreateStudioComponentResponse
-> Rep CreateStudioComponentResponse x)
-> (forall x.
Rep CreateStudioComponentResponse x
-> CreateStudioComponentResponse)
-> Generic CreateStudioComponentResponse
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' :: Maybe StudioComponent -> Int -> CreateStudioComponentResponse
CreateStudioComponentResponse'
{ $sel:studioComponent:CreateStudioComponentResponse' :: Maybe StudioComponent
studioComponent =
Maybe StudioComponent
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStudioComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStudioComponentResponse_studioComponent :: Lens.Lens' CreateStudioComponentResponse (Prelude.Maybe StudioComponent)
createStudioComponentResponse_studioComponent :: (Maybe StudioComponent -> f (Maybe StudioComponent))
-> CreateStudioComponentResponse -> f CreateStudioComponentResponse
createStudioComponentResponse_studioComponent = (CreateStudioComponentResponse -> Maybe StudioComponent)
-> (CreateStudioComponentResponse
-> Maybe StudioComponent -> CreateStudioComponentResponse)
-> Lens
CreateStudioComponentResponse
CreateStudioComponentResponse
(Maybe StudioComponent)
(Maybe 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 :: (Int -> f Int)
-> CreateStudioComponentResponse -> f CreateStudioComponentResponse
createStudioComponentResponse_httpStatus = (CreateStudioComponentResponse -> Int)
-> (CreateStudioComponentResponse
-> Int -> CreateStudioComponentResponse)
-> Lens
CreateStudioComponentResponse CreateStudioComponentResponse Int Int
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