{-# 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.MachineLearning.Types.RealtimeEndpointInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MachineLearning.Types.RealtimeEndpointStatus
import qualified Amazonka.Prelude as Prelude
data RealtimeEndpointInfo = RealtimeEndpointInfo'
{
RealtimeEndpointInfo -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
RealtimeEndpointInfo -> Maybe RealtimeEndpointStatus
endpointStatus :: Prelude.Maybe RealtimeEndpointStatus,
RealtimeEndpointInfo -> Maybe Text
endpointUrl :: Prelude.Maybe Prelude.Text,
RealtimeEndpointInfo -> Maybe Int
peakRequestsPerSecond :: Prelude.Maybe Prelude.Int
}
deriving (RealtimeEndpointInfo -> RealtimeEndpointInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RealtimeEndpointInfo -> RealtimeEndpointInfo -> Bool
$c/= :: RealtimeEndpointInfo -> RealtimeEndpointInfo -> Bool
== :: RealtimeEndpointInfo -> RealtimeEndpointInfo -> Bool
$c== :: RealtimeEndpointInfo -> RealtimeEndpointInfo -> Bool
Prelude.Eq, ReadPrec [RealtimeEndpointInfo]
ReadPrec RealtimeEndpointInfo
Int -> ReadS RealtimeEndpointInfo
ReadS [RealtimeEndpointInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RealtimeEndpointInfo]
$creadListPrec :: ReadPrec [RealtimeEndpointInfo]
readPrec :: ReadPrec RealtimeEndpointInfo
$creadPrec :: ReadPrec RealtimeEndpointInfo
readList :: ReadS [RealtimeEndpointInfo]
$creadList :: ReadS [RealtimeEndpointInfo]
readsPrec :: Int -> ReadS RealtimeEndpointInfo
$creadsPrec :: Int -> ReadS RealtimeEndpointInfo
Prelude.Read, Int -> RealtimeEndpointInfo -> ShowS
[RealtimeEndpointInfo] -> ShowS
RealtimeEndpointInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RealtimeEndpointInfo] -> ShowS
$cshowList :: [RealtimeEndpointInfo] -> ShowS
show :: RealtimeEndpointInfo -> String
$cshow :: RealtimeEndpointInfo -> String
showsPrec :: Int -> RealtimeEndpointInfo -> ShowS
$cshowsPrec :: Int -> RealtimeEndpointInfo -> ShowS
Prelude.Show, forall x. Rep RealtimeEndpointInfo x -> RealtimeEndpointInfo
forall x. RealtimeEndpointInfo -> Rep RealtimeEndpointInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RealtimeEndpointInfo x -> RealtimeEndpointInfo
$cfrom :: forall x. RealtimeEndpointInfo -> Rep RealtimeEndpointInfo x
Prelude.Generic)
newRealtimeEndpointInfo ::
RealtimeEndpointInfo
newRealtimeEndpointInfo :: RealtimeEndpointInfo
newRealtimeEndpointInfo =
RealtimeEndpointInfo'
{ $sel:createdAt:RealtimeEndpointInfo' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:endpointStatus:RealtimeEndpointInfo' :: Maybe RealtimeEndpointStatus
endpointStatus = forall a. Maybe a
Prelude.Nothing,
$sel:endpointUrl:RealtimeEndpointInfo' :: Maybe Text
endpointUrl = forall a. Maybe a
Prelude.Nothing,
$sel:peakRequestsPerSecond:RealtimeEndpointInfo' :: Maybe Int
peakRequestsPerSecond = forall a. Maybe a
Prelude.Nothing
}
realtimeEndpointInfo_createdAt :: Lens.Lens' RealtimeEndpointInfo (Prelude.Maybe Prelude.UTCTime)
realtimeEndpointInfo_createdAt :: Lens' RealtimeEndpointInfo (Maybe UTCTime)
realtimeEndpointInfo_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RealtimeEndpointInfo' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: RealtimeEndpointInfo
s@RealtimeEndpointInfo' {} Maybe POSIX
a -> RealtimeEndpointInfo
s {$sel:createdAt:RealtimeEndpointInfo' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: RealtimeEndpointInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
realtimeEndpointInfo_endpointStatus :: Lens.Lens' RealtimeEndpointInfo (Prelude.Maybe RealtimeEndpointStatus)
realtimeEndpointInfo_endpointStatus :: Lens' RealtimeEndpointInfo (Maybe RealtimeEndpointStatus)
realtimeEndpointInfo_endpointStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RealtimeEndpointInfo' {Maybe RealtimeEndpointStatus
endpointStatus :: Maybe RealtimeEndpointStatus
$sel:endpointStatus:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe RealtimeEndpointStatus
endpointStatus} -> Maybe RealtimeEndpointStatus
endpointStatus) (\s :: RealtimeEndpointInfo
s@RealtimeEndpointInfo' {} Maybe RealtimeEndpointStatus
a -> RealtimeEndpointInfo
s {$sel:endpointStatus:RealtimeEndpointInfo' :: Maybe RealtimeEndpointStatus
endpointStatus = Maybe RealtimeEndpointStatus
a} :: RealtimeEndpointInfo)
realtimeEndpointInfo_endpointUrl :: Lens.Lens' RealtimeEndpointInfo (Prelude.Maybe Prelude.Text)
realtimeEndpointInfo_endpointUrl :: Lens' RealtimeEndpointInfo (Maybe Text)
realtimeEndpointInfo_endpointUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RealtimeEndpointInfo' {Maybe Text
endpointUrl :: Maybe Text
$sel:endpointUrl:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Text
endpointUrl} -> Maybe Text
endpointUrl) (\s :: RealtimeEndpointInfo
s@RealtimeEndpointInfo' {} Maybe Text
a -> RealtimeEndpointInfo
s {$sel:endpointUrl:RealtimeEndpointInfo' :: Maybe Text
endpointUrl = Maybe Text
a} :: RealtimeEndpointInfo)
realtimeEndpointInfo_peakRequestsPerSecond :: Lens.Lens' RealtimeEndpointInfo (Prelude.Maybe Prelude.Int)
realtimeEndpointInfo_peakRequestsPerSecond :: Lens' RealtimeEndpointInfo (Maybe Int)
realtimeEndpointInfo_peakRequestsPerSecond = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RealtimeEndpointInfo' {Maybe Int
peakRequestsPerSecond :: Maybe Int
$sel:peakRequestsPerSecond:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Int
peakRequestsPerSecond} -> Maybe Int
peakRequestsPerSecond) (\s :: RealtimeEndpointInfo
s@RealtimeEndpointInfo' {} Maybe Int
a -> RealtimeEndpointInfo
s {$sel:peakRequestsPerSecond:RealtimeEndpointInfo' :: Maybe Int
peakRequestsPerSecond = Maybe Int
a} :: RealtimeEndpointInfo)
instance Data.FromJSON RealtimeEndpointInfo where
parseJSON :: Value -> Parser RealtimeEndpointInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RealtimeEndpointInfo"
( \Object
x ->
Maybe POSIX
-> Maybe RealtimeEndpointStatus
-> Maybe Text
-> Maybe Int
-> RealtimeEndpointInfo
RealtimeEndpointInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndpointStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndpointUrl")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PeakRequestsPerSecond")
)
instance Prelude.Hashable RealtimeEndpointInfo where
hashWithSalt :: Int -> RealtimeEndpointInfo -> Int
hashWithSalt Int
_salt RealtimeEndpointInfo' {Maybe Int
Maybe Text
Maybe POSIX
Maybe RealtimeEndpointStatus
peakRequestsPerSecond :: Maybe Int
endpointUrl :: Maybe Text
endpointStatus :: Maybe RealtimeEndpointStatus
createdAt :: Maybe POSIX
$sel:peakRequestsPerSecond:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Int
$sel:endpointUrl:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Text
$sel:endpointStatus:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe RealtimeEndpointStatus
$sel:createdAt:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RealtimeEndpointStatus
endpointStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpointUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
peakRequestsPerSecond
instance Prelude.NFData RealtimeEndpointInfo where
rnf :: RealtimeEndpointInfo -> ()
rnf RealtimeEndpointInfo' {Maybe Int
Maybe Text
Maybe POSIX
Maybe RealtimeEndpointStatus
peakRequestsPerSecond :: Maybe Int
endpointUrl :: Maybe Text
endpointStatus :: Maybe RealtimeEndpointStatus
createdAt :: Maybe POSIX
$sel:peakRequestsPerSecond:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Int
$sel:endpointUrl:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe Text
$sel:endpointStatus:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe RealtimeEndpointStatus
$sel:createdAt:RealtimeEndpointInfo' :: RealtimeEndpointInfo -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RealtimeEndpointStatus
endpointStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpointUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
peakRequestsPerSecond