{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SecurityProfileTarget = SecurityProfileTarget'
{
SecurityProfileTarget -> Text
arn :: Prelude.Text
}
deriving (SecurityProfileTarget -> SecurityProfileTarget -> Bool
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]
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
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. 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' {$sel:arn:SecurityProfileTarget' :: Text
arn = Text
pArn_}
securityProfileTarget_arn :: Lens.Lens' SecurityProfileTarget Prelude.Text
securityProfileTarget_arn :: Lens' SecurityProfileTarget Text
securityProfileTarget_arn = 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 Data.FromJSON SecurityProfileTarget where
parseJSON :: Value -> Parser SecurityProfileTarget
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SecurityProfileTarget"
( \Object
x ->
Text -> SecurityProfileTarget
SecurityProfileTarget' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
)
instance Prelude.Hashable SecurityProfileTarget where
hashWithSalt :: Int -> SecurityProfileTarget -> Int
hashWithSalt Int
_salt SecurityProfileTarget' {Text
arn :: Text
$sel:arn:SecurityProfileTarget' :: SecurityProfileTarget -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData SecurityProfileTarget where
rnf :: SecurityProfileTarget -> ()
rnf SecurityProfileTarget' {Text
arn :: Text
$sel:arn:SecurityProfileTarget' :: SecurityProfileTarget -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn