{-# 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.UpdateStreamingImage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Update streaming image.
module Amazonka.Nimble.UpdateStreamingImage
  ( -- * Creating a Request
    UpdateStreamingImage (..),
    newUpdateStreamingImage,

    -- * Request Lenses
    updateStreamingImage_clientToken,
    updateStreamingImage_name,
    updateStreamingImage_description,
    updateStreamingImage_studioId,
    updateStreamingImage_streamingImageId,

    -- * Destructuring the Response
    UpdateStreamingImageResponse (..),
    newUpdateStreamingImageResponse,

    -- * Response Lenses
    updateStreamingImageResponse_streamingImage,
    updateStreamingImageResponse_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

-- | The streaming image ID.
--
-- /See:/ 'newUpdateStreamingImage' smart constructor.
data UpdateStreamingImage = UpdateStreamingImage'
  { -- | To make an idempotent API request using one of these actions, specify a
    -- client token in the request. You should not reuse the same client token
    -- for other API requests. If you retry a request that completed
    -- successfully using the same client token and the same parameters, the
    -- retry succeeds without performing any further actions. If you retry a
    -- successful request using the same client token, but one or more of the
    -- parameters are different, the retry fails with a ValidationException
    -- error.
    UpdateStreamingImage -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The name for the streaming image.
    UpdateStreamingImage -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The description.
    UpdateStreamingImage -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The studio ID.
    UpdateStreamingImage -> Text
studioId :: Prelude.Text,
    -- | The streaming image ID.
    UpdateStreamingImage -> Text
streamingImageId :: Prelude.Text
  }
  deriving (UpdateStreamingImage -> UpdateStreamingImage -> Bool
(UpdateStreamingImage -> UpdateStreamingImage -> Bool)
-> (UpdateStreamingImage -> UpdateStreamingImage -> Bool)
-> Eq UpdateStreamingImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStreamingImage -> UpdateStreamingImage -> Bool
$c/= :: UpdateStreamingImage -> UpdateStreamingImage -> Bool
== :: UpdateStreamingImage -> UpdateStreamingImage -> Bool
$c== :: UpdateStreamingImage -> UpdateStreamingImage -> Bool
Prelude.Eq, ReadPrec [UpdateStreamingImage]
ReadPrec UpdateStreamingImage
Int -> ReadS UpdateStreamingImage
ReadS [UpdateStreamingImage]
(Int -> ReadS UpdateStreamingImage)
-> ReadS [UpdateStreamingImage]
-> ReadPrec UpdateStreamingImage
-> ReadPrec [UpdateStreamingImage]
-> Read UpdateStreamingImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStreamingImage]
$creadListPrec :: ReadPrec [UpdateStreamingImage]
readPrec :: ReadPrec UpdateStreamingImage
$creadPrec :: ReadPrec UpdateStreamingImage
readList :: ReadS [UpdateStreamingImage]
$creadList :: ReadS [UpdateStreamingImage]
readsPrec :: Int -> ReadS UpdateStreamingImage
$creadsPrec :: Int -> ReadS UpdateStreamingImage
Prelude.Read, Int -> UpdateStreamingImage -> ShowS
[UpdateStreamingImage] -> ShowS
UpdateStreamingImage -> String
(Int -> UpdateStreamingImage -> ShowS)
-> (UpdateStreamingImage -> String)
-> ([UpdateStreamingImage] -> ShowS)
-> Show UpdateStreamingImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStreamingImage] -> ShowS
$cshowList :: [UpdateStreamingImage] -> ShowS
show :: UpdateStreamingImage -> String
$cshow :: UpdateStreamingImage -> String
showsPrec :: Int -> UpdateStreamingImage -> ShowS
$cshowsPrec :: Int -> UpdateStreamingImage -> ShowS
Prelude.Show, (forall x. UpdateStreamingImage -> Rep UpdateStreamingImage x)
-> (forall x. Rep UpdateStreamingImage x -> UpdateStreamingImage)
-> Generic UpdateStreamingImage
forall x. Rep UpdateStreamingImage x -> UpdateStreamingImage
forall x. UpdateStreamingImage -> Rep UpdateStreamingImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStreamingImage x -> UpdateStreamingImage
$cfrom :: forall x. UpdateStreamingImage -> Rep UpdateStreamingImage x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStreamingImage' 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', 'updateStreamingImage_clientToken' - To make an idempotent API request using one of these actions, specify a
-- client token in the request. You should not reuse the same client token
-- for other API requests. If you retry a request that completed
-- successfully using the same client token and the same parameters, the
-- retry succeeds without performing any further actions. If you retry a
-- successful request using the same client token, but one or more of the
-- parameters are different, the retry fails with a ValidationException
-- error.
--
-- 'name', 'updateStreamingImage_name' - The name for the streaming image.
--
-- 'description', 'updateStreamingImage_description' - The description.
--
-- 'studioId', 'updateStreamingImage_studioId' - The studio ID.
--
-- 'streamingImageId', 'updateStreamingImage_streamingImageId' - The streaming image ID.
newUpdateStreamingImage ::
  -- | 'studioId'
  Prelude.Text ->
  -- | 'streamingImageId'
  Prelude.Text ->
  UpdateStreamingImage
newUpdateStreamingImage :: Text -> Text -> UpdateStreamingImage
newUpdateStreamingImage Text
pStudioId_ Text
pStreamingImageId_ =
  UpdateStreamingImage' :: Maybe Text
-> Maybe Text -> Maybe Text -> Text -> Text -> UpdateStreamingImage
UpdateStreamingImage'
    { $sel:clientToken:UpdateStreamingImage' :: Maybe Text
clientToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateStreamingImage' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStreamingImage' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:UpdateStreamingImage' :: Text
studioId = Text
pStudioId_,
      $sel:streamingImageId:UpdateStreamingImage' :: Text
streamingImageId = Text
pStreamingImageId_
    }

-- | To make an idempotent API request using one of these actions, specify a
-- client token in the request. You should not reuse the same client token
-- for other API requests. If you retry a request that completed
-- successfully using the same client token and the same parameters, the
-- retry succeeds without performing any further actions. If you retry a
-- successful request using the same client token, but one or more of the
-- parameters are different, the retry fails with a ValidationException
-- error.
updateStreamingImage_clientToken :: Lens.Lens' UpdateStreamingImage (Prelude.Maybe Prelude.Text)
updateStreamingImage_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamingImage -> f UpdateStreamingImage
updateStreamingImage_clientToken = (UpdateStreamingImage -> Maybe Text)
-> (UpdateStreamingImage -> Maybe Text -> UpdateStreamingImage)
-> Lens
     UpdateStreamingImage UpdateStreamingImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImage' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateStreamingImage
s@UpdateStreamingImage' {} Maybe Text
a -> UpdateStreamingImage
s {$sel:clientToken:UpdateStreamingImage' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateStreamingImage)

-- | The name for the streaming image.
updateStreamingImage_name :: Lens.Lens' UpdateStreamingImage (Prelude.Maybe Prelude.Text)
updateStreamingImage_name :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamingImage -> f UpdateStreamingImage
updateStreamingImage_name = (UpdateStreamingImage -> Maybe Text)
-> (UpdateStreamingImage -> Maybe Text -> UpdateStreamingImage)
-> Lens
     UpdateStreamingImage UpdateStreamingImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImage' {Maybe Text
name :: Maybe Text
$sel:name:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateStreamingImage
s@UpdateStreamingImage' {} Maybe Text
a -> UpdateStreamingImage
s {$sel:name:UpdateStreamingImage' :: Maybe Text
name = Maybe Text
a} :: UpdateStreamingImage)

-- | The description.
updateStreamingImage_description :: Lens.Lens' UpdateStreamingImage (Prelude.Maybe Prelude.Text)
updateStreamingImage_description :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamingImage -> f UpdateStreamingImage
updateStreamingImage_description = (UpdateStreamingImage -> Maybe Text)
-> (UpdateStreamingImage -> Maybe Text -> UpdateStreamingImage)
-> Lens
     UpdateStreamingImage UpdateStreamingImage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImage' {Maybe Text
description :: Maybe Text
$sel:description:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateStreamingImage
s@UpdateStreamingImage' {} Maybe Text
a -> UpdateStreamingImage
s {$sel:description:UpdateStreamingImage' :: Maybe Text
description = Maybe Text
a} :: UpdateStreamingImage)

-- | The studio ID.
updateStreamingImage_studioId :: Lens.Lens' UpdateStreamingImage Prelude.Text
updateStreamingImage_studioId :: (Text -> f Text) -> UpdateStreamingImage -> f UpdateStreamingImage
updateStreamingImage_studioId = (UpdateStreamingImage -> Text)
-> (UpdateStreamingImage -> Text -> UpdateStreamingImage)
-> Lens UpdateStreamingImage UpdateStreamingImage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImage' {Text
studioId :: Text
$sel:studioId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
studioId} -> Text
studioId) (\s :: UpdateStreamingImage
s@UpdateStreamingImage' {} Text
a -> UpdateStreamingImage
s {$sel:studioId:UpdateStreamingImage' :: Text
studioId = Text
a} :: UpdateStreamingImage)

-- | The streaming image ID.
updateStreamingImage_streamingImageId :: Lens.Lens' UpdateStreamingImage Prelude.Text
updateStreamingImage_streamingImageId :: (Text -> f Text) -> UpdateStreamingImage -> f UpdateStreamingImage
updateStreamingImage_streamingImageId = (UpdateStreamingImage -> Text)
-> (UpdateStreamingImage -> Text -> UpdateStreamingImage)
-> Lens UpdateStreamingImage UpdateStreamingImage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImage' {Text
streamingImageId :: Text
$sel:streamingImageId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
streamingImageId} -> Text
streamingImageId) (\s :: UpdateStreamingImage
s@UpdateStreamingImage' {} Text
a -> UpdateStreamingImage
s {$sel:streamingImageId:UpdateStreamingImage' :: Text
streamingImageId = Text
a} :: UpdateStreamingImage)

instance Core.AWSRequest UpdateStreamingImage where
  type
    AWSResponse UpdateStreamingImage =
      UpdateStreamingImageResponse
  request :: UpdateStreamingImage -> Request UpdateStreamingImage
request = Service -> UpdateStreamingImage -> Request UpdateStreamingImage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateStreamingImage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateStreamingImage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateStreamingImage))
-> Logger
-> Service
-> Proxy UpdateStreamingImage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateStreamingImage)))
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 StreamingImage -> Int -> UpdateStreamingImageResponse
UpdateStreamingImageResponse'
            (Maybe StreamingImage -> Int -> UpdateStreamingImageResponse)
-> Either String (Maybe StreamingImage)
-> Either String (Int -> UpdateStreamingImageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe StreamingImage)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"streamingImage")
            Either String (Int -> UpdateStreamingImageResponse)
-> Either String Int -> Either String UpdateStreamingImageResponse
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 UpdateStreamingImage

instance Prelude.NFData UpdateStreamingImage

instance Core.ToHeaders UpdateStreamingImage where
  toHeaders :: UpdateStreamingImage -> ResponseHeaders
toHeaders UpdateStreamingImage' {Maybe Text
Text
streamingImageId :: Text
studioId :: Text
description :: Maybe Text
name :: Maybe Text
clientToken :: Maybe Text
$sel:streamingImageId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:studioId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:description:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:name:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:clientToken:UpdateStreamingImage' :: UpdateStreamingImage -> 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 UpdateStreamingImage where
  toJSON :: UpdateStreamingImage -> Value
toJSON UpdateStreamingImage' {Maybe Text
Text
streamingImageId :: Text
studioId :: Text
description :: Maybe Text
name :: Maybe Text
clientToken :: Maybe Text
$sel:streamingImageId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:studioId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:description:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:name:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:clientToken:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"name" 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
name,
            (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
          ]
      )

instance Core.ToPath UpdateStreamingImage where
  toPath :: UpdateStreamingImage -> ByteString
toPath UpdateStreamingImage' {Maybe Text
Text
streamingImageId :: Text
studioId :: Text
description :: Maybe Text
name :: Maybe Text
clientToken :: Maybe Text
$sel:streamingImageId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:studioId:UpdateStreamingImage' :: UpdateStreamingImage -> Text
$sel:description:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:name:UpdateStreamingImage' :: UpdateStreamingImage -> Maybe Text
$sel:clientToken:UpdateStreamingImage' :: UpdateStreamingImage -> 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
"/streaming-images/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
streamingImageId
      ]

instance Core.ToQuery UpdateStreamingImage where
  toQuery :: UpdateStreamingImage -> QueryString
toQuery = QueryString -> UpdateStreamingImage -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateStreamingImageResponse' smart constructor.
data UpdateStreamingImageResponse = UpdateStreamingImageResponse'
  { UpdateStreamingImageResponse -> Maybe StreamingImage
streamingImage :: Prelude.Maybe StreamingImage,
    -- | The response's http status code.
    UpdateStreamingImageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateStreamingImageResponse
-> UpdateStreamingImageResponse -> Bool
(UpdateStreamingImageResponse
 -> UpdateStreamingImageResponse -> Bool)
-> (UpdateStreamingImageResponse
    -> UpdateStreamingImageResponse -> Bool)
-> Eq UpdateStreamingImageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStreamingImageResponse
-> UpdateStreamingImageResponse -> Bool
$c/= :: UpdateStreamingImageResponse
-> UpdateStreamingImageResponse -> Bool
== :: UpdateStreamingImageResponse
-> UpdateStreamingImageResponse -> Bool
$c== :: UpdateStreamingImageResponse
-> UpdateStreamingImageResponse -> Bool
Prelude.Eq, ReadPrec [UpdateStreamingImageResponse]
ReadPrec UpdateStreamingImageResponse
Int -> ReadS UpdateStreamingImageResponse
ReadS [UpdateStreamingImageResponse]
(Int -> ReadS UpdateStreamingImageResponse)
-> ReadS [UpdateStreamingImageResponse]
-> ReadPrec UpdateStreamingImageResponse
-> ReadPrec [UpdateStreamingImageResponse]
-> Read UpdateStreamingImageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStreamingImageResponse]
$creadListPrec :: ReadPrec [UpdateStreamingImageResponse]
readPrec :: ReadPrec UpdateStreamingImageResponse
$creadPrec :: ReadPrec UpdateStreamingImageResponse
readList :: ReadS [UpdateStreamingImageResponse]
$creadList :: ReadS [UpdateStreamingImageResponse]
readsPrec :: Int -> ReadS UpdateStreamingImageResponse
$creadsPrec :: Int -> ReadS UpdateStreamingImageResponse
Prelude.Read, Int -> UpdateStreamingImageResponse -> ShowS
[UpdateStreamingImageResponse] -> ShowS
UpdateStreamingImageResponse -> String
(Int -> UpdateStreamingImageResponse -> ShowS)
-> (UpdateStreamingImageResponse -> String)
-> ([UpdateStreamingImageResponse] -> ShowS)
-> Show UpdateStreamingImageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStreamingImageResponse] -> ShowS
$cshowList :: [UpdateStreamingImageResponse] -> ShowS
show :: UpdateStreamingImageResponse -> String
$cshow :: UpdateStreamingImageResponse -> String
showsPrec :: Int -> UpdateStreamingImageResponse -> ShowS
$cshowsPrec :: Int -> UpdateStreamingImageResponse -> ShowS
Prelude.Show, (forall x.
 UpdateStreamingImageResponse -> Rep UpdateStreamingImageResponse x)
-> (forall x.
    Rep UpdateStreamingImageResponse x -> UpdateStreamingImageResponse)
-> Generic UpdateStreamingImageResponse
forall x.
Rep UpdateStreamingImageResponse x -> UpdateStreamingImageResponse
forall x.
UpdateStreamingImageResponse -> Rep UpdateStreamingImageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateStreamingImageResponse x -> UpdateStreamingImageResponse
$cfrom :: forall x.
UpdateStreamingImageResponse -> Rep UpdateStreamingImageResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStreamingImageResponse' 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:
--
-- 'streamingImage', 'updateStreamingImageResponse_streamingImage' -
--
-- 'httpStatus', 'updateStreamingImageResponse_httpStatus' - The response's http status code.
newUpdateStreamingImageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateStreamingImageResponse
newUpdateStreamingImageResponse :: Int -> UpdateStreamingImageResponse
newUpdateStreamingImageResponse Int
pHttpStatus_ =
  UpdateStreamingImageResponse' :: Maybe StreamingImage -> Int -> UpdateStreamingImageResponse
UpdateStreamingImageResponse'
    { $sel:streamingImage:UpdateStreamingImageResponse' :: Maybe StreamingImage
streamingImage =
        Maybe StreamingImage
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateStreamingImageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- |
updateStreamingImageResponse_streamingImage :: Lens.Lens' UpdateStreamingImageResponse (Prelude.Maybe StreamingImage)
updateStreamingImageResponse_streamingImage :: (Maybe StreamingImage -> f (Maybe StreamingImage))
-> UpdateStreamingImageResponse -> f UpdateStreamingImageResponse
updateStreamingImageResponse_streamingImage = (UpdateStreamingImageResponse -> Maybe StreamingImage)
-> (UpdateStreamingImageResponse
    -> Maybe StreamingImage -> UpdateStreamingImageResponse)
-> Lens
     UpdateStreamingImageResponse
     UpdateStreamingImageResponse
     (Maybe StreamingImage)
     (Maybe StreamingImage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImageResponse' {Maybe StreamingImage
streamingImage :: Maybe StreamingImage
$sel:streamingImage:UpdateStreamingImageResponse' :: UpdateStreamingImageResponse -> Maybe StreamingImage
streamingImage} -> Maybe StreamingImage
streamingImage) (\s :: UpdateStreamingImageResponse
s@UpdateStreamingImageResponse' {} Maybe StreamingImage
a -> UpdateStreamingImageResponse
s {$sel:streamingImage:UpdateStreamingImageResponse' :: Maybe StreamingImage
streamingImage = Maybe StreamingImage
a} :: UpdateStreamingImageResponse)

-- | The response's http status code.
updateStreamingImageResponse_httpStatus :: Lens.Lens' UpdateStreamingImageResponse Prelude.Int
updateStreamingImageResponse_httpStatus :: (Int -> f Int)
-> UpdateStreamingImageResponse -> f UpdateStreamingImageResponse
updateStreamingImageResponse_httpStatus = (UpdateStreamingImageResponse -> Int)
-> (UpdateStreamingImageResponse
    -> Int -> UpdateStreamingImageResponse)
-> Lens
     UpdateStreamingImageResponse UpdateStreamingImageResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingImageResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateStreamingImageResponse' :: UpdateStreamingImageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateStreamingImageResponse
s@UpdateStreamingImageResponse' {} Int
a -> UpdateStreamingImageResponse
s {$sel:httpStatus:UpdateStreamingImageResponse' :: Int
httpStatus = Int
a} :: UpdateStreamingImageResponse)

instance Prelude.NFData UpdateStreamingImageResponse