{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.FusionTables.Types.Product where
import Network.Google.FusionTables.Types.Sum
import Network.Google.Prelude
data ColumnList = ColumnList'
{ _clTotalItems :: !(Maybe (Textual Int32))
, _clNextPageToken :: !(Maybe Text)
, _clKind :: !Text
, _clItems :: !(Maybe [Column])
} deriving (Eq,Show,Data,Typeable,Generic)
columnList
:: ColumnList
columnList =
ColumnList'
{ _clTotalItems = Nothing
, _clNextPageToken = Nothing
, _clKind = "fusiontables#columnList"
, _clItems = Nothing
}
clTotalItems :: Lens' ColumnList (Maybe Int32)
clTotalItems
= lens _clTotalItems (\ s a -> s{_clTotalItems = a})
. mapping _Coerce
clNextPageToken :: Lens' ColumnList (Maybe Text)
clNextPageToken
= lens _clNextPageToken
(\ s a -> s{_clNextPageToken = a})
clKind :: Lens' ColumnList Text
clKind = lens _clKind (\ s a -> s{_clKind = a})
clItems :: Lens' ColumnList [Column]
clItems
= lens _clItems (\ s a -> s{_clItems = a}) . _Default
. _Coerce
instance FromJSON ColumnList where
parseJSON
= withObject "ColumnList"
(\ o ->
ColumnList' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "fusiontables#columnList")
<*> (o .:? "items" .!= mempty))
instance ToJSON ColumnList where
toJSON ColumnList'{..}
= object
(catMaybes
[("totalItems" .=) <$> _clTotalItems,
("nextPageToken" .=) <$> _clNextPageToken,
Just ("kind" .= _clKind), ("items" .=) <$> _clItems])
data TableList = TableList'
{ _tlNextPageToken :: !(Maybe Text)
, _tlKind :: !Text
, _tlItems :: !(Maybe [Table])
} deriving (Eq,Show,Data,Typeable,Generic)
tableList
:: TableList
tableList =
TableList'
{ _tlNextPageToken = Nothing
, _tlKind = "fusiontables#tableList"
, _tlItems = Nothing
}
tlNextPageToken :: Lens' TableList (Maybe Text)
tlNextPageToken
= lens _tlNextPageToken
(\ s a -> s{_tlNextPageToken = a})
tlKind :: Lens' TableList Text
tlKind = lens _tlKind (\ s a -> s{_tlKind = a})
tlItems :: Lens' TableList [Table]
tlItems
= lens _tlItems (\ s a -> s{_tlItems = a}) . _Default
. _Coerce
instance FromJSON TableList where
parseJSON
= withObject "TableList"
(\ o ->
TableList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "fusiontables#tableList")
<*> (o .:? "items" .!= mempty))
instance ToJSON TableList where
toJSON TableList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _tlNextPageToken,
Just ("kind" .= _tlKind), ("items" .=) <$> _tlItems])
data StyleFunction = StyleFunction'
{ _sfBuckets :: !(Maybe [Bucket])
, _sfKind :: !(Maybe Text)
, _sfGradient :: !(Maybe StyleFunctionGradient)
, _sfColumnName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
styleFunction
:: StyleFunction
styleFunction =
StyleFunction'
{ _sfBuckets = Nothing
, _sfKind = Nothing
, _sfGradient = Nothing
, _sfColumnName = Nothing
}
sfBuckets :: Lens' StyleFunction [Bucket]
sfBuckets
= lens _sfBuckets (\ s a -> s{_sfBuckets = a}) .
_Default
. _Coerce
sfKind :: Lens' StyleFunction (Maybe Text)
sfKind = lens _sfKind (\ s a -> s{_sfKind = a})
sfGradient :: Lens' StyleFunction (Maybe StyleFunctionGradient)
sfGradient
= lens _sfGradient (\ s a -> s{_sfGradient = a})
sfColumnName :: Lens' StyleFunction (Maybe Text)
sfColumnName
= lens _sfColumnName (\ s a -> s{_sfColumnName = a})
instance FromJSON StyleFunction where
parseJSON
= withObject "StyleFunction"
(\ o ->
StyleFunction' <$>
(o .:? "buckets" .!= mempty) <*> (o .:? "kind") <*>
(o .:? "gradient")
<*> (o .:? "columnName"))
instance ToJSON StyleFunction where
toJSON StyleFunction'{..}
= object
(catMaybes
[("buckets" .=) <$> _sfBuckets,
("kind" .=) <$> _sfKind,
("gradient" .=) <$> _sfGradient,
("columnName" .=) <$> _sfColumnName])
data ColumnBaseColumn = ColumnBaseColumn'
{ _cbcTableIndex :: !(Maybe (Textual Int32))
, _cbcColumnId :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
columnBaseColumn
:: ColumnBaseColumn
columnBaseColumn =
ColumnBaseColumn'
{ _cbcTableIndex = Nothing
, _cbcColumnId = Nothing
}
cbcTableIndex :: Lens' ColumnBaseColumn (Maybe Int32)
cbcTableIndex
= lens _cbcTableIndex
(\ s a -> s{_cbcTableIndex = a})
. mapping _Coerce
cbcColumnId :: Lens' ColumnBaseColumn (Maybe Int32)
cbcColumnId
= lens _cbcColumnId (\ s a -> s{_cbcColumnId = a}) .
mapping _Coerce
instance FromJSON ColumnBaseColumn where
parseJSON
= withObject "ColumnBaseColumn"
(\ o ->
ColumnBaseColumn' <$>
(o .:? "tableIndex") <*> (o .:? "columnId"))
instance ToJSON ColumnBaseColumn where
toJSON ColumnBaseColumn'{..}
= object
(catMaybes
[("tableIndex" .=) <$> _cbcTableIndex,
("columnId" .=) <$> _cbcColumnId])
data SQLresponse = SQLresponse'
{ _sqlKind :: !Text
, _sqlRows :: !(Maybe [[JSONValue]])
, _sqlColumns :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
sQLresponse
:: SQLresponse
sQLresponse =
SQLresponse'
{ _sqlKind = "fusiontables#sqlresponse"
, _sqlRows = Nothing
, _sqlColumns = Nothing
}
sqlKind :: Lens' SQLresponse Text
sqlKind = lens _sqlKind (\ s a -> s{_sqlKind = a})
sqlRows :: Lens' SQLresponse [[JSONValue]]
sqlRows
= lens _sqlRows (\ s a -> s{_sqlRows = a}) . _Default
. _Coerce
sqlColumns :: Lens' SQLresponse [Text]
sqlColumns
= lens _sqlColumns (\ s a -> s{_sqlColumns = a}) .
_Default
. _Coerce
instance FromJSON SQLresponse where
parseJSON
= withObject "SQLresponse"
(\ o ->
SQLresponse' <$>
(o .:? "kind" .!= "fusiontables#sqlresponse") <*>
(o .:? "rows" .!= mempty)
<*> (o .:? "columns" .!= mempty))
instance ToJSON SQLresponse where
toJSON SQLresponse'{..}
= object
(catMaybes
[Just ("kind" .= _sqlKind), ("rows" .=) <$> _sqlRows,
("columns" .=) <$> _sqlColumns])
data StyleFunctionGradientColorsItem = StyleFunctionGradientColorsItem'
{ _sfgciColor :: !(Maybe Text)
, _sfgciOpacity :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
styleFunctionGradientColorsItem
:: StyleFunctionGradientColorsItem
styleFunctionGradientColorsItem =
StyleFunctionGradientColorsItem'
{ _sfgciColor = Nothing
, _sfgciOpacity = Nothing
}
sfgciColor :: Lens' StyleFunctionGradientColorsItem (Maybe Text)
sfgciColor
= lens _sfgciColor (\ s a -> s{_sfgciColor = a})
sfgciOpacity :: Lens' StyleFunctionGradientColorsItem (Maybe Double)
sfgciOpacity
= lens _sfgciOpacity (\ s a -> s{_sfgciOpacity = a})
. mapping _Coerce
instance FromJSON StyleFunctionGradientColorsItem
where
parseJSON
= withObject "StyleFunctionGradientColorsItem"
(\ o ->
StyleFunctionGradientColorsItem' <$>
(o .:? "color") <*> (o .:? "opacity"))
instance ToJSON StyleFunctionGradientColorsItem where
toJSON StyleFunctionGradientColorsItem'{..}
= object
(catMaybes
[("color" .=) <$> _sfgciColor,
("opacity" .=) <$> _sfgciOpacity])
data StyleSettingList = StyleSettingList'
{ _sslTotalItems :: !(Maybe (Textual Int32))
, _sslNextPageToken :: !(Maybe Text)
, _sslKind :: !Text
, _sslItems :: !(Maybe [StyleSetting])
} deriving (Eq,Show,Data,Typeable,Generic)
styleSettingList
:: StyleSettingList
styleSettingList =
StyleSettingList'
{ _sslTotalItems = Nothing
, _sslNextPageToken = Nothing
, _sslKind = "fusiontables#styleSettingList"
, _sslItems = Nothing
}
sslTotalItems :: Lens' StyleSettingList (Maybe Int32)
sslTotalItems
= lens _sslTotalItems
(\ s a -> s{_sslTotalItems = a})
. mapping _Coerce
sslNextPageToken :: Lens' StyleSettingList (Maybe Text)
sslNextPageToken
= lens _sslNextPageToken
(\ s a -> s{_sslNextPageToken = a})
sslKind :: Lens' StyleSettingList Text
sslKind = lens _sslKind (\ s a -> s{_sslKind = a})
sslItems :: Lens' StyleSettingList [StyleSetting]
sslItems
= lens _sslItems (\ s a -> s{_sslItems = a}) .
_Default
. _Coerce
instance FromJSON StyleSettingList where
parseJSON
= withObject "StyleSettingList"
(\ o ->
StyleSettingList' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "fusiontables#styleSettingList")
<*> (o .:? "items" .!= mempty))
instance ToJSON StyleSettingList where
toJSON StyleSettingList'{..}
= object
(catMaybes
[("totalItems" .=) <$> _sslTotalItems,
("nextPageToken" .=) <$> _sslNextPageToken,
Just ("kind" .= _sslKind),
("items" .=) <$> _sslItems])
data Bucket = Bucket'
{ _bMax :: !(Maybe (Textual Double))
, _bColor :: !(Maybe Text)
, _bWeight :: !(Maybe (Textual Int32))
, _bIcon :: !(Maybe Text)
, _bOpacity :: !(Maybe (Textual Double))
, _bMin :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
bucket
:: Bucket
bucket =
Bucket'
{ _bMax = Nothing
, _bColor = Nothing
, _bWeight = Nothing
, _bIcon = Nothing
, _bOpacity = Nothing
, _bMin = Nothing
}
bMax :: Lens' Bucket (Maybe Double)
bMax
= lens _bMax (\ s a -> s{_bMax = a}) .
mapping _Coerce
bColor :: Lens' Bucket (Maybe Text)
bColor = lens _bColor (\ s a -> s{_bColor = a})
bWeight :: Lens' Bucket (Maybe Int32)
bWeight
= lens _bWeight (\ s a -> s{_bWeight = a}) .
mapping _Coerce
bIcon :: Lens' Bucket (Maybe Text)
bIcon = lens _bIcon (\ s a -> s{_bIcon = a})
bOpacity :: Lens' Bucket (Maybe Double)
bOpacity
= lens _bOpacity (\ s a -> s{_bOpacity = a}) .
mapping _Coerce
bMin :: Lens' Bucket (Maybe Double)
bMin
= lens _bMin (\ s a -> s{_bMin = a}) .
mapping _Coerce
instance FromJSON Bucket where
parseJSON
= withObject "Bucket"
(\ o ->
Bucket' <$>
(o .:? "max") <*> (o .:? "color") <*>
(o .:? "weight")
<*> (o .:? "icon")
<*> (o .:? "opacity")
<*> (o .:? "min"))
instance ToJSON Bucket where
toJSON Bucket'{..}
= object
(catMaybes
[("max" .=) <$> _bMax, ("color" .=) <$> _bColor,
("weight" .=) <$> _bWeight, ("icon" .=) <$> _bIcon,
("opacity" .=) <$> _bOpacity, ("min" .=) <$> _bMin])
data Line = Line'
{ _lCoordinates :: !(Maybe [[Textual Double]])
, _lType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
line
:: Line
line =
Line'
{ _lCoordinates = Nothing
, _lType = "LineString"
}
lCoordinates :: Lens' Line [[Double]]
lCoordinates
= lens _lCoordinates (\ s a -> s{_lCoordinates = a})
. _Default
. _Coerce
lType :: Lens' Line Text
lType = lens _lType (\ s a -> s{_lType = a})
instance FromJSON Line where
parseJSON
= withObject "Line"
(\ o ->
Line' <$>
(o .:? "coordinates" .!= mempty) <*>
(o .:? "type" .!= "LineString"))
instance ToJSON Line where
toJSON Line'{..}
= object
(catMaybes
[("coordinates" .=) <$> _lCoordinates,
Just ("type" .= _lType)])
data StyleSetting = StyleSetting'
{ _ssPolylineOptions :: !(Maybe LineStyle)
, _ssPolygonOptions :: !(Maybe PolygonStyle)
, _ssMarkerOptions :: !(Maybe PointStyle)
, _ssKind :: !Text
, _ssName :: !(Maybe Text)
, _ssStyleId :: !(Maybe (Textual Int32))
, _ssTableId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
styleSetting
:: StyleSetting
styleSetting =
StyleSetting'
{ _ssPolylineOptions = Nothing
, _ssPolygonOptions = Nothing
, _ssMarkerOptions = Nothing
, _ssKind = "fusiontables#styleSetting"
, _ssName = Nothing
, _ssStyleId = Nothing
, _ssTableId = Nothing
}
ssPolylineOptions :: Lens' StyleSetting (Maybe LineStyle)
ssPolylineOptions
= lens _ssPolylineOptions
(\ s a -> s{_ssPolylineOptions = a})
ssPolygonOptions :: Lens' StyleSetting (Maybe PolygonStyle)
ssPolygonOptions
= lens _ssPolygonOptions
(\ s a -> s{_ssPolygonOptions = a})
ssMarkerOptions :: Lens' StyleSetting (Maybe PointStyle)
ssMarkerOptions
= lens _ssMarkerOptions
(\ s a -> s{_ssMarkerOptions = a})
ssKind :: Lens' StyleSetting Text
ssKind = lens _ssKind (\ s a -> s{_ssKind = a})
ssName :: Lens' StyleSetting (Maybe Text)
ssName = lens _ssName (\ s a -> s{_ssName = a})
ssStyleId :: Lens' StyleSetting (Maybe Int32)
ssStyleId
= lens _ssStyleId (\ s a -> s{_ssStyleId = a}) .
mapping _Coerce
ssTableId :: Lens' StyleSetting (Maybe Text)
ssTableId
= lens _ssTableId (\ s a -> s{_ssTableId = a})
instance FromJSON StyleSetting where
parseJSON
= withObject "StyleSetting"
(\ o ->
StyleSetting' <$>
(o .:? "polylineOptions") <*>
(o .:? "polygonOptions")
<*> (o .:? "markerOptions")
<*> (o .:? "kind" .!= "fusiontables#styleSetting")
<*> (o .:? "name")
<*> (o .:? "styleId")
<*> (o .:? "tableId"))
instance ToJSON StyleSetting where
toJSON StyleSetting'{..}
= object
(catMaybes
[("polylineOptions" .=) <$> _ssPolylineOptions,
("polygonOptions" .=) <$> _ssPolygonOptions,
("markerOptions" .=) <$> _ssMarkerOptions,
Just ("kind" .= _ssKind), ("name" .=) <$> _ssName,
("styleId" .=) <$> _ssStyleId,
("tableId" .=) <$> _ssTableId])
data Point = Point'
{ _pCoordinates :: !(Maybe [Textual Double])
, _pType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
point
:: Point
point =
Point'
{ _pCoordinates = Nothing
, _pType = "Point"
}
pCoordinates :: Lens' Point [Double]
pCoordinates
= lens _pCoordinates (\ s a -> s{_pCoordinates = a})
. _Default
. _Coerce
pType :: Lens' Point Text
pType = lens _pType (\ s a -> s{_pType = a})
instance FromJSON Point where
parseJSON
= withObject "Point"
(\ o ->
Point' <$>
(o .:? "coordinates" .!= mempty) <*>
(o .:? "type" .!= "Point"))
instance ToJSON Point where
toJSON Point'{..}
= object
(catMaybes
[("coordinates" .=) <$> _pCoordinates,
Just ("type" .= _pType)])
data Polygon = Polygon'
{ _polCoordinates :: !(Maybe [[[Textual Double]]])
, _polType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
polygon
:: Polygon
polygon =
Polygon'
{ _polCoordinates = Nothing
, _polType = "Polygon"
}
polCoordinates :: Lens' Polygon [[[Double]]]
polCoordinates
= lens _polCoordinates
(\ s a -> s{_polCoordinates = a})
. _Default
. _Coerce
polType :: Lens' Polygon Text
polType = lens _polType (\ s a -> s{_polType = a})
instance FromJSON Polygon where
parseJSON
= withObject "Polygon"
(\ o ->
Polygon' <$>
(o .:? "coordinates" .!= mempty) <*>
(o .:? "type" .!= "Polygon"))
instance ToJSON Polygon where
toJSON Polygon'{..}
= object
(catMaybes
[("coordinates" .=) <$> _polCoordinates,
Just ("type" .= _polType)])
data TaskList = TaskList'
{ _tTotalItems :: !(Maybe (Textual Int32))
, _tNextPageToken :: !(Maybe Text)
, _tKind :: !Text
, _tItems :: !(Maybe [Task])
} deriving (Eq,Show,Data,Typeable,Generic)
taskList
:: TaskList
taskList =
TaskList'
{ _tTotalItems = Nothing
, _tNextPageToken = Nothing
, _tKind = "fusiontables#taskList"
, _tItems = Nothing
}
tTotalItems :: Lens' TaskList (Maybe Int32)
tTotalItems
= lens _tTotalItems (\ s a -> s{_tTotalItems = a}) .
mapping _Coerce
tNextPageToken :: Lens' TaskList (Maybe Text)
tNextPageToken
= lens _tNextPageToken
(\ s a -> s{_tNextPageToken = a})
tKind :: Lens' TaskList Text
tKind = lens _tKind (\ s a -> s{_tKind = a})
tItems :: Lens' TaskList [Task]
tItems
= lens _tItems (\ s a -> s{_tItems = a}) . _Default .
_Coerce
instance FromJSON TaskList where
parseJSON
= withObject "TaskList"
(\ o ->
TaskList' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "fusiontables#taskList")
<*> (o .:? "items" .!= mempty))
instance ToJSON TaskList where
toJSON TaskList'{..}
= object
(catMaybes
[("totalItems" .=) <$> _tTotalItems,
("nextPageToken" .=) <$> _tNextPageToken,
Just ("kind" .= _tKind), ("items" .=) <$> _tItems])
data Geometry = Geometry'
{ _gGeometries :: !(Maybe [JSONValue])
, _gGeometry :: !(Maybe JSONValue)
, _gType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
geometry
:: Geometry
geometry =
Geometry'
{ _gGeometries = Nothing
, _gGeometry = Nothing
, _gType = "GeometryCollection"
}
gGeometries :: Lens' Geometry [JSONValue]
gGeometries
= lens _gGeometries (\ s a -> s{_gGeometries = a}) .
_Default
. _Coerce
gGeometry :: Lens' Geometry (Maybe JSONValue)
gGeometry
= lens _gGeometry (\ s a -> s{_gGeometry = a})
gType :: Lens' Geometry Text
gType = lens _gType (\ s a -> s{_gType = a})
instance FromJSON Geometry where
parseJSON
= withObject "Geometry"
(\ o ->
Geometry' <$>
(o .:? "geometries" .!= mempty) <*>
(o .:? "geometry")
<*> (o .:? "type" .!= "GeometryCollection"))
instance ToJSON Geometry where
toJSON Geometry'{..}
= object
(catMaybes
[("geometries" .=) <$> _gGeometries,
("geometry" .=) <$> _gGeometry,
Just ("type" .= _gType)])
data TemplateList = TemplateList'
{ _temTotalItems :: !(Maybe (Textual Int32))
, _temNextPageToken :: !(Maybe Text)
, _temKind :: !Text
, _temItems :: !(Maybe [Template])
} deriving (Eq,Show,Data,Typeable,Generic)
templateList
:: TemplateList
templateList =
TemplateList'
{ _temTotalItems = Nothing
, _temNextPageToken = Nothing
, _temKind = "fusiontables#templateList"
, _temItems = Nothing
}
temTotalItems :: Lens' TemplateList (Maybe Int32)
temTotalItems
= lens _temTotalItems
(\ s a -> s{_temTotalItems = a})
. mapping _Coerce
temNextPageToken :: Lens' TemplateList (Maybe Text)
temNextPageToken
= lens _temNextPageToken
(\ s a -> s{_temNextPageToken = a})
temKind :: Lens' TemplateList Text
temKind = lens _temKind (\ s a -> s{_temKind = a})
temItems :: Lens' TemplateList [Template]
temItems
= lens _temItems (\ s a -> s{_temItems = a}) .
_Default
. _Coerce
instance FromJSON TemplateList where
parseJSON
= withObject "TemplateList"
(\ o ->
TemplateList' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "fusiontables#templateList")
<*> (o .:? "items" .!= mempty))
instance ToJSON TemplateList where
toJSON TemplateList'{..}
= object
(catMaybes
[("totalItems" .=) <$> _temTotalItems,
("nextPageToken" .=) <$> _temNextPageToken,
Just ("kind" .= _temKind),
("items" .=) <$> _temItems])
data Import = Import'
{ _iKind :: !Text
, _iNumRowsReceived :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
import'
:: Import
import' =
Import'
{ _iKind = "fusiontables#import"
, _iNumRowsReceived = Nothing
}
iKind :: Lens' Import Text
iKind = lens _iKind (\ s a -> s{_iKind = a})
iNumRowsReceived :: Lens' Import (Maybe Int64)
iNumRowsReceived
= lens _iNumRowsReceived
(\ s a -> s{_iNumRowsReceived = a})
. mapping _Coerce
instance FromJSON Import where
parseJSON
= withObject "Import"
(\ o ->
Import' <$>
(o .:? "kind" .!= "fusiontables#import") <*>
(o .:? "numRowsReceived"))
instance ToJSON Import where
toJSON Import'{..}
= object
(catMaybes
[Just ("kind" .= _iKind),
("numRowsReceived" .=) <$> _iNumRowsReceived])
data Task = Task'
{ _tasProgress :: !(Maybe Text)
, _tasTaskId :: !(Maybe (Textual Int64))
, _tasKind :: !Text
, _tasType :: !(Maybe Text)
, _tasStarted :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
task
:: Task
task =
Task'
{ _tasProgress = Nothing
, _tasTaskId = Nothing
, _tasKind = "fusiontables#task"
, _tasType = Nothing
, _tasStarted = Nothing
}
tasProgress :: Lens' Task (Maybe Text)
tasProgress
= lens _tasProgress (\ s a -> s{_tasProgress = a})
tasTaskId :: Lens' Task (Maybe Int64)
tasTaskId
= lens _tasTaskId (\ s a -> s{_tasTaskId = a}) .
mapping _Coerce
tasKind :: Lens' Task Text
tasKind = lens _tasKind (\ s a -> s{_tasKind = a})
tasType :: Lens' Task (Maybe Text)
tasType = lens _tasType (\ s a -> s{_tasType = a})
tasStarted :: Lens' Task (Maybe Bool)
tasStarted
= lens _tasStarted (\ s a -> s{_tasStarted = a})
instance FromJSON Task where
parseJSON
= withObject "Task"
(\ o ->
Task' <$>
(o .:? "progress") <*> (o .:? "taskId") <*>
(o .:? "kind" .!= "fusiontables#task")
<*> (o .:? "type")
<*> (o .:? "started"))
instance ToJSON Task where
toJSON Task'{..}
= object
(catMaybes
[("progress" .=) <$> _tasProgress,
("taskId" .=) <$> _tasTaskId,
Just ("kind" .= _tasKind), ("type" .=) <$> _tasType,
("started" .=) <$> _tasStarted])
data Template = Template'
{ _ttAutomaticColumnNames :: !(Maybe [Text])
, _ttTemplateId :: !(Maybe (Textual Int32))
, _ttKind :: !Text
, _ttBody :: !(Maybe Text)
, _ttName :: !(Maybe Text)
, _ttTableId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
template
:: Template
template =
Template'
{ _ttAutomaticColumnNames = Nothing
, _ttTemplateId = Nothing
, _ttKind = "fusiontables#template"
, _ttBody = Nothing
, _ttName = Nothing
, _ttTableId = Nothing
}
ttAutomaticColumnNames :: Lens' Template [Text]
ttAutomaticColumnNames
= lens _ttAutomaticColumnNames
(\ s a -> s{_ttAutomaticColumnNames = a})
. _Default
. _Coerce
ttTemplateId :: Lens' Template (Maybe Int32)
ttTemplateId
= lens _ttTemplateId (\ s a -> s{_ttTemplateId = a})
. mapping _Coerce
ttKind :: Lens' Template Text
ttKind = lens _ttKind (\ s a -> s{_ttKind = a})
ttBody :: Lens' Template (Maybe Text)
ttBody = lens _ttBody (\ s a -> s{_ttBody = a})
ttName :: Lens' Template (Maybe Text)
ttName = lens _ttName (\ s a -> s{_ttName = a})
ttTableId :: Lens' Template (Maybe Text)
ttTableId
= lens _ttTableId (\ s a -> s{_ttTableId = a})
instance FromJSON Template where
parseJSON
= withObject "Template"
(\ o ->
Template' <$>
(o .:? "automaticColumnNames" .!= mempty) <*>
(o .:? "templateId")
<*> (o .:? "kind" .!= "fusiontables#template")
<*> (o .:? "body")
<*> (o .:? "name")
<*> (o .:? "tableId"))
instance ToJSON Template where
toJSON Template'{..}
= object
(catMaybes
[("automaticColumnNames" .=) <$>
_ttAutomaticColumnNames,
("templateId" .=) <$> _ttTemplateId,
Just ("kind" .= _ttKind), ("body" .=) <$> _ttBody,
("name" .=) <$> _ttName,
("tableId" .=) <$> _ttTableId])
data PointStyle = PointStyle'
{ _psIconName :: !(Maybe Text)
, _psIconStyler :: !(Maybe StyleFunction)
} deriving (Eq,Show,Data,Typeable,Generic)
pointStyle
:: PointStyle
pointStyle =
PointStyle'
{ _psIconName = Nothing
, _psIconStyler = Nothing
}
psIconName :: Lens' PointStyle (Maybe Text)
psIconName
= lens _psIconName (\ s a -> s{_psIconName = a})
psIconStyler :: Lens' PointStyle (Maybe StyleFunction)
psIconStyler
= lens _psIconStyler (\ s a -> s{_psIconStyler = a})
instance FromJSON PointStyle where
parseJSON
= withObject "PointStyle"
(\ o ->
PointStyle' <$>
(o .:? "iconName") <*> (o .:? "iconStyler"))
instance ToJSON PointStyle where
toJSON PointStyle'{..}
= object
(catMaybes
[("iconName" .=) <$> _psIconName,
("iconStyler" .=) <$> _psIconStyler])
data PolygonStyle = PolygonStyle'
{ _psFillColorStyler :: !(Maybe StyleFunction)
, _psFillColor :: !(Maybe Text)
, _psStrokeColorStyler :: !(Maybe StyleFunction)
, _psStrokeWeight :: !(Maybe (Textual Int32))
, _psStrokeOpacity :: !(Maybe (Textual Double))
, _psFillOpacity :: !(Maybe (Textual Double))
, _psStrokeWeightStyler :: !(Maybe StyleFunction)
, _psStrokeColor :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
polygonStyle
:: PolygonStyle
polygonStyle =
PolygonStyle'
{ _psFillColorStyler = Nothing
, _psFillColor = Nothing
, _psStrokeColorStyler = Nothing
, _psStrokeWeight = Nothing
, _psStrokeOpacity = Nothing
, _psFillOpacity = Nothing
, _psStrokeWeightStyler = Nothing
, _psStrokeColor = Nothing
}
psFillColorStyler :: Lens' PolygonStyle (Maybe StyleFunction)
psFillColorStyler
= lens _psFillColorStyler
(\ s a -> s{_psFillColorStyler = a})
psFillColor :: Lens' PolygonStyle (Maybe Text)
psFillColor
= lens _psFillColor (\ s a -> s{_psFillColor = a})
psStrokeColorStyler :: Lens' PolygonStyle (Maybe StyleFunction)
psStrokeColorStyler
= lens _psStrokeColorStyler
(\ s a -> s{_psStrokeColorStyler = a})
psStrokeWeight :: Lens' PolygonStyle (Maybe Int32)
psStrokeWeight
= lens _psStrokeWeight
(\ s a -> s{_psStrokeWeight = a})
. mapping _Coerce
psStrokeOpacity :: Lens' PolygonStyle (Maybe Double)
psStrokeOpacity
= lens _psStrokeOpacity
(\ s a -> s{_psStrokeOpacity = a})
. mapping _Coerce
psFillOpacity :: Lens' PolygonStyle (Maybe Double)
psFillOpacity
= lens _psFillOpacity
(\ s a -> s{_psFillOpacity = a})
. mapping _Coerce
psStrokeWeightStyler :: Lens' PolygonStyle (Maybe StyleFunction)
psStrokeWeightStyler
= lens _psStrokeWeightStyler
(\ s a -> s{_psStrokeWeightStyler = a})
psStrokeColor :: Lens' PolygonStyle (Maybe Text)
psStrokeColor
= lens _psStrokeColor
(\ s a -> s{_psStrokeColor = a})
instance FromJSON PolygonStyle where
parseJSON
= withObject "PolygonStyle"
(\ o ->
PolygonStyle' <$>
(o .:? "fillColorStyler") <*> (o .:? "fillColor") <*>
(o .:? "strokeColorStyler")
<*> (o .:? "strokeWeight")
<*> (o .:? "strokeOpacity")
<*> (o .:? "fillOpacity")
<*> (o .:? "strokeWeightStyler")
<*> (o .:? "strokeColor"))
instance ToJSON PolygonStyle where
toJSON PolygonStyle'{..}
= object
(catMaybes
[("fillColorStyler" .=) <$> _psFillColorStyler,
("fillColor" .=) <$> _psFillColor,
("strokeColorStyler" .=) <$> _psStrokeColorStyler,
("strokeWeight" .=) <$> _psStrokeWeight,
("strokeOpacity" .=) <$> _psStrokeOpacity,
("fillOpacity" .=) <$> _psFillOpacity,
("strokeWeightStyler" .=) <$> _psStrokeWeightStyler,
("strokeColor" .=) <$> _psStrokeColor])
data StyleFunctionGradient = StyleFunctionGradient'
{ _sfgMax :: !(Maybe (Textual Double))
, _sfgMin :: !(Maybe (Textual Double))
, _sfgColors :: !(Maybe [StyleFunctionGradientColorsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
styleFunctionGradient
:: StyleFunctionGradient
styleFunctionGradient =
StyleFunctionGradient'
{ _sfgMax = Nothing
, _sfgMin = Nothing
, _sfgColors = Nothing
}
sfgMax :: Lens' StyleFunctionGradient (Maybe Double)
sfgMax
= lens _sfgMax (\ s a -> s{_sfgMax = a}) .
mapping _Coerce
sfgMin :: Lens' StyleFunctionGradient (Maybe Double)
sfgMin
= lens _sfgMin (\ s a -> s{_sfgMin = a}) .
mapping _Coerce
sfgColors :: Lens' StyleFunctionGradient [StyleFunctionGradientColorsItem]
sfgColors
= lens _sfgColors (\ s a -> s{_sfgColors = a}) .
_Default
. _Coerce
instance FromJSON StyleFunctionGradient where
parseJSON
= withObject "StyleFunctionGradient"
(\ o ->
StyleFunctionGradient' <$>
(o .:? "max") <*> (o .:? "min") <*>
(o .:? "colors" .!= mempty))
instance ToJSON StyleFunctionGradient where
toJSON StyleFunctionGradient'{..}
= object
(catMaybes
[("max" .=) <$> _sfgMax, ("min" .=) <$> _sfgMin,
("colors" .=) <$> _sfgColors])
data Column = Column'
{ _cColumnJSONSchema :: !(Maybe Text)
, _cGraphPredicate :: !(Maybe Text)
, _cKind :: !Text
, _cBaseColumn :: !(Maybe ColumnBaseColumn)
, _cColumnPropertiesJSON :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cType :: !(Maybe Text)
, _cFormatPattern :: !(Maybe Text)
, _cColumnId :: !(Maybe (Textual Int32))
, _cValidValues :: !(Maybe [Text])
, _cValidateData :: !(Maybe Bool)
, _cDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
column
:: Column
column =
Column'
{ _cColumnJSONSchema = Nothing
, _cGraphPredicate = Nothing
, _cKind = "fusiontables#column"
, _cBaseColumn = Nothing
, _cColumnPropertiesJSON = Nothing
, _cName = Nothing
, _cType = Nothing
, _cFormatPattern = Nothing
, _cColumnId = Nothing
, _cValidValues = Nothing
, _cValidateData = Nothing
, _cDescription = Nothing
}
cColumnJSONSchema :: Lens' Column (Maybe Text)
cColumnJSONSchema
= lens _cColumnJSONSchema
(\ s a -> s{_cColumnJSONSchema = a})
cGraphPredicate :: Lens' Column (Maybe Text)
cGraphPredicate
= lens _cGraphPredicate
(\ s a -> s{_cGraphPredicate = a})
cKind :: Lens' Column Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cBaseColumn :: Lens' Column (Maybe ColumnBaseColumn)
cBaseColumn
= lens _cBaseColumn (\ s a -> s{_cBaseColumn = a})
cColumnPropertiesJSON :: Lens' Column (Maybe Text)
cColumnPropertiesJSON
= lens _cColumnPropertiesJSON
(\ s a -> s{_cColumnPropertiesJSON = a})
cName :: Lens' Column (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cType :: Lens' Column (Maybe Text)
cType = lens _cType (\ s a -> s{_cType = a})
cFormatPattern :: Lens' Column (Maybe Text)
cFormatPattern
= lens _cFormatPattern
(\ s a -> s{_cFormatPattern = a})
cColumnId :: Lens' Column (Maybe Int32)
cColumnId
= lens _cColumnId (\ s a -> s{_cColumnId = a}) .
mapping _Coerce
cValidValues :: Lens' Column [Text]
cValidValues
= lens _cValidValues (\ s a -> s{_cValidValues = a})
. _Default
. _Coerce
cValidateData :: Lens' Column (Maybe Bool)
cValidateData
= lens _cValidateData
(\ s a -> s{_cValidateData = a})
cDescription :: Lens' Column (Maybe Text)
cDescription
= lens _cDescription (\ s a -> s{_cDescription = a})
instance FromJSON Column where
parseJSON
= withObject "Column"
(\ o ->
Column' <$>
(o .:? "columnJsonSchema") <*>
(o .:? "graphPredicate")
<*> (o .:? "kind" .!= "fusiontables#column")
<*> (o .:? "baseColumn")
<*> (o .:? "columnPropertiesJson")
<*> (o .:? "name")
<*> (o .:? "type")
<*> (o .:? "formatPattern")
<*> (o .:? "columnId")
<*> (o .:? "validValues" .!= mempty)
<*> (o .:? "validateData")
<*> (o .:? "description"))
instance ToJSON Column where
toJSON Column'{..}
= object
(catMaybes
[("columnJsonSchema" .=) <$> _cColumnJSONSchema,
("graphPredicate" .=) <$> _cGraphPredicate,
Just ("kind" .= _cKind),
("baseColumn" .=) <$> _cBaseColumn,
("columnPropertiesJson" .=) <$>
_cColumnPropertiesJSON,
("name" .=) <$> _cName, ("type" .=) <$> _cType,
("formatPattern" .=) <$> _cFormatPattern,
("columnId" .=) <$> _cColumnId,
("validValues" .=) <$> _cValidValues,
("validateData" .=) <$> _cValidateData,
("description" .=) <$> _cDescription])
data Table = Table'
{ _tabaIsExportable :: !(Maybe Bool)
, _tabaKind :: !Text
, _tabaColumnPropertiesJSONSchema :: !(Maybe Text)
, _tabaTablePropertiesJSONSchema :: !(Maybe Text)
, _tabaName :: !(Maybe Text)
, _tabaTablePropertiesJSON :: !(Maybe Text)
, _tabaColumns :: !(Maybe [Column])
, _tabaBaseTableIds :: !(Maybe [Text])
, _tabaTableId :: !(Maybe Text)
, _tabaSQL :: !(Maybe Text)
, _tabaDescription :: !(Maybe Text)
, _tabaAttribution :: !(Maybe Text)
, _tabaAttributionLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
table
:: Table
table =
Table'
{ _tabaIsExportable = Nothing
, _tabaKind = "fusiontables#table"
, _tabaColumnPropertiesJSONSchema = Nothing
, _tabaTablePropertiesJSONSchema = Nothing
, _tabaName = Nothing
, _tabaTablePropertiesJSON = Nothing
, _tabaColumns = Nothing
, _tabaBaseTableIds = Nothing
, _tabaTableId = Nothing
, _tabaSQL = Nothing
, _tabaDescription = Nothing
, _tabaAttribution = Nothing
, _tabaAttributionLink = Nothing
}
tabaIsExportable :: Lens' Table (Maybe Bool)
tabaIsExportable
= lens _tabaIsExportable
(\ s a -> s{_tabaIsExportable = a})
tabaKind :: Lens' Table Text
tabaKind = lens _tabaKind (\ s a -> s{_tabaKind = a})
tabaColumnPropertiesJSONSchema :: Lens' Table (Maybe Text)
tabaColumnPropertiesJSONSchema
= lens _tabaColumnPropertiesJSONSchema
(\ s a -> s{_tabaColumnPropertiesJSONSchema = a})
tabaTablePropertiesJSONSchema :: Lens' Table (Maybe Text)
tabaTablePropertiesJSONSchema
= lens _tabaTablePropertiesJSONSchema
(\ s a -> s{_tabaTablePropertiesJSONSchema = a})
tabaName :: Lens' Table (Maybe Text)
tabaName = lens _tabaName (\ s a -> s{_tabaName = a})
tabaTablePropertiesJSON :: Lens' Table (Maybe Text)
tabaTablePropertiesJSON
= lens _tabaTablePropertiesJSON
(\ s a -> s{_tabaTablePropertiesJSON = a})
tabaColumns :: Lens' Table [Column]
tabaColumns
= lens _tabaColumns (\ s a -> s{_tabaColumns = a}) .
_Default
. _Coerce
tabaBaseTableIds :: Lens' Table [Text]
tabaBaseTableIds
= lens _tabaBaseTableIds
(\ s a -> s{_tabaBaseTableIds = a})
. _Default
. _Coerce
tabaTableId :: Lens' Table (Maybe Text)
tabaTableId
= lens _tabaTableId (\ s a -> s{_tabaTableId = a})
tabaSQL :: Lens' Table (Maybe Text)
tabaSQL = lens _tabaSQL (\ s a -> s{_tabaSQL = a})
tabaDescription :: Lens' Table (Maybe Text)
tabaDescription
= lens _tabaDescription
(\ s a -> s{_tabaDescription = a})
tabaAttribution :: Lens' Table (Maybe Text)
tabaAttribution
= lens _tabaAttribution
(\ s a -> s{_tabaAttribution = a})
tabaAttributionLink :: Lens' Table (Maybe Text)
tabaAttributionLink
= lens _tabaAttributionLink
(\ s a -> s{_tabaAttributionLink = a})
instance FromJSON Table where
parseJSON
= withObject "Table"
(\ o ->
Table' <$>
(o .:? "isExportable") <*>
(o .:? "kind" .!= "fusiontables#table")
<*> (o .:? "columnPropertiesJsonSchema")
<*> (o .:? "tablePropertiesJsonSchema")
<*> (o .:? "name")
<*> (o .:? "tablePropertiesJson")
<*> (o .:? "columns" .!= mempty)
<*> (o .:? "baseTableIds" .!= mempty)
<*> (o .:? "tableId")
<*> (o .:? "sql")
<*> (o .:? "description")
<*> (o .:? "attribution")
<*> (o .:? "attributionLink"))
instance ToJSON Table where
toJSON Table'{..}
= object
(catMaybes
[("isExportable" .=) <$> _tabaIsExportable,
Just ("kind" .= _tabaKind),
("columnPropertiesJsonSchema" .=) <$>
_tabaColumnPropertiesJSONSchema,
("tablePropertiesJsonSchema" .=) <$>
_tabaTablePropertiesJSONSchema,
("name" .=) <$> _tabaName,
("tablePropertiesJson" .=) <$>
_tabaTablePropertiesJSON,
("columns" .=) <$> _tabaColumns,
("baseTableIds" .=) <$> _tabaBaseTableIds,
("tableId" .=) <$> _tabaTableId,
("sql" .=) <$> _tabaSQL,
("description" .=) <$> _tabaDescription,
("attribution" .=) <$> _tabaAttribution,
("attributionLink" .=) <$> _tabaAttributionLink])
data LineStyle = LineStyle'
{ _lsStrokeColorStyler :: !(Maybe StyleFunction)
, _lsStrokeWeight :: !(Maybe (Textual Int32))
, _lsStrokeOpacity :: !(Maybe (Textual Double))
, _lsStrokeWeightStyler :: !(Maybe StyleFunction)
, _lsStrokeColor :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
lineStyle
:: LineStyle
lineStyle =
LineStyle'
{ _lsStrokeColorStyler = Nothing
, _lsStrokeWeight = Nothing
, _lsStrokeOpacity = Nothing
, _lsStrokeWeightStyler = Nothing
, _lsStrokeColor = Nothing
}
lsStrokeColorStyler :: Lens' LineStyle (Maybe StyleFunction)
lsStrokeColorStyler
= lens _lsStrokeColorStyler
(\ s a -> s{_lsStrokeColorStyler = a})
lsStrokeWeight :: Lens' LineStyle (Maybe Int32)
lsStrokeWeight
= lens _lsStrokeWeight
(\ s a -> s{_lsStrokeWeight = a})
. mapping _Coerce
lsStrokeOpacity :: Lens' LineStyle (Maybe Double)
lsStrokeOpacity
= lens _lsStrokeOpacity
(\ s a -> s{_lsStrokeOpacity = a})
. mapping _Coerce
lsStrokeWeightStyler :: Lens' LineStyle (Maybe StyleFunction)
lsStrokeWeightStyler
= lens _lsStrokeWeightStyler
(\ s a -> s{_lsStrokeWeightStyler = a})
lsStrokeColor :: Lens' LineStyle (Maybe Text)
lsStrokeColor
= lens _lsStrokeColor
(\ s a -> s{_lsStrokeColor = a})
instance FromJSON LineStyle where
parseJSON
= withObject "LineStyle"
(\ o ->
LineStyle' <$>
(o .:? "strokeColorStyler") <*>
(o .:? "strokeWeight")
<*> (o .:? "strokeOpacity")
<*> (o .:? "strokeWeightStyler")
<*> (o .:? "strokeColor"))
instance ToJSON LineStyle where
toJSON LineStyle'{..}
= object
(catMaybes
[("strokeColorStyler" .=) <$> _lsStrokeColorStyler,
("strokeWeight" .=) <$> _lsStrokeWeight,
("strokeOpacity" .=) <$> _lsStrokeOpacity,
("strokeWeightStyler" .=) <$> _lsStrokeWeightStyler,
("strokeColor" .=) <$> _lsStrokeColor])