/
Google.Apis.Calendar.v3.cs
6212 lines (5410 loc) · 303 KB
/
Google.Apis.Calendar.v3.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
// Copyright 2024 Google LLC
//
// 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
//
// https://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.
// Generated code. DO NOT EDIT!
namespace Google.Apis.Calendar.v3
{
/// <summary>The Calendar Service.</summary>
public class CalendarService : Google.Apis.Services.BaseClientService
{
/// <summary>The API version.</summary>
public const string Version = "v3";
/// <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 CalendarService() : this(new Google.Apis.Services.BaseClientService.Initializer())
{
}
/// <summary>Constructs a new service.</summary>
/// <param name="initializer">The service initializer.</param>
public CalendarService(Google.Apis.Services.BaseClientService.Initializer initializer) : base(initializer)
{
Acl = new AclResource(this);
CalendarList = new CalendarListResource(this);
Calendars = new CalendarsResource(this);
Channels = new ChannelsResource(this);
Colors = new ColorsResource(this);
Events = new EventsResource(this);
Freebusy = new FreebusyResource(this);
Settings = new SettingsResource(this);
BaseUri = GetEffectiveUri(BaseUriOverride, "https://www.googleapis.com/calendar/v3/");
BatchUri = GetEffectiveUri(null, "https://www.googleapis.com/batch/calendar/v3");
}
/// <summary>Gets the service supported features.</summary>
public override System.Collections.Generic.IList<string> Features => new string[0];
/// <summary>Gets the service name.</summary>
public override string Name => "calendar";
/// <summary>Gets the service base URI.</summary>
public override string BaseUri { get; }
/// <summary>Gets the service base path.</summary>
public override string BasePath => "calendar/v3/";
/// <summary>Gets the batch base URI; <c>null</c> if unspecified.</summary>
public override string BatchUri { get; }
/// <summary>Gets the batch base path; <c>null</c> if unspecified.</summary>
public override string BatchPath => "batch/calendar/v3";
/// <summary>Available OAuth 2.0 scopes for use with the Calendar API.</summary>
public class Scope
{
/// <summary>
/// See, edit, share, and permanently delete all the calendars you can access using Google Calendar
/// </summary>
public static string Calendar = "https://www.googleapis.com/auth/calendar";
/// <summary>View and edit events on all your calendars</summary>
public static string CalendarEvents = "https://www.googleapis.com/auth/calendar.events";
/// <summary>View events on all your calendars</summary>
public static string CalendarEventsReadonly = "https://www.googleapis.com/auth/calendar.events.readonly";
/// <summary>See and download any calendar you can access using your Google Calendar</summary>
public static string CalendarReadonly = "https://www.googleapis.com/auth/calendar.readonly";
/// <summary>View your Calendar settings</summary>
public static string CalendarSettingsReadonly = "https://www.googleapis.com/auth/calendar.settings.readonly";
}
/// <summary>Available OAuth 2.0 scope constants for use with the Calendar API.</summary>
public static class ScopeConstants
{
/// <summary>
/// See, edit, share, and permanently delete all the calendars you can access using Google Calendar
/// </summary>
public const string Calendar = "https://www.googleapis.com/auth/calendar";
/// <summary>View and edit events on all your calendars</summary>
public const string CalendarEvents = "https://www.googleapis.com/auth/calendar.events";
/// <summary>View events on all your calendars</summary>
public const string CalendarEventsReadonly = "https://www.googleapis.com/auth/calendar.events.readonly";
/// <summary>See and download any calendar you can access using your Google Calendar</summary>
public const string CalendarReadonly = "https://www.googleapis.com/auth/calendar.readonly";
/// <summary>View your Calendar settings</summary>
public const string CalendarSettingsReadonly = "https://www.googleapis.com/auth/calendar.settings.readonly";
}
/// <summary>Gets the Acl resource.</summary>
public virtual AclResource Acl { get; }
/// <summary>Gets the CalendarList resource.</summary>
public virtual CalendarListResource CalendarList { get; }
/// <summary>Gets the Calendars resource.</summary>
public virtual CalendarsResource Calendars { get; }
/// <summary>Gets the Channels resource.</summary>
public virtual ChannelsResource Channels { get; }
/// <summary>Gets the Colors resource.</summary>
public virtual ColorsResource Colors { get; }
/// <summary>Gets the Events resource.</summary>
public virtual EventsResource Events { get; }
/// <summary>Gets the Freebusy resource.</summary>
public virtual FreebusyResource Freebusy { get; }
/// <summary>Gets the Settings resource.</summary>
public virtual SettingsResource Settings { get; }
}
/// <summary>A base abstract class for Calendar requests.</summary>
public abstract class CalendarBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
{
/// <summary>Constructs a new CalendarBaseServiceRequest instance.</summary>
protected CalendarBaseServiceRequest(Google.Apis.Services.IClientService service) : base(service)
{
}
/// <summary>Data format for the response.</summary>
[Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<AltEnum> Alt { get; set; }
/// <summary>Data format for the response.</summary>
public enum AltEnum
{
/// <summary>Responses with Content-Type of application/json</summary>
[Google.Apis.Util.StringValueAttribute("json")]
Json = 0,
}
/// <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>
[Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> PrettyPrint { get; set; }
/// <summary>
/// An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
public virtual string QuotaUser { get; set; }
/// <summary>Deprecated. Please use quotaUser instead.</summary>
[Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
public virtual string UserIp { get; set; }
/// <summary>Initializes Calendar parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("alt", new Google.Apis.Discovery.Parameter
{
Name = "alt",
IsRequired = false,
ParameterType = "query",
DefaultValue = "json",
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("userIp", new Google.Apis.Discovery.Parameter
{
Name = "userIp",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>The "acl" collection of methods.</summary>
public class AclResource
{
private const string Resource = "acl";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public AclResource(Google.Apis.Services.IClientService service)
{
this.service = service;
}
/// <summary>Deletes an access control rule.</summary>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
/// <param name="ruleId">ACL rule identifier.</param>
public virtual DeleteRequest Delete(string calendarId, string ruleId)
{
return new DeleteRequest(this.service, calendarId, ruleId);
}
/// <summary>Deletes an access control rule.</summary>
public class DeleteRequest : CalendarBaseServiceRequest<string>
{
/// <summary>Constructs a new Delete request.</summary>
public DeleteRequest(Google.Apis.Services.IClientService service, string calendarId, string ruleId) : base(service)
{
CalendarId = calendarId;
RuleId = ruleId;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>ACL rule identifier.</summary>
[Google.Apis.Util.RequestParameterAttribute("ruleId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string RuleId { get; private set; }
/// <summary>Gets the method name.</summary>
public override string MethodName => "delete";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "DELETE";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl/{ruleId}";
/// <summary>Initializes Delete parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("ruleId", new Google.Apis.Discovery.Parameter
{
Name = "ruleId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Returns an access control rule.</summary>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
/// <param name="ruleId">ACL rule identifier.</param>
public virtual GetRequest Get(string calendarId, string ruleId)
{
return new GetRequest(this.service, calendarId, ruleId);
}
/// <summary>Returns an access control rule.</summary>
public class GetRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.AclRule>
{
/// <summary>Constructs a new Get request.</summary>
public GetRequest(Google.Apis.Services.IClientService service, string calendarId, string ruleId) : base(service)
{
CalendarId = calendarId;
RuleId = ruleId;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>ACL rule identifier.</summary>
[Google.Apis.Util.RequestParameterAttribute("ruleId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string RuleId { get; private set; }
/// <summary>Gets the method name.</summary>
public override string MethodName => "get";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "GET";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl/{ruleId}";
/// <summary>Initializes Get parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("ruleId", new Google.Apis.Discovery.Parameter
{
Name = "ruleId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Creates an access control rule.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
public virtual InsertRequest Insert(Google.Apis.Calendar.v3.Data.AclRule body, string calendarId)
{
return new InsertRequest(this.service, body, calendarId);
}
/// <summary>Creates an access control rule.</summary>
public class InsertRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.AclRule>
{
/// <summary>Constructs a new Insert request.</summary>
public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Calendar.v3.Data.AclRule body, string calendarId) : base(service)
{
CalendarId = calendarId;
Body = body;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>
/// Whether to send notifications about the calendar sharing change. Optional. The default is True.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("sendNotifications", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> SendNotifications { get; set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Calendar.v3.Data.AclRule Body { get; set; }
/// <summary>Returns the body of the request.</summary>
protected override object GetBody() => Body;
/// <summary>Gets the method name.</summary>
public override string MethodName => "insert";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "POST";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl";
/// <summary>Initializes Insert parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("sendNotifications", new Google.Apis.Discovery.Parameter
{
Name = "sendNotifications",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Returns the rules in the access control list for the calendar.</summary>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
public virtual ListRequest List(string calendarId)
{
return new ListRequest(this.service, calendarId);
}
/// <summary>Returns the rules in the access control list for the calendar.</summary>
public class ListRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.Acl>
{
/// <summary>Constructs a new List request.</summary>
public ListRequest(Google.Apis.Services.IClientService service, string calendarId) : base(service)
{
CalendarId = calendarId;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>
/// Maximum number of entries returned on one result page. By default the value is 100 entries. The page
/// size can never be larger than 250 entries. Optional.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<int> MaxResults { get; set; }
/// <summary>Token specifying which result page to return. Optional.</summary>
[Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
public virtual string PageToken { get; set; }
/// <summary>
/// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none".
/// Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("showDeleted", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> ShowDeleted { get; set; }
/// <summary>
/// Token obtained from the nextSyncToken field returned on the last page of results from the previous list
/// request. It makes the result of this list request contain only entries that have changed since then. All
/// entries deleted since the previous list request will always be in the result set and it is not allowed
/// to set showDeleted to False. If the syncToken expires, the server will respond with a 410 GONE response
/// code and the client should clear its storage and perform a full synchronization without any syncToken.
/// Learn more about incremental synchronization. Optional. The default is to return all entries.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("syncToken", Google.Apis.Util.RequestParameterType.Query)]
public virtual string SyncToken { get; set; }
/// <summary>Gets the method name.</summary>
public override string MethodName => "list";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "GET";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl";
/// <summary>Initializes List parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("maxResults", new Google.Apis.Discovery.Parameter
{
Name = "maxResults",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("pageToken", new Google.Apis.Discovery.Parameter
{
Name = "pageToken",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("showDeleted", new Google.Apis.Discovery.Parameter
{
Name = "showDeleted",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("syncToken", new Google.Apis.Discovery.Parameter
{
Name = "syncToken",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Updates an access control rule. This method supports patch semantics.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
/// <param name="ruleId">ACL rule identifier.</param>
public virtual PatchRequest Patch(Google.Apis.Calendar.v3.Data.AclRule body, string calendarId, string ruleId)
{
return new PatchRequest(this.service, body, calendarId, ruleId);
}
/// <summary>Updates an access control rule. This method supports patch semantics.</summary>
public class PatchRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.AclRule>
{
/// <summary>Constructs a new Patch request.</summary>
public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Calendar.v3.Data.AclRule body, string calendarId, string ruleId) : base(service)
{
CalendarId = calendarId;
RuleId = ruleId;
Body = body;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>ACL rule identifier.</summary>
[Google.Apis.Util.RequestParameterAttribute("ruleId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string RuleId { get; private set; }
/// <summary>
/// Whether to send notifications about the calendar sharing change. Note that there are no notifications on
/// access removal. Optional. The default is True.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("sendNotifications", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> SendNotifications { get; set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Calendar.v3.Data.AclRule Body { get; set; }
/// <summary>Returns the body of the request.</summary>
protected override object GetBody() => Body;
/// <summary>Gets the method name.</summary>
public override string MethodName => "patch";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "PATCH";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl/{ruleId}";
/// <summary>Initializes Patch parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("ruleId", new Google.Apis.Discovery.Parameter
{
Name = "ruleId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("sendNotifications", new Google.Apis.Discovery.Parameter
{
Name = "sendNotifications",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Updates an access control rule.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
/// <param name="ruleId">ACL rule identifier.</param>
public virtual UpdateRequest Update(Google.Apis.Calendar.v3.Data.AclRule body, string calendarId, string ruleId)
{
return new UpdateRequest(this.service, body, calendarId, ruleId);
}
/// <summary>Updates an access control rule.</summary>
public class UpdateRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.AclRule>
{
/// <summary>Constructs a new Update request.</summary>
public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Calendar.v3.Data.AclRule body, string calendarId, string ruleId) : base(service)
{
CalendarId = calendarId;
RuleId = ruleId;
Body = body;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>ACL rule identifier.</summary>
[Google.Apis.Util.RequestParameterAttribute("ruleId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string RuleId { get; private set; }
/// <summary>
/// Whether to send notifications about the calendar sharing change. Note that there are no notifications on
/// access removal. Optional. The default is True.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("sendNotifications", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> SendNotifications { get; set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Calendar.v3.Data.AclRule Body { get; set; }
/// <summary>Returns the body of the request.</summary>
protected override object GetBody() => Body;
/// <summary>Gets the method name.</summary>
public override string MethodName => "update";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "PUT";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl/{ruleId}";
/// <summary>Initializes Update parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("ruleId", new Google.Apis.Discovery.Parameter
{
Name = "ruleId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("sendNotifications", new Google.Apis.Discovery.Parameter
{
Name = "sendNotifications",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Watch for changes to ACL resources.</summary>
/// <param name="body">The body of the request.</param>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
public virtual WatchRequest Watch(Google.Apis.Calendar.v3.Data.Channel body, string calendarId)
{
return new WatchRequest(this.service, body, calendarId);
}
/// <summary>Watch for changes to ACL resources.</summary>
public class WatchRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.Channel>
{
/// <summary>Constructs a new Watch request.</summary>
public WatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Calendar.v3.Data.Channel body, string calendarId) : base(service)
{
CalendarId = calendarId;
Body = body;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>
/// Maximum number of entries returned on one result page. By default the value is 100 entries. The page
/// size can never be larger than 250 entries. Optional.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<int> MaxResults { get; set; }
/// <summary>Token specifying which result page to return. Optional.</summary>
[Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
public virtual string PageToken { get; set; }
/// <summary>
/// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none".
/// Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("showDeleted", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<bool> ShowDeleted { get; set; }
/// <summary>
/// Token obtained from the nextSyncToken field returned on the last page of results from the previous list
/// request. It makes the result of this list request contain only entries that have changed since then. All
/// entries deleted since the previous list request will always be in the result set and it is not allowed
/// to set showDeleted to False. If the syncToken expires, the server will respond with a 410 GONE response
/// code and the client should clear its storage and perform a full synchronization without any syncToken.
/// Learn more about incremental synchronization. Optional. The default is to return all entries.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("syncToken", Google.Apis.Util.RequestParameterType.Query)]
public virtual string SyncToken { get; set; }
/// <summary>Gets or sets the body of this request.</summary>
Google.Apis.Calendar.v3.Data.Channel Body { get; set; }
/// <summary>Returns the body of the request.</summary>
protected override object GetBody() => Body;
/// <summary>Gets the method name.</summary>
public override string MethodName => "watch";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "POST";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "calendars/{calendarId}/acl/watch";
/// <summary>Initializes Watch parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("maxResults", new Google.Apis.Discovery.Parameter
{
Name = "maxResults",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("pageToken", new Google.Apis.Discovery.Parameter
{
Name = "pageToken",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("showDeleted", new Google.Apis.Discovery.Parameter
{
Name = "showDeleted",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
RequestParameters.Add("syncToken", new Google.Apis.Discovery.Parameter
{
Name = "syncToken",
IsRequired = false,
ParameterType = "query",
DefaultValue = null,
Pattern = null,
});
}
}
}
/// <summary>The "calendarList" collection of methods.</summary>
public class CalendarListResource
{
private const string Resource = "calendarList";
/// <summary>The service which this resource belongs to.</summary>
private readonly Google.Apis.Services.IClientService service;
/// <summary>Constructs a new resource.</summary>
public CalendarListResource(Google.Apis.Services.IClientService service)
{
this.service = service;
}
/// <summary>Removes a calendar from the user's calendar list.</summary>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
public virtual DeleteRequest Delete(string calendarId)
{
return new DeleteRequest(this.service, calendarId);
}
/// <summary>Removes a calendar from the user's calendar list.</summary>
public class DeleteRequest : CalendarBaseServiceRequest<string>
{
/// <summary>Constructs a new Delete request.</summary>
public DeleteRequest(Google.Apis.Services.IClientService service, string calendarId) : base(service)
{
CalendarId = calendarId;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>Gets the method name.</summary>
public override string MethodName => "delete";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "DELETE";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "users/me/calendarList/{calendarId}";
/// <summary>Initializes Delete parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Returns a calendar from the user's calendar list.</summary>
/// <param name="calendarId">
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the
/// primary calendar of the currently logged in user, use the "primary" keyword.
/// </param>
public virtual GetRequest Get(string calendarId)
{
return new GetRequest(this.service, calendarId);
}
/// <summary>Returns a calendar from the user's calendar list.</summary>
public class GetRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.CalendarListEntry>
{
/// <summary>Constructs a new Get request.</summary>
public GetRequest(Google.Apis.Services.IClientService service, string calendarId) : base(service)
{
CalendarId = calendarId;
InitParameters();
}
/// <summary>
/// Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access
/// the primary calendar of the currently logged in user, use the "primary" keyword.
/// </summary>
[Google.Apis.Util.RequestParameterAttribute("calendarId", Google.Apis.Util.RequestParameterType.Path)]
public virtual string CalendarId { get; private set; }
/// <summary>Gets the method name.</summary>
public override string MethodName => "get";
/// <summary>Gets the HTTP method.</summary>
public override string HttpMethod => "GET";
/// <summary>Gets the REST path.</summary>
public override string RestPath => "users/me/calendarList/{calendarId}";
/// <summary>Initializes Get parameter list.</summary>
protected override void InitParameters()
{
base.InitParameters();
RequestParameters.Add("calendarId", new Google.Apis.Discovery.Parameter
{
Name = "calendarId",
IsRequired = true,
ParameterType = "path",
DefaultValue = null,
Pattern = null,
});
}
}
/// <summary>Inserts an existing calendar into the user's calendar list.</summary>
/// <param name="body">The body of the request.</param>
public virtual InsertRequest Insert(Google.Apis.Calendar.v3.Data.CalendarListEntry body)
{
return new InsertRequest(this.service, body);
}
/// <summary>Inserts an existing calendar into the user's calendar list.</summary>
public class InsertRequest : CalendarBaseServiceRequest<Google.Apis.Calendar.v3.Data.CalendarListEntry>
{
/// <summary>Constructs a new Insert request.</summary>
public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Calendar.v3.Data.CalendarListEntry body) : base(service)
{