{-# 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.CreateLaunchProfile
(
CreateLaunchProfile (..),
newCreateLaunchProfile,
createLaunchProfile_clientToken,
createLaunchProfile_description,
createLaunchProfile_tags,
createLaunchProfile_ec2SubnetIds,
createLaunchProfile_studioComponentIds,
createLaunchProfile_studioId,
createLaunchProfile_launchProfileProtocolVersions,
createLaunchProfile_name,
createLaunchProfile_streamConfiguration,
CreateLaunchProfileResponse (..),
newCreateLaunchProfileResponse,
createLaunchProfileResponse_launchProfile,
createLaunchProfileResponse_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 CreateLaunchProfile = CreateLaunchProfile'
{
CreateLaunchProfile -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateLaunchProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateLaunchProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateLaunchProfile -> [Text]
ec2SubnetIds :: [Prelude.Text],
CreateLaunchProfile -> NonEmpty Text
studioComponentIds :: Prelude.NonEmpty Prelude.Text,
CreateLaunchProfile -> Text
studioId :: Prelude.Text,
CreateLaunchProfile -> [Text]
launchProfileProtocolVersions :: [Prelude.Text],
CreateLaunchProfile -> Text
name :: Prelude.Text,
CreateLaunchProfile -> StreamConfigurationCreate
streamConfiguration :: StreamConfigurationCreate
}
deriving (CreateLaunchProfile -> CreateLaunchProfile -> Bool
(CreateLaunchProfile -> CreateLaunchProfile -> Bool)
-> (CreateLaunchProfile -> CreateLaunchProfile -> Bool)
-> Eq CreateLaunchProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLaunchProfile -> CreateLaunchProfile -> Bool
$c/= :: CreateLaunchProfile -> CreateLaunchProfile -> Bool
== :: CreateLaunchProfile -> CreateLaunchProfile -> Bool
$c== :: CreateLaunchProfile -> CreateLaunchProfile -> Bool
Prelude.Eq, ReadPrec [CreateLaunchProfile]
ReadPrec CreateLaunchProfile
Int -> ReadS CreateLaunchProfile
ReadS [CreateLaunchProfile]
(Int -> ReadS CreateLaunchProfile)
-> ReadS [CreateLaunchProfile]
-> ReadPrec CreateLaunchProfile
-> ReadPrec [CreateLaunchProfile]
-> Read CreateLaunchProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLaunchProfile]
$creadListPrec :: ReadPrec [CreateLaunchProfile]
readPrec :: ReadPrec CreateLaunchProfile
$creadPrec :: ReadPrec CreateLaunchProfile
readList :: ReadS [CreateLaunchProfile]
$creadList :: ReadS [CreateLaunchProfile]
readsPrec :: Int -> ReadS CreateLaunchProfile
$creadsPrec :: Int -> ReadS CreateLaunchProfile
Prelude.Read, Int -> CreateLaunchProfile -> ShowS
[CreateLaunchProfile] -> ShowS
CreateLaunchProfile -> String
(Int -> CreateLaunchProfile -> ShowS)
-> (CreateLaunchProfile -> String)
-> ([CreateLaunchProfile] -> ShowS)
-> Show CreateLaunchProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLaunchProfile] -> ShowS
$cshowList :: [CreateLaunchProfile] -> ShowS
show :: CreateLaunchProfile -> String
$cshow :: CreateLaunchProfile -> String
showsPrec :: Int -> CreateLaunchProfile -> ShowS
$cshowsPrec :: Int -> CreateLaunchProfile -> ShowS
Prelude.Show, (forall x. CreateLaunchProfile -> Rep CreateLaunchProfile x)
-> (forall x. Rep CreateLaunchProfile x -> CreateLaunchProfile)
-> Generic CreateLaunchProfile
forall x. Rep CreateLaunchProfile x -> CreateLaunchProfile
forall x. CreateLaunchProfile -> Rep CreateLaunchProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateLaunchProfile x -> CreateLaunchProfile
$cfrom :: forall x. CreateLaunchProfile -> Rep CreateLaunchProfile x
Prelude.Generic)
newCreateLaunchProfile ::
Prelude.NonEmpty Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StreamConfigurationCreate ->
CreateLaunchProfile
newCreateLaunchProfile :: NonEmpty Text
-> Text -> Text -> StreamConfigurationCreate -> CreateLaunchProfile
newCreateLaunchProfile
NonEmpty Text
pStudioComponentIds_
Text
pStudioId_
Text
pName_
StreamConfigurationCreate
pStreamConfiguration_ =
CreateLaunchProfile' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> [Text]
-> NonEmpty Text
-> Text
-> [Text]
-> Text
-> StreamConfigurationCreate
-> CreateLaunchProfile
CreateLaunchProfile'
{ $sel:clientToken:CreateLaunchProfile' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateLaunchProfile' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateLaunchProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:ec2SubnetIds:CreateLaunchProfile' :: [Text]
ec2SubnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:studioComponentIds:CreateLaunchProfile' :: NonEmpty Text
studioComponentIds =
Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pStudioComponentIds_,
$sel:studioId:CreateLaunchProfile' :: Text
studioId = Text
pStudioId_,
$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: [Text]
launchProfileProtocolVersions = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:name:CreateLaunchProfile' :: Text
name = Text
pName_,
$sel:streamConfiguration:CreateLaunchProfile' :: StreamConfigurationCreate
streamConfiguration = StreamConfigurationCreate
pStreamConfiguration_
}
createLaunchProfile_clientToken :: Lens.Lens' CreateLaunchProfile (Prelude.Maybe Prelude.Text)
createLaunchProfile_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_clientToken = (CreateLaunchProfile -> Maybe Text)
-> (CreateLaunchProfile -> Maybe Text -> CreateLaunchProfile)
-> Lens
CreateLaunchProfile CreateLaunchProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} Maybe Text
a -> CreateLaunchProfile
s {$sel:clientToken:CreateLaunchProfile' :: Maybe Text
clientToken = Maybe Text
a} :: CreateLaunchProfile)
createLaunchProfile_description :: Lens.Lens' CreateLaunchProfile (Prelude.Maybe Prelude.Text)
createLaunchProfile_description :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_description = (CreateLaunchProfile -> Maybe Text)
-> (CreateLaunchProfile -> Maybe Text -> CreateLaunchProfile)
-> Lens
CreateLaunchProfile CreateLaunchProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {Maybe Text
description :: Maybe Text
$sel:description:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} Maybe Text
a -> CreateLaunchProfile
s {$sel:description:CreateLaunchProfile' :: Maybe Text
description = Maybe Text
a} :: CreateLaunchProfile)
createLaunchProfile_tags :: Lens.Lens' CreateLaunchProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createLaunchProfile_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_tags = (CreateLaunchProfile -> Maybe (HashMap Text Text))
-> (CreateLaunchProfile
-> Maybe (HashMap Text Text) -> CreateLaunchProfile)
-> Lens
CreateLaunchProfile
CreateLaunchProfile
(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 (\CreateLaunchProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} Maybe (HashMap Text Text)
a -> CreateLaunchProfile
s {$sel:tags:CreateLaunchProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateLaunchProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateLaunchProfile -> f CreateLaunchProfile)
-> ((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)))
-> CreateLaunchProfile
-> f CreateLaunchProfile
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
createLaunchProfile_ec2SubnetIds :: Lens.Lens' CreateLaunchProfile [Prelude.Text]
createLaunchProfile_ec2SubnetIds :: ([Text] -> f [Text])
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_ec2SubnetIds = (CreateLaunchProfile -> [Text])
-> (CreateLaunchProfile -> [Text] -> CreateLaunchProfile)
-> Lens CreateLaunchProfile CreateLaunchProfile [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {[Text]
ec2SubnetIds :: [Text]
$sel:ec2SubnetIds:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
ec2SubnetIds} -> [Text]
ec2SubnetIds) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} [Text]
a -> CreateLaunchProfile
s {$sel:ec2SubnetIds:CreateLaunchProfile' :: [Text]
ec2SubnetIds = [Text]
a} :: CreateLaunchProfile) (([Text] -> f [Text])
-> CreateLaunchProfile -> f CreateLaunchProfile)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateLaunchProfile
-> f CreateLaunchProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLaunchProfile_studioComponentIds :: Lens.Lens' CreateLaunchProfile (Prelude.NonEmpty Prelude.Text)
createLaunchProfile_studioComponentIds :: (NonEmpty Text -> f (NonEmpty Text))
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_studioComponentIds = (CreateLaunchProfile -> NonEmpty Text)
-> (CreateLaunchProfile -> NonEmpty Text -> CreateLaunchProfile)
-> Lens
CreateLaunchProfile
CreateLaunchProfile
(NonEmpty Text)
(NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {NonEmpty Text
studioComponentIds :: NonEmpty Text
$sel:studioComponentIds:CreateLaunchProfile' :: CreateLaunchProfile -> NonEmpty Text
studioComponentIds} -> NonEmpty Text
studioComponentIds) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} NonEmpty Text
a -> CreateLaunchProfile
s {$sel:studioComponentIds:CreateLaunchProfile' :: NonEmpty Text
studioComponentIds = NonEmpty Text
a} :: CreateLaunchProfile) ((NonEmpty Text -> f (NonEmpty Text))
-> CreateLaunchProfile -> f CreateLaunchProfile)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> CreateLaunchProfile
-> f CreateLaunchProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLaunchProfile_studioId :: Lens.Lens' CreateLaunchProfile Prelude.Text
createLaunchProfile_studioId :: (Text -> f Text) -> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_studioId = (CreateLaunchProfile -> Text)
-> (CreateLaunchProfile -> Text -> CreateLaunchProfile)
-> Lens CreateLaunchProfile CreateLaunchProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {Text
studioId :: Text
$sel:studioId:CreateLaunchProfile' :: CreateLaunchProfile -> Text
studioId} -> Text
studioId) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} Text
a -> CreateLaunchProfile
s {$sel:studioId:CreateLaunchProfile' :: Text
studioId = Text
a} :: CreateLaunchProfile)
createLaunchProfile_launchProfileProtocolVersions :: Lens.Lens' CreateLaunchProfile [Prelude.Text]
createLaunchProfile_launchProfileProtocolVersions :: ([Text] -> f [Text])
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_launchProfileProtocolVersions = (CreateLaunchProfile -> [Text])
-> (CreateLaunchProfile -> [Text] -> CreateLaunchProfile)
-> Lens CreateLaunchProfile CreateLaunchProfile [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {[Text]
launchProfileProtocolVersions :: [Text]
$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
launchProfileProtocolVersions} -> [Text]
launchProfileProtocolVersions) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} [Text]
a -> CreateLaunchProfile
s {$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: [Text]
launchProfileProtocolVersions = [Text]
a} :: CreateLaunchProfile) (([Text] -> f [Text])
-> CreateLaunchProfile -> f CreateLaunchProfile)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateLaunchProfile
-> f CreateLaunchProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLaunchProfile_name :: Lens.Lens' CreateLaunchProfile Prelude.Text
createLaunchProfile_name :: (Text -> f Text) -> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_name = (CreateLaunchProfile -> Text)
-> (CreateLaunchProfile -> Text -> CreateLaunchProfile)
-> Lens CreateLaunchProfile CreateLaunchProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {Text
name :: Text
$sel:name:CreateLaunchProfile' :: CreateLaunchProfile -> Text
name} -> Text
name) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} Text
a -> CreateLaunchProfile
s {$sel:name:CreateLaunchProfile' :: Text
name = Text
a} :: CreateLaunchProfile)
createLaunchProfile_streamConfiguration :: Lens.Lens' CreateLaunchProfile StreamConfigurationCreate
createLaunchProfile_streamConfiguration :: (StreamConfigurationCreate -> f StreamConfigurationCreate)
-> CreateLaunchProfile -> f CreateLaunchProfile
createLaunchProfile_streamConfiguration = (CreateLaunchProfile -> StreamConfigurationCreate)
-> (CreateLaunchProfile
-> StreamConfigurationCreate -> CreateLaunchProfile)
-> Lens
CreateLaunchProfile
CreateLaunchProfile
StreamConfigurationCreate
StreamConfigurationCreate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfile' {StreamConfigurationCreate
streamConfiguration :: StreamConfigurationCreate
$sel:streamConfiguration:CreateLaunchProfile' :: CreateLaunchProfile -> StreamConfigurationCreate
streamConfiguration} -> StreamConfigurationCreate
streamConfiguration) (\s :: CreateLaunchProfile
s@CreateLaunchProfile' {} StreamConfigurationCreate
a -> CreateLaunchProfile
s {$sel:streamConfiguration:CreateLaunchProfile' :: StreamConfigurationCreate
streamConfiguration = StreamConfigurationCreate
a} :: CreateLaunchProfile)
instance Core.AWSRequest CreateLaunchProfile where
type
AWSResponse CreateLaunchProfile =
CreateLaunchProfileResponse
request :: CreateLaunchProfile -> Request CreateLaunchProfile
request = Service -> CreateLaunchProfile -> Request CreateLaunchProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateLaunchProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLaunchProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateLaunchProfile))
-> Logger
-> Service
-> Proxy CreateLaunchProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLaunchProfile)))
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 LaunchProfile -> Int -> CreateLaunchProfileResponse
CreateLaunchProfileResponse'
(Maybe LaunchProfile -> Int -> CreateLaunchProfileResponse)
-> Either String (Maybe LaunchProfile)
-> Either String (Int -> CreateLaunchProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LaunchProfile)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"launchProfile")
Either String (Int -> CreateLaunchProfileResponse)
-> Either String Int -> Either String CreateLaunchProfileResponse
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 CreateLaunchProfile
instance Prelude.NFData CreateLaunchProfile
instance Core.ToHeaders CreateLaunchProfile where
toHeaders :: CreateLaunchProfile -> ResponseHeaders
toHeaders CreateLaunchProfile' {[Text]
Maybe Text
Maybe (HashMap Text Text)
NonEmpty Text
Text
StreamConfigurationCreate
streamConfiguration :: StreamConfigurationCreate
name :: Text
launchProfileProtocolVersions :: [Text]
studioId :: Text
studioComponentIds :: NonEmpty Text
ec2SubnetIds :: [Text]
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:streamConfiguration:CreateLaunchProfile' :: CreateLaunchProfile -> StreamConfigurationCreate
$sel:name:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:studioId:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:studioComponentIds:CreateLaunchProfile' :: CreateLaunchProfile -> NonEmpty Text
$sel:ec2SubnetIds:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:tags:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe (HashMap Text Text)
$sel:description:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
$sel:clientToken:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
..} =
[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 CreateLaunchProfile where
toJSON :: CreateLaunchProfile -> Value
toJSON CreateLaunchProfile' {[Text]
Maybe Text
Maybe (HashMap Text Text)
NonEmpty Text
Text
StreamConfigurationCreate
streamConfiguration :: StreamConfigurationCreate
name :: Text
launchProfileProtocolVersions :: [Text]
studioId :: Text
studioComponentIds :: NonEmpty Text
ec2SubnetIds :: [Text]
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:streamConfiguration:CreateLaunchProfile' :: CreateLaunchProfile -> StreamConfigurationCreate
$sel:name:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:studioId:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:studioComponentIds:CreateLaunchProfile' :: CreateLaunchProfile -> NonEmpty Text
$sel:ec2SubnetIds:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:tags:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe (HashMap Text Text)
$sel:description:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
$sel:clientToken:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"ec2SubnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
ec2SubnetIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"studioComponentIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
studioComponentIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"launchProfileProtocolVersions"
Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
launchProfileProtocolVersions
),
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
"streamConfiguration" Text -> StreamConfigurationCreate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= StreamConfigurationCreate
streamConfiguration)
]
)
instance Core.ToPath CreateLaunchProfile where
toPath :: CreateLaunchProfile -> ByteString
toPath CreateLaunchProfile' {[Text]
Maybe Text
Maybe (HashMap Text Text)
NonEmpty Text
Text
StreamConfigurationCreate
streamConfiguration :: StreamConfigurationCreate
name :: Text
launchProfileProtocolVersions :: [Text]
studioId :: Text
studioComponentIds :: NonEmpty Text
ec2SubnetIds :: [Text]
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
clientToken :: Maybe Text
$sel:streamConfiguration:CreateLaunchProfile' :: CreateLaunchProfile -> StreamConfigurationCreate
$sel:name:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:launchProfileProtocolVersions:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:studioId:CreateLaunchProfile' :: CreateLaunchProfile -> Text
$sel:studioComponentIds:CreateLaunchProfile' :: CreateLaunchProfile -> NonEmpty Text
$sel:ec2SubnetIds:CreateLaunchProfile' :: CreateLaunchProfile -> [Text]
$sel:tags:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe (HashMap Text Text)
$sel:description:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
$sel:clientToken:CreateLaunchProfile' :: CreateLaunchProfile -> Maybe Text
..} =
[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
"/launch-profiles"
]
instance Core.ToQuery CreateLaunchProfile where
toQuery :: CreateLaunchProfile -> QueryString
toQuery = QueryString -> CreateLaunchProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateLaunchProfileResponse = CreateLaunchProfileResponse'
{
CreateLaunchProfileResponse -> Maybe LaunchProfile
launchProfile :: Prelude.Maybe LaunchProfile,
CreateLaunchProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateLaunchProfileResponse -> CreateLaunchProfileResponse -> Bool
(CreateLaunchProfileResponse
-> CreateLaunchProfileResponse -> Bool)
-> (CreateLaunchProfileResponse
-> CreateLaunchProfileResponse -> Bool)
-> Eq CreateLaunchProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLaunchProfileResponse -> CreateLaunchProfileResponse -> Bool
$c/= :: CreateLaunchProfileResponse -> CreateLaunchProfileResponse -> Bool
== :: CreateLaunchProfileResponse -> CreateLaunchProfileResponse -> Bool
$c== :: CreateLaunchProfileResponse -> CreateLaunchProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateLaunchProfileResponse]
ReadPrec CreateLaunchProfileResponse
Int -> ReadS CreateLaunchProfileResponse
ReadS [CreateLaunchProfileResponse]
(Int -> ReadS CreateLaunchProfileResponse)
-> ReadS [CreateLaunchProfileResponse]
-> ReadPrec CreateLaunchProfileResponse
-> ReadPrec [CreateLaunchProfileResponse]
-> Read CreateLaunchProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLaunchProfileResponse]
$creadListPrec :: ReadPrec [CreateLaunchProfileResponse]
readPrec :: ReadPrec CreateLaunchProfileResponse
$creadPrec :: ReadPrec CreateLaunchProfileResponse
readList :: ReadS [CreateLaunchProfileResponse]
$creadList :: ReadS [CreateLaunchProfileResponse]
readsPrec :: Int -> ReadS CreateLaunchProfileResponse
$creadsPrec :: Int -> ReadS CreateLaunchProfileResponse
Prelude.Read, Int -> CreateLaunchProfileResponse -> ShowS
[CreateLaunchProfileResponse] -> ShowS
CreateLaunchProfileResponse -> String
(Int -> CreateLaunchProfileResponse -> ShowS)
-> (CreateLaunchProfileResponse -> String)
-> ([CreateLaunchProfileResponse] -> ShowS)
-> Show CreateLaunchProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLaunchProfileResponse] -> ShowS
$cshowList :: [CreateLaunchProfileResponse] -> ShowS
show :: CreateLaunchProfileResponse -> String
$cshow :: CreateLaunchProfileResponse -> String
showsPrec :: Int -> CreateLaunchProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateLaunchProfileResponse -> ShowS
Prelude.Show, (forall x.
CreateLaunchProfileResponse -> Rep CreateLaunchProfileResponse x)
-> (forall x.
Rep CreateLaunchProfileResponse x -> CreateLaunchProfileResponse)
-> Generic CreateLaunchProfileResponse
forall x.
Rep CreateLaunchProfileResponse x -> CreateLaunchProfileResponse
forall x.
CreateLaunchProfileResponse -> Rep CreateLaunchProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLaunchProfileResponse x -> CreateLaunchProfileResponse
$cfrom :: forall x.
CreateLaunchProfileResponse -> Rep CreateLaunchProfileResponse x
Prelude.Generic)
newCreateLaunchProfileResponse ::
Prelude.Int ->
CreateLaunchProfileResponse
newCreateLaunchProfileResponse :: Int -> CreateLaunchProfileResponse
newCreateLaunchProfileResponse Int
pHttpStatus_ =
CreateLaunchProfileResponse' :: Maybe LaunchProfile -> Int -> CreateLaunchProfileResponse
CreateLaunchProfileResponse'
{ $sel:launchProfile:CreateLaunchProfileResponse' :: Maybe LaunchProfile
launchProfile =
Maybe LaunchProfile
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateLaunchProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createLaunchProfileResponse_launchProfile :: Lens.Lens' CreateLaunchProfileResponse (Prelude.Maybe LaunchProfile)
createLaunchProfileResponse_launchProfile :: (Maybe LaunchProfile -> f (Maybe LaunchProfile))
-> CreateLaunchProfileResponse -> f CreateLaunchProfileResponse
createLaunchProfileResponse_launchProfile = (CreateLaunchProfileResponse -> Maybe LaunchProfile)
-> (CreateLaunchProfileResponse
-> Maybe LaunchProfile -> CreateLaunchProfileResponse)
-> Lens
CreateLaunchProfileResponse
CreateLaunchProfileResponse
(Maybe LaunchProfile)
(Maybe LaunchProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfileResponse' {Maybe LaunchProfile
launchProfile :: Maybe LaunchProfile
$sel:launchProfile:CreateLaunchProfileResponse' :: CreateLaunchProfileResponse -> Maybe LaunchProfile
launchProfile} -> Maybe LaunchProfile
launchProfile) (\s :: CreateLaunchProfileResponse
s@CreateLaunchProfileResponse' {} Maybe LaunchProfile
a -> CreateLaunchProfileResponse
s {$sel:launchProfile:CreateLaunchProfileResponse' :: Maybe LaunchProfile
launchProfile = Maybe LaunchProfile
a} :: CreateLaunchProfileResponse)
createLaunchProfileResponse_httpStatus :: Lens.Lens' CreateLaunchProfileResponse Prelude.Int
createLaunchProfileResponse_httpStatus :: (Int -> f Int)
-> CreateLaunchProfileResponse -> f CreateLaunchProfileResponse
createLaunchProfileResponse_httpStatus = (CreateLaunchProfileResponse -> Int)
-> (CreateLaunchProfileResponse
-> Int -> CreateLaunchProfileResponse)
-> Lens
CreateLaunchProfileResponse CreateLaunchProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateLaunchProfileResponse' :: CreateLaunchProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateLaunchProfileResponse
s@CreateLaunchProfileResponse' {} Int
a -> CreateLaunchProfileResponse
s {$sel:httpStatus:CreateLaunchProfileResponse' :: Int
httpStatus = Int
a} :: CreateLaunchProfileResponse)
instance Prelude.NFData CreateLaunchProfileResponse