{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Chime.Types.BatchCreateChannelMembershipError where
import Amazonka.Chime.Types.ErrorCode
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchCreateChannelMembershipError = BatchCreateChannelMembershipError'
{
BatchCreateChannelMembershipError -> Maybe ErrorCode
errorCode :: Prelude.Maybe ErrorCode,
BatchCreateChannelMembershipError -> Maybe Text
memberArn :: Prelude.Maybe Prelude.Text,
BatchCreateChannelMembershipError -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool
(BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool)
-> (BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool)
-> Eq BatchCreateChannelMembershipError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool
$c/= :: BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool
== :: BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool
$c== :: BatchCreateChannelMembershipError
-> BatchCreateChannelMembershipError -> Bool
Prelude.Eq, ReadPrec [BatchCreateChannelMembershipError]
ReadPrec BatchCreateChannelMembershipError
Int -> ReadS BatchCreateChannelMembershipError
ReadS [BatchCreateChannelMembershipError]
(Int -> ReadS BatchCreateChannelMembershipError)
-> ReadS [BatchCreateChannelMembershipError]
-> ReadPrec BatchCreateChannelMembershipError
-> ReadPrec [BatchCreateChannelMembershipError]
-> Read BatchCreateChannelMembershipError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchCreateChannelMembershipError]
$creadListPrec :: ReadPrec [BatchCreateChannelMembershipError]
readPrec :: ReadPrec BatchCreateChannelMembershipError
$creadPrec :: ReadPrec BatchCreateChannelMembershipError
readList :: ReadS [BatchCreateChannelMembershipError]
$creadList :: ReadS [BatchCreateChannelMembershipError]
readsPrec :: Int -> ReadS BatchCreateChannelMembershipError
$creadsPrec :: Int -> ReadS BatchCreateChannelMembershipError
Prelude.Read, Int -> BatchCreateChannelMembershipError -> ShowS
[BatchCreateChannelMembershipError] -> ShowS
BatchCreateChannelMembershipError -> String
(Int -> BatchCreateChannelMembershipError -> ShowS)
-> (BatchCreateChannelMembershipError -> String)
-> ([BatchCreateChannelMembershipError] -> ShowS)
-> Show BatchCreateChannelMembershipError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchCreateChannelMembershipError] -> ShowS
$cshowList :: [BatchCreateChannelMembershipError] -> ShowS
show :: BatchCreateChannelMembershipError -> String
$cshow :: BatchCreateChannelMembershipError -> String
showsPrec :: Int -> BatchCreateChannelMembershipError -> ShowS
$cshowsPrec :: Int -> BatchCreateChannelMembershipError -> ShowS
Prelude.Show, (forall x.
BatchCreateChannelMembershipError
-> Rep BatchCreateChannelMembershipError x)
-> (forall x.
Rep BatchCreateChannelMembershipError x
-> BatchCreateChannelMembershipError)
-> Generic BatchCreateChannelMembershipError
forall x.
Rep BatchCreateChannelMembershipError x
-> BatchCreateChannelMembershipError
forall x.
BatchCreateChannelMembershipError
-> Rep BatchCreateChannelMembershipError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchCreateChannelMembershipError x
-> BatchCreateChannelMembershipError
$cfrom :: forall x.
BatchCreateChannelMembershipError
-> Rep BatchCreateChannelMembershipError x
Prelude.Generic)
newBatchCreateChannelMembershipError ::
BatchCreateChannelMembershipError
newBatchCreateChannelMembershipError :: BatchCreateChannelMembershipError
newBatchCreateChannelMembershipError =
BatchCreateChannelMembershipError' :: Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchCreateChannelMembershipError
BatchCreateChannelMembershipError'
{ $sel:errorCode:BatchCreateChannelMembershipError' :: Maybe ErrorCode
errorCode =
Maybe ErrorCode
forall a. Maybe a
Prelude.Nothing,
$sel:memberArn:BatchCreateChannelMembershipError' :: Maybe Text
memberArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BatchCreateChannelMembershipError' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
batchCreateChannelMembershipError_errorCode :: Lens.Lens' BatchCreateChannelMembershipError (Prelude.Maybe ErrorCode)
batchCreateChannelMembershipError_errorCode :: (Maybe ErrorCode -> f (Maybe ErrorCode))
-> BatchCreateChannelMembershipError
-> f BatchCreateChannelMembershipError
batchCreateChannelMembershipError_errorCode = (BatchCreateChannelMembershipError -> Maybe ErrorCode)
-> (BatchCreateChannelMembershipError
-> Maybe ErrorCode -> BatchCreateChannelMembershipError)
-> Lens
BatchCreateChannelMembershipError
BatchCreateChannelMembershipError
(Maybe ErrorCode)
(Maybe ErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateChannelMembershipError' {Maybe ErrorCode
errorCode :: Maybe ErrorCode
$sel:errorCode:BatchCreateChannelMembershipError' :: BatchCreateChannelMembershipError -> Maybe ErrorCode
errorCode} -> Maybe ErrorCode
errorCode) (\s :: BatchCreateChannelMembershipError
s@BatchCreateChannelMembershipError' {} Maybe ErrorCode
a -> BatchCreateChannelMembershipError
s {$sel:errorCode:BatchCreateChannelMembershipError' :: Maybe ErrorCode
errorCode = Maybe ErrorCode
a} :: BatchCreateChannelMembershipError)
batchCreateChannelMembershipError_memberArn :: Lens.Lens' BatchCreateChannelMembershipError (Prelude.Maybe Prelude.Text)
batchCreateChannelMembershipError_memberArn :: (Maybe Text -> f (Maybe Text))
-> BatchCreateChannelMembershipError
-> f BatchCreateChannelMembershipError
batchCreateChannelMembershipError_memberArn = (BatchCreateChannelMembershipError -> Maybe Text)
-> (BatchCreateChannelMembershipError
-> Maybe Text -> BatchCreateChannelMembershipError)
-> Lens
BatchCreateChannelMembershipError
BatchCreateChannelMembershipError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateChannelMembershipError' {Maybe Text
memberArn :: Maybe Text
$sel:memberArn:BatchCreateChannelMembershipError' :: BatchCreateChannelMembershipError -> Maybe Text
memberArn} -> Maybe Text
memberArn) (\s :: BatchCreateChannelMembershipError
s@BatchCreateChannelMembershipError' {} Maybe Text
a -> BatchCreateChannelMembershipError
s {$sel:memberArn:BatchCreateChannelMembershipError' :: Maybe Text
memberArn = Maybe Text
a} :: BatchCreateChannelMembershipError)
batchCreateChannelMembershipError_errorMessage :: Lens.Lens' BatchCreateChannelMembershipError (Prelude.Maybe Prelude.Text)
batchCreateChannelMembershipError_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BatchCreateChannelMembershipError
-> f BatchCreateChannelMembershipError
batchCreateChannelMembershipError_errorMessage = (BatchCreateChannelMembershipError -> Maybe Text)
-> (BatchCreateChannelMembershipError
-> Maybe Text -> BatchCreateChannelMembershipError)
-> Lens
BatchCreateChannelMembershipError
BatchCreateChannelMembershipError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateChannelMembershipError' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchCreateChannelMembershipError' :: BatchCreateChannelMembershipError -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchCreateChannelMembershipError
s@BatchCreateChannelMembershipError' {} Maybe Text
a -> BatchCreateChannelMembershipError
s {$sel:errorMessage:BatchCreateChannelMembershipError' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchCreateChannelMembershipError)
instance
Core.FromJSON
BatchCreateChannelMembershipError
where
parseJSON :: Value -> Parser BatchCreateChannelMembershipError
parseJSON =
String
-> (Object -> Parser BatchCreateChannelMembershipError)
-> Value
-> Parser BatchCreateChannelMembershipError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchCreateChannelMembershipError"
( \Object
x ->
Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchCreateChannelMembershipError
BatchCreateChannelMembershipError'
(Maybe ErrorCode
-> Maybe Text -> Maybe Text -> BatchCreateChannelMembershipError)
-> Parser (Maybe ErrorCode)
-> Parser
(Maybe Text -> Maybe Text -> BatchCreateChannelMembershipError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ErrorCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCode")
Parser
(Maybe Text -> Maybe Text -> BatchCreateChannelMembershipError)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BatchCreateChannelMembershipError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MemberArn")
Parser (Maybe Text -> BatchCreateChannelMembershipError)
-> Parser (Maybe Text) -> Parser BatchCreateChannelMembershipError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorMessage")
)
instance
Prelude.Hashable
BatchCreateChannelMembershipError
instance
Prelude.NFData
BatchCreateChannelMembershipError