{-# 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.Glue.Types.GetConnectionsFilter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.ConnectionType
import qualified Amazonka.Prelude as Prelude
data GetConnectionsFilter = GetConnectionsFilter'
{
GetConnectionsFilter -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
GetConnectionsFilter -> Maybe [Text]
matchCriteria :: Prelude.Maybe [Prelude.Text]
}
deriving (GetConnectionsFilter -> GetConnectionsFilter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConnectionsFilter -> GetConnectionsFilter -> Bool
$c/= :: GetConnectionsFilter -> GetConnectionsFilter -> Bool
== :: GetConnectionsFilter -> GetConnectionsFilter -> Bool
$c== :: GetConnectionsFilter -> GetConnectionsFilter -> Bool
Prelude.Eq, ReadPrec [GetConnectionsFilter]
ReadPrec GetConnectionsFilter
Int -> ReadS GetConnectionsFilter
ReadS [GetConnectionsFilter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConnectionsFilter]
$creadListPrec :: ReadPrec [GetConnectionsFilter]
readPrec :: ReadPrec GetConnectionsFilter
$creadPrec :: ReadPrec GetConnectionsFilter
readList :: ReadS [GetConnectionsFilter]
$creadList :: ReadS [GetConnectionsFilter]
readsPrec :: Int -> ReadS GetConnectionsFilter
$creadsPrec :: Int -> ReadS GetConnectionsFilter
Prelude.Read, Int -> GetConnectionsFilter -> ShowS
[GetConnectionsFilter] -> ShowS
GetConnectionsFilter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConnectionsFilter] -> ShowS
$cshowList :: [GetConnectionsFilter] -> ShowS
show :: GetConnectionsFilter -> String
$cshow :: GetConnectionsFilter -> String
showsPrec :: Int -> GetConnectionsFilter -> ShowS
$cshowsPrec :: Int -> GetConnectionsFilter -> ShowS
Prelude.Show, forall x. Rep GetConnectionsFilter x -> GetConnectionsFilter
forall x. GetConnectionsFilter -> Rep GetConnectionsFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetConnectionsFilter x -> GetConnectionsFilter
$cfrom :: forall x. GetConnectionsFilter -> Rep GetConnectionsFilter x
Prelude.Generic)
newGetConnectionsFilter ::
GetConnectionsFilter
newGetConnectionsFilter :: GetConnectionsFilter
newGetConnectionsFilter =
GetConnectionsFilter'
{ $sel:connectionType:GetConnectionsFilter' :: Maybe ConnectionType
connectionType =
forall a. Maybe a
Prelude.Nothing,
$sel:matchCriteria:GetConnectionsFilter' :: Maybe [Text]
matchCriteria = forall a. Maybe a
Prelude.Nothing
}
getConnectionsFilter_connectionType :: Lens.Lens' GetConnectionsFilter (Prelude.Maybe ConnectionType)
getConnectionsFilter_connectionType :: Lens' GetConnectionsFilter (Maybe ConnectionType)
getConnectionsFilter_connectionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectionsFilter' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: GetConnectionsFilter
s@GetConnectionsFilter' {} Maybe ConnectionType
a -> GetConnectionsFilter
s {$sel:connectionType:GetConnectionsFilter' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: GetConnectionsFilter)
getConnectionsFilter_matchCriteria :: Lens.Lens' GetConnectionsFilter (Prelude.Maybe [Prelude.Text])
getConnectionsFilter_matchCriteria :: Lens' GetConnectionsFilter (Maybe [Text])
getConnectionsFilter_matchCriteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConnectionsFilter' {Maybe [Text]
matchCriteria :: Maybe [Text]
$sel:matchCriteria:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe [Text]
matchCriteria} -> Maybe [Text]
matchCriteria) (\s :: GetConnectionsFilter
s@GetConnectionsFilter' {} Maybe [Text]
a -> GetConnectionsFilter
s {$sel:matchCriteria:GetConnectionsFilter' :: Maybe [Text]
matchCriteria = Maybe [Text]
a} :: GetConnectionsFilter) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable GetConnectionsFilter where
hashWithSalt :: Int -> GetConnectionsFilter -> Int
hashWithSalt Int
_salt GetConnectionsFilter' {Maybe [Text]
Maybe ConnectionType
matchCriteria :: Maybe [Text]
connectionType :: Maybe ConnectionType
$sel:matchCriteria:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe [Text]
$sel:connectionType:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe ConnectionType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectionType
connectionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
matchCriteria
instance Prelude.NFData GetConnectionsFilter where
rnf :: GetConnectionsFilter -> ()
rnf GetConnectionsFilter' {Maybe [Text]
Maybe ConnectionType
matchCriteria :: Maybe [Text]
connectionType :: Maybe ConnectionType
$sel:matchCriteria:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe [Text]
$sel:connectionType:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe ConnectionType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionType
connectionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
matchCriteria
instance Data.ToJSON GetConnectionsFilter where
toJSON :: GetConnectionsFilter -> Value
toJSON GetConnectionsFilter' {Maybe [Text]
Maybe ConnectionType
matchCriteria :: Maybe [Text]
connectionType :: Maybe ConnectionType
$sel:matchCriteria:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe [Text]
$sel:connectionType:GetConnectionsFilter' :: GetConnectionsFilter -> Maybe ConnectionType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ConnectionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionType
connectionType,
(Key
"MatchCriteria" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
matchCriteria
]
)