{-# 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.GetLaunchProfileDetails
(
GetLaunchProfileDetails (..),
newGetLaunchProfileDetails,
getLaunchProfileDetails_launchProfileId,
getLaunchProfileDetails_studioId,
GetLaunchProfileDetailsResponse (..),
newGetLaunchProfileDetailsResponse,
getLaunchProfileDetailsResponse_launchProfile,
getLaunchProfileDetailsResponse_streamingImages,
getLaunchProfileDetailsResponse_studioComponentSummaries,
getLaunchProfileDetailsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetLaunchProfileDetails = GetLaunchProfileDetails'
{
GetLaunchProfileDetails -> Text
launchProfileId :: Prelude.Text,
GetLaunchProfileDetails -> Text
studioId :: Prelude.Text
}
deriving (GetLaunchProfileDetails -> GetLaunchProfileDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLaunchProfileDetails -> GetLaunchProfileDetails -> Bool
$c/= :: GetLaunchProfileDetails -> GetLaunchProfileDetails -> Bool
== :: GetLaunchProfileDetails -> GetLaunchProfileDetails -> Bool
$c== :: GetLaunchProfileDetails -> GetLaunchProfileDetails -> Bool
Prelude.Eq, ReadPrec [GetLaunchProfileDetails]
ReadPrec GetLaunchProfileDetails
Int -> ReadS GetLaunchProfileDetails
ReadS [GetLaunchProfileDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLaunchProfileDetails]
$creadListPrec :: ReadPrec [GetLaunchProfileDetails]
readPrec :: ReadPrec GetLaunchProfileDetails
$creadPrec :: ReadPrec GetLaunchProfileDetails
readList :: ReadS [GetLaunchProfileDetails]
$creadList :: ReadS [GetLaunchProfileDetails]
readsPrec :: Int -> ReadS GetLaunchProfileDetails
$creadsPrec :: Int -> ReadS GetLaunchProfileDetails
Prelude.Read, Int -> GetLaunchProfileDetails -> ShowS
[GetLaunchProfileDetails] -> ShowS
GetLaunchProfileDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLaunchProfileDetails] -> ShowS
$cshowList :: [GetLaunchProfileDetails] -> ShowS
show :: GetLaunchProfileDetails -> String
$cshow :: GetLaunchProfileDetails -> String
showsPrec :: Int -> GetLaunchProfileDetails -> ShowS
$cshowsPrec :: Int -> GetLaunchProfileDetails -> ShowS
Prelude.Show, forall x. Rep GetLaunchProfileDetails x -> GetLaunchProfileDetails
forall x. GetLaunchProfileDetails -> Rep GetLaunchProfileDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLaunchProfileDetails x -> GetLaunchProfileDetails
$cfrom :: forall x. GetLaunchProfileDetails -> Rep GetLaunchProfileDetails x
Prelude.Generic)
newGetLaunchProfileDetails ::
Prelude.Text ->
Prelude.Text ->
GetLaunchProfileDetails
newGetLaunchProfileDetails :: Text -> Text -> GetLaunchProfileDetails
newGetLaunchProfileDetails
Text
pLaunchProfileId_
Text
pStudioId_ =
GetLaunchProfileDetails'
{ $sel:launchProfileId:GetLaunchProfileDetails' :: Text
launchProfileId =
Text
pLaunchProfileId_,
$sel:studioId:GetLaunchProfileDetails' :: Text
studioId = Text
pStudioId_
}
getLaunchProfileDetails_launchProfileId :: Lens.Lens' GetLaunchProfileDetails Prelude.Text
getLaunchProfileDetails_launchProfileId :: Lens' GetLaunchProfileDetails Text
getLaunchProfileDetails_launchProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetails' {Text
launchProfileId :: Text
$sel:launchProfileId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
launchProfileId} -> Text
launchProfileId) (\s :: GetLaunchProfileDetails
s@GetLaunchProfileDetails' {} Text
a -> GetLaunchProfileDetails
s {$sel:launchProfileId:GetLaunchProfileDetails' :: Text
launchProfileId = Text
a} :: GetLaunchProfileDetails)
getLaunchProfileDetails_studioId :: Lens.Lens' GetLaunchProfileDetails Prelude.Text
getLaunchProfileDetails_studioId :: Lens' GetLaunchProfileDetails Text
getLaunchProfileDetails_studioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetails' {Text
studioId :: Text
$sel:studioId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
studioId} -> Text
studioId) (\s :: GetLaunchProfileDetails
s@GetLaunchProfileDetails' {} Text
a -> GetLaunchProfileDetails
s {$sel:studioId:GetLaunchProfileDetails' :: Text
studioId = Text
a} :: GetLaunchProfileDetails)
instance Core.AWSRequest GetLaunchProfileDetails where
type
AWSResponse GetLaunchProfileDetails =
GetLaunchProfileDetailsResponse
request :: (Service -> Service)
-> GetLaunchProfileDetails -> Request GetLaunchProfileDetails
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetLaunchProfileDetails
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLaunchProfileDetails)))
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 LaunchProfile
-> Maybe [StreamingImage]
-> Maybe [StudioComponentSummary]
-> Int
-> GetLaunchProfileDetailsResponse
GetLaunchProfileDetailsResponse'
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
"launchProfile")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"streamingImages"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"studioComponentSummaries"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
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 GetLaunchProfileDetails where
hashWithSalt :: Int -> GetLaunchProfileDetails -> Int
hashWithSalt Int
_salt GetLaunchProfileDetails' {Text
studioId :: Text
launchProfileId :: Text
$sel:studioId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
$sel:launchProfileId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
launchProfileId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId
instance Prelude.NFData GetLaunchProfileDetails where
rnf :: GetLaunchProfileDetails -> ()
rnf GetLaunchProfileDetails' {Text
studioId :: Text
launchProfileId :: Text
$sel:studioId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
$sel:launchProfileId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
launchProfileId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId
instance Data.ToHeaders GetLaunchProfileDetails where
toHeaders :: GetLaunchProfileDetails -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetLaunchProfileDetails where
toPath :: GetLaunchProfileDetails -> ByteString
toPath GetLaunchProfileDetails' {Text
studioId :: Text
launchProfileId :: Text
$sel:studioId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> Text
$sel:launchProfileId:GetLaunchProfileDetails' :: GetLaunchProfileDetails -> 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
"/launch-profiles/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
launchProfileId,
ByteString
"/details"
]
instance Data.ToQuery GetLaunchProfileDetails where
toQuery :: GetLaunchProfileDetails -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetLaunchProfileDetailsResponse = GetLaunchProfileDetailsResponse'
{
GetLaunchProfileDetailsResponse -> Maybe LaunchProfile
launchProfile :: Prelude.Maybe LaunchProfile,
GetLaunchProfileDetailsResponse -> Maybe [StreamingImage]
streamingImages :: Prelude.Maybe [StreamingImage],
GetLaunchProfileDetailsResponse -> Maybe [StudioComponentSummary]
studioComponentSummaries :: Prelude.Maybe [StudioComponentSummary],
GetLaunchProfileDetailsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLaunchProfileDetailsResponse
-> GetLaunchProfileDetailsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLaunchProfileDetailsResponse
-> GetLaunchProfileDetailsResponse -> Bool
$c/= :: GetLaunchProfileDetailsResponse
-> GetLaunchProfileDetailsResponse -> Bool
== :: GetLaunchProfileDetailsResponse
-> GetLaunchProfileDetailsResponse -> Bool
$c== :: GetLaunchProfileDetailsResponse
-> GetLaunchProfileDetailsResponse -> Bool
Prelude.Eq, Int -> GetLaunchProfileDetailsResponse -> ShowS
[GetLaunchProfileDetailsResponse] -> ShowS
GetLaunchProfileDetailsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLaunchProfileDetailsResponse] -> ShowS
$cshowList :: [GetLaunchProfileDetailsResponse] -> ShowS
show :: GetLaunchProfileDetailsResponse -> String
$cshow :: GetLaunchProfileDetailsResponse -> String
showsPrec :: Int -> GetLaunchProfileDetailsResponse -> ShowS
$cshowsPrec :: Int -> GetLaunchProfileDetailsResponse -> ShowS
Prelude.Show, forall x.
Rep GetLaunchProfileDetailsResponse x
-> GetLaunchProfileDetailsResponse
forall x.
GetLaunchProfileDetailsResponse
-> Rep GetLaunchProfileDetailsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLaunchProfileDetailsResponse x
-> GetLaunchProfileDetailsResponse
$cfrom :: forall x.
GetLaunchProfileDetailsResponse
-> Rep GetLaunchProfileDetailsResponse x
Prelude.Generic)
newGetLaunchProfileDetailsResponse ::
Prelude.Int ->
GetLaunchProfileDetailsResponse
newGetLaunchProfileDetailsResponse :: Int -> GetLaunchProfileDetailsResponse
newGetLaunchProfileDetailsResponse Int
pHttpStatus_ =
GetLaunchProfileDetailsResponse'
{ $sel:launchProfile:GetLaunchProfileDetailsResponse' :: Maybe LaunchProfile
launchProfile =
forall a. Maybe a
Prelude.Nothing,
$sel:streamingImages:GetLaunchProfileDetailsResponse' :: Maybe [StreamingImage]
streamingImages = forall a. Maybe a
Prelude.Nothing,
$sel:studioComponentSummaries:GetLaunchProfileDetailsResponse' :: Maybe [StudioComponentSummary]
studioComponentSummaries = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLaunchProfileDetailsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLaunchProfileDetailsResponse_launchProfile :: Lens.Lens' GetLaunchProfileDetailsResponse (Prelude.Maybe LaunchProfile)
getLaunchProfileDetailsResponse_launchProfile :: Lens' GetLaunchProfileDetailsResponse (Maybe LaunchProfile)
getLaunchProfileDetailsResponse_launchProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetailsResponse' {Maybe LaunchProfile
launchProfile :: Maybe LaunchProfile
$sel:launchProfile:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe LaunchProfile
launchProfile} -> Maybe LaunchProfile
launchProfile) (\s :: GetLaunchProfileDetailsResponse
s@GetLaunchProfileDetailsResponse' {} Maybe LaunchProfile
a -> GetLaunchProfileDetailsResponse
s {$sel:launchProfile:GetLaunchProfileDetailsResponse' :: Maybe LaunchProfile
launchProfile = Maybe LaunchProfile
a} :: GetLaunchProfileDetailsResponse)
getLaunchProfileDetailsResponse_streamingImages :: Lens.Lens' GetLaunchProfileDetailsResponse (Prelude.Maybe [StreamingImage])
getLaunchProfileDetailsResponse_streamingImages :: Lens' GetLaunchProfileDetailsResponse (Maybe [StreamingImage])
getLaunchProfileDetailsResponse_streamingImages = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetailsResponse' {Maybe [StreamingImage]
streamingImages :: Maybe [StreamingImage]
$sel:streamingImages:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe [StreamingImage]
streamingImages} -> Maybe [StreamingImage]
streamingImages) (\s :: GetLaunchProfileDetailsResponse
s@GetLaunchProfileDetailsResponse' {} Maybe [StreamingImage]
a -> GetLaunchProfileDetailsResponse
s {$sel:streamingImages:GetLaunchProfileDetailsResponse' :: Maybe [StreamingImage]
streamingImages = Maybe [StreamingImage]
a} :: GetLaunchProfileDetailsResponse) 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
getLaunchProfileDetailsResponse_studioComponentSummaries :: Lens.Lens' GetLaunchProfileDetailsResponse (Prelude.Maybe [StudioComponentSummary])
getLaunchProfileDetailsResponse_studioComponentSummaries :: Lens'
GetLaunchProfileDetailsResponse (Maybe [StudioComponentSummary])
getLaunchProfileDetailsResponse_studioComponentSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetailsResponse' {Maybe [StudioComponentSummary]
studioComponentSummaries :: Maybe [StudioComponentSummary]
$sel:studioComponentSummaries:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe [StudioComponentSummary]
studioComponentSummaries} -> Maybe [StudioComponentSummary]
studioComponentSummaries) (\s :: GetLaunchProfileDetailsResponse
s@GetLaunchProfileDetailsResponse' {} Maybe [StudioComponentSummary]
a -> GetLaunchProfileDetailsResponse
s {$sel:studioComponentSummaries:GetLaunchProfileDetailsResponse' :: Maybe [StudioComponentSummary]
studioComponentSummaries = Maybe [StudioComponentSummary]
a} :: GetLaunchProfileDetailsResponse) 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
getLaunchProfileDetailsResponse_httpStatus :: Lens.Lens' GetLaunchProfileDetailsResponse Prelude.Int
getLaunchProfileDetailsResponse_httpStatus :: Lens' GetLaunchProfileDetailsResponse Int
getLaunchProfileDetailsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLaunchProfileDetailsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLaunchProfileDetailsResponse
s@GetLaunchProfileDetailsResponse' {} Int
a -> GetLaunchProfileDetailsResponse
s {$sel:httpStatus:GetLaunchProfileDetailsResponse' :: Int
httpStatus = Int
a} :: GetLaunchProfileDetailsResponse)
instance
Prelude.NFData
GetLaunchProfileDetailsResponse
where
rnf :: GetLaunchProfileDetailsResponse -> ()
rnf GetLaunchProfileDetailsResponse' {Int
Maybe [StreamingImage]
Maybe [StudioComponentSummary]
Maybe LaunchProfile
httpStatus :: Int
studioComponentSummaries :: Maybe [StudioComponentSummary]
streamingImages :: Maybe [StreamingImage]
launchProfile :: Maybe LaunchProfile
$sel:httpStatus:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Int
$sel:studioComponentSummaries:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe [StudioComponentSummary]
$sel:streamingImages:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe [StreamingImage]
$sel:launchProfile:GetLaunchProfileDetailsResponse' :: GetLaunchProfileDetailsResponse -> Maybe LaunchProfile
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchProfile
launchProfile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StreamingImage]
streamingImages
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StudioComponentSummary]
studioComponentSummaries
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus