{-# 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.ChimeSDKMessaging.UpdateChannel
-- 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 a channel\'s attributes.
--
-- __Restriction__: You can\'t change a channel\'s privacy.
--
-- The @x-amz-chime-bearer@ request header is mandatory. Use the
-- @AppInstanceUserArn@ of the user that makes the API call as the value in
-- the header.
module Amazonka.ChimeSDKMessaging.UpdateChannel
  ( -- * Creating a Request
    UpdateChannel (..),
    newUpdateChannel,

    -- * Request Lenses
    updateChannel_metadata,
    updateChannel_channelArn,
    updateChannel_name,
    updateChannel_mode,
    updateChannel_chimeBearer,

    -- * Destructuring the Response
    UpdateChannelResponse (..),
    newUpdateChannelResponse,

    -- * Response Lenses
    updateChannelResponse_channelArn,
    updateChannelResponse_httpStatus,
  )
where

import Amazonka.ChimeSDKMessaging.Types
import qualified Amazonka.Core as Core
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:/ 'newUpdateChannel' smart constructor.
data UpdateChannel = UpdateChannel'
  { -- | The metadata for the update request.
    UpdateChannel -> Maybe (Sensitive Text)
metadata :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The ARN of the channel.
    UpdateChannel -> Text
channelArn :: Prelude.Text,
    -- | The name of the channel.
    UpdateChannel -> Sensitive Text
name :: Core.Sensitive Prelude.Text,
    -- | The mode of the update request.
    UpdateChannel -> ChannelMode
mode :: ChannelMode,
    -- | The @AppInstanceUserArn@ of the user that makes the API call.
    UpdateChannel -> Text
chimeBearer :: Prelude.Text
  }
  deriving (UpdateChannel -> UpdateChannel -> Bool
(UpdateChannel -> UpdateChannel -> Bool)
-> (UpdateChannel -> UpdateChannel -> Bool) -> Eq UpdateChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateChannel -> UpdateChannel -> Bool
$c/= :: UpdateChannel -> UpdateChannel -> Bool
== :: UpdateChannel -> UpdateChannel -> Bool
$c== :: UpdateChannel -> UpdateChannel -> Bool
Prelude.Eq, Int -> UpdateChannel -> ShowS
[UpdateChannel] -> ShowS
UpdateChannel -> String
(Int -> UpdateChannel -> ShowS)
-> (UpdateChannel -> String)
-> ([UpdateChannel] -> ShowS)
-> Show UpdateChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateChannel] -> ShowS
$cshowList :: [UpdateChannel] -> ShowS
show :: UpdateChannel -> String
$cshow :: UpdateChannel -> String
showsPrec :: Int -> UpdateChannel -> ShowS
$cshowsPrec :: Int -> UpdateChannel -> ShowS
Prelude.Show, (forall x. UpdateChannel -> Rep UpdateChannel x)
-> (forall x. Rep UpdateChannel x -> UpdateChannel)
-> Generic UpdateChannel
forall x. Rep UpdateChannel x -> UpdateChannel
forall x. UpdateChannel -> Rep UpdateChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateChannel x -> UpdateChannel
$cfrom :: forall x. UpdateChannel -> Rep UpdateChannel x
Prelude.Generic)

-- |
-- Create a value of 'UpdateChannel' 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:
--
-- 'metadata', 'updateChannel_metadata' - The metadata for the update request.
--
-- 'channelArn', 'updateChannel_channelArn' - The ARN of the channel.
--
-- 'name', 'updateChannel_name' - The name of the channel.
--
-- 'mode', 'updateChannel_mode' - The mode of the update request.
--
-- 'chimeBearer', 'updateChannel_chimeBearer' - The @AppInstanceUserArn@ of the user that makes the API call.
newUpdateChannel ::
  -- | 'channelArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'mode'
  ChannelMode ->
  -- | 'chimeBearer'
  Prelude.Text ->
  UpdateChannel
newUpdateChannel :: Text -> Text -> ChannelMode -> Text -> UpdateChannel
newUpdateChannel
  Text
pChannelArn_
  Text
pName_
  ChannelMode
pMode_
  Text
pChimeBearer_ =
    UpdateChannel' :: Maybe (Sensitive Text)
-> Text -> Sensitive Text -> ChannelMode -> Text -> UpdateChannel
UpdateChannel'
      { $sel:metadata:UpdateChannel' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:channelArn:UpdateChannel' :: Text
channelArn = Text
pChannelArn_,
        $sel:name:UpdateChannel' :: Sensitive Text
name = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pName_,
        $sel:mode:UpdateChannel' :: ChannelMode
mode = ChannelMode
pMode_,
        $sel:chimeBearer:UpdateChannel' :: Text
chimeBearer = Text
pChimeBearer_
      }

-- | The metadata for the update request.
updateChannel_metadata :: Lens.Lens' UpdateChannel (Prelude.Maybe Prelude.Text)
updateChannel_metadata :: (Maybe Text -> f (Maybe Text)) -> UpdateChannel -> f UpdateChannel
updateChannel_metadata = (UpdateChannel -> Maybe (Sensitive Text))
-> (UpdateChannel -> Maybe (Sensitive Text) -> UpdateChannel)
-> Lens
     UpdateChannel
     UpdateChannel
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel' {Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
$sel:metadata:UpdateChannel' :: UpdateChannel -> Maybe (Sensitive Text)
metadata} -> Maybe (Sensitive Text)
metadata) (\s :: UpdateChannel
s@UpdateChannel' {} Maybe (Sensitive Text)
a -> UpdateChannel
s {$sel:metadata:UpdateChannel' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
a} :: UpdateChannel) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateChannel -> f UpdateChannel)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateChannel
-> f UpdateChannel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The ARN of the channel.
updateChannel_channelArn :: Lens.Lens' UpdateChannel Prelude.Text
updateChannel_channelArn :: (Text -> f Text) -> UpdateChannel -> f UpdateChannel
updateChannel_channelArn = (UpdateChannel -> Text)
-> (UpdateChannel -> Text -> UpdateChannel)
-> Lens UpdateChannel UpdateChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel' {Text
channelArn :: Text
$sel:channelArn:UpdateChannel' :: UpdateChannel -> Text
channelArn} -> Text
channelArn) (\s :: UpdateChannel
s@UpdateChannel' {} Text
a -> UpdateChannel
s {$sel:channelArn:UpdateChannel' :: Text
channelArn = Text
a} :: UpdateChannel)

-- | The name of the channel.
updateChannel_name :: Lens.Lens' UpdateChannel Prelude.Text
updateChannel_name :: (Text -> f Text) -> UpdateChannel -> f UpdateChannel
updateChannel_name = (UpdateChannel -> Sensitive Text)
-> (UpdateChannel -> Sensitive Text -> UpdateChannel)
-> Lens
     UpdateChannel UpdateChannel (Sensitive Text) (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel' {Sensitive Text
name :: Sensitive Text
$sel:name:UpdateChannel' :: UpdateChannel -> Sensitive Text
name} -> Sensitive Text
name) (\s :: UpdateChannel
s@UpdateChannel' {} Sensitive Text
a -> UpdateChannel
s {$sel:name:UpdateChannel' :: Sensitive Text
name = Sensitive Text
a} :: UpdateChannel) ((Sensitive Text -> f (Sensitive Text))
 -> UpdateChannel -> f UpdateChannel)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> UpdateChannel
-> f UpdateChannel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The mode of the update request.
updateChannel_mode :: Lens.Lens' UpdateChannel ChannelMode
updateChannel_mode :: (ChannelMode -> f ChannelMode) -> UpdateChannel -> f UpdateChannel
updateChannel_mode = (UpdateChannel -> ChannelMode)
-> (UpdateChannel -> ChannelMode -> UpdateChannel)
-> Lens UpdateChannel UpdateChannel ChannelMode ChannelMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel' {ChannelMode
mode :: ChannelMode
$sel:mode:UpdateChannel' :: UpdateChannel -> ChannelMode
mode} -> ChannelMode
mode) (\s :: UpdateChannel
s@UpdateChannel' {} ChannelMode
a -> UpdateChannel
s {$sel:mode:UpdateChannel' :: ChannelMode
mode = ChannelMode
a} :: UpdateChannel)

-- | The @AppInstanceUserArn@ of the user that makes the API call.
updateChannel_chimeBearer :: Lens.Lens' UpdateChannel Prelude.Text
updateChannel_chimeBearer :: (Text -> f Text) -> UpdateChannel -> f UpdateChannel
updateChannel_chimeBearer = (UpdateChannel -> Text)
-> (UpdateChannel -> Text -> UpdateChannel)
-> Lens UpdateChannel UpdateChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel' {Text
chimeBearer :: Text
$sel:chimeBearer:UpdateChannel' :: UpdateChannel -> Text
chimeBearer} -> Text
chimeBearer) (\s :: UpdateChannel
s@UpdateChannel' {} Text
a -> UpdateChannel
s {$sel:chimeBearer:UpdateChannel' :: Text
chimeBearer = Text
a} :: UpdateChannel)

instance Core.AWSRequest UpdateChannel where
  type
    AWSResponse UpdateChannel =
      UpdateChannelResponse
  request :: UpdateChannel -> Request UpdateChannel
request = Service -> UpdateChannel -> Request UpdateChannel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateChannel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateChannel))
-> Logger
-> Service
-> Proxy UpdateChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateChannel)))
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 Text -> Int -> UpdateChannelResponse
UpdateChannelResponse'
            (Maybe Text -> Int -> UpdateChannelResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateChannelResponse)
forall (f :: * -> *) a b. Functor 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
"ChannelArn")
            Either String (Int -> UpdateChannelResponse)
-> Either String Int -> Either String UpdateChannelResponse
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 UpdateChannel

instance Prelude.NFData UpdateChannel

instance Core.ToHeaders UpdateChannel where
  toHeaders :: UpdateChannel -> ResponseHeaders
toHeaders UpdateChannel' {Maybe (Sensitive Text)
Text
Sensitive Text
ChannelMode
chimeBearer :: Text
mode :: ChannelMode
name :: Sensitive Text
channelArn :: Text
metadata :: Maybe (Sensitive Text)
$sel:chimeBearer:UpdateChannel' :: UpdateChannel -> Text
$sel:mode:UpdateChannel' :: UpdateChannel -> ChannelMode
$sel:name:UpdateChannel' :: UpdateChannel -> Sensitive Text
$sel:channelArn:UpdateChannel' :: UpdateChannel -> Text
$sel:metadata:UpdateChannel' :: UpdateChannel -> Maybe (Sensitive Text)
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [HeaderName
"x-amz-chime-bearer" HeaderName -> Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Text
chimeBearer]

instance Core.ToJSON UpdateChannel where
  toJSON :: UpdateChannel -> Value
toJSON UpdateChannel' {Maybe (Sensitive Text)
Text
Sensitive Text
ChannelMode
chimeBearer :: Text
mode :: ChannelMode
name :: Sensitive Text
channelArn :: Text
metadata :: Maybe (Sensitive Text)
$sel:chimeBearer:UpdateChannel' :: UpdateChannel -> Text
$sel:mode:UpdateChannel' :: UpdateChannel -> ChannelMode
$sel:name:UpdateChannel' :: UpdateChannel -> Sensitive Text
$sel:channelArn:UpdateChannel' :: UpdateChannel -> Text
$sel:metadata:UpdateChannel' :: UpdateChannel -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Metadata" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
metadata,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Mode" Text -> ChannelMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ChannelMode
mode)
          ]
      )

instance Core.ToPath UpdateChannel where
  toPath :: UpdateChannel -> ByteString
toPath UpdateChannel' {Maybe (Sensitive Text)
Text
Sensitive Text
ChannelMode
chimeBearer :: Text
mode :: ChannelMode
name :: Sensitive Text
channelArn :: Text
metadata :: Maybe (Sensitive Text)
$sel:chimeBearer:UpdateChannel' :: UpdateChannel -> Text
$sel:mode:UpdateChannel' :: UpdateChannel -> ChannelMode
$sel:name:UpdateChannel' :: UpdateChannel -> Sensitive Text
$sel:channelArn:UpdateChannel' :: UpdateChannel -> Text
$sel:metadata:UpdateChannel' :: UpdateChannel -> Maybe (Sensitive Text)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/channels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelArn]

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

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

-- |
-- Create a value of 'UpdateChannelResponse' 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:
--
-- 'channelArn', 'updateChannelResponse_channelArn' - The ARN of the channel.
--
-- 'httpStatus', 'updateChannelResponse_httpStatus' - The response's http status code.
newUpdateChannelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateChannelResponse
newUpdateChannelResponse :: Int -> UpdateChannelResponse
newUpdateChannelResponse Int
pHttpStatus_ =
  UpdateChannelResponse' :: Maybe Text -> Int -> UpdateChannelResponse
UpdateChannelResponse'
    { $sel:channelArn:UpdateChannelResponse' :: Maybe Text
channelArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateChannelResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the channel.
updateChannelResponse_channelArn :: Lens.Lens' UpdateChannelResponse (Prelude.Maybe Prelude.Text)
updateChannelResponse_channelArn :: (Maybe Text -> f (Maybe Text))
-> UpdateChannelResponse -> f UpdateChannelResponse
updateChannelResponse_channelArn = (UpdateChannelResponse -> Maybe Text)
-> (UpdateChannelResponse -> Maybe Text -> UpdateChannelResponse)
-> Lens
     UpdateChannelResponse
     UpdateChannelResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannelResponse' {Maybe Text
channelArn :: Maybe Text
$sel:channelArn:UpdateChannelResponse' :: UpdateChannelResponse -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: UpdateChannelResponse
s@UpdateChannelResponse' {} Maybe Text
a -> UpdateChannelResponse
s {$sel:channelArn:UpdateChannelResponse' :: Maybe Text
channelArn = Maybe Text
a} :: UpdateChannelResponse)

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

instance Prelude.NFData UpdateChannelResponse