{-# 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.CodeCommit.Types.ReactionValueFormats where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReactionValueFormats = ReactionValueFormats'
{
ReactionValueFormats -> Maybe Text
emoji :: Prelude.Maybe Prelude.Text,
ReactionValueFormats -> Maybe Text
shortCode :: Prelude.Maybe Prelude.Text,
ReactionValueFormats -> Maybe Text
unicode :: Prelude.Maybe Prelude.Text
}
deriving (ReactionValueFormats -> ReactionValueFormats -> Bool
(ReactionValueFormats -> ReactionValueFormats -> Bool)
-> (ReactionValueFormats -> ReactionValueFormats -> Bool)
-> Eq ReactionValueFormats
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReactionValueFormats -> ReactionValueFormats -> Bool
$c/= :: ReactionValueFormats -> ReactionValueFormats -> Bool
== :: ReactionValueFormats -> ReactionValueFormats -> Bool
$c== :: ReactionValueFormats -> ReactionValueFormats -> Bool
Prelude.Eq, ReadPrec [ReactionValueFormats]
ReadPrec ReactionValueFormats
Int -> ReadS ReactionValueFormats
ReadS [ReactionValueFormats]
(Int -> ReadS ReactionValueFormats)
-> ReadS [ReactionValueFormats]
-> ReadPrec ReactionValueFormats
-> ReadPrec [ReactionValueFormats]
-> Read ReactionValueFormats
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReactionValueFormats]
$creadListPrec :: ReadPrec [ReactionValueFormats]
readPrec :: ReadPrec ReactionValueFormats
$creadPrec :: ReadPrec ReactionValueFormats
readList :: ReadS [ReactionValueFormats]
$creadList :: ReadS [ReactionValueFormats]
readsPrec :: Int -> ReadS ReactionValueFormats
$creadsPrec :: Int -> ReadS ReactionValueFormats
Prelude.Read, Int -> ReactionValueFormats -> ShowS
[ReactionValueFormats] -> ShowS
ReactionValueFormats -> String
(Int -> ReactionValueFormats -> ShowS)
-> (ReactionValueFormats -> String)
-> ([ReactionValueFormats] -> ShowS)
-> Show ReactionValueFormats
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReactionValueFormats] -> ShowS
$cshowList :: [ReactionValueFormats] -> ShowS
show :: ReactionValueFormats -> String
$cshow :: ReactionValueFormats -> String
showsPrec :: Int -> ReactionValueFormats -> ShowS
$cshowsPrec :: Int -> ReactionValueFormats -> ShowS
Prelude.Show, (forall x. ReactionValueFormats -> Rep ReactionValueFormats x)
-> (forall x. Rep ReactionValueFormats x -> ReactionValueFormats)
-> Generic ReactionValueFormats
forall x. Rep ReactionValueFormats x -> ReactionValueFormats
forall x. ReactionValueFormats -> Rep ReactionValueFormats x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReactionValueFormats x -> ReactionValueFormats
$cfrom :: forall x. ReactionValueFormats -> Rep ReactionValueFormats x
Prelude.Generic)
newReactionValueFormats ::
ReactionValueFormats
newReactionValueFormats :: ReactionValueFormats
newReactionValueFormats =
ReactionValueFormats' :: Maybe Text -> Maybe Text -> Maybe Text -> ReactionValueFormats
ReactionValueFormats'
{ $sel:emoji:ReactionValueFormats' :: Maybe Text
emoji = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shortCode:ReactionValueFormats' :: Maybe Text
shortCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:unicode:ReactionValueFormats' :: Maybe Text
unicode = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reactionValueFormats_emoji :: Lens.Lens' ReactionValueFormats (Prelude.Maybe Prelude.Text)
reactionValueFormats_emoji :: (Maybe Text -> f (Maybe Text))
-> ReactionValueFormats -> f ReactionValueFormats
reactionValueFormats_emoji = (ReactionValueFormats -> Maybe Text)
-> (ReactionValueFormats -> Maybe Text -> ReactionValueFormats)
-> Lens
ReactionValueFormats ReactionValueFormats (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactionValueFormats' {Maybe Text
emoji :: Maybe Text
$sel:emoji:ReactionValueFormats' :: ReactionValueFormats -> Maybe Text
emoji} -> Maybe Text
emoji) (\s :: ReactionValueFormats
s@ReactionValueFormats' {} Maybe Text
a -> ReactionValueFormats
s {$sel:emoji:ReactionValueFormats' :: Maybe Text
emoji = Maybe Text
a} :: ReactionValueFormats)
reactionValueFormats_shortCode :: Lens.Lens' ReactionValueFormats (Prelude.Maybe Prelude.Text)
reactionValueFormats_shortCode :: (Maybe Text -> f (Maybe Text))
-> ReactionValueFormats -> f ReactionValueFormats
reactionValueFormats_shortCode = (ReactionValueFormats -> Maybe Text)
-> (ReactionValueFormats -> Maybe Text -> ReactionValueFormats)
-> Lens
ReactionValueFormats ReactionValueFormats (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactionValueFormats' {Maybe Text
shortCode :: Maybe Text
$sel:shortCode:ReactionValueFormats' :: ReactionValueFormats -> Maybe Text
shortCode} -> Maybe Text
shortCode) (\s :: ReactionValueFormats
s@ReactionValueFormats' {} Maybe Text
a -> ReactionValueFormats
s {$sel:shortCode:ReactionValueFormats' :: Maybe Text
shortCode = Maybe Text
a} :: ReactionValueFormats)
reactionValueFormats_unicode :: Lens.Lens' ReactionValueFormats (Prelude.Maybe Prelude.Text)
reactionValueFormats_unicode :: (Maybe Text -> f (Maybe Text))
-> ReactionValueFormats -> f ReactionValueFormats
reactionValueFormats_unicode = (ReactionValueFormats -> Maybe Text)
-> (ReactionValueFormats -> Maybe Text -> ReactionValueFormats)
-> Lens
ReactionValueFormats ReactionValueFormats (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactionValueFormats' {Maybe Text
unicode :: Maybe Text
$sel:unicode:ReactionValueFormats' :: ReactionValueFormats -> Maybe Text
unicode} -> Maybe Text
unicode) (\s :: ReactionValueFormats
s@ReactionValueFormats' {} Maybe Text
a -> ReactionValueFormats
s {$sel:unicode:ReactionValueFormats' :: Maybe Text
unicode = Maybe Text
a} :: ReactionValueFormats)
instance Core.FromJSON ReactionValueFormats where
parseJSON :: Value -> Parser ReactionValueFormats
parseJSON =
String
-> (Object -> Parser ReactionValueFormats)
-> Value
-> Parser ReactionValueFormats
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReactionValueFormats"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ReactionValueFormats
ReactionValueFormats'
(Maybe Text -> Maybe Text -> Maybe Text -> ReactionValueFormats)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ReactionValueFormats)
forall (f :: * -> *) a b. Functor 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
"emoji")
Parser (Maybe Text -> Maybe Text -> ReactionValueFormats)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReactionValueFormats)
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
"shortCode")
Parser (Maybe Text -> ReactionValueFormats)
-> Parser (Maybe Text) -> Parser ReactionValueFormats
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
"unicode")
)
instance Prelude.Hashable ReactionValueFormats
instance Prelude.NFData ReactionValueFormats