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