{-# 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.SageMaker.Types.MonitoringConstraintsResource where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MonitoringConstraintsResource = MonitoringConstraintsResource'
{
MonitoringConstraintsResource -> Maybe Text
s3Uri :: Prelude.Maybe Prelude.Text
}
deriving (MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool
(MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool)
-> (MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool)
-> Eq MonitoringConstraintsResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool
$c/= :: MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool
== :: MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool
$c== :: MonitoringConstraintsResource
-> MonitoringConstraintsResource -> Bool
Prelude.Eq, ReadPrec [MonitoringConstraintsResource]
ReadPrec MonitoringConstraintsResource
Int -> ReadS MonitoringConstraintsResource
ReadS [MonitoringConstraintsResource]
(Int -> ReadS MonitoringConstraintsResource)
-> ReadS [MonitoringConstraintsResource]
-> ReadPrec MonitoringConstraintsResource
-> ReadPrec [MonitoringConstraintsResource]
-> Read MonitoringConstraintsResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringConstraintsResource]
$creadListPrec :: ReadPrec [MonitoringConstraintsResource]
readPrec :: ReadPrec MonitoringConstraintsResource
$creadPrec :: ReadPrec MonitoringConstraintsResource
readList :: ReadS [MonitoringConstraintsResource]
$creadList :: ReadS [MonitoringConstraintsResource]
readsPrec :: Int -> ReadS MonitoringConstraintsResource
$creadsPrec :: Int -> ReadS MonitoringConstraintsResource
Prelude.Read, Int -> MonitoringConstraintsResource -> ShowS
[MonitoringConstraintsResource] -> ShowS
MonitoringConstraintsResource -> String
(Int -> MonitoringConstraintsResource -> ShowS)
-> (MonitoringConstraintsResource -> String)
-> ([MonitoringConstraintsResource] -> ShowS)
-> Show MonitoringConstraintsResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringConstraintsResource] -> ShowS
$cshowList :: [MonitoringConstraintsResource] -> ShowS
show :: MonitoringConstraintsResource -> String
$cshow :: MonitoringConstraintsResource -> String
showsPrec :: Int -> MonitoringConstraintsResource -> ShowS
$cshowsPrec :: Int -> MonitoringConstraintsResource -> ShowS
Prelude.Show, (forall x.
MonitoringConstraintsResource
-> Rep MonitoringConstraintsResource x)
-> (forall x.
Rep MonitoringConstraintsResource x
-> MonitoringConstraintsResource)
-> Generic MonitoringConstraintsResource
forall x.
Rep MonitoringConstraintsResource x
-> MonitoringConstraintsResource
forall x.
MonitoringConstraintsResource
-> Rep MonitoringConstraintsResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MonitoringConstraintsResource x
-> MonitoringConstraintsResource
$cfrom :: forall x.
MonitoringConstraintsResource
-> Rep MonitoringConstraintsResource x
Prelude.Generic)
newMonitoringConstraintsResource ::
MonitoringConstraintsResource
newMonitoringConstraintsResource :: MonitoringConstraintsResource
newMonitoringConstraintsResource =
MonitoringConstraintsResource' :: Maybe Text -> MonitoringConstraintsResource
MonitoringConstraintsResource'
{ $sel:s3Uri:MonitoringConstraintsResource' :: Maybe Text
s3Uri =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
monitoringConstraintsResource_s3Uri :: Lens.Lens' MonitoringConstraintsResource (Prelude.Maybe Prelude.Text)
monitoringConstraintsResource_s3Uri :: (Maybe Text -> f (Maybe Text))
-> MonitoringConstraintsResource -> f MonitoringConstraintsResource
monitoringConstraintsResource_s3Uri = (MonitoringConstraintsResource -> Maybe Text)
-> (MonitoringConstraintsResource
-> Maybe Text -> MonitoringConstraintsResource)
-> Lens
MonitoringConstraintsResource
MonitoringConstraintsResource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConstraintsResource' {Maybe Text
s3Uri :: Maybe Text
$sel:s3Uri:MonitoringConstraintsResource' :: MonitoringConstraintsResource -> Maybe Text
s3Uri} -> Maybe Text
s3Uri) (\s :: MonitoringConstraintsResource
s@MonitoringConstraintsResource' {} Maybe Text
a -> MonitoringConstraintsResource
s {$sel:s3Uri:MonitoringConstraintsResource' :: Maybe Text
s3Uri = Maybe Text
a} :: MonitoringConstraintsResource)
instance Core.FromJSON MonitoringConstraintsResource where
parseJSON :: Value -> Parser MonitoringConstraintsResource
parseJSON =
String
-> (Object -> Parser MonitoringConstraintsResource)
-> Value
-> Parser MonitoringConstraintsResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MonitoringConstraintsResource"
( \Object
x ->
Maybe Text -> MonitoringConstraintsResource
MonitoringConstraintsResource'
(Maybe Text -> MonitoringConstraintsResource)
-> Parser (Maybe Text) -> Parser MonitoringConstraintsResource
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
"S3Uri")
)
instance
Prelude.Hashable
MonitoringConstraintsResource
instance Prelude.NFData MonitoringConstraintsResource
instance Core.ToJSON MonitoringConstraintsResource where
toJSON :: MonitoringConstraintsResource -> Value
toJSON MonitoringConstraintsResource' {Maybe Text
s3Uri :: Maybe Text
$sel:s3Uri:MonitoringConstraintsResource' :: MonitoringConstraintsResource -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"S3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Uri]
)