{-# 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.M2.Types.GdgAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data GdgAttributes = GdgAttributes'
{
GdgAttributes -> Maybe Int
limit :: Prelude.Maybe Prelude.Int,
GdgAttributes -> Maybe Text
rollDisposition :: Prelude.Maybe Prelude.Text
}
deriving (GdgAttributes -> GdgAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GdgAttributes -> GdgAttributes -> Bool
$c/= :: GdgAttributes -> GdgAttributes -> Bool
== :: GdgAttributes -> GdgAttributes -> Bool
$c== :: GdgAttributes -> GdgAttributes -> Bool
Prelude.Eq, ReadPrec [GdgAttributes]
ReadPrec GdgAttributes
Int -> ReadS GdgAttributes
ReadS [GdgAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GdgAttributes]
$creadListPrec :: ReadPrec [GdgAttributes]
readPrec :: ReadPrec GdgAttributes
$creadPrec :: ReadPrec GdgAttributes
readList :: ReadS [GdgAttributes]
$creadList :: ReadS [GdgAttributes]
readsPrec :: Int -> ReadS GdgAttributes
$creadsPrec :: Int -> ReadS GdgAttributes
Prelude.Read, Int -> GdgAttributes -> ShowS
[GdgAttributes] -> ShowS
GdgAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GdgAttributes] -> ShowS
$cshowList :: [GdgAttributes] -> ShowS
show :: GdgAttributes -> String
$cshow :: GdgAttributes -> String
showsPrec :: Int -> GdgAttributes -> ShowS
$cshowsPrec :: Int -> GdgAttributes -> ShowS
Prelude.Show, forall x. Rep GdgAttributes x -> GdgAttributes
forall x. GdgAttributes -> Rep GdgAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GdgAttributes x -> GdgAttributes
$cfrom :: forall x. GdgAttributes -> Rep GdgAttributes x
Prelude.Generic)
newGdgAttributes ::
GdgAttributes
newGdgAttributes :: GdgAttributes
newGdgAttributes =
GdgAttributes'
{ $sel:limit:GdgAttributes' :: Maybe Int
limit = forall a. Maybe a
Prelude.Nothing,
$sel:rollDisposition:GdgAttributes' :: Maybe Text
rollDisposition = forall a. Maybe a
Prelude.Nothing
}
gdgAttributes_limit :: Lens.Lens' GdgAttributes (Prelude.Maybe Prelude.Int)
gdgAttributes_limit :: Lens' GdgAttributes (Maybe Int)
gdgAttributes_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GdgAttributes' {Maybe Int
limit :: Maybe Int
$sel:limit:GdgAttributes' :: GdgAttributes -> Maybe Int
limit} -> Maybe Int
limit) (\s :: GdgAttributes
s@GdgAttributes' {} Maybe Int
a -> GdgAttributes
s {$sel:limit:GdgAttributes' :: Maybe Int
limit = Maybe Int
a} :: GdgAttributes)
gdgAttributes_rollDisposition :: Lens.Lens' GdgAttributes (Prelude.Maybe Prelude.Text)
gdgAttributes_rollDisposition :: Lens' GdgAttributes (Maybe Text)
gdgAttributes_rollDisposition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GdgAttributes' {Maybe Text
rollDisposition :: Maybe Text
$sel:rollDisposition:GdgAttributes' :: GdgAttributes -> Maybe Text
rollDisposition} -> Maybe Text
rollDisposition) (\s :: GdgAttributes
s@GdgAttributes' {} Maybe Text
a -> GdgAttributes
s {$sel:rollDisposition:GdgAttributes' :: Maybe Text
rollDisposition = Maybe Text
a} :: GdgAttributes)
instance Prelude.Hashable GdgAttributes where
hashWithSalt :: Int -> GdgAttributes -> Int
hashWithSalt Int
_salt GdgAttributes' {Maybe Int
Maybe Text
rollDisposition :: Maybe Text
limit :: Maybe Int
$sel:rollDisposition:GdgAttributes' :: GdgAttributes -> Maybe Text
$sel:limit:GdgAttributes' :: GdgAttributes -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
limit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rollDisposition
instance Prelude.NFData GdgAttributes where
rnf :: GdgAttributes -> ()
rnf GdgAttributes' {Maybe Int
Maybe Text
rollDisposition :: Maybe Text
limit :: Maybe Int
$sel:rollDisposition:GdgAttributes' :: GdgAttributes -> Maybe Text
$sel:limit:GdgAttributes' :: GdgAttributes -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
limit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rollDisposition
instance Data.ToJSON GdgAttributes where
toJSON :: GdgAttributes -> Value
toJSON GdgAttributes' {Maybe Int
Maybe Text
rollDisposition :: Maybe Text
limit :: Maybe Int
$sel:rollDisposition:GdgAttributes' :: GdgAttributes -> Maybe Text
$sel:limit:GdgAttributes' :: GdgAttributes -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
limit,
(Key
"rollDisposition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
rollDisposition
]
)