{-# 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.AttachmentInformation 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 AttachmentInformation = AttachmentInformation'
{
AttachmentInformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (AttachmentInformation -> AttachmentInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachmentInformation -> AttachmentInformation -> Bool
$c/= :: AttachmentInformation -> AttachmentInformation -> Bool
== :: AttachmentInformation -> AttachmentInformation -> Bool
$c== :: AttachmentInformation -> AttachmentInformation -> Bool
Prelude.Eq, ReadPrec [AttachmentInformation]
ReadPrec AttachmentInformation
Int -> ReadS AttachmentInformation
ReadS [AttachmentInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachmentInformation]
$creadListPrec :: ReadPrec [AttachmentInformation]
readPrec :: ReadPrec AttachmentInformation
$creadPrec :: ReadPrec AttachmentInformation
readList :: ReadS [AttachmentInformation]
$creadList :: ReadS [AttachmentInformation]
readsPrec :: Int -> ReadS AttachmentInformation
$creadsPrec :: Int -> ReadS AttachmentInformation
Prelude.Read, Int -> AttachmentInformation -> ShowS
[AttachmentInformation] -> ShowS
AttachmentInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachmentInformation] -> ShowS
$cshowList :: [AttachmentInformation] -> ShowS
show :: AttachmentInformation -> String
$cshow :: AttachmentInformation -> String
showsPrec :: Int -> AttachmentInformation -> ShowS
$cshowsPrec :: Int -> AttachmentInformation -> ShowS
Prelude.Show, forall x. Rep AttachmentInformation x -> AttachmentInformation
forall x. AttachmentInformation -> Rep AttachmentInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttachmentInformation x -> AttachmentInformation
$cfrom :: forall x. AttachmentInformation -> Rep AttachmentInformation x
Prelude.Generic)
newAttachmentInformation ::
AttachmentInformation
newAttachmentInformation :: AttachmentInformation
newAttachmentInformation =
AttachmentInformation' {$sel:name:AttachmentInformation' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing}
attachmentInformation_name :: Lens.Lens' AttachmentInformation (Prelude.Maybe Prelude.Text)
attachmentInformation_name :: Lens' AttachmentInformation (Maybe Text)
attachmentInformation_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachmentInformation' {Maybe Text
name :: Maybe Text
$sel:name:AttachmentInformation' :: AttachmentInformation -> Maybe Text
name} -> Maybe Text
name) (\s :: AttachmentInformation
s@AttachmentInformation' {} Maybe Text
a -> AttachmentInformation
s {$sel:name:AttachmentInformation' :: Maybe Text
name = Maybe Text
a} :: AttachmentInformation)
instance Data.FromJSON AttachmentInformation where
parseJSON :: Value -> Parser AttachmentInformation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AttachmentInformation"
( \Object
x ->
Maybe Text -> AttachmentInformation
AttachmentInformation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
)
instance Prelude.Hashable AttachmentInformation where
hashWithSalt :: Int -> AttachmentInformation -> Int
hashWithSalt Int
_salt AttachmentInformation' {Maybe Text
name :: Maybe Text
$sel:name:AttachmentInformation' :: AttachmentInformation -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData AttachmentInformation where
rnf :: AttachmentInformation -> ()
rnf AttachmentInformation' {Maybe Text
name :: Maybe Text
$sel:name:AttachmentInformation' :: AttachmentInformation -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name