{-# 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.Chime.DescribeChannelModeratedByAppInstanceUser
-- 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)
--
-- Returns the full details of a channel moderated by the specified
-- @AppInstanceUser@.
--
-- 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.Chime.DescribeChannelModeratedByAppInstanceUser
  ( -- * Creating a Request
    DescribeChannelModeratedByAppInstanceUser (..),
    newDescribeChannelModeratedByAppInstanceUser,

    -- * Request Lenses
    describeChannelModeratedByAppInstanceUser_chimeBearer,
    describeChannelModeratedByAppInstanceUser_channelArn,
    describeChannelModeratedByAppInstanceUser_appInstanceUserArn,

    -- * Destructuring the Response
    DescribeChannelModeratedByAppInstanceUserResponse (..),
    newDescribeChannelModeratedByAppInstanceUserResponse,

    -- * Response Lenses
    describeChannelModeratedByAppInstanceUserResponse_channel,
    describeChannelModeratedByAppInstanceUserResponse_httpStatus,
  )
where

import Amazonka.Chime.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:/ 'newDescribeChannelModeratedByAppInstanceUser' smart constructor.
data DescribeChannelModeratedByAppInstanceUser = DescribeChannelModeratedByAppInstanceUser'
  { -- | The @AppInstanceUserArn@ of the user that makes the API call.
    DescribeChannelModeratedByAppInstanceUser -> Maybe Text
chimeBearer :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the moderated channel.
    DescribeChannelModeratedByAppInstanceUser -> Text
channelArn :: Prelude.Text,
    -- | The ARN of the @AppInstanceUser@ in the moderated channel.
    DescribeChannelModeratedByAppInstanceUser -> Text
appInstanceUserArn :: Prelude.Text
  }
  deriving (DescribeChannelModeratedByAppInstanceUser
-> DescribeChannelModeratedByAppInstanceUser -> Bool
(DescribeChannelModeratedByAppInstanceUser
 -> DescribeChannelModeratedByAppInstanceUser -> Bool)
-> (DescribeChannelModeratedByAppInstanceUser
    -> DescribeChannelModeratedByAppInstanceUser -> Bool)
-> Eq DescribeChannelModeratedByAppInstanceUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChannelModeratedByAppInstanceUser
-> DescribeChannelModeratedByAppInstanceUser -> Bool
$c/= :: DescribeChannelModeratedByAppInstanceUser
-> DescribeChannelModeratedByAppInstanceUser -> Bool
== :: DescribeChannelModeratedByAppInstanceUser
-> DescribeChannelModeratedByAppInstanceUser -> Bool
$c== :: DescribeChannelModeratedByAppInstanceUser
-> DescribeChannelModeratedByAppInstanceUser -> Bool
Prelude.Eq, ReadPrec [DescribeChannelModeratedByAppInstanceUser]
ReadPrec DescribeChannelModeratedByAppInstanceUser
Int -> ReadS DescribeChannelModeratedByAppInstanceUser
ReadS [DescribeChannelModeratedByAppInstanceUser]
(Int -> ReadS DescribeChannelModeratedByAppInstanceUser)
-> ReadS [DescribeChannelModeratedByAppInstanceUser]
-> ReadPrec DescribeChannelModeratedByAppInstanceUser
-> ReadPrec [DescribeChannelModeratedByAppInstanceUser]
-> Read DescribeChannelModeratedByAppInstanceUser
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChannelModeratedByAppInstanceUser]
$creadListPrec :: ReadPrec [DescribeChannelModeratedByAppInstanceUser]
readPrec :: ReadPrec DescribeChannelModeratedByAppInstanceUser
$creadPrec :: ReadPrec DescribeChannelModeratedByAppInstanceUser
readList :: ReadS [DescribeChannelModeratedByAppInstanceUser]
$creadList :: ReadS [DescribeChannelModeratedByAppInstanceUser]
readsPrec :: Int -> ReadS DescribeChannelModeratedByAppInstanceUser
$creadsPrec :: Int -> ReadS DescribeChannelModeratedByAppInstanceUser
Prelude.Read, Int -> DescribeChannelModeratedByAppInstanceUser -> ShowS
[DescribeChannelModeratedByAppInstanceUser] -> ShowS
DescribeChannelModeratedByAppInstanceUser -> String
(Int -> DescribeChannelModeratedByAppInstanceUser -> ShowS)
-> (DescribeChannelModeratedByAppInstanceUser -> String)
-> ([DescribeChannelModeratedByAppInstanceUser] -> ShowS)
-> Show DescribeChannelModeratedByAppInstanceUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChannelModeratedByAppInstanceUser] -> ShowS
$cshowList :: [DescribeChannelModeratedByAppInstanceUser] -> ShowS
show :: DescribeChannelModeratedByAppInstanceUser -> String
$cshow :: DescribeChannelModeratedByAppInstanceUser -> String
showsPrec :: Int -> DescribeChannelModeratedByAppInstanceUser -> ShowS
$cshowsPrec :: Int -> DescribeChannelModeratedByAppInstanceUser -> ShowS
Prelude.Show, (forall x.
 DescribeChannelModeratedByAppInstanceUser
 -> Rep DescribeChannelModeratedByAppInstanceUser x)
-> (forall x.
    Rep DescribeChannelModeratedByAppInstanceUser x
    -> DescribeChannelModeratedByAppInstanceUser)
-> Generic DescribeChannelModeratedByAppInstanceUser
forall x.
Rep DescribeChannelModeratedByAppInstanceUser x
-> DescribeChannelModeratedByAppInstanceUser
forall x.
DescribeChannelModeratedByAppInstanceUser
-> Rep DescribeChannelModeratedByAppInstanceUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChannelModeratedByAppInstanceUser x
-> DescribeChannelModeratedByAppInstanceUser
$cfrom :: forall x.
DescribeChannelModeratedByAppInstanceUser
-> Rep DescribeChannelModeratedByAppInstanceUser x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChannelModeratedByAppInstanceUser' 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:
--
-- 'chimeBearer', 'describeChannelModeratedByAppInstanceUser_chimeBearer' - The @AppInstanceUserArn@ of the user that makes the API call.
--
-- 'channelArn', 'describeChannelModeratedByAppInstanceUser_channelArn' - The ARN of the moderated channel.
--
-- 'appInstanceUserArn', 'describeChannelModeratedByAppInstanceUser_appInstanceUserArn' - The ARN of the @AppInstanceUser@ in the moderated channel.
newDescribeChannelModeratedByAppInstanceUser ::
  -- | 'channelArn'
  Prelude.Text ->
  -- | 'appInstanceUserArn'
  Prelude.Text ->
  DescribeChannelModeratedByAppInstanceUser
newDescribeChannelModeratedByAppInstanceUser :: Text -> Text -> DescribeChannelModeratedByAppInstanceUser
newDescribeChannelModeratedByAppInstanceUser
  Text
pChannelArn_
  Text
pAppInstanceUserArn_ =
    DescribeChannelModeratedByAppInstanceUser' :: Maybe Text
-> Text -> Text -> DescribeChannelModeratedByAppInstanceUser
DescribeChannelModeratedByAppInstanceUser'
      { $sel:chimeBearer:DescribeChannelModeratedByAppInstanceUser' :: Maybe Text
chimeBearer =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:channelArn:DescribeChannelModeratedByAppInstanceUser' :: Text
channelArn = Text
pChannelArn_,
        $sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: Text
appInstanceUserArn =
          Text
pAppInstanceUserArn_
      }

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

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

-- | The ARN of the @AppInstanceUser@ in the moderated channel.
describeChannelModeratedByAppInstanceUser_appInstanceUserArn :: Lens.Lens' DescribeChannelModeratedByAppInstanceUser Prelude.Text
describeChannelModeratedByAppInstanceUser_appInstanceUserArn :: (Text -> f Text)
-> DescribeChannelModeratedByAppInstanceUser
-> f DescribeChannelModeratedByAppInstanceUser
describeChannelModeratedByAppInstanceUser_appInstanceUserArn = (DescribeChannelModeratedByAppInstanceUser -> Text)
-> (DescribeChannelModeratedByAppInstanceUser
    -> Text -> DescribeChannelModeratedByAppInstanceUser)
-> Lens
     DescribeChannelModeratedByAppInstanceUser
     DescribeChannelModeratedByAppInstanceUser
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelModeratedByAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
appInstanceUserArn} -> Text
appInstanceUserArn) (\s :: DescribeChannelModeratedByAppInstanceUser
s@DescribeChannelModeratedByAppInstanceUser' {} Text
a -> DescribeChannelModeratedByAppInstanceUser
s {$sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: Text
appInstanceUserArn = Text
a} :: DescribeChannelModeratedByAppInstanceUser)

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

instance
  Prelude.NFData
    DescribeChannelModeratedByAppInstanceUser

instance
  Core.ToHeaders
    DescribeChannelModeratedByAppInstanceUser
  where
  toHeaders :: DescribeChannelModeratedByAppInstanceUser -> ResponseHeaders
toHeaders
    DescribeChannelModeratedByAppInstanceUser' {Maybe Text
Text
appInstanceUserArn :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:channelArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:chimeBearer:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Maybe Text
..} =
      [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
        [HeaderName
"x-amz-chime-bearer" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
chimeBearer]

instance
  Core.ToPath
    DescribeChannelModeratedByAppInstanceUser
  where
  toPath :: DescribeChannelModeratedByAppInstanceUser -> ByteString
toPath DescribeChannelModeratedByAppInstanceUser' {Maybe Text
Text
appInstanceUserArn :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:channelArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:chimeBearer:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Maybe 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
    DescribeChannelModeratedByAppInstanceUser
  where
  toQuery :: DescribeChannelModeratedByAppInstanceUser -> QueryString
toQuery
    DescribeChannelModeratedByAppInstanceUser' {Maybe Text
Text
appInstanceUserArn :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:appInstanceUserArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:channelArn:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Text
$sel:chimeBearer:DescribeChannelModeratedByAppInstanceUser' :: DescribeChannelModeratedByAppInstanceUser -> Maybe Text
..} =
      [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"app-instance-user-arn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
appInstanceUserArn,
          QueryString
"scope=app-instance-user-moderated-channel"
        ]

-- | /See:/ 'newDescribeChannelModeratedByAppInstanceUserResponse' smart constructor.
data DescribeChannelModeratedByAppInstanceUserResponse = DescribeChannelModeratedByAppInstanceUserResponse'
  { -- | The moderated channel.
    DescribeChannelModeratedByAppInstanceUserResponse
-> Maybe ChannelModeratedByAppInstanceUserSummary
channel :: Prelude.Maybe ChannelModeratedByAppInstanceUserSummary,
    -- | The response's http status code.
    DescribeChannelModeratedByAppInstanceUserResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeChannelModeratedByAppInstanceUserResponse
-> DescribeChannelModeratedByAppInstanceUserResponse -> Bool
(DescribeChannelModeratedByAppInstanceUserResponse
 -> DescribeChannelModeratedByAppInstanceUserResponse -> Bool)
-> (DescribeChannelModeratedByAppInstanceUserResponse
    -> DescribeChannelModeratedByAppInstanceUserResponse -> Bool)
-> Eq DescribeChannelModeratedByAppInstanceUserResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChannelModeratedByAppInstanceUserResponse
-> DescribeChannelModeratedByAppInstanceUserResponse -> Bool
$c/= :: DescribeChannelModeratedByAppInstanceUserResponse
-> DescribeChannelModeratedByAppInstanceUserResponse -> Bool
== :: DescribeChannelModeratedByAppInstanceUserResponse
-> DescribeChannelModeratedByAppInstanceUserResponse -> Bool
$c== :: DescribeChannelModeratedByAppInstanceUserResponse
-> DescribeChannelModeratedByAppInstanceUserResponse -> Bool
Prelude.Eq, Int -> DescribeChannelModeratedByAppInstanceUserResponse -> ShowS
[DescribeChannelModeratedByAppInstanceUserResponse] -> ShowS
DescribeChannelModeratedByAppInstanceUserResponse -> String
(Int -> DescribeChannelModeratedByAppInstanceUserResponse -> ShowS)
-> (DescribeChannelModeratedByAppInstanceUserResponse -> String)
-> ([DescribeChannelModeratedByAppInstanceUserResponse] -> ShowS)
-> Show DescribeChannelModeratedByAppInstanceUserResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChannelModeratedByAppInstanceUserResponse] -> ShowS
$cshowList :: [DescribeChannelModeratedByAppInstanceUserResponse] -> ShowS
show :: DescribeChannelModeratedByAppInstanceUserResponse -> String
$cshow :: DescribeChannelModeratedByAppInstanceUserResponse -> String
showsPrec :: Int -> DescribeChannelModeratedByAppInstanceUserResponse -> ShowS
$cshowsPrec :: Int -> DescribeChannelModeratedByAppInstanceUserResponse -> ShowS
Prelude.Show, (forall x.
 DescribeChannelModeratedByAppInstanceUserResponse
 -> Rep DescribeChannelModeratedByAppInstanceUserResponse x)
-> (forall x.
    Rep DescribeChannelModeratedByAppInstanceUserResponse x
    -> DescribeChannelModeratedByAppInstanceUserResponse)
-> Generic DescribeChannelModeratedByAppInstanceUserResponse
forall x.
Rep DescribeChannelModeratedByAppInstanceUserResponse x
-> DescribeChannelModeratedByAppInstanceUserResponse
forall x.
DescribeChannelModeratedByAppInstanceUserResponse
-> Rep DescribeChannelModeratedByAppInstanceUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChannelModeratedByAppInstanceUserResponse x
-> DescribeChannelModeratedByAppInstanceUserResponse
$cfrom :: forall x.
DescribeChannelModeratedByAppInstanceUserResponse
-> Rep DescribeChannelModeratedByAppInstanceUserResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChannelModeratedByAppInstanceUserResponse' 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:
--
-- 'channel', 'describeChannelModeratedByAppInstanceUserResponse_channel' - The moderated channel.
--
-- 'httpStatus', 'describeChannelModeratedByAppInstanceUserResponse_httpStatus' - The response's http status code.
newDescribeChannelModeratedByAppInstanceUserResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeChannelModeratedByAppInstanceUserResponse
newDescribeChannelModeratedByAppInstanceUserResponse :: Int -> DescribeChannelModeratedByAppInstanceUserResponse
newDescribeChannelModeratedByAppInstanceUserResponse
  Int
pHttpStatus_ =
    DescribeChannelModeratedByAppInstanceUserResponse' :: Maybe ChannelModeratedByAppInstanceUserSummary
-> Int -> DescribeChannelModeratedByAppInstanceUserResponse
DescribeChannelModeratedByAppInstanceUserResponse'
      { $sel:channel:DescribeChannelModeratedByAppInstanceUserResponse' :: Maybe ChannelModeratedByAppInstanceUserSummary
channel =
          Maybe ChannelModeratedByAppInstanceUserSummary
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeChannelModeratedByAppInstanceUserResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The moderated channel.
describeChannelModeratedByAppInstanceUserResponse_channel :: Lens.Lens' DescribeChannelModeratedByAppInstanceUserResponse (Prelude.Maybe ChannelModeratedByAppInstanceUserSummary)
describeChannelModeratedByAppInstanceUserResponse_channel :: (Maybe ChannelModeratedByAppInstanceUserSummary
 -> f (Maybe ChannelModeratedByAppInstanceUserSummary))
-> DescribeChannelModeratedByAppInstanceUserResponse
-> f DescribeChannelModeratedByAppInstanceUserResponse
describeChannelModeratedByAppInstanceUserResponse_channel = (DescribeChannelModeratedByAppInstanceUserResponse
 -> Maybe ChannelModeratedByAppInstanceUserSummary)
-> (DescribeChannelModeratedByAppInstanceUserResponse
    -> Maybe ChannelModeratedByAppInstanceUserSummary
    -> DescribeChannelModeratedByAppInstanceUserResponse)
-> Lens
     DescribeChannelModeratedByAppInstanceUserResponse
     DescribeChannelModeratedByAppInstanceUserResponse
     (Maybe ChannelModeratedByAppInstanceUserSummary)
     (Maybe ChannelModeratedByAppInstanceUserSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelModeratedByAppInstanceUserResponse' {Maybe ChannelModeratedByAppInstanceUserSummary
channel :: Maybe ChannelModeratedByAppInstanceUserSummary
$sel:channel:DescribeChannelModeratedByAppInstanceUserResponse' :: DescribeChannelModeratedByAppInstanceUserResponse
-> Maybe ChannelModeratedByAppInstanceUserSummary
channel} -> Maybe ChannelModeratedByAppInstanceUserSummary
channel) (\s :: DescribeChannelModeratedByAppInstanceUserResponse
s@DescribeChannelModeratedByAppInstanceUserResponse' {} Maybe ChannelModeratedByAppInstanceUserSummary
a -> DescribeChannelModeratedByAppInstanceUserResponse
s {$sel:channel:DescribeChannelModeratedByAppInstanceUserResponse' :: Maybe ChannelModeratedByAppInstanceUserSummary
channel = Maybe ChannelModeratedByAppInstanceUserSummary
a} :: DescribeChannelModeratedByAppInstanceUserResponse)

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

instance
  Prelude.NFData
    DescribeChannelModeratedByAppInstanceUserResponse