{-# LANGUAGE DeriveDataTypeable    #-}
{-# LANGUAGE DeriveGeneric         #-}
{-# LANGUAGE FlexibleContexts      #-}
{-# LANGUAGE FlexibleInstances     #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings     #-}
{-# LANGUAGE TypeFamilies          #-}

-- |
-- Module      :  Data.SAM.Version1_6.Alignment.IOPT
-- Copyright   :  (c) Matthew Mosior 2023
-- License     :  BSD-style
-- Maintainer  :  mattm.github@gmail.com
-- Portability :  portable
--
-- = WARNING
--
-- This module is considered __internal__.
--
-- The Package Versioning Policy __does not apply__.
--
-- The contents of this module may change __in any way whatsoever__
-- and __without any warning__ between minor versions of this package.
--
-- Authors importing this library are expected to track development
-- closely.
--
-- All credit goes to the author(s)/maintainer(s) of the
-- [containers](https://hackage.haskell.org/package/containers) library
-- for the above warning text.
--
-- = Description
--
-- This library enables the decoding/encoding of SAM, BAM and CRAM file formats.

module Data.SAM.Version1_6.Alignment.IOPT ( -- * SAM version 1.6 alignment optional fields data type
                                            SAM_V1_6_Alignment_IOPT(..)
                                          ) where

import Data.ByteString (ByteString)
import Data.Data
import Generics.Deriving.Base


-- | Custom SAM (version 1.6) @"SAM_V1_6_Alignment_IOPT"@ data type.
--
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_IOPT = SAM_V1_6_Alignment_IOPT { SAM_V1_6_Alignment_IOPT -> ByteString
sam_v1_6_alignment_iopt_tag   :: ByteString 
                                                       , SAM_V1_6_Alignment_IOPT -> Integer
sam_v1_6_alignment_iopt_value :: Integer
                                                       }
  deriving ((forall x.
 SAM_V1_6_Alignment_IOPT -> Rep SAM_V1_6_Alignment_IOPT x)
-> (forall x.
    Rep SAM_V1_6_Alignment_IOPT x -> SAM_V1_6_Alignment_IOPT)
-> Generic SAM_V1_6_Alignment_IOPT
forall x. Rep SAM_V1_6_Alignment_IOPT x -> SAM_V1_6_Alignment_IOPT
forall x. SAM_V1_6_Alignment_IOPT -> Rep SAM_V1_6_Alignment_IOPT x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SAM_V1_6_Alignment_IOPT -> Rep SAM_V1_6_Alignment_IOPT x
from :: forall x. SAM_V1_6_Alignment_IOPT -> Rep SAM_V1_6_Alignment_IOPT x
$cto :: forall x. Rep SAM_V1_6_Alignment_IOPT x -> SAM_V1_6_Alignment_IOPT
to :: forall x. Rep SAM_V1_6_Alignment_IOPT x -> SAM_V1_6_Alignment_IOPT
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_IOPT where
  SAM_V1_6_Alignment_IOPT ByteString
sam_v1_6_alignment_iopt_tag1
                          Integer
sam_v1_6_alignment_iopt_value1 == :: SAM_V1_6_Alignment_IOPT -> SAM_V1_6_Alignment_IOPT -> Bool
== SAM_V1_6_Alignment_IOPT ByteString
sam_v1_6_alignment_iopt_tag2
                                                                                    Integer
sam_v1_6_alignment_iopt_value2 = ByteString
sam_v1_6_alignment_iopt_tag1   ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
== ByteString
sam_v1_6_alignment_iopt_tag2     Bool -> Bool -> Bool
&&
                                                                                                                     Integer
sam_v1_6_alignment_iopt_value1  Integer -> Integer -> Bool
forall a. Eq a => a -> a -> Bool
== Integer
sam_v1_6_alignment_iopt_value2

instance Show SAM_V1_6_Alignment_IOPT where
  show :: SAM_V1_6_Alignment_IOPT -> String
show (SAM_V1_6_Alignment_IOPT ByteString
tag
                                Integer
value
       ) =
    String
"SAM_V1_6_Alignment_IOPT { "          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"sam_v1_6_alignment_iopt_tag = "      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (ByteString -> String
forall a. Show a => a -> String
show ByteString
tag)                            String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_iopt_value = " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Integer -> String
forall a. Show a => a -> String
show Integer
value)                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"