module Network.AWS.CodeCommit.Types.Sum where
import Network.AWS.Prelude
data OrderEnum
= Ascending
| Descending
deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
instance FromText OrderEnum where
parser = takeLowerText >>= \case
"ascending" -> pure Ascending
"descending" -> pure Descending
e -> fromTextError $ "Failure parsing OrderEnum from value: '" <> e
<> "'. Accepted values: ascending, descending"
instance ToText OrderEnum where
toText = \case
Ascending -> "ascending"
Descending -> "descending"
instance Hashable OrderEnum
instance ToByteString OrderEnum
instance ToQuery OrderEnum
instance ToHeader OrderEnum
instance ToJSON OrderEnum where
toJSON = toJSONText
data SortByEnum
= LastModifiedDate
| RepositoryName
deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
instance FromText SortByEnum where
parser = takeLowerText >>= \case
"lastmodifieddate" -> pure LastModifiedDate
"repositoryname" -> pure RepositoryName
e -> fromTextError $ "Failure parsing SortByEnum from value: '" <> e
<> "'. Accepted values: lastModifiedDate, repositoryName"
instance ToText SortByEnum where
toText = \case
LastModifiedDate -> "lastModifiedDate"
RepositoryName -> "repositoryName"
instance Hashable SortByEnum
instance ToByteString SortByEnum
instance ToQuery SortByEnum
instance ToHeader SortByEnum
instance ToJSON SortByEnum where
toJSON = toJSONText