{-# 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.Omics.Types.VcfOptions 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
data VcfOptions = VcfOptions'
{
VcfOptions -> Maybe Bool
ignoreFilterField :: Prelude.Maybe Prelude.Bool,
VcfOptions -> Maybe Bool
ignoreQualField :: Prelude.Maybe Prelude.Bool
}
deriving (VcfOptions -> VcfOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VcfOptions -> VcfOptions -> Bool
$c/= :: VcfOptions -> VcfOptions -> Bool
== :: VcfOptions -> VcfOptions -> Bool
$c== :: VcfOptions -> VcfOptions -> Bool
Prelude.Eq, ReadPrec [VcfOptions]
ReadPrec VcfOptions
Int -> ReadS VcfOptions
ReadS [VcfOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VcfOptions]
$creadListPrec :: ReadPrec [VcfOptions]
readPrec :: ReadPrec VcfOptions
$creadPrec :: ReadPrec VcfOptions
readList :: ReadS [VcfOptions]
$creadList :: ReadS [VcfOptions]
readsPrec :: Int -> ReadS VcfOptions
$creadsPrec :: Int -> ReadS VcfOptions
Prelude.Read, Int -> VcfOptions -> ShowS
[VcfOptions] -> ShowS
VcfOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VcfOptions] -> ShowS
$cshowList :: [VcfOptions] -> ShowS
show :: VcfOptions -> String
$cshow :: VcfOptions -> String
showsPrec :: Int -> VcfOptions -> ShowS
$cshowsPrec :: Int -> VcfOptions -> ShowS
Prelude.Show, forall x. Rep VcfOptions x -> VcfOptions
forall x. VcfOptions -> Rep VcfOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VcfOptions x -> VcfOptions
$cfrom :: forall x. VcfOptions -> Rep VcfOptions x
Prelude.Generic)
newVcfOptions ::
VcfOptions
newVcfOptions :: VcfOptions
newVcfOptions =
VcfOptions'
{ $sel:ignoreFilterField:VcfOptions' :: Maybe Bool
ignoreFilterField = forall a. Maybe a
Prelude.Nothing,
$sel:ignoreQualField:VcfOptions' :: Maybe Bool
ignoreQualField = forall a. Maybe a
Prelude.Nothing
}
vcfOptions_ignoreFilterField :: Lens.Lens' VcfOptions (Prelude.Maybe Prelude.Bool)
vcfOptions_ignoreFilterField :: Lens' VcfOptions (Maybe Bool)
vcfOptions_ignoreFilterField = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcfOptions' {Maybe Bool
ignoreFilterField :: Maybe Bool
$sel:ignoreFilterField:VcfOptions' :: VcfOptions -> Maybe Bool
ignoreFilterField} -> Maybe Bool
ignoreFilterField) (\s :: VcfOptions
s@VcfOptions' {} Maybe Bool
a -> VcfOptions
s {$sel:ignoreFilterField:VcfOptions' :: Maybe Bool
ignoreFilterField = Maybe Bool
a} :: VcfOptions)
vcfOptions_ignoreQualField :: Lens.Lens' VcfOptions (Prelude.Maybe Prelude.Bool)
vcfOptions_ignoreQualField :: Lens' VcfOptions (Maybe Bool)
vcfOptions_ignoreQualField = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcfOptions' {Maybe Bool
ignoreQualField :: Maybe Bool
$sel:ignoreQualField:VcfOptions' :: VcfOptions -> Maybe Bool
ignoreQualField} -> Maybe Bool
ignoreQualField) (\s :: VcfOptions
s@VcfOptions' {} Maybe Bool
a -> VcfOptions
s {$sel:ignoreQualField:VcfOptions' :: Maybe Bool
ignoreQualField = Maybe Bool
a} :: VcfOptions)
instance Data.FromJSON VcfOptions where
parseJSON :: Value -> Parser VcfOptions
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VcfOptions"
( \Object
x ->
Maybe Bool -> Maybe Bool -> VcfOptions
VcfOptions'
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
"ignoreFilterField")
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
"ignoreQualField")
)
instance Prelude.Hashable VcfOptions where
hashWithSalt :: Int -> VcfOptions -> Int
hashWithSalt Int
_salt VcfOptions' {Maybe Bool
ignoreQualField :: Maybe Bool
ignoreFilterField :: Maybe Bool
$sel:ignoreQualField:VcfOptions' :: VcfOptions -> Maybe Bool
$sel:ignoreFilterField:VcfOptions' :: VcfOptions -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ignoreFilterField
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ignoreQualField
instance Prelude.NFData VcfOptions where
rnf :: VcfOptions -> ()
rnf VcfOptions' {Maybe Bool
ignoreQualField :: Maybe Bool
ignoreFilterField :: Maybe Bool
$sel:ignoreQualField:VcfOptions' :: VcfOptions -> Maybe Bool
$sel:ignoreFilterField:VcfOptions' :: VcfOptions -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ignoreFilterField
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ignoreQualField
instance Data.ToJSON VcfOptions where
toJSON :: VcfOptions -> Value
toJSON VcfOptions' {Maybe Bool
ignoreQualField :: Maybe Bool
ignoreFilterField :: Maybe Bool
$sel:ignoreQualField:VcfOptions' :: VcfOptions -> Maybe Bool
$sel:ignoreFilterField:VcfOptions' :: VcfOptions -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ignoreFilterField" 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 Bool
ignoreFilterField,
(Key
"ignoreQualField" 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 Bool
ignoreQualField
]
)