{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AttachmentInformation = AttachmentInformation'
{
AttachmentInformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (AttachmentInformation -> AttachmentInformation -> Bool
(AttachmentInformation -> AttachmentInformation -> Bool)
-> (AttachmentInformation -> AttachmentInformation -> Bool)
-> Eq AttachmentInformation
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]
(Int -> ReadS AttachmentInformation)
-> ReadS [AttachmentInformation]
-> ReadPrec AttachmentInformation
-> ReadPrec [AttachmentInformation]
-> Read 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
(Int -> AttachmentInformation -> ShowS)
-> (AttachmentInformation -> String)
-> ([AttachmentInformation] -> ShowS)
-> Show AttachmentInformation
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. AttachmentInformation -> Rep AttachmentInformation x)
-> (forall x. Rep AttachmentInformation x -> AttachmentInformation)
-> Generic AttachmentInformation
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' :: Maybe Text -> AttachmentInformation
AttachmentInformation' {$sel:name:AttachmentInformation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing}
attachmentInformation_name :: Lens.Lens' AttachmentInformation (Prelude.Maybe Prelude.Text)
attachmentInformation_name :: (Maybe Text -> f (Maybe Text))
-> AttachmentInformation -> f AttachmentInformation
attachmentInformation_name = (AttachmentInformation -> Maybe Text)
-> (AttachmentInformation -> Maybe Text -> AttachmentInformation)
-> Lens
AttachmentInformation
AttachmentInformation
(Maybe Text)
(Maybe Text)
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 Core.FromJSON AttachmentInformation where
parseJSON :: Value -> Parser AttachmentInformation
parseJSON =
String
-> (Object -> Parser AttachmentInformation)
-> Value
-> Parser AttachmentInformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AttachmentInformation"
( \Object
x ->
Maybe Text -> AttachmentInformation
AttachmentInformation'
(Maybe Text -> AttachmentInformation)
-> Parser (Maybe Text) -> Parser AttachmentInformation
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
"Name")
)
instance Prelude.Hashable AttachmentInformation
instance Prelude.NFData AttachmentInformation