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