{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SecurityProfileIdentifier = SecurityProfileIdentifier'
{
SecurityProfileIdentifier -> Text
name :: Prelude.Text,
SecurityProfileIdentifier -> Text
arn :: Prelude.Text
}
deriving (SecurityProfileIdentifier -> SecurityProfileIdentifier -> Bool
(SecurityProfileIdentifier -> SecurityProfileIdentifier -> Bool)
-> (SecurityProfileIdentifier -> SecurityProfileIdentifier -> Bool)
-> Eq SecurityProfileIdentifier
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]
(Int -> ReadS SecurityProfileIdentifier)
-> ReadS [SecurityProfileIdentifier]
-> ReadPrec SecurityProfileIdentifier
-> ReadPrec [SecurityProfileIdentifier]
-> Read 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
(Int -> SecurityProfileIdentifier -> ShowS)
-> (SecurityProfileIdentifier -> String)
-> ([SecurityProfileIdentifier] -> ShowS)
-> Show SecurityProfileIdentifier
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.
SecurityProfileIdentifier -> Rep SecurityProfileIdentifier x)
-> (forall x.
Rep SecurityProfileIdentifier x -> SecurityProfileIdentifier)
-> Generic SecurityProfileIdentifier
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' :: Text -> Text -> SecurityProfileIdentifier
SecurityProfileIdentifier'
{ $sel:name:SecurityProfileIdentifier' :: Text
name = Text
pName_,
$sel:arn:SecurityProfileIdentifier' :: Text
arn = Text
pArn_
}
securityProfileIdentifier_name :: Lens.Lens' SecurityProfileIdentifier Prelude.Text
securityProfileIdentifier_name :: (Text -> f Text)
-> SecurityProfileIdentifier -> f SecurityProfileIdentifier
securityProfileIdentifier_name = (SecurityProfileIdentifier -> Text)
-> (SecurityProfileIdentifier -> Text -> SecurityProfileIdentifier)
-> Lens
SecurityProfileIdentifier SecurityProfileIdentifier Text Text
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 :: (Text -> f Text)
-> SecurityProfileIdentifier -> f SecurityProfileIdentifier
securityProfileIdentifier_arn = (SecurityProfileIdentifier -> Text)
-> (SecurityProfileIdentifier -> Text -> SecurityProfileIdentifier)
-> Lens
SecurityProfileIdentifier SecurityProfileIdentifier Text Text
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 Core.FromJSON SecurityProfileIdentifier where
parseJSON :: Value -> Parser SecurityProfileIdentifier
parseJSON =
String
-> (Object -> Parser SecurityProfileIdentifier)
-> Value
-> Parser SecurityProfileIdentifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SecurityProfileIdentifier"
( \Object
x ->
Text -> Text -> SecurityProfileIdentifier
SecurityProfileIdentifier'
(Text -> Text -> SecurityProfileIdentifier)
-> Parser Text -> Parser (Text -> SecurityProfileIdentifier)
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
"name") Parser (Text -> SecurityProfileIdentifier)
-> Parser Text -> Parser SecurityProfileIdentifier
forall (f :: * -> *) a b. Applicative f => 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 SecurityProfileIdentifier
instance Prelude.NFData SecurityProfileIdentifier