{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Nimble.CreateStudioComponent
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a studio component resource.
module Amazonka.Nimble.CreateStudioComponent
  ( -- * Creating a Request
    CreateStudioComponent (..),
    newCreateStudioComponent,

    -- * Request Lenses
    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,

    -- * Destructuring the Response
    CreateStudioComponentResponse (..),
    newCreateStudioComponentResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newCreateStudioComponent' smart constructor.
data CreateStudioComponent = CreateStudioComponent'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. If you don’t specify a client token, the
    -- Amazon Web Services SDK automatically generates a client token and uses
    -- it for the request to ensure idempotency.
    CreateStudioComponent -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The configuration of the studio component, based on component type.
    CreateStudioComponent -> Maybe StudioComponentConfiguration
configuration :: Prelude.Maybe StudioComponentConfiguration,
    -- | The description.
    CreateStudioComponent -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The EC2 security groups that control access to the studio component.
    CreateStudioComponent -> Maybe [Text]
ec2SecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | Initialization scripts for studio components.
    CreateStudioComponent
-> Maybe [StudioComponentInitializationScript]
initializationScripts :: Prelude.Maybe [StudioComponentInitializationScript],
    -- | An IAM role attached to a Studio Component that gives the studio
    -- component access to Amazon Web Services resources at anytime while the
    -- instance is running.
    CreateStudioComponent -> Maybe Text
runtimeRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Parameters for the studio component scripts.
    CreateStudioComponent
-> Maybe (Sensitive [ScriptParameterKeyValue])
scriptParameters :: Prelude.Maybe (Data.Sensitive [ScriptParameterKeyValue]),
    -- | An IAM role attached to Studio Component when the system initialization
    -- script runs which give the studio component access to Amazon Web
    -- Services resources when the system initialization script runs.
    CreateStudioComponent -> Maybe Text
secureInitializationRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The specific subtype of a studio component.
    CreateStudioComponent -> Maybe StudioComponentSubtype
subtype :: Prelude.Maybe StudioComponentSubtype,
    -- | A collection of labels, in the form of key-value pairs, that apply to
    -- this resource.
    CreateStudioComponent -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name for the studio component.
    CreateStudioComponent -> Sensitive Text
name :: Data.Sensitive Prelude.Text,
    -- | The studio ID.
    CreateStudioComponent -> Text
studioId :: Prelude.Text,
    -- | The type of the studio component.
    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)

-- |
-- Create a value of 'CreateStudioComponent' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientToken', 'createStudioComponent_clientToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don’t specify a client token, the
-- Amazon Web Services SDK automatically generates a client token and uses
-- it for the request to ensure idempotency.
--
-- 'configuration', 'createStudioComponent_configuration' - The configuration of the studio component, based on component type.
--
-- 'description', 'createStudioComponent_description' - The description.
--
-- 'ec2SecurityGroupIds', 'createStudioComponent_ec2SecurityGroupIds' - The EC2 security groups that control access to the studio component.
--
-- 'initializationScripts', 'createStudioComponent_initializationScripts' - Initialization scripts for studio components.
--
-- 'runtimeRoleArn', 'createStudioComponent_runtimeRoleArn' - An IAM role attached to a Studio Component that gives the studio
-- component access to Amazon Web Services resources at anytime while the
-- instance is running.
--
-- 'scriptParameters', 'createStudioComponent_scriptParameters' - Parameters for the studio component scripts.
--
-- 'secureInitializationRoleArn', 'createStudioComponent_secureInitializationRoleArn' - An IAM role attached to Studio Component when the system initialization
-- script runs which give the studio component access to Amazon Web
-- Services resources when the system initialization script runs.
--
-- 'subtype', 'createStudioComponent_subtype' - The specific subtype of a studio component.
--
-- 'tags', 'createStudioComponent_tags' - A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
--
-- 'name', 'createStudioComponent_name' - The name for the studio component.
--
-- 'studioId', 'createStudioComponent_studioId' - The studio ID.
--
-- 'type'', 'createStudioComponent_type' - The type of the studio component.
newCreateStudioComponent ::
  -- | 'name'
  Prelude.Text ->
  -- | 'studioId'
  Prelude.Text ->
  -- | 'type''
  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_
    }

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don’t specify a client token, the
-- Amazon Web Services SDK automatically generates a client token and uses
-- it for the request to ensure idempotency.
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)

-- | The configuration of the studio component, based on component type.
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)

-- | The description.
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

-- | The EC2 security groups that control access to the studio component.
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

-- | Initialization scripts for studio components.
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

-- | An IAM role attached to a Studio Component that gives the studio
-- component access to Amazon Web Services resources at anytime while the
-- instance is running.
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)

-- | Parameters for the studio component scripts.
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)

-- | An IAM role attached to Studio Component when the system initialization
-- script runs which give the studio component access to Amazon Web
-- Services resources when the system initialization script runs.
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)

-- | The specific subtype of a studio component.
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)

-- | A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
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

-- | The name for the studio component.
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

-- | The studio ID.
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)

-- | The type of the studio component.
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

-- | /See:/ 'newCreateStudioComponentResponse' smart constructor.
data CreateStudioComponentResponse = CreateStudioComponentResponse'
  { -- | Information about the studio component.
    CreateStudioComponentResponse -> Maybe StudioComponent
studioComponent :: Prelude.Maybe StudioComponent,
    -- | The response's http status code.
    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)

-- |
-- Create a value of 'CreateStudioComponentResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'studioComponent', 'createStudioComponentResponse_studioComponent' - Information about the studio component.
--
-- 'httpStatus', 'createStudioComponentResponse_httpStatus' - The response's http status code.
newCreateStudioComponentResponse ::
  -- | 'httpStatus'
  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_
    }

-- | Information about the studio component.
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)

-- | The response's http status code.
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