{-# 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.IoT.UpdateStream
-- 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)
--
-- Updates an existing stream. The stream version will be incremented by
-- one.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateStream>
-- action.
module Amazonka.IoT.UpdateStream
  ( -- * Creating a Request
    UpdateStream (..),
    newUpdateStream,

    -- * Request Lenses
    updateStream_files,
    updateStream_description,
    updateStream_roleArn,
    updateStream_streamId,

    -- * Destructuring the Response
    UpdateStreamResponse (..),
    newUpdateStreamResponse,

    -- * Response Lenses
    updateStreamResponse_streamVersion,
    updateStreamResponse_streamArn,
    updateStreamResponse_description,
    updateStreamResponse_streamId,
    updateStreamResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateStream' smart constructor.
data UpdateStream = UpdateStream'
  { -- | The files associated with the stream.
    UpdateStream -> Maybe (NonEmpty StreamFile)
files :: Prelude.Maybe (Prelude.NonEmpty StreamFile),
    -- | The description of the stream.
    UpdateStream -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | An IAM role that allows the IoT service principal assumes to access your
    -- S3 files.
    UpdateStream -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The stream ID.
    UpdateStream -> Text
streamId :: Prelude.Text
  }
  deriving (UpdateStream -> UpdateStream -> Bool
(UpdateStream -> UpdateStream -> Bool)
-> (UpdateStream -> UpdateStream -> Bool) -> Eq UpdateStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStream -> UpdateStream -> Bool
$c/= :: UpdateStream -> UpdateStream -> Bool
== :: UpdateStream -> UpdateStream -> Bool
$c== :: UpdateStream -> UpdateStream -> Bool
Prelude.Eq, ReadPrec [UpdateStream]
ReadPrec UpdateStream
Int -> ReadS UpdateStream
ReadS [UpdateStream]
(Int -> ReadS UpdateStream)
-> ReadS [UpdateStream]
-> ReadPrec UpdateStream
-> ReadPrec [UpdateStream]
-> Read UpdateStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStream]
$creadListPrec :: ReadPrec [UpdateStream]
readPrec :: ReadPrec UpdateStream
$creadPrec :: ReadPrec UpdateStream
readList :: ReadS [UpdateStream]
$creadList :: ReadS [UpdateStream]
readsPrec :: Int -> ReadS UpdateStream
$creadsPrec :: Int -> ReadS UpdateStream
Prelude.Read, Int -> UpdateStream -> ShowS
[UpdateStream] -> ShowS
UpdateStream -> String
(Int -> UpdateStream -> ShowS)
-> (UpdateStream -> String)
-> ([UpdateStream] -> ShowS)
-> Show UpdateStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStream] -> ShowS
$cshowList :: [UpdateStream] -> ShowS
show :: UpdateStream -> String
$cshow :: UpdateStream -> String
showsPrec :: Int -> UpdateStream -> ShowS
$cshowsPrec :: Int -> UpdateStream -> ShowS
Prelude.Show, (forall x. UpdateStream -> Rep UpdateStream x)
-> (forall x. Rep UpdateStream x -> UpdateStream)
-> Generic UpdateStream
forall x. Rep UpdateStream x -> UpdateStream
forall x. UpdateStream -> Rep UpdateStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStream x -> UpdateStream
$cfrom :: forall x. UpdateStream -> Rep UpdateStream x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStream' 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:
--
-- 'files', 'updateStream_files' - The files associated with the stream.
--
-- 'description', 'updateStream_description' - The description of the stream.
--
-- 'roleArn', 'updateStream_roleArn' - An IAM role that allows the IoT service principal assumes to access your
-- S3 files.
--
-- 'streamId', 'updateStream_streamId' - The stream ID.
newUpdateStream ::
  -- | 'streamId'
  Prelude.Text ->
  UpdateStream
newUpdateStream :: Text -> UpdateStream
newUpdateStream Text
pStreamId_ =
  UpdateStream' :: Maybe (NonEmpty StreamFile)
-> Maybe Text -> Maybe Text -> Text -> UpdateStream
UpdateStream'
    { $sel:files:UpdateStream' :: Maybe (NonEmpty StreamFile)
files = Maybe (NonEmpty StreamFile)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStream' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateStream' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:UpdateStream' :: Text
streamId = Text
pStreamId_
    }

-- | The files associated with the stream.
updateStream_files :: Lens.Lens' UpdateStream (Prelude.Maybe (Prelude.NonEmpty StreamFile))
updateStream_files :: (Maybe (NonEmpty StreamFile) -> f (Maybe (NonEmpty StreamFile)))
-> UpdateStream -> f UpdateStream
updateStream_files = (UpdateStream -> Maybe (NonEmpty StreamFile))
-> (UpdateStream -> Maybe (NonEmpty StreamFile) -> UpdateStream)
-> Lens
     UpdateStream
     UpdateStream
     (Maybe (NonEmpty StreamFile))
     (Maybe (NonEmpty StreamFile))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStream' {Maybe (NonEmpty StreamFile)
files :: Maybe (NonEmpty StreamFile)
$sel:files:UpdateStream' :: UpdateStream -> Maybe (NonEmpty StreamFile)
files} -> Maybe (NonEmpty StreamFile)
files) (\s :: UpdateStream
s@UpdateStream' {} Maybe (NonEmpty StreamFile)
a -> UpdateStream
s {$sel:files:UpdateStream' :: Maybe (NonEmpty StreamFile)
files = Maybe (NonEmpty StreamFile)
a} :: UpdateStream) ((Maybe (NonEmpty StreamFile) -> f (Maybe (NonEmpty StreamFile)))
 -> UpdateStream -> f UpdateStream)
-> ((Maybe (NonEmpty StreamFile)
     -> f (Maybe (NonEmpty StreamFile)))
    -> Maybe (NonEmpty StreamFile) -> f (Maybe (NonEmpty StreamFile)))
-> (Maybe (NonEmpty StreamFile) -> f (Maybe (NonEmpty StreamFile)))
-> UpdateStream
-> f UpdateStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
-> Iso
     (Maybe (NonEmpty StreamFile))
     (Maybe (NonEmpty StreamFile))
     (Maybe (NonEmpty StreamFile))
     (Maybe (NonEmpty StreamFile))
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
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
  (NonEmpty StreamFile)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | An IAM role that allows the IoT service principal assumes to access your
-- S3 files.
updateStream_roleArn :: Lens.Lens' UpdateStream (Prelude.Maybe Prelude.Text)
updateStream_roleArn :: (Maybe Text -> f (Maybe Text)) -> UpdateStream -> f UpdateStream
updateStream_roleArn = (UpdateStream -> Maybe Text)
-> (UpdateStream -> Maybe Text -> UpdateStream)
-> Lens UpdateStream UpdateStream (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStream' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateStream' :: UpdateStream -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateStream
s@UpdateStream' {} Maybe Text
a -> UpdateStream
s {$sel:roleArn:UpdateStream' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateStream)

-- | The stream ID.
updateStream_streamId :: Lens.Lens' UpdateStream Prelude.Text
updateStream_streamId :: (Text -> f Text) -> UpdateStream -> f UpdateStream
updateStream_streamId = (UpdateStream -> Text)
-> (UpdateStream -> Text -> UpdateStream)
-> Lens UpdateStream UpdateStream Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStream' {Text
streamId :: Text
$sel:streamId:UpdateStream' :: UpdateStream -> Text
streamId} -> Text
streamId) (\s :: UpdateStream
s@UpdateStream' {} Text
a -> UpdateStream
s {$sel:streamId:UpdateStream' :: Text
streamId = Text
a} :: UpdateStream)

instance Core.AWSRequest UpdateStream where
  type AWSResponse UpdateStream = UpdateStreamResponse
  request :: UpdateStream -> Request UpdateStream
request = Service -> UpdateStream -> Request UpdateStream
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateStream
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStream)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateStream))
-> Logger
-> Service
-> Proxy UpdateStream
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStream)))
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 Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateStreamResponse
UpdateStreamResponse'
            (Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateStreamResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> UpdateStreamResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"streamVersion")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> UpdateStreamResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> UpdateStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"streamArn")
            Either
  String (Maybe Text -> Maybe Text -> Int -> UpdateStreamResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either String (Maybe Text -> Int -> UpdateStreamResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"streamId")
            Either String (Int -> UpdateStreamResponse)
-> Either String Int -> Either String UpdateStreamResponse
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 UpdateStream

instance Prelude.NFData UpdateStream

instance Core.ToHeaders UpdateStream where
  toHeaders :: UpdateStream -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateStream -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON UpdateStream where
  toJSON :: UpdateStream -> Value
toJSON UpdateStream' {Maybe (NonEmpty StreamFile)
Maybe Text
Text
streamId :: Text
roleArn :: Maybe Text
description :: Maybe Text
files :: Maybe (NonEmpty StreamFile)
$sel:streamId:UpdateStream' :: UpdateStream -> Text
$sel:roleArn:UpdateStream' :: UpdateStream -> Maybe Text
$sel:description:UpdateStream' :: UpdateStream -> Maybe Text
$sel:files:UpdateStream' :: UpdateStream -> Maybe (NonEmpty StreamFile)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"files" Text -> NonEmpty StreamFile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty StreamFile -> Pair)
-> Maybe (NonEmpty StreamFile) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty StreamFile)
files,
            (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
"roleArn" 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
roleArn
          ]
      )

instance Core.ToPath UpdateStream where
  toPath :: UpdateStream -> ByteString
toPath UpdateStream' {Maybe (NonEmpty StreamFile)
Maybe Text
Text
streamId :: Text
roleArn :: Maybe Text
description :: Maybe Text
files :: Maybe (NonEmpty StreamFile)
$sel:streamId:UpdateStream' :: UpdateStream -> Text
$sel:roleArn:UpdateStream' :: UpdateStream -> Maybe Text
$sel:description:UpdateStream' :: UpdateStream -> Maybe Text
$sel:files:UpdateStream' :: UpdateStream -> Maybe (NonEmpty StreamFile)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/streams/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
streamId]

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

-- | /See:/ 'newUpdateStreamResponse' smart constructor.
data UpdateStreamResponse = UpdateStreamResponse'
  { -- | The stream version.
    UpdateStreamResponse -> Maybe Natural
streamVersion :: Prelude.Maybe Prelude.Natural,
    -- | The stream ARN.
    UpdateStreamResponse -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text,
    -- | A description of the stream.
    UpdateStreamResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The stream ID.
    UpdateStreamResponse -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateStreamResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateStreamResponse -> UpdateStreamResponse -> Bool
(UpdateStreamResponse -> UpdateStreamResponse -> Bool)
-> (UpdateStreamResponse -> UpdateStreamResponse -> Bool)
-> Eq UpdateStreamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStreamResponse -> UpdateStreamResponse -> Bool
$c/= :: UpdateStreamResponse -> UpdateStreamResponse -> Bool
== :: UpdateStreamResponse -> UpdateStreamResponse -> Bool
$c== :: UpdateStreamResponse -> UpdateStreamResponse -> Bool
Prelude.Eq, ReadPrec [UpdateStreamResponse]
ReadPrec UpdateStreamResponse
Int -> ReadS UpdateStreamResponse
ReadS [UpdateStreamResponse]
(Int -> ReadS UpdateStreamResponse)
-> ReadS [UpdateStreamResponse]
-> ReadPrec UpdateStreamResponse
-> ReadPrec [UpdateStreamResponse]
-> Read UpdateStreamResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStreamResponse]
$creadListPrec :: ReadPrec [UpdateStreamResponse]
readPrec :: ReadPrec UpdateStreamResponse
$creadPrec :: ReadPrec UpdateStreamResponse
readList :: ReadS [UpdateStreamResponse]
$creadList :: ReadS [UpdateStreamResponse]
readsPrec :: Int -> ReadS UpdateStreamResponse
$creadsPrec :: Int -> ReadS UpdateStreamResponse
Prelude.Read, Int -> UpdateStreamResponse -> ShowS
[UpdateStreamResponse] -> ShowS
UpdateStreamResponse -> String
(Int -> UpdateStreamResponse -> ShowS)
-> (UpdateStreamResponse -> String)
-> ([UpdateStreamResponse] -> ShowS)
-> Show UpdateStreamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStreamResponse] -> ShowS
$cshowList :: [UpdateStreamResponse] -> ShowS
show :: UpdateStreamResponse -> String
$cshow :: UpdateStreamResponse -> String
showsPrec :: Int -> UpdateStreamResponse -> ShowS
$cshowsPrec :: Int -> UpdateStreamResponse -> ShowS
Prelude.Show, (forall x. UpdateStreamResponse -> Rep UpdateStreamResponse x)
-> (forall x. Rep UpdateStreamResponse x -> UpdateStreamResponse)
-> Generic UpdateStreamResponse
forall x. Rep UpdateStreamResponse x -> UpdateStreamResponse
forall x. UpdateStreamResponse -> Rep UpdateStreamResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStreamResponse x -> UpdateStreamResponse
$cfrom :: forall x. UpdateStreamResponse -> Rep UpdateStreamResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStreamResponse' 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:
--
-- 'streamVersion', 'updateStreamResponse_streamVersion' - The stream version.
--
-- 'streamArn', 'updateStreamResponse_streamArn' - The stream ARN.
--
-- 'description', 'updateStreamResponse_description' - A description of the stream.
--
-- 'streamId', 'updateStreamResponse_streamId' - The stream ID.
--
-- 'httpStatus', 'updateStreamResponse_httpStatus' - The response's http status code.
newUpdateStreamResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateStreamResponse
newUpdateStreamResponse :: Int -> UpdateStreamResponse
newUpdateStreamResponse Int
pHttpStatus_ =
  UpdateStreamResponse' :: Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateStreamResponse
UpdateStreamResponse'
    { $sel:streamVersion:UpdateStreamResponse' :: Maybe Natural
streamVersion =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:streamArn:UpdateStreamResponse' :: Maybe Text
streamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStreamResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:UpdateStreamResponse' :: Maybe Text
streamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateStreamResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The stream version.
updateStreamResponse_streamVersion :: Lens.Lens' UpdateStreamResponse (Prelude.Maybe Prelude.Natural)
updateStreamResponse_streamVersion :: (Maybe Natural -> f (Maybe Natural))
-> UpdateStreamResponse -> f UpdateStreamResponse
updateStreamResponse_streamVersion = (UpdateStreamResponse -> Maybe Natural)
-> (UpdateStreamResponse -> Maybe Natural -> UpdateStreamResponse)
-> Lens
     UpdateStreamResponse
     UpdateStreamResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamResponse' {Maybe Natural
streamVersion :: Maybe Natural
$sel:streamVersion:UpdateStreamResponse' :: UpdateStreamResponse -> Maybe Natural
streamVersion} -> Maybe Natural
streamVersion) (\s :: UpdateStreamResponse
s@UpdateStreamResponse' {} Maybe Natural
a -> UpdateStreamResponse
s {$sel:streamVersion:UpdateStreamResponse' :: Maybe Natural
streamVersion = Maybe Natural
a} :: UpdateStreamResponse)

-- | The stream ARN.
updateStreamResponse_streamArn :: Lens.Lens' UpdateStreamResponse (Prelude.Maybe Prelude.Text)
updateStreamResponse_streamArn :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamResponse -> f UpdateStreamResponse
updateStreamResponse_streamArn = (UpdateStreamResponse -> Maybe Text)
-> (UpdateStreamResponse -> Maybe Text -> UpdateStreamResponse)
-> Lens
     UpdateStreamResponse UpdateStreamResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamResponse' {Maybe Text
streamArn :: Maybe Text
$sel:streamArn:UpdateStreamResponse' :: UpdateStreamResponse -> Maybe Text
streamArn} -> Maybe Text
streamArn) (\s :: UpdateStreamResponse
s@UpdateStreamResponse' {} Maybe Text
a -> UpdateStreamResponse
s {$sel:streamArn:UpdateStreamResponse' :: Maybe Text
streamArn = Maybe Text
a} :: UpdateStreamResponse)

-- | A description of the stream.
updateStreamResponse_description :: Lens.Lens' UpdateStreamResponse (Prelude.Maybe Prelude.Text)
updateStreamResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamResponse -> f UpdateStreamResponse
updateStreamResponse_description = (UpdateStreamResponse -> Maybe Text)
-> (UpdateStreamResponse -> Maybe Text -> UpdateStreamResponse)
-> Lens
     UpdateStreamResponse UpdateStreamResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateStreamResponse' :: UpdateStreamResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateStreamResponse
s@UpdateStreamResponse' {} Maybe Text
a -> UpdateStreamResponse
s {$sel:description:UpdateStreamResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateStreamResponse)

-- | The stream ID.
updateStreamResponse_streamId :: Lens.Lens' UpdateStreamResponse (Prelude.Maybe Prelude.Text)
updateStreamResponse_streamId :: (Maybe Text -> f (Maybe Text))
-> UpdateStreamResponse -> f UpdateStreamResponse
updateStreamResponse_streamId = (UpdateStreamResponse -> Maybe Text)
-> (UpdateStreamResponse -> Maybe Text -> UpdateStreamResponse)
-> Lens
     UpdateStreamResponse UpdateStreamResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamResponse' {Maybe Text
streamId :: Maybe Text
$sel:streamId:UpdateStreamResponse' :: UpdateStreamResponse -> Maybe Text
streamId} -> Maybe Text
streamId) (\s :: UpdateStreamResponse
s@UpdateStreamResponse' {} Maybe Text
a -> UpdateStreamResponse
s {$sel:streamId:UpdateStreamResponse' :: Maybe Text
streamId = Maybe Text
a} :: UpdateStreamResponse)

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

instance Prelude.NFData UpdateStreamResponse