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