{-# 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.AlexaBusiness.Types.DeviceNetworkProfileInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeviceNetworkProfileInfo = DeviceNetworkProfileInfo'
{
DeviceNetworkProfileInfo -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
DeviceNetworkProfileInfo -> Maybe Text
networkProfileArn :: Prelude.Maybe Prelude.Text,
DeviceNetworkProfileInfo -> Maybe POSIX
certificateExpirationTime :: Prelude.Maybe Core.POSIX
}
deriving (DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool
(DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool)
-> (DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool)
-> Eq DeviceNetworkProfileInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool
$c/= :: DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool
== :: DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool
$c== :: DeviceNetworkProfileInfo -> DeviceNetworkProfileInfo -> Bool
Prelude.Eq, ReadPrec [DeviceNetworkProfileInfo]
ReadPrec DeviceNetworkProfileInfo
Int -> ReadS DeviceNetworkProfileInfo
ReadS [DeviceNetworkProfileInfo]
(Int -> ReadS DeviceNetworkProfileInfo)
-> ReadS [DeviceNetworkProfileInfo]
-> ReadPrec DeviceNetworkProfileInfo
-> ReadPrec [DeviceNetworkProfileInfo]
-> Read DeviceNetworkProfileInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceNetworkProfileInfo]
$creadListPrec :: ReadPrec [DeviceNetworkProfileInfo]
readPrec :: ReadPrec DeviceNetworkProfileInfo
$creadPrec :: ReadPrec DeviceNetworkProfileInfo
readList :: ReadS [DeviceNetworkProfileInfo]
$creadList :: ReadS [DeviceNetworkProfileInfo]
readsPrec :: Int -> ReadS DeviceNetworkProfileInfo
$creadsPrec :: Int -> ReadS DeviceNetworkProfileInfo
Prelude.Read, Int -> DeviceNetworkProfileInfo -> ShowS
[DeviceNetworkProfileInfo] -> ShowS
DeviceNetworkProfileInfo -> String
(Int -> DeviceNetworkProfileInfo -> ShowS)
-> (DeviceNetworkProfileInfo -> String)
-> ([DeviceNetworkProfileInfo] -> ShowS)
-> Show DeviceNetworkProfileInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceNetworkProfileInfo] -> ShowS
$cshowList :: [DeviceNetworkProfileInfo] -> ShowS
show :: DeviceNetworkProfileInfo -> String
$cshow :: DeviceNetworkProfileInfo -> String
showsPrec :: Int -> DeviceNetworkProfileInfo -> ShowS
$cshowsPrec :: Int -> DeviceNetworkProfileInfo -> ShowS
Prelude.Show, (forall x.
DeviceNetworkProfileInfo -> Rep DeviceNetworkProfileInfo x)
-> (forall x.
Rep DeviceNetworkProfileInfo x -> DeviceNetworkProfileInfo)
-> Generic DeviceNetworkProfileInfo
forall x.
Rep DeviceNetworkProfileInfo x -> DeviceNetworkProfileInfo
forall x.
DeviceNetworkProfileInfo -> Rep DeviceNetworkProfileInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeviceNetworkProfileInfo x -> DeviceNetworkProfileInfo
$cfrom :: forall x.
DeviceNetworkProfileInfo -> Rep DeviceNetworkProfileInfo x
Prelude.Generic)
newDeviceNetworkProfileInfo ::
DeviceNetworkProfileInfo
newDeviceNetworkProfileInfo :: DeviceNetworkProfileInfo
newDeviceNetworkProfileInfo =
DeviceNetworkProfileInfo' :: Maybe Text -> Maybe Text -> Maybe POSIX -> DeviceNetworkProfileInfo
DeviceNetworkProfileInfo'
{ $sel:certificateArn:DeviceNetworkProfileInfo' :: Maybe Text
certificateArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkProfileArn:DeviceNetworkProfileInfo' :: Maybe Text
networkProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateExpirationTime:DeviceNetworkProfileInfo' :: Maybe POSIX
certificateExpirationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
deviceNetworkProfileInfo_certificateArn :: Lens.Lens' DeviceNetworkProfileInfo (Prelude.Maybe Prelude.Text)
deviceNetworkProfileInfo_certificateArn :: (Maybe Text -> f (Maybe Text))
-> DeviceNetworkProfileInfo -> f DeviceNetworkProfileInfo
deviceNetworkProfileInfo_certificateArn = (DeviceNetworkProfileInfo -> Maybe Text)
-> (DeviceNetworkProfileInfo
-> Maybe Text -> DeviceNetworkProfileInfo)
-> Lens
DeviceNetworkProfileInfo
DeviceNetworkProfileInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceNetworkProfileInfo' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:DeviceNetworkProfileInfo' :: DeviceNetworkProfileInfo -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: DeviceNetworkProfileInfo
s@DeviceNetworkProfileInfo' {} Maybe Text
a -> DeviceNetworkProfileInfo
s {$sel:certificateArn:DeviceNetworkProfileInfo' :: Maybe Text
certificateArn = Maybe Text
a} :: DeviceNetworkProfileInfo)
deviceNetworkProfileInfo_networkProfileArn :: Lens.Lens' DeviceNetworkProfileInfo (Prelude.Maybe Prelude.Text)
deviceNetworkProfileInfo_networkProfileArn :: (Maybe Text -> f (Maybe Text))
-> DeviceNetworkProfileInfo -> f DeviceNetworkProfileInfo
deviceNetworkProfileInfo_networkProfileArn = (DeviceNetworkProfileInfo -> Maybe Text)
-> (DeviceNetworkProfileInfo
-> Maybe Text -> DeviceNetworkProfileInfo)
-> Lens
DeviceNetworkProfileInfo
DeviceNetworkProfileInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceNetworkProfileInfo' {Maybe Text
networkProfileArn :: Maybe Text
$sel:networkProfileArn:DeviceNetworkProfileInfo' :: DeviceNetworkProfileInfo -> Maybe Text
networkProfileArn} -> Maybe Text
networkProfileArn) (\s :: DeviceNetworkProfileInfo
s@DeviceNetworkProfileInfo' {} Maybe Text
a -> DeviceNetworkProfileInfo
s {$sel:networkProfileArn:DeviceNetworkProfileInfo' :: Maybe Text
networkProfileArn = Maybe Text
a} :: DeviceNetworkProfileInfo)
deviceNetworkProfileInfo_certificateExpirationTime :: Lens.Lens' DeviceNetworkProfileInfo (Prelude.Maybe Prelude.UTCTime)
deviceNetworkProfileInfo_certificateExpirationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceNetworkProfileInfo -> f DeviceNetworkProfileInfo
deviceNetworkProfileInfo_certificateExpirationTime = (DeviceNetworkProfileInfo -> Maybe POSIX)
-> (DeviceNetworkProfileInfo
-> Maybe POSIX -> DeviceNetworkProfileInfo)
-> Lens
DeviceNetworkProfileInfo
DeviceNetworkProfileInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceNetworkProfileInfo' {Maybe POSIX
certificateExpirationTime :: Maybe POSIX
$sel:certificateExpirationTime:DeviceNetworkProfileInfo' :: DeviceNetworkProfileInfo -> Maybe POSIX
certificateExpirationTime} -> Maybe POSIX
certificateExpirationTime) (\s :: DeviceNetworkProfileInfo
s@DeviceNetworkProfileInfo' {} Maybe POSIX
a -> DeviceNetworkProfileInfo
s {$sel:certificateExpirationTime:DeviceNetworkProfileInfo' :: Maybe POSIX
certificateExpirationTime = Maybe POSIX
a} :: DeviceNetworkProfileInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> DeviceNetworkProfileInfo -> f DeviceNetworkProfileInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeviceNetworkProfileInfo
-> f DeviceNetworkProfileInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON DeviceNetworkProfileInfo where
parseJSON :: Value -> Parser DeviceNetworkProfileInfo
parseJSON =
String
-> (Object -> Parser DeviceNetworkProfileInfo)
-> Value
-> Parser DeviceNetworkProfileInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeviceNetworkProfileInfo"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe POSIX -> DeviceNetworkProfileInfo
DeviceNetworkProfileInfo'
(Maybe Text
-> Maybe Text -> Maybe POSIX -> DeviceNetworkProfileInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> DeviceNetworkProfileInfo)
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
"CertificateArn")
Parser (Maybe Text -> Maybe POSIX -> DeviceNetworkProfileInfo)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> DeviceNetworkProfileInfo)
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
"NetworkProfileArn")
Parser (Maybe POSIX -> DeviceNetworkProfileInfo)
-> Parser (Maybe POSIX) -> Parser DeviceNetworkProfileInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateExpirationTime")
)
instance Prelude.Hashable DeviceNetworkProfileInfo
instance Prelude.NFData DeviceNetworkProfileInfo