{-# 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.DeleteStreamingImage
(
DeleteStreamingImage (..),
newDeleteStreamingImage,
deleteStreamingImage_clientToken,
deleteStreamingImage_streamingImageId,
deleteStreamingImage_studioId,
DeleteStreamingImageResponse (..),
newDeleteStreamingImageResponse,
deleteStreamingImageResponse_streamingImage,
deleteStreamingImageResponse_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 DeleteStreamingImage = DeleteStreamingImage'
{
DeleteStreamingImage -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
DeleteStreamingImage -> Text
streamingImageId :: Prelude.Text,
DeleteStreamingImage -> Text
studioId :: Prelude.Text
}
deriving (DeleteStreamingImage -> DeleteStreamingImage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStreamingImage -> DeleteStreamingImage -> Bool
$c/= :: DeleteStreamingImage -> DeleteStreamingImage -> Bool
== :: DeleteStreamingImage -> DeleteStreamingImage -> Bool
$c== :: DeleteStreamingImage -> DeleteStreamingImage -> Bool
Prelude.Eq, ReadPrec [DeleteStreamingImage]
ReadPrec DeleteStreamingImage
Int -> ReadS DeleteStreamingImage
ReadS [DeleteStreamingImage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStreamingImage]
$creadListPrec :: ReadPrec [DeleteStreamingImage]
readPrec :: ReadPrec DeleteStreamingImage
$creadPrec :: ReadPrec DeleteStreamingImage
readList :: ReadS [DeleteStreamingImage]
$creadList :: ReadS [DeleteStreamingImage]
readsPrec :: Int -> ReadS DeleteStreamingImage
$creadsPrec :: Int -> ReadS DeleteStreamingImage
Prelude.Read, Int -> DeleteStreamingImage -> ShowS
[DeleteStreamingImage] -> ShowS
DeleteStreamingImage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStreamingImage] -> ShowS
$cshowList :: [DeleteStreamingImage] -> ShowS
show :: DeleteStreamingImage -> String
$cshow :: DeleteStreamingImage -> String
showsPrec :: Int -> DeleteStreamingImage -> ShowS
$cshowsPrec :: Int -> DeleteStreamingImage -> ShowS
Prelude.Show, forall x. Rep DeleteStreamingImage x -> DeleteStreamingImage
forall x. DeleteStreamingImage -> Rep DeleteStreamingImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteStreamingImage x -> DeleteStreamingImage
$cfrom :: forall x. DeleteStreamingImage -> Rep DeleteStreamingImage x
Prelude.Generic)
newDeleteStreamingImage ::
Prelude.Text ->
Prelude.Text ->
DeleteStreamingImage
newDeleteStreamingImage :: Text -> Text -> DeleteStreamingImage
newDeleteStreamingImage Text
pStreamingImageId_ Text
pStudioId_ =
DeleteStreamingImage'
{ $sel:clientToken:DeleteStreamingImage' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:streamingImageId:DeleteStreamingImage' :: Text
streamingImageId = Text
pStreamingImageId_,
$sel:studioId:DeleteStreamingImage' :: Text
studioId = Text
pStudioId_
}
deleteStreamingImage_clientToken :: Lens.Lens' DeleteStreamingImage (Prelude.Maybe Prelude.Text)
deleteStreamingImage_clientToken :: Lens' DeleteStreamingImage (Maybe Text)
deleteStreamingImage_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingImage' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:DeleteStreamingImage' :: DeleteStreamingImage -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: DeleteStreamingImage
s@DeleteStreamingImage' {} Maybe Text
a -> DeleteStreamingImage
s {$sel:clientToken:DeleteStreamingImage' :: Maybe Text
clientToken = Maybe Text
a} :: DeleteStreamingImage)
deleteStreamingImage_streamingImageId :: Lens.Lens' DeleteStreamingImage Prelude.Text
deleteStreamingImage_streamingImageId :: Lens' DeleteStreamingImage Text
deleteStreamingImage_streamingImageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingImage' {Text
streamingImageId :: Text
$sel:streamingImageId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
streamingImageId} -> Text
streamingImageId) (\s :: DeleteStreamingImage
s@DeleteStreamingImage' {} Text
a -> DeleteStreamingImage
s {$sel:streamingImageId:DeleteStreamingImage' :: Text
streamingImageId = Text
a} :: DeleteStreamingImage)
deleteStreamingImage_studioId :: Lens.Lens' DeleteStreamingImage Prelude.Text
deleteStreamingImage_studioId :: Lens' DeleteStreamingImage Text
deleteStreamingImage_studioId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingImage' {Text
studioId :: Text
$sel:studioId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
studioId} -> Text
studioId) (\s :: DeleteStreamingImage
s@DeleteStreamingImage' {} Text
a -> DeleteStreamingImage
s {$sel:studioId:DeleteStreamingImage' :: Text
studioId = Text
a} :: DeleteStreamingImage)
instance Core.AWSRequest DeleteStreamingImage where
type
AWSResponse DeleteStreamingImage =
DeleteStreamingImageResponse
request :: (Service -> Service)
-> DeleteStreamingImage -> Request DeleteStreamingImage
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteStreamingImage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteStreamingImage)))
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 StreamingImage -> Int -> DeleteStreamingImageResponse
DeleteStreamingImageResponse'
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
"streamingImage")
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 DeleteStreamingImage where
hashWithSalt :: Int -> DeleteStreamingImage -> Int
hashWithSalt Int
_salt DeleteStreamingImage' {Maybe Text
Text
studioId :: Text
streamingImageId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:streamingImageId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:clientToken:DeleteStreamingImage' :: DeleteStreamingImage -> 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` Text
streamingImageId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId
instance Prelude.NFData DeleteStreamingImage where
rnf :: DeleteStreamingImage -> ()
rnf DeleteStreamingImage' {Maybe Text
Text
studioId :: Text
streamingImageId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:streamingImageId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:clientToken:DeleteStreamingImage' :: DeleteStreamingImage -> 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 Text
streamingImageId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId
instance Data.ToHeaders DeleteStreamingImage where
toHeaders :: DeleteStreamingImage -> ResponseHeaders
toHeaders DeleteStreamingImage' {Maybe Text
Text
studioId :: Text
streamingImageId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:streamingImageId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:clientToken:DeleteStreamingImage' :: DeleteStreamingImage -> 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.ToPath DeleteStreamingImage where
toPath :: DeleteStreamingImage -> ByteString
toPath DeleteStreamingImage' {Maybe Text
Text
studioId :: Text
streamingImageId :: Text
clientToken :: Maybe Text
$sel:studioId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:streamingImageId:DeleteStreamingImage' :: DeleteStreamingImage -> Text
$sel:clientToken:DeleteStreamingImage' :: DeleteStreamingImage -> 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
"/streaming-images/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
streamingImageId
]
instance Data.ToQuery DeleteStreamingImage where
toQuery :: DeleteStreamingImage -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteStreamingImageResponse = DeleteStreamingImageResponse'
{
DeleteStreamingImageResponse -> Maybe StreamingImage
streamingImage :: Prelude.Maybe StreamingImage,
DeleteStreamingImageResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteStreamingImageResponse
-> DeleteStreamingImageResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStreamingImageResponse
-> DeleteStreamingImageResponse -> Bool
$c/= :: DeleteStreamingImageResponse
-> DeleteStreamingImageResponse -> Bool
== :: DeleteStreamingImageResponse
-> DeleteStreamingImageResponse -> Bool
$c== :: DeleteStreamingImageResponse
-> DeleteStreamingImageResponse -> Bool
Prelude.Eq, Int -> DeleteStreamingImageResponse -> ShowS
[DeleteStreamingImageResponse] -> ShowS
DeleteStreamingImageResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStreamingImageResponse] -> ShowS
$cshowList :: [DeleteStreamingImageResponse] -> ShowS
show :: DeleteStreamingImageResponse -> String
$cshow :: DeleteStreamingImageResponse -> String
showsPrec :: Int -> DeleteStreamingImageResponse -> ShowS
$cshowsPrec :: Int -> DeleteStreamingImageResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteStreamingImageResponse x -> DeleteStreamingImageResponse
forall x.
DeleteStreamingImageResponse -> Rep DeleteStreamingImageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteStreamingImageResponse x -> DeleteStreamingImageResponse
$cfrom :: forall x.
DeleteStreamingImageResponse -> Rep DeleteStreamingImageResponse x
Prelude.Generic)
newDeleteStreamingImageResponse ::
Prelude.Int ->
DeleteStreamingImageResponse
newDeleteStreamingImageResponse :: Int -> DeleteStreamingImageResponse
newDeleteStreamingImageResponse Int
pHttpStatus_ =
DeleteStreamingImageResponse'
{ $sel:streamingImage:DeleteStreamingImageResponse' :: Maybe StreamingImage
streamingImage =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteStreamingImageResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteStreamingImageResponse_streamingImage :: Lens.Lens' DeleteStreamingImageResponse (Prelude.Maybe StreamingImage)
deleteStreamingImageResponse_streamingImage :: Lens' DeleteStreamingImageResponse (Maybe StreamingImage)
deleteStreamingImageResponse_streamingImage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingImageResponse' {Maybe StreamingImage
streamingImage :: Maybe StreamingImage
$sel:streamingImage:DeleteStreamingImageResponse' :: DeleteStreamingImageResponse -> Maybe StreamingImage
streamingImage} -> Maybe StreamingImage
streamingImage) (\s :: DeleteStreamingImageResponse
s@DeleteStreamingImageResponse' {} Maybe StreamingImage
a -> DeleteStreamingImageResponse
s {$sel:streamingImage:DeleteStreamingImageResponse' :: Maybe StreamingImage
streamingImage = Maybe StreamingImage
a} :: DeleteStreamingImageResponse)
deleteStreamingImageResponse_httpStatus :: Lens.Lens' DeleteStreamingImageResponse Prelude.Int
deleteStreamingImageResponse_httpStatus :: Lens' DeleteStreamingImageResponse Int
deleteStreamingImageResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStreamingImageResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteStreamingImageResponse' :: DeleteStreamingImageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteStreamingImageResponse
s@DeleteStreamingImageResponse' {} Int
a -> DeleteStreamingImageResponse
s {$sel:httpStatus:DeleteStreamingImageResponse' :: Int
httpStatus = Int
a} :: DeleteStreamingImageResponse)
instance Prelude.NFData DeleteStreamingImageResponse where
rnf :: DeleteStreamingImageResponse -> ()
rnf DeleteStreamingImageResponse' {Int
Maybe StreamingImage
httpStatus :: Int
streamingImage :: Maybe StreamingImage
$sel:httpStatus:DeleteStreamingImageResponse' :: DeleteStreamingImageResponse -> Int
$sel:streamingImage:DeleteStreamingImageResponse' :: DeleteStreamingImageResponse -> Maybe StreamingImage
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingImage
streamingImage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus