module Network.Google.ResourceViews.Types.Sum where
import Network.Google.Prelude
data ZoneViewsListResourcesFormat
= None
| URL
| URLPort
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ZoneViewsListResourcesFormat
instance FromHttpApiData ZoneViewsListResourcesFormat where
parseQueryParam = \case
"NONE" -> Right None
"URL" -> Right URL
"URL_PORT" -> Right URLPort
x -> Left ("Unable to parse ZoneViewsListResourcesFormat from: " <> x)
instance ToHttpApiData ZoneViewsListResourcesFormat where
toQueryParam = \case
None -> "NONE"
URL -> "URL"
URLPort -> "URL_PORT"
instance FromJSON ZoneViewsListResourcesFormat where
parseJSON = parseJSONText "ZoneViewsListResourcesFormat"
instance ToJSON ZoneViewsListResourcesFormat where
toJSON = toJSONText
data ZoneViewsListResourcesListState
= All
| Running
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ZoneViewsListResourcesListState
instance FromHttpApiData ZoneViewsListResourcesListState where
parseQueryParam = \case
"ALL" -> Right All
"RUNNING" -> Right Running
x -> Left ("Unable to parse ZoneViewsListResourcesListState from: " <> x)
instance ToHttpApiData ZoneViewsListResourcesListState where
toQueryParam = \case
All -> "ALL"
Running -> "RUNNING"
instance FromJSON ZoneViewsListResourcesListState where
parseJSON = parseJSONText "ZoneViewsListResourcesListState"
instance ToJSON ZoneViewsListResourcesListState where
toJSON = toJSONText