{-# 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.SSM.Types.OpsResultAttribute 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 OpsResultAttribute = OpsResultAttribute'
{
OpsResultAttribute -> Text
typeName :: Prelude.Text
}
deriving (OpsResultAttribute -> OpsResultAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpsResultAttribute -> OpsResultAttribute -> Bool
$c/= :: OpsResultAttribute -> OpsResultAttribute -> Bool
== :: OpsResultAttribute -> OpsResultAttribute -> Bool
$c== :: OpsResultAttribute -> OpsResultAttribute -> Bool
Prelude.Eq, ReadPrec [OpsResultAttribute]
ReadPrec OpsResultAttribute
Int -> ReadS OpsResultAttribute
ReadS [OpsResultAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpsResultAttribute]
$creadListPrec :: ReadPrec [OpsResultAttribute]
readPrec :: ReadPrec OpsResultAttribute
$creadPrec :: ReadPrec OpsResultAttribute
readList :: ReadS [OpsResultAttribute]
$creadList :: ReadS [OpsResultAttribute]
readsPrec :: Int -> ReadS OpsResultAttribute
$creadsPrec :: Int -> ReadS OpsResultAttribute
Prelude.Read, Int -> OpsResultAttribute -> ShowS
[OpsResultAttribute] -> ShowS
OpsResultAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpsResultAttribute] -> ShowS
$cshowList :: [OpsResultAttribute] -> ShowS
show :: OpsResultAttribute -> String
$cshow :: OpsResultAttribute -> String
showsPrec :: Int -> OpsResultAttribute -> ShowS
$cshowsPrec :: Int -> OpsResultAttribute -> ShowS
Prelude.Show, forall x. Rep OpsResultAttribute x -> OpsResultAttribute
forall x. OpsResultAttribute -> Rep OpsResultAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpsResultAttribute x -> OpsResultAttribute
$cfrom :: forall x. OpsResultAttribute -> Rep OpsResultAttribute x
Prelude.Generic)
newOpsResultAttribute ::
Prelude.Text ->
OpsResultAttribute
newOpsResultAttribute :: Text -> OpsResultAttribute
newOpsResultAttribute Text
pTypeName_ =
OpsResultAttribute' {$sel:typeName:OpsResultAttribute' :: Text
typeName = Text
pTypeName_}
opsResultAttribute_typeName :: Lens.Lens' OpsResultAttribute Prelude.Text
opsResultAttribute_typeName :: Lens' OpsResultAttribute Text
opsResultAttribute_typeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsResultAttribute' {Text
typeName :: Text
$sel:typeName:OpsResultAttribute' :: OpsResultAttribute -> Text
typeName} -> Text
typeName) (\s :: OpsResultAttribute
s@OpsResultAttribute' {} Text
a -> OpsResultAttribute
s {$sel:typeName:OpsResultAttribute' :: Text
typeName = Text
a} :: OpsResultAttribute)
instance Prelude.Hashable OpsResultAttribute where
hashWithSalt :: Int -> OpsResultAttribute -> Int
hashWithSalt Int
_salt OpsResultAttribute' {Text
typeName :: Text
$sel:typeName:OpsResultAttribute' :: OpsResultAttribute -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
typeName
instance Prelude.NFData OpsResultAttribute where
rnf :: OpsResultAttribute -> ()
rnf OpsResultAttribute' {Text
typeName :: Text
$sel:typeName:OpsResultAttribute' :: OpsResultAttribute -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
typeName
instance Data.ToJSON OpsResultAttribute where
toJSON :: OpsResultAttribute -> Value
toJSON OpsResultAttribute' {Text
typeName :: Text
$sel:typeName:OpsResultAttribute' :: OpsResultAttribute -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"TypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
typeName)]
)