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