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

-- |
-- Module      :  Data.BAM.Version1_6.BAM.Header.CO
-- Copyright   :  (c) Matthew Mosior 2024
-- License     :  BSD-style
-- Maintainer  :  mattm.github@gmail.com
-- Portability :  portable
--
-- = Description
--
-- This library enables the decoding/encoding of SAM, BAM and CRAM file formats.

module Data.BAM.Version1_6.BAM.Header.CO ( -- * BAM version 1.6 One-line text comment data type
                                           BAM_V1_6_One_Line_Comment(..)
                                         ) where

import Data.ByteString
import Data.Data
import Generics.Deriving.Base

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

instance Eq BAM_V1_6_One_Line_Comment where
  BAM_V1_6_One_Line_Comment ByteString
bam_v1_6_one_line_comment_value1 == :: BAM_V1_6_One_Line_Comment -> BAM_V1_6_One_Line_Comment -> Bool
==
    BAM_V1_6_One_Line_Comment ByteString
bam_v1_6_one_line_comment_value2 =
      ByteString
bam_v1_6_one_line_comment_value1 ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
== ByteString
bam_v1_6_one_line_comment_value2

instance Show BAM_V1_6_One_Line_Comment where
  show :: BAM_V1_6_One_Line_Comment -> String
show (BAM_V1_6_One_Line_Comment ByteString
value) = String
"BAM_V1_6_One_Line_Comment { "       String -> ShowS
forall a. [a] -> [a] -> [a]
++
                                           String
"bam_v1_6_one_line_comment_value = " String -> ShowS
forall a. [a] -> [a] -> [a]
++
                                           (ByteString -> String
forall a. Show a => a -> String
show ByteString
value)                         String -> ShowS
forall a. [a] -> [a] -> [a]
++
                                           String
" }"