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