/
Google.Apis.Sheets.v4.cs
6728 lines (5570 loc) · 339 KB
/
Google.Apis.Sheets.v4.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by google-apis-code-generator 1.5.1
// C# generator version: 1.38.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
/**
* \brief
* Google Sheets API Version v4
*
* \section ApiInfo API Version Information
* <table>
* <tr><th>API
* <td><a href='https://developers.google.com/sheets/'>Google Sheets API</a>
* <tr><th>API Version<td>v4
* <tr><th>API Rev<td>20190305 (1524)
* <tr><th>API Docs
* <td><a href='https://developers.google.com/sheets/'>
* https://developers.google.com/sheets/</a>
* <tr><th>Discovery Name<td>sheets
* </table>
*
* \section ForMoreInfo For More Information
*
* The complete API documentation for using Google Sheets API can be found at
* <a href='https://developers.google.com/sheets/'>https://developers.google.com/sheets/</a>.
*
* For more information about the Google APIs Client Library for .NET, see
* <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
* https://developers.google.com/api-client-library/dotnet/get_started</a>
*/
namespace Google.Apis.Sheets.v4
{
/// <summary>The Sheets Service.</summary>
public class SheetsService : Google.Apis.Services.BaseClientService
{
/// <summary>The API version.</summary>
public const string Version = "v4";
/// <summary>The discovery version used to generate this service.</summary>
public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
Google.Apis.Discovery.DiscoveryVersion.Version_1_0;
/// <summary>Constructs a new service.</summary>
public SheetsService() :
this(new Google.Apis.Services.BaseClientService.Initializer()) {}
/// <summary>Constructs a new service.</summary>
/// <param name="initializer">The service initializer.</param>
public SheetsService(Google.Apis.Services.BaseClientService.Initializer initializer)
: base(initializer)
{
spreadsheets = new SpreadsheetsResource(this);
}
/// <summary>Gets the service supported features.</summary>
public override System.Collections.Generic.IList<string> Features
{
get { return new string[0]; }
}
/// <summary>Gets the service name.</summary>
public override string Name
{
get { return "sheets"; }
}
/// <summary>Gets the service base URI.</summary>
public override string BaseUri
{
get { return "https://sheets.googleapis.com/"; }
}
/// <summary>Gets the service base path.</summary>
public override string BasePath
{
get { return ""; }
}
#if !NET40
/// <summary>Gets the batch base URI; <c>null</c> if unspecified.</summary>
public override string BatchUri
{
get { return "https://sheets.googleapis.com/batch"; }
}
/// <summary>Gets the batch base path; <c>null</c> if unspecified.</summary>
public override string BatchPath
{
get { return "batch"; }
}
#endif
/// <summary>Available OAuth 2.0 scopes for use with the Google Sheets API.</summary>
public class Scope
{
/// <summary>See, edit, create, and delete all of your Google Drive files</summary>
public static string Drive = "https://www.googleapis.com/auth/drive";
/// <summary>View and manage Google Drive files and folders that you have opened or created with this
/// app</summary>
public static string DriveFile = "https://www.googleapis.com/auth/drive.file";
/// <summary>See and download all your Google Drive files</summary>
public static string DriveReadonly = "https://www.googleapis.com/auth/drive.readonly";
/// <summary>See, edit, create, and delete your spreadsheets in Google Drive</summary>
public static string Spreadsheets = "https://www.googleapis.com/auth/spreadsheets";
/// <summary>View your Google Spreadsheets</summary>
public static string SpreadsheetsReadonly = "https://www.googleapis.com/auth/spreadsheets.readonly";
}
/// <summary>Available OAuth 2.0 scope constants for use with the Google Sheets API.</summary>
public static class ScopeConstants
{
/// <summary>See, edit, create, and delete all of your Google Drive files</summary>
public const string Drive = "https://www.googleapis.com/auth/drive";
/// <summary>View and manage Google Drive files and folders that you have opened or created with this
/// app</summary>
public const string DriveFile = "https://www.googleapis.com/auth/drive.file";
/// <summary>See and download all your Google Drive files</summary>
public const string DriveReadonly = "https://www.googleapis.com/auth/drive.readonly";
/// <summary>See, edit, create, and delete your spreadsheets in Google Drive</summary>
public const string Spreadsheets = "https://www.googleapis.com/auth/spreadsheets";
/// <summary>View your Google Spreadsheets</summary>
public const string SpreadsheetsReadonly = "https://www.googleapis.com/auth/spreadsheets.readonly";
}
private readonly SpreadsheetsResource spreadsheets;
/// <summary>Gets the Spreadsheets resource.</summary>
public virtual SpreadsheetsResource Spreadsheets
{
get { return spreadsheets; }
}
}
///<summary>A base abstract class for Sheets requests.</summary>
public abstract class SheetsBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
{
///<summary>Constructs a new SheetsBaseServiceRequest instance.</summary>
protected SheetsBaseServiceRequest(Google.Apis.Services.IClientService service)
: base(service)
{
}
/// <summary>V1 error format.</summary>
[Google.Apis.Util.RequestParameterAttribute("$.xgafv", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<XgafvEnum> Xgafv { get; set; }
/// <summary>V1 error format.</summary>
public enum XgafvEnum
{
/// <summary>v1 error format</summary>
[Google.Apis.Util.StringValueAttribute("1")]
Value1,
/// <summary>v2 error format</summary>
[Google.Apis.Util.StringValueAttribute("2")]
Value2,
}
/// <summary>OAuth access token.</summary>
[Google.Apis.Util.RequestParameterAttribute("access_token", Google.Apis.Util.RequestParameterType.Query)]
public virtual string AccessToken { get; set; }
/// <summary>Data format for response.</summary>
/// [default: json]
[Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<AltEnum> Alt { get; set; }
/// <summary>Data format for response.</summary>
public enum AltEnum
{
/// <summary>Responses with Content-Type of application/json</summary>
[Google.Apis.Util.StringValueAttribute("json")]
Json,
/// <summary>Media download with context-dependent Content-Type</summary>
[Google.Apis.Util.StringValueAttribute("media")]
Media,
/// <summary>Responses with Content-Type of application/x-protobuf</summary>
[Google.Apis.Util.StringValueAttribute("proto")]
Proto,
}
/// <summary>JSONP</summary>
[Google.Apis.Util.RequestParameterAttribute("callback", Google.Apis.Util.RequestParameterType.Query)]
public virtual string Callback { get; set; }
/// <summary>Selector specifying which fields to include in a partial response.</summary>
[Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
public virtual string Fields { get; set; }
/// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
/// Required unless you provide an OAuth 2.0 token.</summary>
[Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
public virtual string Key { get; set; }
/// <summary>OAuth 2.0 token for the current user.</summary>
[Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
public virtual string OauthToken { get; set; }
/// <summary>Returns response with indentations and line breaks.</summary>
/// [default: true]
[Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> PrettyPrint { get; set; }
/// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
/// assigned to a user, but should not exceed 40 characters.</summary>
[Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
public virtual string QuotaUser { get; set; }
/// <summary>Legacy upload protocol for media (e.g. "media", "multipart").</summary>
[Google.Apis.Util.RequestParameterAttribute("uploadType", Google.Apis.Util.RequestParameterType.Query)]
public virtual string UploadType { get; set; }
/// <summary>Upload protocol for media (e.g. "raw", "multipart").</summary>
[Google.Apis.Util.RequestParameterAttribute("upload_protocol", Google.Apis.Util.RequestParameterType.Query)]
public virtual string UploadProtocol { get; set; }
/// <summary>Initializes Sheets parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"$.xgafv", new Google.Apis.Discovery.Parameter
{
Name = "$.xgafv",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"access_token", new Google.Apis.Discovery.Parameter
{
Name = "access_token",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"alt", new Google.Apis.Discovery.Parameter
{
Name = "alt",
IsRequired = false,
ParameterType = "query",
DefaultValue = "json",
Pattern = null,
});
RequestParameters.Add(
"callback", new Google.Apis.Discovery.Parameter
{
Name = "callback",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"fields", new Google.Apis.Discovery.Parameter
{
Name = "fields",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"key", new Google.Apis.Discovery.Parameter
{
Name = "key",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"oauth_token", new Google.Apis.Discovery.Parameter
{
Name = "oauth_token",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"prettyPrint", new Google.Apis.Discovery.Parameter
{
Name = "prettyPrint",
IsRequired = false,
ParameterType = "query",
DefaultValue = "true",
Pattern = null,
});
RequestParameters.Add(
"quotaUser", new Google.Apis.Discovery.Parameter
{
Name = "quotaUser",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"uploadType", new Google.Apis.Discovery.Parameter
{
Name = "uploadType",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"upload_protocol", new Google.Apis.Discovery.Parameter
{
Name = "upload_protocol",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>The "spreadsheets" collection of methods.</summary>
public class SpreadsheetsResource
{
private const string Resource = "spreadsheets";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public SpreadsheetsResource(Google.Apis.Services.IClientService service)
{
this.service = service;
developerMetadata = new DeveloperMetadataResource(service);
sheets = new SheetsResource(service);
values = new ValuesResource(service);
}
private readonly DeveloperMetadataResource developerMetadata;
/// <summary>Gets the DeveloperMetadata resource.</summary>
public virtual DeveloperMetadataResource DeveloperMetadata
{
get { return developerMetadata; }
}
/// <summary>The "developerMetadata" collection of methods.</summary>
public class DeveloperMetadataResource
{
private const string Resource = "developerMetadata";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public DeveloperMetadataResource(Google.Apis.Services.IClientService service)
{
this.service = service;
}
/// <summary>Returns the developer metadata with the specified ID. The caller must specify the spreadsheet
/// ID and the developer metadata's unique metadataId.</summary>
/// <param name="spreadsheetId">The ID of the spreadsheet to retrieve metadata from.</param>
/// <param
/// name="metadataId">The ID of the developer metadata to retrieve.</param>
public virtual GetRequest Get(string spreadsheetId, int metadataId)
{
return new GetRequest(service, spreadsheetId, metadataId);
}
/// <summary>Returns the developer metadata with the specified ID. The caller must specify the spreadsheet
/// ID and the developer metadata's unique metadataId.</summary>
public class GetRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.DeveloperMetadata>
{
/// <summary>Constructs a new Get request.</summary>
public GetRequest(Google.Apis.Services.IClientService service, string spreadsheetId, int metadataId)
: base(service)
{
SpreadsheetId = spreadsheetId;
MetadataId = metadataId;
InitParameters();
}
/// <summary>The ID of the spreadsheet to retrieve metadata from.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>The ID of the developer metadata to retrieve.</summary>
[Google.Apis.Util.RequestParameterAttribute("metadataId", Google.Apis.Util.RequestParameterType.Path)]
public virtual int MetadataId { get; private set; }
///<summary>Gets the method name.</summary>
public override string MethodName
{
get { return "get"; }
}
///<summary>Gets the HTTP method.</summary>
public override string HttpMethod
{
get { return "GET"; }
}
///<summary>Gets the REST path.</summary>
public override string RestPath
{
get { return "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}"; }
}
/// <summary>Initializes Get parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"spreadsheetId", new Google.Apis.Discovery.Parameter
{
Name = "spreadsheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"metadataId", new Google.Apis.Discovery.Parameter
{
Name = "metadataId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Returns all developer metadata matching the specified DataFilter. If the provided DataFilter
/// represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by
/// it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata
/// associated with locations intersecting that region.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="spreadsheetId">The ID of the spreadsheet to retrieve metadata from.</param>
public virtual SearchRequest Search(Google.Apis.Sheets.v4.Data.SearchDeveloperMetadataRequest body, string spreadsheetId)
{
return new SearchRequest(service, body, spreadsheetId);
}
/// <summary>Returns all developer metadata matching the specified DataFilter. If the provided DataFilter
/// represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by
/// it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata
/// associated with locations intersecting that region.</summary>
public class SearchRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.SearchDeveloperMetadataResponse>
{
/// <summary>Constructs a new Search request.</summary>
public SearchRequest(Google.Apis.Services.IClientService service, Google.Apis.Sheets.v4.Data.SearchDeveloperMetadataRequest body, string spreadsheetId)
: base(service)
{
SpreadsheetId = spreadsheetId;
Body = body;
InitParameters();
}
/// <summary>The ID of the spreadsheet to retrieve metadata from.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Sheets.v4.Data.SearchDeveloperMetadataRequest Body { get; set; }
///<summary>Returns the body of the request.</summary>
protected override object GetBody() { return Body; }
///<summary>Gets the method name.</summary>
public override string MethodName
{
get { return "search"; }
}
///<summary>Gets the HTTP method.</summary>
public override string HttpMethod
{
get { return "POST"; }
}
///<summary>Gets the REST path.</summary>
public override string RestPath
{
get { return "v4/spreadsheets/{spreadsheetId}/developerMetadata:search"; }
}
/// <summary>Initializes Search parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"spreadsheetId", new Google.Apis.Discovery.Parameter
{
Name = "spreadsheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
}
private readonly SheetsResource sheets;
/// <summary>Gets the Sheets resource.</summary>
public virtual SheetsResource Sheets
{
get { return sheets; }
}
/// <summary>The "sheets" collection of methods.</summary>
public class SheetsResource
{
private const string Resource = "sheets";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public SheetsResource(Google.Apis.Services.IClientService service)
{
this.service = service;
}
/// <summary>Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the
/// newly created sheet.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="spreadsheetId">The ID of the spreadsheet containing the sheet to copy.</param>
/// <param
/// name="sheetId">The ID of the sheet to copy.</param>
public virtual CopyToRequest CopyTo(Google.Apis.Sheets.v4.Data.CopySheetToAnotherSpreadsheetRequest body, string spreadsheetId, int sheetId)
{
return new CopyToRequest(service, body, spreadsheetId, sheetId);
}
/// <summary>Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the
/// newly created sheet.</summary>
public class CopyToRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.SheetProperties>
{
/// <summary>Constructs a new CopyTo request.</summary>
public CopyToRequest(Google.Apis.Services.IClientService service, Google.Apis.Sheets.v4.Data.CopySheetToAnotherSpreadsheetRequest body, string spreadsheetId, int sheetId)
: base(service)
{
SpreadsheetId = spreadsheetId;
SheetId = sheetId;
Body = body;
InitParameters();
}
/// <summary>The ID of the spreadsheet containing the sheet to copy.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>The ID of the sheet to copy.</summary>
[Google.Apis.Util.RequestParameterAttribute("sheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual int SheetId { get; private set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Sheets.v4.Data.CopySheetToAnotherSpreadsheetRequest Body { get; set; }
///<summary>Returns the body of the request.</summary>
protected override object GetBody() { return Body; }
///<summary>Gets the method name.</summary>
public override string MethodName
{
get { return "copyTo"; }
}
///<summary>Gets the HTTP method.</summary>
public override string HttpMethod
{
get { return "POST"; }
}
///<summary>Gets the REST path.</summary>
public override string RestPath
{
get { return "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo"; }
}
/// <summary>Initializes CopyTo parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"spreadsheetId", new Google.Apis.Discovery.Parameter
{
Name = "spreadsheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"sheetId", new Google.Apis.Discovery.Parameter
{
Name = "sheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
}
private readonly ValuesResource values;
/// <summary>Gets the Values resource.</summary>
public virtual ValuesResource Values
{
get { return values; }
}
/// <summary>The "values" collection of methods.</summary>
public class ValuesResource
{
private const string Resource = "values";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public ValuesResource(Google.Apis.Services.IClientService service)
{
this.service = service;
}
/// <summary>Appends values to a spreadsheet. The input range is used to search for existing data and find a
/// "table" within that range. Values will be appended to the next row of the table, starting with the first
/// column of the table. See the [guide](/sheets/api/guides/values#appending_values) and [sample
/// code](/sheets/api/samples/writing#append_values) for specific details of how tables are detected and
/// data is appended.
///
/// The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only
/// controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence
/// what cell the data starts being written to.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="spreadsheetId">The ID of the spreadsheet to update.</param>
/// <param name="range">The A1 notation
/// of a range to search for a logical table of data. Values will be appended after the last row of the
/// table.</param>
public virtual AppendRequest Append(Google.Apis.Sheets.v4.Data.ValueRange body, string spreadsheetId, string range)
{
return new AppendRequest(service, body, spreadsheetId, range);
}
/// <summary>Appends values to a spreadsheet. The input range is used to search for existing data and find a
/// "table" within that range. Values will be appended to the next row of the table, starting with the first
/// column of the table. See the [guide](/sheets/api/guides/values#appending_values) and [sample
/// code](/sheets/api/samples/writing#append_values) for specific details of how tables are detected and
/// data is appended.
///
/// The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only
/// controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence
/// what cell the data starts being written to.</summary>
public class AppendRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.AppendValuesResponse>
{
/// <summary>Constructs a new Append request.</summary>
public AppendRequest(Google.Apis.Services.IClientService service, Google.Apis.Sheets.v4.Data.ValueRange body, string spreadsheetId, string range)
: base(service)
{
SpreadsheetId = spreadsheetId;
Range = range;
Body = body;
InitParameters();
}
/// <summary>The ID of the spreadsheet to update.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>The A1 notation of a range to search for a logical table of data. Values will be appended
/// after the last row of the table.</summary>
[Google.Apis.Util.RequestParameterAttribute("range", Google.Apis.Util.RequestParameterType.Path)]
public virtual string Range { get; private set; }
/// <summary>Determines how values in the response should be rendered. The default render option is
/// ValueRenderOption.FORMATTED_VALUE.</summary>
[Google.Apis.Util.RequestParameterAttribute("responseValueRenderOption", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<ResponseValueRenderOptionEnum> ResponseValueRenderOption { get; set; }
/// <summary>Determines how values in the response should be rendered. The default render option is
/// ValueRenderOption.FORMATTED_VALUE.</summary>
public enum ResponseValueRenderOptionEnum
{
[Google.Apis.Util.StringValueAttribute("FORMATTED_VALUE")]
FORMATTEDVALUE,
[Google.Apis.Util.StringValueAttribute("UNFORMATTED_VALUE")]
UNFORMATTEDVALUE,
[Google.Apis.Util.StringValueAttribute("FORMULA")]
FORMULA,
}
/// <summary>How the input data should be inserted.</summary>
[Google.Apis.Util.RequestParameterAttribute("insertDataOption", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<InsertDataOptionEnum> InsertDataOption { get; set; }
/// <summary>How the input data should be inserted.</summary>
public enum InsertDataOptionEnum
{
[Google.Apis.Util.StringValueAttribute("OVERWRITE")]
OVERWRITE,
[Google.Apis.Util.StringValueAttribute("INSERT_ROWS")]
INSERTROWS,
}
/// <summary>How the input data should be interpreted.</summary>
[Google.Apis.Util.RequestParameterAttribute("valueInputOption", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<ValueInputOptionEnum> ValueInputOption { get; set; }
/// <summary>How the input data should be interpreted.</summary>
public enum ValueInputOptionEnum
{
[Google.Apis.Util.StringValueAttribute("INPUT_VALUE_OPTION_UNSPECIFIED")]
INPUTVALUEOPTIONUNSPECIFIED,
[Google.Apis.Util.StringValueAttribute("RAW")]
RAW,
[Google.Apis.Util.StringValueAttribute("USER_ENTERED")]
USERENTERED,
}
/// <summary>Determines how dates, times, and durations in the response should be rendered. This is
/// ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is
/// [DateTimeRenderOption.SERIAL_NUMBER].</summary>
[Google.Apis.Util.RequestParameterAttribute("responseDateTimeRenderOption", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<ResponseDateTimeRenderOptionEnum> ResponseDateTimeRenderOption { get; set; }
/// <summary>Determines how dates, times, and durations in the response should be rendered. This is
/// ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is
/// [DateTimeRenderOption.SERIAL_NUMBER].</summary>
public enum ResponseDateTimeRenderOptionEnum
{
[Google.Apis.Util.StringValueAttribute("SERIAL_NUMBER")]
SERIALNUMBER,
[Google.Apis.Util.StringValueAttribute("FORMATTED_STRING")]
FORMATTEDSTRING,
}
/// <summary>Determines if the update response should include the values of the cells that were
/// appended. By default, responses do not include the updated values.</summary>
[Google.Apis.Util.RequestParameterAttribute("includeValuesInResponse", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> IncludeValuesInResponse { get; set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Sheets.v4.Data.ValueRange Body { get; set; }
///<summary>Returns the body of the request.</summary>
protected override object GetBody() { return Body; }
///<summary>Gets the method name.</summary>
public override string MethodName
{
get { return "append"; }
}
///<summary>Gets the HTTP method.</summary>
public override string HttpMethod
{
get { return "POST"; }
}
///<summary>Gets the REST path.</summary>
public override string RestPath
{
get { return "v4/spreadsheets/{spreadsheetId}/values/{range}:append"; }
}
/// <summary>Initializes Append parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"spreadsheetId", new Google.Apis.Discovery.Parameter
{
Name = "spreadsheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"range", new Google.Apis.Discovery.Parameter
{
Name = "range",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"responseValueRenderOption", new Google.Apis.Discovery.Parameter
{
Name = "responseValueRenderOption",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"insertDataOption", new Google.Apis.Discovery.Parameter
{
Name = "insertDataOption",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"valueInputOption", new Google.Apis.Discovery.Parameter
{
Name = "valueInputOption",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"responseDateTimeRenderOption", new Google.Apis.Discovery.Parameter
{
Name = "responseDateTimeRenderOption",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add(
"includeValuesInResponse", new Google.Apis.Discovery.Parameter
{
Name = "includeValuesInResponse",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet
/// ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as
/// formatting, data validation, etc..) are kept.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="spreadsheetId">The ID of the spreadsheet to update.</param>
public virtual BatchClearRequest BatchClear(Google.Apis.Sheets.v4.Data.BatchClearValuesRequest body, string spreadsheetId)
{
return new BatchClearRequest(service, body, spreadsheetId);
}
/// <summary>Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet
/// ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as
/// formatting, data validation, etc..) are kept.</summary>
public class BatchClearRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.BatchClearValuesResponse>
{
/// <summary>Constructs a new BatchClear request.</summary>
public BatchClearRequest(Google.Apis.Services.IClientService service, Google.Apis.Sheets.v4.Data.BatchClearValuesRequest body, string spreadsheetId)
: base(service)
{
SpreadsheetId = spreadsheetId;
Body = body;
InitParameters();
}
/// <summary>The ID of the spreadsheet to update.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Sheets.v4.Data.BatchClearValuesRequest Body { get; set; }
///<summary>Returns the body of the request.</summary>
protected override object GetBody() { return Body; }
///<summary>Gets the method name.</summary>
public override string MethodName
{
get { return "batchClear"; }
}
///<summary>Gets the HTTP method.</summary>
public override string HttpMethod
{
get { return "POST"; }
}
///<summary>Gets the REST path.</summary>
public override string RestPath
{
get { return "v4/spreadsheets/{spreadsheetId}/values:batchClear"; }
}
/// <summary>Initializes BatchClear parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add(
"spreadsheetId", new Google.Apis.Discovery.Parameter
{
Name = "spreadsheetId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet
/// ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only
/// values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are
/// kept.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="spreadsheetId">The ID of the spreadsheet to update.</param>
public virtual BatchClearByDataFilterRequest BatchClearByDataFilter(Google.Apis.Sheets.v4.Data.BatchClearValuesByDataFilterRequest body, string spreadsheetId)
{
return new BatchClearByDataFilterRequest(service, body, spreadsheetId);
}
/// <summary>Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet
/// ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only
/// values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are
/// kept.</summary>
public class BatchClearByDataFilterRequest : SheetsBaseServiceRequest<Google.Apis.Sheets.v4.Data.BatchClearValuesByDataFilterResponse>
{
/// <summary>Constructs a new BatchClearByDataFilter request.</summary>
public BatchClearByDataFilterRequest(Google.Apis.Services.IClientService service, Google.Apis.Sheets.v4.Data.BatchClearValuesByDataFilterRequest body, string spreadsheetId)
: base(service)
{
SpreadsheetId = spreadsheetId;
Body = body;
InitParameters();
}
/// <summary>The ID of the spreadsheet to update.</summary>
[Google.Apis.Util.RequestParameterAttribute("spreadsheetId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string SpreadsheetId { get; private set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Sheets.v4.Data.BatchClearValuesByDataFilterRequest Body { get; set; }
///<summary>Returns the body of the request.</summary>
protected override object GetBody() { return Body; }