on develop help sign in
Regenerating gogol-sheets from latest service definition
commit46032f1e1200858b9b5e804ea3aa11be8b65470a authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parent4b5e897
9 files changed+1255−98
gen/model/sheets/v4/sheets-api.json+262−69 gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Append.hs+245 gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/BatchClear.hs+197 gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Clear.hs+205 gogol-sheets/gen/Network/Google/Sheets.hs+44−1 gogol-sheets/gen/Network/Google/Sheets/Types.hs+28 gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs+250−15 gogol-sheets/gen/Network/Google/Sheets/Types/Sum.hs+21−13 gogol-sheets/gogol-sheets.cabal+3
gen/model/sheets/v4/sheets-api.json+262−69
@@ -26,32 +26,22 @@
2626 "resources": {
2727 "values": {
2828 "methods": {
29− "update": {
30− "id": "sheets.spreadsheets.values.update",
29+ "clear": {
30+ "id": "sheets.spreadsheets.values.clear",
3131 "response": {
32− "$ref": "UpdateValuesResponse"
32+ "$ref": "ClearValuesResponse"
3333 },
3434 "parameterOrder": [
3535 "spreadsheetId",
3636 "range"
3737 ],
38− "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.",
38+ "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.",
3939 "request": {
40− "$ref": "ValueRange"
40+ "$ref": "ClearValuesRequest"
4141 },
42− "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
43− "httpMethod": "PUT",
42+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
43+ "httpMethod": "POST",
4444 "parameters": {
45− "valueInputOption": {
46− "description": "How the input data should be interpreted.",
47− "enum": [
48− "INPUT_VALUE_OPTION_UNSPECIFIED",
49− "RAW",
50− "USER_ENTERED"
51− ],
52− "location": "query",
53− "type": "string"
54− },
5545 "spreadsheetId": {
5646 "description": "The ID of the spreadsheet to update.",
5747 "required": true,
@@ -59,29 +49,28 @@
5949 "type": "string"
6050 },
6151 "range": {
62− "description": "The A1 notation of the values to update.",
52+ "description": "The A1 notation of the values to clear.",
6353 "required": true,
6454 "location": "path",
6555 "type": "string"
6656 }
6757 },
68− "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
58+ "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
6959 "scopes": [
7060 "https://www.googleapis.com/auth/drive",
7161 "https://www.googleapis.com/auth/spreadsheets"
7262 ]
7363 },
74− "get": {
75− "id": "sheets.spreadsheets.values.get",
64+ "batchGet": {
65+ "id": "sheets.spreadsheets.values.batchGet",
7666 "response": {
77− "$ref": "ValueRange"
67+ "$ref": "BatchGetValuesResponse"
7868 },
7969 "parameterOrder": [
80− "spreadsheetId",
81− "range"
70+ "spreadsheetId"
8271 ],
83− "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.",
84− "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
72+ "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.",
73+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
8574 "httpMethod": "GET",
8675 "parameters": {
8776 "spreadsheetId": {
@@ -90,6 +79,12 @@
9079 "location": "path",
9180 "type": "string"
9281 },
82+ "ranges": {
83+ "description": "The A1 notation of the values to retrieve.",
84+ "repeated": true,
85+ "location": "query",
86+ "type": "string"
87+ },
9388 "valueRenderOption": {
9489 "description": "How values should be represented in the output.",
9590 "enum": [
@@ -109,12 +104,6 @@
109104 "location": "query",
110105 "type": "string"
111106 },
112− "range": {
113− "description": "The A1 notation of the values to retrieve.",
114− "required": true,
115− "location": "path",
116− "type": "string"
117− },
118107 "majorDimension": {
119108 "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.",
120109 "enum": [
@@ -126,7 +115,7 @@
126115 "type": "string"
127116 }
128117 },
129− "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
118+ "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
130119 "scopes": [
131120 "https://www.googleapis.com/auth/drive",
132121 "https://www.googleapis.com/auth/drive.readonly",
@@ -134,16 +123,45 @@
134123 "https://www.googleapis.com/auth/spreadsheets.readonly"
135124 ]
136125 },
137− "batchGet": {
138− "id": "sheets.spreadsheets.values.batchGet",
126+ "batchUpdate": {
127+ "id": "sheets.spreadsheets.values.batchUpdate",
139128 "response": {
140− "$ref": "BatchGetValuesResponse"
129+ "$ref": "BatchUpdateValuesResponse"
141130 },
142131 "parameterOrder": [
143132 "spreadsheetId"
144133 ],
145− "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.",
146− "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
134+ "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.",
135+ "request": {
136+ "$ref": "BatchUpdateValuesRequest"
137+ },
138+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
139+ "httpMethod": "POST",
140+ "parameters": {
141+ "spreadsheetId": {
142+ "description": "The ID of the spreadsheet to update.",
143+ "required": true,
144+ "location": "path",
145+ "type": "string"
146+ }
147+ },
148+ "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
149+ "scopes": [
150+ "https://www.googleapis.com/auth/drive",
151+ "https://www.googleapis.com/auth/spreadsheets"
152+ ]
153+ },
154+ "get": {
155+ "id": "sheets.spreadsheets.values.get",
156+ "response": {
157+ "$ref": "ValueRange"
158+ },
159+ "parameterOrder": [
160+ "spreadsheetId",
161+ "range"
162+ ],
163+ "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.",
164+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
147165 "httpMethod": "GET",
148166 "parameters": {
149167 "spreadsheetId": {
@@ -152,12 +170,6 @@
152170 "location": "path",
153171 "type": "string"
154172 },
155− "ranges": {
156− "description": "The A1 notation of the values to retrieve.",
157− "repeated": true,
158− "location": "query",
159− "type": "string"
160− },
161173 "valueRenderOption": {
162174 "description": "How values should be represented in the output.",
163175 "enum": [
@@ -177,6 +189,12 @@
177189 "location": "query",
178190 "type": "string"
179191 },
192+ "range": {
193+ "description": "The A1 notation of the values to retrieve.",
194+ "required": true,
195+ "location": "path",
196+ "type": "string"
197+ },
180198 "majorDimension": {
181199 "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.",
182200 "enum": [
@@ -188,7 +206,7 @@
188206 "type": "string"
189207 }
190208 },
191− "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
209+ "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
192210 "scopes": [
193211 "https://www.googleapis.com/auth/drive",
194212 "https://www.googleapis.com/auth/drive.readonly",
@@ -196,19 +214,118 @@
196214 "https://www.googleapis.com/auth/spreadsheets.readonly"
197215 ]
198216 },
199− "batchUpdate": {
200− "id": "sheets.spreadsheets.values.batchUpdate",
217+ "append": {
218+ "id": "sheets.spreadsheets.values.append",
201219 "response": {
202− "$ref": "BatchUpdateValuesResponse"
220+ "$ref": "AppendValuesResponse"
221+ },
222+ "parameterOrder": [
223+ "spreadsheetId",
224+ "range"
225+ ],
226+ "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/guides/values#appending_values)\nand\n[sample code](/sheets/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.",
227+ "request": {
228+ "$ref": "ValueRange"
229+ },
230+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
231+ "httpMethod": "POST",
232+ "parameters": {
233+ "valueInputOption": {
234+ "description": "How the input data should be interpreted.",
235+ "enum": [
236+ "INPUT_VALUE_OPTION_UNSPECIFIED",
237+ "RAW",
238+ "USER_ENTERED"
239+ ],
240+ "location": "query",
241+ "type": "string"
242+ },
243+ "spreadsheetId": {
244+ "description": "The ID of the spreadsheet to update.",
245+ "required": true,
246+ "location": "path",
247+ "type": "string"
248+ },
249+ "insertDataOption": {
250+ "description": "How the input data should be inserted.",
251+ "enum": [
252+ "OVERWRITE",
253+ "INSERT_ROWS"
254+ ],
255+ "location": "query",
256+ "type": "string"
257+ },
258+ "range": {
259+ "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.",
260+ "required": true,
261+ "location": "path",
262+ "type": "string"
263+ }
264+ },
265+ "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
266+ "scopes": [
267+ "https://www.googleapis.com/auth/drive",
268+ "https://www.googleapis.com/auth/spreadsheets"
269+ ]
270+ },
271+ "update": {
272+ "id": "sheets.spreadsheets.values.update",
273+ "response": {
274+ "$ref": "UpdateValuesResponse"
275+ },
276+ "parameterOrder": [
277+ "spreadsheetId",
278+ "range"
279+ ],
280+ "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.",
281+ "request": {
282+ "$ref": "ValueRange"
283+ },
284+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
285+ "httpMethod": "PUT",
286+ "parameters": {
287+ "valueInputOption": {
288+ "description": "How the input data should be interpreted.",
289+ "enum": [
290+ "INPUT_VALUE_OPTION_UNSPECIFIED",
291+ "RAW",
292+ "USER_ENTERED"
293+ ],
294+ "location": "query",
295+ "type": "string"
296+ },
297+ "spreadsheetId": {
298+ "description": "The ID of the spreadsheet to update.",
299+ "required": true,
300+ "location": "path",
301+ "type": "string"
302+ },
303+ "range": {
304+ "description": "The A1 notation of the values to update.",
305+ "required": true,
306+ "location": "path",
307+ "type": "string"
308+ }
309+ },
310+ "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
311+ "scopes": [
312+ "https://www.googleapis.com/auth/drive",
313+ "https://www.googleapis.com/auth/spreadsheets"
314+ ]
315+ },
316+ "batchClear": {
317+ "id": "sheets.spreadsheets.values.batchClear",
318+ "response": {
319+ "$ref": "BatchClearValuesResponse"
203320 },
204321 "parameterOrder": [
205322 "spreadsheetId"
206323 ],
207− "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.",
324+ "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.",
208325 "request": {
209− "$ref": "BatchUpdateValuesRequest"
326+ "$ref": "BatchClearValuesRequest"
210327 },
211− "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
328+ "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
212329 "httpMethod": "POST",
213330 "parameters": {
214331 "spreadsheetId": {
@@ -218,7 +335,7 @@
218335 "type": "string"
219336 }
220337 },
221− "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
338+ "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
222339 "scopes": [
223340 "https://www.googleapis.com/auth/drive",
224341 "https://www.googleapis.com/auth/spreadsheets"
@@ -373,7 +490,7 @@
373490 "type": "object",
374491 "properties": {
375492 "protectedRange": {
376− "description": "The protected range to update with the new properties. If a nonzero\nprotectedRangeId is\nspecified, the protected range will use that ID. (It is an error to\nspecify the ID of a protected range that already exists.)",
493+ "description": "The protected range to update with the new properties.",
377494 "$ref": "ProtectedRange"
378495 },
379496 "fields": {
@@ -473,6 +590,21 @@
473590 },
474591 "id": "UpdateEmbeddedObjectPositionResponse"
475592 },
593+ "ClearValuesResponse": {
594+ "description": "The response when clearing a range of values in a spreadsheet.",
595+ "type": "object",
596+ "properties": {
597+ "spreadsheetId": {
598+ "description": "The spreadsheet the updates were applied to.",
599+ "type": "string"
600+ },
601+ "clearedRange": {
602+ "description": "The range (in A1 notation) that was cleared.\n(If the request was for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual range\n that was cleared, bounded to the sheet's limits.)",
603+ "type": "string"
604+ }
605+ },
606+ "id": "ClearValuesResponse"
607+ },
476608 "UpdateConditionalFormatRuleRequest": {
477609 "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index.",
478610 "type": "object",
@@ -871,23 +1003,23 @@
8711003 "The cell's value must not be between the two condition values.\nSupported by data validation, conditional formatting and filters.\nRequires exactly two ConditionValues.",
8721004 "The cell's value must contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
8731005 "The cell's value must not contain the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
874− "The cell's value must start with the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
875− "The cell's value must end with the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
1006+ "The cell's value must start with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.",
1007+ "The cell's value must end with the condition's value.\nSupported by conditional formatting and filters.\nRequires a single ConditionValue.",
8761008 "The cell's value must be exactly the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
8771009 "The cell's value must be a valid email address.\nSupported by data validation.\nRequires no ConditionValues.",
8781010 "The cell's value must be a valid URL.\nSupported by data validation.\nRequires no ConditionValues.",
8791011 "The cell's value must be the same date as the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.",
8801012 "The cell's value must be before the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.",
8811013 "The cell's value must be after the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.",
882− "The cell's value must be on or before the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.",
883− "The cell's value must be on or after the date of the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue\nthat may be a relative date.",
1014+ "The cell's value must be on or before the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.",
1015+ "The cell's value must be on or after the date of the condition's value.\nSupported by data validation.\nRequires a single ConditionValue\nthat may be a relative date.",
8841016 "The cell's value must be between the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.",
8851017 "The cell's value must be outside the dates of the two condition values.\nSupported by data validation.\nRequires exactly two ConditionValues.",
8861018 "The cell's value must be a date.\nSupported by data validation.\nRequires no ConditionValues.",
8871019 "The cell's value must be listed in the grid in condition value's range.\nSupported by data validation.\nRequires a single ConditionValue,\nand the value must be a valid range in A1 notation.",
8881020 "The cell's value must in the list of condition values.\nSupported by data validation.\nSupports any number of condition values,\none per item in the list.\nFormulas are not supported in the values.",
889− "The cell's value must be empty.\nSupported by data validation, conditional formatting and filters.\nRequires no ConditionValues.",
890− "The cell's value must not be empty.\nSupported by data validation, conditional formatting and filters.\nRequires no ConditionValues.",
1021+ "The cell's value must be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.",
1022+ "The cell's value must not be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.",
8911023 "The condition's formula must evaluate to true.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue."
8921024 ],
8931025 "type": "string"
@@ -1307,6 +1439,24 @@
13071439 },
13081440 "id": "ClearBasicFilterRequest"
13091441 },
1442+ "BatchClearValuesResponse": {
1443+ "description": "The response when updating a range of values in a spreadsheet.",
1444+ "type": "object",
1445+ "properties": {
1446+ "spreadsheetId": {
1447+ "description": "The spreadsheet the updates were applied to.",
1448+ "type": "string"
1449+ },
1450+ "clearedRanges": {
1451+ "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)",
1452+ "type": "array",
1453+ "items": {
1454+ "type": "string"
1455+ }
1456+ }
1457+ },
1458+ "id": "BatchClearValuesResponse"
1459+ },
13101460 "ConditionalFormatRule": {
13111461 "description": "A rule describing a conditional format.",
13121462 "type": "object",
@@ -1453,7 +1603,7 @@
14531603 "type": "object",
14541604 "properties": {
14551605 "properties": {
1456− "description": "The properties the new sheet should have.\nAll properties are optional.\nIf a sheetId\nis specified, the sheet will use that ID.\n(It is an error to specify the ID of a sheet that already exists.)",
1606+ "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)",
14571607 "$ref": "SheetProperties"
14581608 }
14591609 },
@@ -1464,7 +1614,7 @@
14641614 "type": "object",
14651615 "properties": {
14661616 "protectedRange": {
1467− "description": "The protected range to be added.",
1617+ "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)",
14681618 "$ref": "ProtectedRange"
14691619 }
14701620 },
@@ -1485,7 +1635,7 @@
14851635 }
14861636 },
14871637 "range": {
1488− "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.",
1638+ "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.",
14891639 "type": "string"
14901640 },
14911641 "majorDimension": {
@@ -1537,6 +1687,25 @@
15371687 },
15381688 "id": "FindReplaceResponse"
15391689 },
1690+ "AppendValuesResponse": {
1691+ "description": "The response when updating a range of values in a spreadsheet.",
1692+ "type": "object",
1693+ "properties": {
1694+ "spreadsheetId": {
1695+ "description": "The spreadsheet the updates were applied to.",
1696+ "type": "string"
1697+ },
1698+ "tableRange": {
1699+ "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.",
1700+ "type": "string"
1701+ },
1702+ "updates": {
1703+ "description": "Information about the updates that were applied.",
1704+ "$ref": "UpdateValuesResponse"
1705+ }
1706+ },
1707+ "id": "AppendValuesResponse"
1708+ },
15401709 "CellFormat": {
15411710 "description": "The format of a cell.",
15421711 "type": "object",
@@ -1899,6 +2068,12 @@
18992068 },
19002069 "id": "SheetProperties"
19012070 },
2071+ "ClearValuesRequest": {
2072+ "description": "The request for clearing a range of values in a spreadsheet.",
2073+ "type": "object",
2074+ "properties": {},
2075+ "id": "ClearValuesRequest"
2076+ },
19022077 "ProtectedRange": {
19032078 "description": "A protected range.",
19042079 "type": "object",
@@ -2190,7 +2365,7 @@
21902365 "type": "object",
21912366 "properties": {
21922367 "pattern": {
2193− "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.",
2368+ "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/guides/formats) for more\ninformation about the supported patterns.",
21942369 "type": "string"
21952370 },
21962371 "type": {
@@ -2222,6 +2397,20 @@
22222397 },
22232398 "id": "NumberFormat"
22242399 },
2400+ "BatchClearValuesRequest": {
2401+ "description": "The request for clearing more than one range of values in a spreadsheet.",
2402+ "type": "object",
2403+ "properties": {
2404+ "ranges": {
2405+ "description": "The ranges to clear, in A1 notation.",
2406+ "type": "array",
2407+ "items": {
2408+ "type": "string"
2409+ }
2410+ }
2411+ },
2412+ "id": "BatchClearValuesRequest"
2413+ },
22252414 "UpdateDimensionPropertiesRequest": {
22262415 "description": "Updates properties of dimensions within the specified range.",
22272416 "type": "object",
@@ -2476,6 +2665,8 @@
24762665 "DOTTED",
24772666 "DASHED",
24782667 "SOLID",
2668+ "SOLID_MEDIUM",
2669+ "SOLID_THICK",
24792670 "NONE",
24802671 "DOUBLE"
24812672 ],
@@ -2483,14 +2674,16 @@
24832674 "The style is not specified. Do not use this.",
24842675 "The border is dotted.",
24852676 "The border is dashed.",
2486− "The border is a solid line.",
2677+ "The border is a thin solid line.",
2678+ "The border is a medium solid line.",
2679+ "The border is a thick solid line.",
24872680 "No border.\nUsed only when updating a border in order to erase it.",
24882681 "The border is two solid lines."
24892682 ],
24902683 "type": "string"
24912684 },
24922685 "width": {
2493− "description": "The width of the border, in pixels.\nBorder widths must be between 0 and 3 pixels, inclusive.",
2686+ "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.",
24942687 "type": "integer",
24952688 "format": "int32"
24962689 },
@@ -2506,7 +2699,7 @@
25062699 "type": "object",
25072700 "properties": {
25082701 "namedRange": {
2509− "description": "The named range to add. If a non-empty\nnamedRangeId is specified, the named range\nwill use that ID. (It is an error to specify the ID of a named\nrange that already exists.)",
2702+ "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)",
25102703 "$ref": "NamedRange"
25112704 }
25122705 },
@@ -3272,7 +3465,7 @@
32723465 "type": "object",
32733466 "properties": {
32743467 "filter": {
3275− "description": "The filter to add.",
3468+ "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)",
32763469 "$ref": "FilterView"
32773470 }
32783471 },
@@ -3325,7 +3518,7 @@
33253518 "type": "object",
33263519 "properties": {
33273520 "chart": {
3328− "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed.",
3521+ "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)",
33293522 "$ref": "EmbeddedChart"
33303523 }
33313524 },
@@ -3586,7 +3779,7 @@
35863779 "id": "DeleteConditionalFormatRuleResponse"
35873780 }
35883781 },
3589− "revision": "20160519",
3782+ "revision": "20161014",
35903783 "basePath": "",
35913784 "icons": {
35923785 "x32": "http://www.google.com/images/icons/product/search-32.gif",
gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Append.hsnew file+245
@@ -0,0 +1,245 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Sheets.Spreadsheets.Values.Append
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Appends values to a spreadsheet. The input range is used to search for
24+-- existing data and find a \"table\" within that range. Values will be
25+-- appended to the next row of the table, starting with the first column of
26+-- the table. See the [guide](\/sheets\/guides\/values#appending_values)
27+-- and [sample code](\/sheets\/samples\/writing#append_values) for specific
28+-- details of how tables are detected and data is appended. The caller must
29+-- specify the spreadsheet ID, range, and a valueInputOption. The
30+-- \`valueInputOption\` only controls how the input data will be added to
31+-- the sheet (column-wise or row-wise), it does not influence what cell the
32+-- data starts being written to.
33+--
34+-- /See:/ <https://developers.google.com/sheets/ Google Sheets API Reference> for @sheets.spreadsheets.values.append@.
35+module Network.Google.Resource.Sheets.Spreadsheets.Values.Append
36+ (
37+ -- * REST Resource
38+ SpreadsheetsValuesAppendResource
39+
40+ -- * Creating a Request
41+ , spreadsheetsValuesAppend
42+ , SpreadsheetsValuesAppend
43+
44+ -- * Request Lenses
45+ , svaXgafv
46+ , svaUploadProtocol
47+ , svaPp
48+ , svaAccessToken
49+ , svaSpreadsheetId
50+ , svaUploadType
51+ , svaValueInputOption
52+ , svaPayload
53+ , svaInsertDataOption
54+ , svaBearerToken
55+ , svaRange
56+ , svaCallback
57+ ) where
58+
59+import Network.Google.Prelude
60+import Network.Google.Sheets.Types
61+
62+-- | A resource alias for @sheets.spreadsheets.values.append@ method which the
63+-- 'SpreadsheetsValuesAppend' request conforms to.
64+type SpreadsheetsValuesAppendResource =
65+ "v4" :>
66+ "spreadsheets" :>
67+ Capture "spreadsheetId" Text :>
68+ "values" :>
69+ CaptureMode "range" "append" Text :>
70+ QueryParam "$.xgafv" Xgafv :>
71+ QueryParam "upload_protocol" Text :>
72+ QueryParam "pp" Bool :>
73+ QueryParam "access_token" Text :>
74+ QueryParam "uploadType" Text :>
75+ QueryParam "valueInputOption" Text :>
76+ QueryParam "insertDataOption" Text :>
77+ QueryParam "bearer_token" Text :>
78+ QueryParam "callback" Text :>
79+ QueryParam "alt" AltJSON :>
80+ ReqBody '[JSON] ValueRange :>
81+ Post '[JSON] AppendValuesResponse
82+
83+-- | Appends values to a spreadsheet. The input range is used to search for
84+-- existing data and find a \"table\" within that range. Values will be
85+-- appended to the next row of the table, starting with the first column of
86+-- the table. See the [guide](\/sheets\/guides\/values#appending_values)
87+-- and [sample code](\/sheets\/samples\/writing#append_values) for specific
88+-- details of how tables are detected and data is appended. The caller must
89+-- specify the spreadsheet ID, range, and a valueInputOption. The
90+-- \`valueInputOption\` only controls how the input data will be added to
91+-- the sheet (column-wise or row-wise), it does not influence what cell the
92+-- data starts being written to.
93+--
94+-- /See:/ 'spreadsheetsValuesAppend' smart constructor.
95+data SpreadsheetsValuesAppend = SpreadsheetsValuesAppend'
96+ { _svaXgafv :: !(Maybe Xgafv)
97+ , _svaUploadProtocol :: !(Maybe Text)
98+ , _svaPp :: !Bool
99+ , _svaAccessToken :: !(Maybe Text)
100+ , _svaSpreadsheetId :: !Text
101+ , _svaUploadType :: !(Maybe Text)
102+ , _svaValueInputOption :: !(Maybe Text)
103+ , _svaPayload :: !ValueRange
104+ , _svaInsertDataOption :: !(Maybe Text)
105+ , _svaBearerToken :: !(Maybe Text)
106+ , _svaRange :: !Text
107+ , _svaCallback :: !(Maybe Text)
108+ } deriving (Eq,Show,Data,Typeable,Generic)
109+
110+-- | Creates a value of 'SpreadsheetsValuesAppend' with the minimum fields required to make a request.
111+--
112+-- Use one of the following lenses to modify other fields as desired:
113+--
114+-- * 'svaXgafv'
115+--
116+-- * 'svaUploadProtocol'
117+--
118+-- * 'svaPp'
119+--
120+-- * 'svaAccessToken'
121+--
122+-- * 'svaSpreadsheetId'
123+--
124+-- * 'svaUploadType'
125+--
126+-- * 'svaValueInputOption'
127+--
128+-- * 'svaPayload'
129+--
130+-- * 'svaInsertDataOption'
131+--
132+-- * 'svaBearerToken'
133+--
134+-- * 'svaRange'
135+--
136+-- * 'svaCallback'
137+spreadsheetsValuesAppend
138+ :: Text -- ^ 'svaSpreadsheetId'
139+ -> ValueRange -- ^ 'svaPayload'
140+ -> Text -- ^ 'svaRange'
141+ -> SpreadsheetsValuesAppend
142+spreadsheetsValuesAppend pSvaSpreadsheetId_ pSvaPayload_ pSvaRange_ =
143+ SpreadsheetsValuesAppend'
144+ { _svaXgafv = Nothing
145+ , _svaUploadProtocol = Nothing
146+ , _svaPp = True
147+ , _svaAccessToken = Nothing
148+ , _svaSpreadsheetId = pSvaSpreadsheetId_
149+ , _svaUploadType = Nothing
150+ , _svaValueInputOption = Nothing
151+ , _svaPayload = pSvaPayload_
152+ , _svaInsertDataOption = Nothing
153+ , _svaBearerToken = Nothing
154+ , _svaRange = pSvaRange_
155+ , _svaCallback = Nothing
156+ }
157+
158+-- | V1 error format.
159+svaXgafv :: Lens' SpreadsheetsValuesAppend (Maybe Xgafv)
160+svaXgafv = lens _svaXgafv (\ s a -> s{_svaXgafv = a})
161+
162+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
163+svaUploadProtocol :: Lens' SpreadsheetsValuesAppend (Maybe Text)
164+svaUploadProtocol
165+ = lens _svaUploadProtocol
166+ (\ s a -> s{_svaUploadProtocol = a})
167+
168+-- | Pretty-print response.
169+svaPp :: Lens' SpreadsheetsValuesAppend Bool
170+svaPp = lens _svaPp (\ s a -> s{_svaPp = a})
171+
172+-- | OAuth access token.
173+svaAccessToken :: Lens' SpreadsheetsValuesAppend (Maybe Text)
174+svaAccessToken
175+ = lens _svaAccessToken
176+ (\ s a -> s{_svaAccessToken = a})
177+
178+-- | The ID of the spreadsheet to update.
179+svaSpreadsheetId :: Lens' SpreadsheetsValuesAppend Text
180+svaSpreadsheetId
181+ = lens _svaSpreadsheetId
182+ (\ s a -> s{_svaSpreadsheetId = a})
183+
184+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
185+svaUploadType :: Lens' SpreadsheetsValuesAppend (Maybe Text)
186+svaUploadType
187+ = lens _svaUploadType
188+ (\ s a -> s{_svaUploadType = a})
189+
190+-- | How the input data should be interpreted.
191+svaValueInputOption :: Lens' SpreadsheetsValuesAppend (Maybe Text)
192+svaValueInputOption
193+ = lens _svaValueInputOption
194+ (\ s a -> s{_svaValueInputOption = a})
195+
196+-- | Multipart request metadata.
197+svaPayload :: Lens' SpreadsheetsValuesAppend ValueRange
198+svaPayload
199+ = lens _svaPayload (\ s a -> s{_svaPayload = a})
200+
201+-- | How the input data should be inserted.
202+svaInsertDataOption :: Lens' SpreadsheetsValuesAppend (Maybe Text)
203+svaInsertDataOption
204+ = lens _svaInsertDataOption
205+ (\ s a -> s{_svaInsertDataOption = a})
206+
207+-- | OAuth bearer token.
208+svaBearerToken :: Lens' SpreadsheetsValuesAppend (Maybe Text)
209+svaBearerToken
210+ = lens _svaBearerToken
211+ (\ s a -> s{_svaBearerToken = a})
212+
213+-- | The A1 notation of a range to search for a logical table of data. Values
214+-- will be appended after the last row of the table.
215+svaRange :: Lens' SpreadsheetsValuesAppend Text
216+svaRange = lens _svaRange (\ s a -> s{_svaRange = a})
217+
218+-- | JSONP
219+svaCallback :: Lens' SpreadsheetsValuesAppend (Maybe Text)
220+svaCallback
221+ = lens _svaCallback (\ s a -> s{_svaCallback = a})
222+
223+instance GoogleRequest SpreadsheetsValuesAppend where
224+ type Rs SpreadsheetsValuesAppend =
225+ AppendValuesResponse
226+ type Scopes SpreadsheetsValuesAppend =
227+ '["https://www.googleapis.com/auth/drive",
228+ "https://www.googleapis.com/auth/spreadsheets"]
229+ requestClient SpreadsheetsValuesAppend'{..}
230+ = go _svaSpreadsheetId _svaRange _svaXgafv
231+ _svaUploadProtocol
232+ (Just _svaPp)
233+ _svaAccessToken
234+ _svaUploadType
235+ _svaValueInputOption
236+ _svaInsertDataOption
237+ _svaBearerToken
238+ _svaCallback
239+ (Just AltJSON)
240+ _svaPayload
241+ sheetsService
242+ where go
243+ = buildClient
244+ (Proxy :: Proxy SpreadsheetsValuesAppendResource)
245+ mempty
gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/BatchClear.hsnew file+197
@@ -0,0 +1,197 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Sheets.Spreadsheets.Values.BatchClear
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Clears one or more ranges of values from a spreadsheet. The caller must
24+-- specify the spreadsheet ID and one or more ranges. Only values are
25+-- cleared -- all other properties of the cell (such as formatting, data
26+-- validation, etc..) are kept.
27+--
28+-- /See:/ <https://developers.google.com/sheets/ Google Sheets API Reference> for @sheets.spreadsheets.values.batchClear@.
29+module Network.Google.Resource.Sheets.Spreadsheets.Values.BatchClear
30+ (
31+ -- * REST Resource
32+ SpreadsheetsValuesBatchClearResource
33+
34+ -- * Creating a Request
35+ , spreadsheetsValuesBatchClear
36+ , SpreadsheetsValuesBatchClear
37+
38+ -- * Request Lenses
39+ , svbcXgafv
40+ , svbcUploadProtocol
41+ , svbcPp
42+ , svbcAccessToken
43+ , svbcSpreadsheetId
44+ , svbcUploadType
45+ , svbcPayload
46+ , svbcBearerToken
47+ , svbcCallback
48+ ) where
49+
50+import Network.Google.Prelude
51+import Network.Google.Sheets.Types
52+
53+-- | A resource alias for @sheets.spreadsheets.values.batchClear@ method which the
54+-- 'SpreadsheetsValuesBatchClear' request conforms to.
55+type SpreadsheetsValuesBatchClearResource =
56+ "v4" :>
57+ "spreadsheets" :>
58+ Capture "spreadsheetId" Text :>
59+ "values:batchClear" :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ ReqBody '[JSON] BatchClearValuesRequest :>
69+ Post '[JSON] BatchClearValuesResponse
70+
71+-- | Clears one or more ranges of values from a spreadsheet. The caller must
72+-- specify the spreadsheet ID and one or more ranges. Only values are
73+-- cleared -- all other properties of the cell (such as formatting, data
74+-- validation, etc..) are kept.
75+--
76+-- /See:/ 'spreadsheetsValuesBatchClear' smart constructor.
77+data SpreadsheetsValuesBatchClear = SpreadsheetsValuesBatchClear'
78+ { _svbcXgafv :: !(Maybe Xgafv)
79+ , _svbcUploadProtocol :: !(Maybe Text)
80+ , _svbcPp :: !Bool
81+ , _svbcAccessToken :: !(Maybe Text)
82+ , _svbcSpreadsheetId :: !Text
83+ , _svbcUploadType :: !(Maybe Text)
84+ , _svbcPayload :: !BatchClearValuesRequest
85+ , _svbcBearerToken :: !(Maybe Text)
86+ , _svbcCallback :: !(Maybe Text)
87+ } deriving (Eq,Show,Data,Typeable,Generic)
88+
89+-- | Creates a value of 'SpreadsheetsValuesBatchClear' with the minimum fields required to make a request.
90+--
91+-- Use one of the following lenses to modify other fields as desired:
92+--
93+-- * 'svbcXgafv'
94+--
95+-- * 'svbcUploadProtocol'
96+--
97+-- * 'svbcPp'
98+--
99+-- * 'svbcAccessToken'
100+--
101+-- * 'svbcSpreadsheetId'
102+--
103+-- * 'svbcUploadType'
104+--
105+-- * 'svbcPayload'
106+--
107+-- * 'svbcBearerToken'
108+--
109+-- * 'svbcCallback'
110+spreadsheetsValuesBatchClear
111+ :: Text -- ^ 'svbcSpreadsheetId'
112+ -> BatchClearValuesRequest -- ^ 'svbcPayload'
113+ -> SpreadsheetsValuesBatchClear
114+spreadsheetsValuesBatchClear pSvbcSpreadsheetId_ pSvbcPayload_ =
115+ SpreadsheetsValuesBatchClear'
116+ { _svbcXgafv = Nothing
117+ , _svbcUploadProtocol = Nothing
118+ , _svbcPp = True
119+ , _svbcAccessToken = Nothing
120+ , _svbcSpreadsheetId = pSvbcSpreadsheetId_
121+ , _svbcUploadType = Nothing
122+ , _svbcPayload = pSvbcPayload_
123+ , _svbcBearerToken = Nothing
124+ , _svbcCallback = Nothing
125+ }
126+
127+-- | V1 error format.
128+svbcXgafv :: Lens' SpreadsheetsValuesBatchClear (Maybe Xgafv)
129+svbcXgafv
130+ = lens _svbcXgafv (\ s a -> s{_svbcXgafv = a})
131+
132+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
133+svbcUploadProtocol :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
134+svbcUploadProtocol
135+ = lens _svbcUploadProtocol
136+ (\ s a -> s{_svbcUploadProtocol = a})
137+
138+-- | Pretty-print response.
139+svbcPp :: Lens' SpreadsheetsValuesBatchClear Bool
140+svbcPp = lens _svbcPp (\ s a -> s{_svbcPp = a})
141+
142+-- | OAuth access token.
143+svbcAccessToken :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
144+svbcAccessToken
145+ = lens _svbcAccessToken
146+ (\ s a -> s{_svbcAccessToken = a})
147+
148+-- | The ID of the spreadsheet to update.
149+svbcSpreadsheetId :: Lens' SpreadsheetsValuesBatchClear Text
150+svbcSpreadsheetId
151+ = lens _svbcSpreadsheetId
152+ (\ s a -> s{_svbcSpreadsheetId = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+svbcUploadType :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
156+svbcUploadType
157+ = lens _svbcUploadType
158+ (\ s a -> s{_svbcUploadType = a})
159+
160+-- | Multipart request metadata.
161+svbcPayload :: Lens' SpreadsheetsValuesBatchClear BatchClearValuesRequest
162+svbcPayload
163+ = lens _svbcPayload (\ s a -> s{_svbcPayload = a})
164+
165+-- | OAuth bearer token.
166+svbcBearerToken :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
167+svbcBearerToken
168+ = lens _svbcBearerToken
169+ (\ s a -> s{_svbcBearerToken = a})
170+
171+-- | JSONP
172+svbcCallback :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
173+svbcCallback
174+ = lens _svbcCallback (\ s a -> s{_svbcCallback = a})
175+
176+instance GoogleRequest SpreadsheetsValuesBatchClear
177+ where
178+ type Rs SpreadsheetsValuesBatchClear =
179+ BatchClearValuesResponse
180+ type Scopes SpreadsheetsValuesBatchClear =
181+ '["https://www.googleapis.com/auth/drive",
182+ "https://www.googleapis.com/auth/spreadsheets"]
183+ requestClient SpreadsheetsValuesBatchClear'{..}
184+ = go _svbcSpreadsheetId _svbcXgafv
185+ _svbcUploadProtocol
186+ (Just _svbcPp)
187+ _svbcAccessToken
188+ _svbcUploadType
189+ _svbcBearerToken
190+ _svbcCallback
191+ (Just AltJSON)
192+ _svbcPayload
193+ sheetsService
194+ where go
195+ = buildClient
196+ (Proxy :: Proxy SpreadsheetsValuesBatchClearResource)
197+ mempty
gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/Clear.hsnew file+205
@@ -0,0 +1,205 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Sheets.Spreadsheets.Values.Clear
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Clears values from a spreadsheet. The caller must specify the
24+-- spreadsheet ID and range. Only values are cleared -- all other
25+-- properties of the cell (such as formatting, data validation, etc..) are
26+-- kept.
27+--
28+-- /See:/ <https://developers.google.com/sheets/ Google Sheets API Reference> for @sheets.spreadsheets.values.clear@.
29+module Network.Google.Resource.Sheets.Spreadsheets.Values.Clear
30+ (
31+ -- * REST Resource
32+ SpreadsheetsValuesClearResource
33+
34+ -- * Creating a Request
35+ , spreadsheetsValuesClear
36+ , SpreadsheetsValuesClear
37+
38+ -- * Request Lenses
39+ , svcXgafv
40+ , svcUploadProtocol
41+ , svcPp
42+ , svcAccessToken
43+ , svcSpreadsheetId
44+ , svcUploadType
45+ , svcPayload
46+ , svcBearerToken
47+ , svcRange
48+ , svcCallback
49+ ) where
50+
51+import Network.Google.Prelude
52+import Network.Google.Sheets.Types
53+
54+-- | A resource alias for @sheets.spreadsheets.values.clear@ method which the
55+-- 'SpreadsheetsValuesClear' request conforms to.
56+type SpreadsheetsValuesClearResource =
57+ "v4" :>
58+ "spreadsheets" :>
59+ Capture "spreadsheetId" Text :>
60+ "values" :>
61+ CaptureMode "range" "clear" Text :>
62+ QueryParam "$.xgafv" Xgafv :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] ClearValuesRequest :>
71+ Post '[JSON] ClearValuesResponse
72+
73+-- | Clears values from a spreadsheet. The caller must specify the
74+-- spreadsheet ID and range. Only values are cleared -- all other
75+-- properties of the cell (such as formatting, data validation, etc..) are
76+-- kept.
77+--
78+-- /See:/ 'spreadsheetsValuesClear' smart constructor.
79+data SpreadsheetsValuesClear = SpreadsheetsValuesClear'
80+ { _svcXgafv :: !(Maybe Xgafv)
81+ , _svcUploadProtocol :: !(Maybe Text)
82+ , _svcPp :: !Bool
83+ , _svcAccessToken :: !(Maybe Text)
84+ , _svcSpreadsheetId :: !Text
85+ , _svcUploadType :: !(Maybe Text)
86+ , _svcPayload :: !ClearValuesRequest
87+ , _svcBearerToken :: !(Maybe Text)
88+ , _svcRange :: !Text
89+ , _svcCallback :: !(Maybe Text)
90+ } deriving (Eq,Show,Data,Typeable,Generic)
91+
92+-- | Creates a value of 'SpreadsheetsValuesClear' with the minimum fields required to make a request.
93+--
94+-- Use one of the following lenses to modify other fields as desired:
95+--
96+-- * 'svcXgafv'
97+--
98+-- * 'svcUploadProtocol'
99+--
100+-- * 'svcPp'
101+--
102+-- * 'svcAccessToken'
103+--
104+-- * 'svcSpreadsheetId'
105+--
106+-- * 'svcUploadType'
107+--
108+-- * 'svcPayload'
109+--
110+-- * 'svcBearerToken'
111+--
112+-- * 'svcRange'
113+--
114+-- * 'svcCallback'
115+spreadsheetsValuesClear
116+ :: Text -- ^ 'svcSpreadsheetId'
117+ -> ClearValuesRequest -- ^ 'svcPayload'
118+ -> Text -- ^ 'svcRange'
119+ -> SpreadsheetsValuesClear
120+spreadsheetsValuesClear pSvcSpreadsheetId_ pSvcPayload_ pSvcRange_ =
121+ SpreadsheetsValuesClear'
122+ { _svcXgafv = Nothing
123+ , _svcUploadProtocol = Nothing
124+ , _svcPp = True
125+ , _svcAccessToken = Nothing
126+ , _svcSpreadsheetId = pSvcSpreadsheetId_
127+ , _svcUploadType = Nothing
128+ , _svcPayload = pSvcPayload_
129+ , _svcBearerToken = Nothing
130+ , _svcRange = pSvcRange_
131+ , _svcCallback = Nothing
132+ }
133+
134+-- | V1 error format.
135+svcXgafv :: Lens' SpreadsheetsValuesClear (Maybe Xgafv)
136+svcXgafv = lens _svcXgafv (\ s a -> s{_svcXgafv = a})
137+
138+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
139+svcUploadProtocol :: Lens' SpreadsheetsValuesClear (Maybe Text)
140+svcUploadProtocol
141+ = lens _svcUploadProtocol
142+ (\ s a -> s{_svcUploadProtocol = a})
143+
144+-- | Pretty-print response.
145+svcPp :: Lens' SpreadsheetsValuesClear Bool
146+svcPp = lens _svcPp (\ s a -> s{_svcPp = a})
147+
148+-- | OAuth access token.
149+svcAccessToken :: Lens' SpreadsheetsValuesClear (Maybe Text)
150+svcAccessToken
151+ = lens _svcAccessToken
152+ (\ s a -> s{_svcAccessToken = a})
153+
154+-- | The ID of the spreadsheet to update.
155+svcSpreadsheetId :: Lens' SpreadsheetsValuesClear Text
156+svcSpreadsheetId
157+ = lens _svcSpreadsheetId
158+ (\ s a -> s{_svcSpreadsheetId = a})
159+
160+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
161+svcUploadType :: Lens' SpreadsheetsValuesClear (Maybe Text)
162+svcUploadType
163+ = lens _svcUploadType
164+ (\ s a -> s{_svcUploadType = a})
165+
166+-- | Multipart request metadata.
167+svcPayload :: Lens' SpreadsheetsValuesClear ClearValuesRequest
168+svcPayload
169+ = lens _svcPayload (\ s a -> s{_svcPayload = a})
170+
171+-- | OAuth bearer token.
172+svcBearerToken :: Lens' SpreadsheetsValuesClear (Maybe Text)
173+svcBearerToken
174+ = lens _svcBearerToken
175+ (\ s a -> s{_svcBearerToken = a})
176+
177+-- | The A1 notation of the values to clear.
178+svcRange :: Lens' SpreadsheetsValuesClear Text
179+svcRange = lens _svcRange (\ s a -> s{_svcRange = a})
180+
181+-- | JSONP
182+svcCallback :: Lens' SpreadsheetsValuesClear (Maybe Text)
183+svcCallback
184+ = lens _svcCallback (\ s a -> s{_svcCallback = a})
185+
186+instance GoogleRequest SpreadsheetsValuesClear where
187+ type Rs SpreadsheetsValuesClear = ClearValuesResponse
188+ type Scopes SpreadsheetsValuesClear =
189+ '["https://www.googleapis.com/auth/drive",
190+ "https://www.googleapis.com/auth/spreadsheets"]
191+ requestClient SpreadsheetsValuesClear'{..}
192+ = go _svcSpreadsheetId _svcRange _svcXgafv
193+ _svcUploadProtocol
194+ (Just _svcPp)
195+ _svcAccessToken
196+ _svcUploadType
197+ _svcBearerToken
198+ _svcCallback
199+ (Just AltJSON)
200+ _svcPayload
201+ sheetsService
202+ where go
203+ = buildClient
204+ (Proxy :: Proxy SpreadsheetsValuesClearResource)
205+ mempty
gogol-sheets/gen/Network/Google/Sheets.hs+44−1
@@ -44,12 +44,21 @@ module Network.Google.Sheets
4444 -- ** sheets.spreadsheets.sheets.copyTo
4545 , module Network.Google.Resource.Sheets.Spreadsheets.Sheets.CopyTo
4646
47+ -- ** sheets.spreadsheets.values.append
48+ , module Network.Google.Resource.Sheets.Spreadsheets.Values.Append
49+
50+ -- ** sheets.spreadsheets.values.batchClear
51+ , module Network.Google.Resource.Sheets.Spreadsheets.Values.BatchClear
52+
4753 -- ** sheets.spreadsheets.values.batchGet
4854 , module Network.Google.Resource.Sheets.Spreadsheets.Values.BatchGet
4955
5056 -- ** sheets.spreadsheets.values.batchUpdate
5157 , module Network.Google.Resource.Sheets.Spreadsheets.Values.BatchUpdate
5258
59+ -- ** sheets.spreadsheets.values.clear
60+ , module Network.Google.Resource.Sheets.Spreadsheets.Values.Clear
61+
5362 -- ** sheets.spreadsheets.values.get
5463 , module Network.Google.Resource.Sheets.Spreadsheets.Values.Get
5564
@@ -99,6 +108,11 @@ module Network.Google.Sheets
99108 , chartData
100109 , cdSourceRange
101110
111+ -- ** BatchClearValuesRequest
112+ , BatchClearValuesRequest
113+ , batchClearValuesRequest
114+ , bcvrRanges
115+
102116 -- ** BasicChartSeriesTargetAxis
103117 , BasicChartSeriesTargetAxis (..)
104118
@@ -194,6 +208,12 @@ module Network.Google.Sheets
194208 , gcRowIndex
195209 , gcSheetId
196210
211+ -- ** ClearValuesResponse
212+ , ClearValuesResponse
213+ , clearValuesResponse
214+ , cvrClearedRange
215+ , cvrSpreadsheetId
216+
197217 -- ** ClearBasicFilterRequest
198218 , ClearBasicFilterRequest
199219 , clearBasicFilterRequest
@@ -262,6 +282,13 @@ module Network.Google.Sheets
262282 , pcsSeries
263283 , pcsThreeDimensional
264284
285+ -- ** AppendValuesResponse
286+ , AppendValuesResponse
287+ , appendValuesResponse
288+ , avrSpreadsheetId
289+ , avrUpdates
290+ , avrTableRange
291+
265292 -- ** DataValidationRule
266293 , DataValidationRule
267294 , dataValidationRule
@@ -332,6 +359,10 @@ module Network.Google.Sheets
332359 , deleteDimensionRequest
333360 , ddrRange
334361
362+ -- ** ClearValuesRequest
363+ , ClearValuesRequest
364+ , clearValuesRequest
365+
335366 -- ** FindReplaceRequest
336367 , FindReplaceRequest
337368 , findReplaceRequest
@@ -962,6 +993,12 @@ module Network.Google.Sheets
962993 , tfBold
963994 , tfStrikethrough
964995
996+ -- ** BatchClearValuesResponse
997+ , BatchClearValuesResponse
998+ , batchClearValuesResponse
999+ , bcvrClearedRanges
1000+ , bcvrSpreadsheetId
1001+
9651002 -- ** BasicChartDomain
9661003 , BasicChartDomain
9671004 , basicChartDomain
@@ -1069,8 +1106,11 @@ import Network.Google.Resource.Sheets.Spreadsheets.BatchUpdate
10691106import Network.Google.Resource.Sheets.Spreadsheets.Create
10701107import Network.Google.Resource.Sheets.Spreadsheets.Get
10711108import Network.Google.Resource.Sheets.Spreadsheets.Sheets.CopyTo
1109+import Network.Google.Resource.Sheets.Spreadsheets.Values.Append
1110+import Network.Google.Resource.Sheets.Spreadsheets.Values.BatchClear
10721111import Network.Google.Resource.Sheets.Spreadsheets.Values.BatchGet
10731112import Network.Google.Resource.Sheets.Spreadsheets.Values.BatchUpdate
1113+import Network.Google.Resource.Sheets.Spreadsheets.Values.Clear
10741114import Network.Google.Resource.Sheets.Spreadsheets.Values.Get
10751115import Network.Google.Resource.Sheets.Spreadsheets.Values.Update
10761116import Network.Google.Sheets.Types
@@ -1082,9 +1122,12 @@ TODO
10821122-- | Represents the entirety of the methods and resources available for the Google Sheets API service.
10831123type SheetsAPI =
10841124 SpreadsheetsSheetsCopyToResource :<|>
1085− SpreadsheetsValuesGetResource
1125+ SpreadsheetsValuesBatchClearResource
1126+ :<|> SpreadsheetsValuesGetResource
1127+ :<|> SpreadsheetsValuesClearResource
10861128 :<|> SpreadsheetsValuesBatchGetResource
10871129 :<|> SpreadsheetsValuesBatchUpdateResource
1130+ :<|> SpreadsheetsValuesAppendResource
10881131 :<|> SpreadsheetsValuesUpdateResource
10891132 :<|> SpreadsheetsGetResource
10901133 :<|> SpreadsheetsCreateResource
gogol-sheets/gen/Network/Google/Sheets/Types.hs+28
@@ -66,6 +66,11 @@ module Network.Google.Sheets.Types
6666 , chartData
6767 , cdSourceRange
6868
69+ -- * BatchClearValuesRequest
70+ , BatchClearValuesRequest
71+ , batchClearValuesRequest
72+ , bcvrRanges
73+
6974 -- * BasicChartSeriesTargetAxis
7075 , BasicChartSeriesTargetAxis (..)
7176
@@ -161,6 +166,12 @@ module Network.Google.Sheets.Types
161166 , gcRowIndex
162167 , gcSheetId
163168
169+ -- * ClearValuesResponse
170+ , ClearValuesResponse
171+ , clearValuesResponse
172+ , cvrClearedRange
173+ , cvrSpreadsheetId
174+
164175 -- * ClearBasicFilterRequest
165176 , ClearBasicFilterRequest
166177 , clearBasicFilterRequest
@@ -229,6 +240,13 @@ module Network.Google.Sheets.Types
229240 , pcsSeries
230241 , pcsThreeDimensional
231242
243+ -- * AppendValuesResponse
244+ , AppendValuesResponse
245+ , appendValuesResponse
246+ , avrSpreadsheetId
247+ , avrUpdates
248+ , avrTableRange
249+
232250 -- * DataValidationRule
233251 , DataValidationRule
234252 , dataValidationRule
@@ -299,6 +317,10 @@ module Network.Google.Sheets.Types
299317 , deleteDimensionRequest
300318 , ddrRange
301319
320+ -- * ClearValuesRequest
321+ , ClearValuesRequest
322+ , clearValuesRequest
323+
302324 -- * FindReplaceRequest
303325 , FindReplaceRequest
304326 , findReplaceRequest
@@ -929,6 +951,12 @@ module Network.Google.Sheets.Types
929951 , tfBold
930952 , tfStrikethrough
931953
954+ -- * BatchClearValuesResponse
955+ , BatchClearValuesResponse
956+ , batchClearValuesResponse
957+ , bcvrClearedRanges
958+ , bcvrSpreadsheetId
959+
932960 -- * BasicChartDomain
933961 , BasicChartDomain
934962 , basicChartDomain
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs+250−15
@@ -123,7 +123,9 @@ vrValues
123123
124124-- | The range the values cover, in A1 notation. For output, this range
125125-- indicates the entire requested range, even though the values will
126−-- exclude trailing rows and columns.
126+-- exclude trailing rows and columns. When appending values, this field
127+-- represents the range to search for a table, after which values will be
128+-- appended.
127129vrRange :: Lens' ValueRange (Maybe Text)
128130vrRange = lens _vrRange (\ s a -> s{_vrRange = a})
129131
@@ -328,6 +330,43 @@ instance ToJSON ChartData where
328330 = object
329331 (catMaybes [("sourceRange" .=) <$> _cdSourceRange])
330332
333+-- | The request for clearing more than one range of values in a spreadsheet.
334+--
335+-- /See:/ 'batchClearValuesRequest' smart constructor.
336+newtype BatchClearValuesRequest = BatchClearValuesRequest'
337+ { _bcvrRanges :: Maybe [Text]
338+ } deriving (Eq,Show,Data,Typeable,Generic)
339+
340+-- | Creates a value of 'BatchClearValuesRequest' with the minimum fields required to make a request.
341+--
342+-- Use one of the following lenses to modify other fields as desired:
343+--
344+-- * 'bcvrRanges'
345+batchClearValuesRequest
346+ :: BatchClearValuesRequest
347+batchClearValuesRequest =
348+ BatchClearValuesRequest'
349+ { _bcvrRanges = Nothing
350+ }
351+
352+-- | The ranges to clear, in A1 notation.
353+bcvrRanges :: Lens' BatchClearValuesRequest [Text]
354+bcvrRanges
355+ = lens _bcvrRanges (\ s a -> s{_bcvrRanges = a}) .
356+ _Default
357+ . _Coerce
358+
359+instance FromJSON BatchClearValuesRequest where
360+ parseJSON
361+ = withObject "BatchClearValuesRequest"
362+ (\ o ->
363+ BatchClearValuesRequest' <$>
364+ (o .:? "ranges" .!= mempty))
365+
366+instance ToJSON BatchClearValuesRequest where
367+ toJSON BatchClearValuesRequest'{..}
368+ = object (catMaybes [("ranges" .=) <$> _bcvrRanges])
369+
331370-- | Properties of a spreadsheet.
332371--
333372-- /See:/ 'spreadsheetProperties' smart constructor.
@@ -552,8 +591,9 @@ addSheetRequest =
552591 }
553592
554593-- | The properties the new sheet should have. All properties are optional.
555−-- If a sheetId is specified, the sheet will use that ID. (It is an error
556−-- to specify the ID of a sheet that already exists.)
594+-- The sheetId field is optional; if one is not set, an id will be randomly
595+-- generated. (It is an error to specify the ID of a sheet that already
596+-- exists.)
557597asrProperties :: Lens' AddSheetRequest (Maybe SheetProperties)
558598asrProperties
559599 = lens _asrProperties
@@ -1112,6 +1152,58 @@ instance ToJSON GridCoordinate where
11121152 ("rowIndex" .=) <$> _gcRowIndex,
11131153 ("sheetId" .=) <$> _gcSheetId])
11141154
1155+-- | The response when clearing a range of values in a spreadsheet.
1156+--
1157+-- /See:/ 'clearValuesResponse' smart constructor.
1158+data ClearValuesResponse = ClearValuesResponse'
1159+ { _cvrClearedRange :: !(Maybe Text)
1160+ , _cvrSpreadsheetId :: !(Maybe Text)
1161+ } deriving (Eq,Show,Data,Typeable,Generic)
1162+
1163+-- | Creates a value of 'ClearValuesResponse' with the minimum fields required to make a request.
1164+--
1165+-- Use one of the following lenses to modify other fields as desired:
1166+--
1167+-- * 'cvrClearedRange'
1168+--
1169+-- * 'cvrSpreadsheetId'
1170+clearValuesResponse
1171+ :: ClearValuesResponse
1172+clearValuesResponse =
1173+ ClearValuesResponse'
1174+ { _cvrClearedRange = Nothing
1175+ , _cvrSpreadsheetId = Nothing
1176+ }
1177+
1178+-- | The range (in A1 notation) that was cleared. (If the request was for an
1179+-- unbounded range or a ranger larger than the bounds of the sheet, this
1180+-- will be the actual range that was cleared, bounded to the sheet\'s
1181+-- limits.)
1182+cvrClearedRange :: Lens' ClearValuesResponse (Maybe Text)
1183+cvrClearedRange
1184+ = lens _cvrClearedRange
1185+ (\ s a -> s{_cvrClearedRange = a})
1186+
1187+-- | The spreadsheet the updates were applied to.
1188+cvrSpreadsheetId :: Lens' ClearValuesResponse (Maybe Text)
1189+cvrSpreadsheetId
1190+ = lens _cvrSpreadsheetId
1191+ (\ s a -> s{_cvrSpreadsheetId = a})
1192+
1193+instance FromJSON ClearValuesResponse where
1194+ parseJSON
1195+ = withObject "ClearValuesResponse"
1196+ (\ o ->
1197+ ClearValuesResponse' <$>
1198+ (o .:? "clearedRange") <*> (o .:? "spreadsheetId"))
1199+
1200+instance ToJSON ClearValuesResponse where
1201+ toJSON ClearValuesResponse'{..}
1202+ = object
1203+ (catMaybes
1204+ [("clearedRange" .=) <$> _cvrClearedRange,
1205+ ("spreadsheetId" .=) <$> _cvrSpreadsheetId])
1206+
11151207-- | Clears the basic filter, if any exists on the sheet.
11161208--
11171209-- /See:/ 'clearBasicFilterRequest' smart constructor.
@@ -1649,6 +1741,67 @@ instance ToJSON PieChartSpec where
16491741 ("series" .=) <$> _pcsSeries,
16501742 ("threeDimensional" .=) <$> _pcsThreeDimensional])
16511743
1744+-- | The response when updating a range of values in a spreadsheet.
1745+--
1746+-- /See:/ 'appendValuesResponse' smart constructor.
1747+data AppendValuesResponse = AppendValuesResponse'
1748+ { _avrSpreadsheetId :: !(Maybe Text)
1749+ , _avrUpdates :: !(Maybe UpdateValuesResponse)
1750+ , _avrTableRange :: !(Maybe Text)
1751+ } deriving (Eq,Show,Data,Typeable,Generic)
1752+
1753+-- | Creates a value of 'AppendValuesResponse' with the minimum fields required to make a request.
1754+--
1755+-- Use one of the following lenses to modify other fields as desired:
1756+--
1757+-- * 'avrSpreadsheetId'
1758+--
1759+-- * 'avrUpdates'
1760+--
1761+-- * 'avrTableRange'
1762+appendValuesResponse
1763+ :: AppendValuesResponse
1764+appendValuesResponse =
1765+ AppendValuesResponse'
1766+ { _avrSpreadsheetId = Nothing
1767+ , _avrUpdates = Nothing
1768+ , _avrTableRange = Nothing
1769+ }
1770+
1771+-- | The spreadsheet the updates were applied to.
1772+avrSpreadsheetId :: Lens' AppendValuesResponse (Maybe Text)
1773+avrSpreadsheetId
1774+ = lens _avrSpreadsheetId
1775+ (\ s a -> s{_avrSpreadsheetId = a})
1776+
1777+-- | Information about the updates that were applied.
1778+avrUpdates :: Lens' AppendValuesResponse (Maybe UpdateValuesResponse)
1779+avrUpdates
1780+ = lens _avrUpdates (\ s a -> s{_avrUpdates = a})
1781+
1782+-- | The range (in A1 notation) of the table that values are being appended
1783+-- to (before the values were appended). Empty if no table was found.
1784+avrTableRange :: Lens' AppendValuesResponse (Maybe Text)
1785+avrTableRange
1786+ = lens _avrTableRange
1787+ (\ s a -> s{_avrTableRange = a})
1788+
1789+instance FromJSON AppendValuesResponse where
1790+ parseJSON
1791+ = withObject "AppendValuesResponse"
1792+ (\ o ->
1793+ AppendValuesResponse' <$>
1794+ (o .:? "spreadsheetId") <*> (o .:? "updates") <*>
1795+ (o .:? "tableRange"))
1796+
1797+instance ToJSON AppendValuesResponse where
1798+ toJSON AppendValuesResponse'{..}
1799+ = object
1800+ (catMaybes
1801+ [("spreadsheetId" .=) <$> _avrSpreadsheetId,
1802+ ("updates" .=) <$> _avrUpdates,
1803+ ("tableRange" .=) <$> _avrTableRange])
1804+
16521805-- | A data validation rule.
16531806--
16541807-- /See:/ 'dataValidationRule' smart constructor.
@@ -2113,7 +2266,9 @@ addProtectedRangeRequest =
21132266 { _aprrProtectedRange = Nothing
21142267 }
21152268
2116−-- | The protected range to be added.
2269+-- | The protected range to be added. The protectedRangeId field is optional;
2270+-- if one is not set, an id will be randomly generated. (It is an error to
2271+-- specify the ID of a range that already exists.)
21172272aprrProtectedRange :: Lens' AddProtectedRangeRequest (Maybe ProtectedRange)
21182273aprrProtectedRange
21192274 = lens _aprrProtectedRange
@@ -2285,6 +2440,27 @@ instance ToJSON DeleteDimensionRequest where
22852440 toJSON DeleteDimensionRequest'{..}
22862441 = object (catMaybes [("range" .=) <$> _ddrRange])
22872442
2443+-- | The request for clearing a range of values in a spreadsheet.
2444+--
2445+-- /See:/ 'clearValuesRequest' smart constructor.
2446+data ClearValuesRequest =
2447+ ClearValuesRequest'
2448+ deriving (Eq,Show,Data,Typeable,Generic)
2449+
2450+-- | Creates a value of 'ClearValuesRequest' with the minimum fields required to make a request.
2451+--
2452+clearValuesRequest
2453+ :: ClearValuesRequest
2454+clearValuesRequest = ClearValuesRequest'
2455+
2456+instance FromJSON ClearValuesRequest where
2457+ parseJSON
2458+ = withObject "ClearValuesRequest"
2459+ (\ o -> pure ClearValuesRequest')
2460+
2461+instance ToJSON ClearValuesRequest where
2462+ toJSON = const emptyObject
2463+
22882464-- | Finds and replaces data in cells over a range, sheet, or all sheets.
22892465--
22902466-- /See:/ 'findReplaceRequest' smart constructor.
@@ -4484,7 +4660,9 @@ addChartRequest =
44844660 }
44854661
44864662-- | The chart that should be added to the spreadsheet, including the
4487−-- position where it should be placed.
4663+-- position where it should be placed. The chartId field is optional; if
4664+-- one is not set, an id will be randomly generated. (It is an error to
4665+-- specify the ID of a chart that already exists.)
44884666aChart :: Lens' AddChartRequest (Maybe EmbeddedChart)
44894667aChart = lens _aChart (\ s a -> s{_aChart = a})
44904668
@@ -4634,8 +4812,8 @@ boStyle = lens _boStyle (\ s a -> s{_boStyle = a})
46344812boColor :: Lens' BOrder (Maybe Color)
46354813boColor = lens _boColor (\ s a -> s{_boColor = a})
46364814
4637−-- | The width of the border, in pixels. Border widths must be between 0 and
4638−-- 3 pixels, inclusive.
4815+-- | The width of the border, in pixels. Deprecated; the width is determined
4816+-- by the \"style\" field.
46394817boWidth :: Lens' BOrder (Maybe Int32)
46404818boWidth
46414819 = lens _boWidth (\ s a -> s{_boWidth = a}) .
@@ -4763,9 +4941,9 @@ addNamedRangeRequest =
47634941 { _aNamedRange = Nothing
47644942 }
47654943
4766−-- | The named range to add. If a non-empty namedRangeId is specified, the
4767−-- named range will use that ID. (It is an error to specify the ID of a
4768−-- named range that already exists.)
4944+-- | The named range to add. The namedRangeId field is optional; if one is
4945+-- not set, an id will be randomly generated. (It is an error to specify
4946+-- the ID of a range that already exists.)
47694947aNamedRange :: Lens' AddNamedRangeRequest (Maybe NamedRange)
47704948aNamedRange
47714949 = lens _aNamedRange (\ s a -> s{_aNamedRange = a})
@@ -5924,7 +6102,9 @@ addFilterViewRequest =
59246102 { _aFilter = Nothing
59256103 }
59266104
5927−-- | The filter to add.
6105+-- | The filter to add. The filterViewId field is optional; if one is not
6106+-- set, an id will be randomly generated. (It is an error to specify the ID
6107+-- of a filter that already exists.)
59286108aFilter :: Lens' AddFilterViewRequest (Maybe FilterView)
59296109aFilter = lens _aFilter (\ s a -> s{_aFilter = a})
59306110
@@ -6265,9 +6445,7 @@ updateProtectedRangeRequest =
62656445 , _uprrFields = Nothing
62666446 }
62676447
6268−-- | The protected range to update with the new properties. If a nonzero
6269−-- protectedRangeId is specified, the protected range will use that ID. (It
6270−-- is an error to specify the ID of a protected range that already exists.)
6448+-- | The protected range to update with the new properties.
62716449uprrProtectedRange :: Lens' UpdateProtectedRangeRequest (Maybe ProtectedRange)
62726450uprrProtectedRange
62736451 = lens _uprrProtectedRange
@@ -6643,7 +6821,9 @@ numberFormat =
66436821 }
66446822
66456823-- | Pattern string used for formatting. If not set, a default pattern based
6646−-- on the user\'s locale will be used if necessary for the given type.
6824+-- on the user\'s locale will be used if necessary for the given type. See
6825+-- the [Date and Number Formats guide](\/sheets\/guides\/formats) for more
6826+-- information about the supported patterns.
66476827nfPattern :: Lens' NumberFormat (Maybe Text)
66486828nfPattern
66496829 = lens _nfPattern (\ s a -> s{_nfPattern = a})
@@ -7247,6 +7427,61 @@ instance ToJSON TextFormat where
72477427 ("italic" .=) <$> _tfItalic, ("bold" .=) <$> _tfBold,
72487428 ("strikethrough" .=) <$> _tfStrikethrough])
72497429
7430+-- | The response when updating a range of values in a spreadsheet.
7431+--
7432+-- /See:/ 'batchClearValuesResponse' smart constructor.
7433+data BatchClearValuesResponse = BatchClearValuesResponse'
7434+ { _bcvrClearedRanges :: !(Maybe [Text])
7435+ , _bcvrSpreadsheetId :: !(Maybe Text)
7436+ } deriving (Eq,Show,Data,Typeable,Generic)
7437+
7438+-- | Creates a value of 'BatchClearValuesResponse' with the minimum fields required to make a request.
7439+--
7440+-- Use one of the following lenses to modify other fields as desired:
7441+--
7442+-- * 'bcvrClearedRanges'
7443+--
7444+-- * 'bcvrSpreadsheetId'
7445+batchClearValuesResponse
7446+ :: BatchClearValuesResponse
7447+batchClearValuesResponse =
7448+ BatchClearValuesResponse'
7449+ { _bcvrClearedRanges = Nothing
7450+ , _bcvrSpreadsheetId = Nothing
7451+ }
7452+
7453+-- | The ranges that were cleared, in A1 notation. (If the requests were for
7454+-- an unbounded range or a ranger larger than the bounds of the sheet, this
7455+-- will be the actual ranges that were cleared, bounded to the sheet\'s
7456+-- limits.)
7457+bcvrClearedRanges :: Lens' BatchClearValuesResponse [Text]
7458+bcvrClearedRanges
7459+ = lens _bcvrClearedRanges
7460+ (\ s a -> s{_bcvrClearedRanges = a})
7461+ . _Default
7462+ . _Coerce
7463+
7464+-- | The spreadsheet the updates were applied to.
7465+bcvrSpreadsheetId :: Lens' BatchClearValuesResponse (Maybe Text)
7466+bcvrSpreadsheetId
7467+ = lens _bcvrSpreadsheetId
7468+ (\ s a -> s{_bcvrSpreadsheetId = a})
7469+
7470+instance FromJSON BatchClearValuesResponse where
7471+ parseJSON
7472+ = withObject "BatchClearValuesResponse"
7473+ (\ o ->
7474+ BatchClearValuesResponse' <$>
7475+ (o .:? "clearedRanges" .!= mempty) <*>
7476+ (o .:? "spreadsheetId"))
7477+
7478+instance ToJSON BatchClearValuesResponse where
7479+ toJSON BatchClearValuesResponse'{..}
7480+ = object
7481+ (catMaybes
7482+ [("clearedRanges" .=) <$> _bcvrClearedRanges,
7483+ ("spreadsheetId" .=) <$> _bcvrSpreadsheetId])
7484+
72507485-- | The domain of a chart. For example, if charting stock prices over time,
72517486-- this would be the date.
72527487--
gogol-sheets/gen/Network/Google/Sheets/Types/Sum.hs+21−13
@@ -904,13 +904,11 @@ data BooleanConditionType
904904 | TextStartsWith
905905 -- ^ @TEXT_STARTS_WITH@
906906 -- The cell\'s value must start with the condition\'s value. Supported by
907− -- data validation, conditional formatting and filters. Requires a single
908− -- ConditionValue.
907+ -- conditional formatting and filters. Requires a single ConditionValue.
909908 | TextEndsWith
910909 -- ^ @TEXT_ENDS_WITH@
911910 -- The cell\'s value must end with the condition\'s value. Supported by
912− -- data validation, conditional formatting and filters. Requires a single
913− -- ConditionValue.
911+ -- conditional formatting and filters. Requires a single ConditionValue.
914912 | TextEQ
915913 -- ^ @TEXT_EQ@
916914 -- The cell\'s value must be exactly the condition\'s value. Supported by
@@ -942,13 +940,13 @@ data BooleanConditionType
942940 | DateOnOrBefore
943941 -- ^ @DATE_ON_OR_BEFORE@
944942 -- The cell\'s value must be on or before the date of the condition\'s
945− -- value. Supported by data validation, conditional formatting and filters.
946− -- Requires a single ConditionValue that may be a relative date.
943+ -- value. Supported by data validation. Requires a single ConditionValue
944+ -- that may be a relative date.
947945 | DateOnOrAfter
948946 -- ^ @DATE_ON_OR_AFTER@
949947 -- The cell\'s value must be on or after the date of the condition\'s
950− -- value. Supported by data validation, conditional formatting and filters.
951− -- Requires a single ConditionValue that may be a relative date.
948+ -- value. Supported by data validation. Requires a single ConditionValue
949+ -- that may be a relative date.
952950 | DateBetween
953951 -- ^ @DATE_BETWEEN@
954952 -- The cell\'s value must be between the dates of the two condition values.
@@ -973,12 +971,12 @@ data BooleanConditionType
973971 -- in the list. Formulas are not supported in the values.
974972 | Blank
975973 -- ^ @BLANK@
976− -- The cell\'s value must be empty. Supported by data validation,
977− -- conditional formatting and filters. Requires no ConditionValues.
974+ -- The cell\'s value must be empty. Supported by conditional formatting and
975+ -- filters. Requires no ConditionValues.
978976 | NotBlank
979977 -- ^ @NOT_BLANK@
980− -- The cell\'s value must not be empty. Supported by data validation,
981− -- conditional formatting and filters. Requires no ConditionValues.
978+ -- The cell\'s value must not be empty. Supported by conditional formatting
979+ -- and filters. Requires no ConditionValues.
982980 | CustomFormula
983981 -- ^ @CUSTOM_FORMULA@
984982 -- The condition\'s formula must evaluate to true. Supported by data
@@ -1487,7 +1485,13 @@ data BOrderStyle
14871485 -- The border is dashed.
14881486 | Solid
14891487 -- ^ @SOLID@
1490− -- The border is a solid line.
1488+ -- The border is a thin solid line.
1489+ | SolidMedium
1490+ -- ^ @SOLID_MEDIUM@
1491+ -- The border is a medium solid line.
1492+ | SolidThick
1493+ -- ^ @SOLID_THICK@
1494+ -- The border is a thick solid line.
14911495 | None
14921496 -- ^ @NONE@
14931497 -- No border. Used only when updating a border in order to erase it.
@@ -1504,6 +1508,8 @@ instance FromHttpApiData BOrderStyle where
15041508 "DOTTED" -> Right Dotted
15051509 "DASHED" -> Right Dashed
15061510 "SOLID" -> Right Solid
1511+ "SOLID_MEDIUM" -> Right SolidMedium
1512+ "SOLID_THICK" -> Right SolidThick
15071513 "NONE" -> Right None
15081514 "DOUBLE" -> Right Double
15091515 x -> Left ("Unable to parse BOrderStyle from: " <> x)
@@ -1514,6 +1520,8 @@ instance ToHttpApiData BOrderStyle where
15141520 Dotted -> "DOTTED"
15151521 Dashed -> "DASHED"
15161522 Solid -> "SOLID"
1523+ SolidMedium -> "SOLID_MEDIUM"
1524+ SolidThick -> "SOLID_THICK"
15171525 None -> "NONE"
15181526 Double -> "DOUBLE"
15191527
gogol-sheets/gogol-sheets.cabal+3
@@ -37,8 +37,11 @@ library
3737 , Network.Google.Resource.Sheets.Spreadsheets.Create
3838 , Network.Google.Resource.Sheets.Spreadsheets.Get
3939 , Network.Google.Resource.Sheets.Spreadsheets.Sheets.CopyTo
40+ , Network.Google.Resource.Sheets.Spreadsheets.Values.Append
41+ , Network.Google.Resource.Sheets.Spreadsheets.Values.BatchClear
4042 , Network.Google.Resource.Sheets.Spreadsheets.Values.BatchGet
4143 , Network.Google.Resource.Sheets.Spreadsheets.Values.BatchUpdate
44+ , Network.Google.Resource.Sheets.Spreadsheets.Values.Clear
4245 , Network.Google.Resource.Sheets.Spreadsheets.Values.Get
4346 , Network.Google.Resource.Sheets.Spreadsheets.Values.Update
4447 , Network.Google.Sheets