~ubuntu-branches/ubuntu/utopic/awn-extras-applets/utopic

« back to all changes in this revision

Viewing changes to src/calendar/google/gdata/calendar/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-01-13 21:50:33 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100113215033-kd9otcdjrajmiag0
Tags: 0.3.9~bzr1944-0ubuntu1
* New upstream snapshot.
 - Catch error in weather applet (LP: #359668)
* debian/patches: Refresh.
* debian/*.install: 
 - Update to new location and new applets.
 - Disable dialect applet until python-xklavier is in the archive.
 - Disable MiMenu and Pandora applets, there are unmaintained and not stable.
* debian/awn-applets-c-core: Dropped, not needed.
* debian/control:
 - Update description with new applets.
 - Remove libawn-extras and python-awnlib, all merged in python-awn-extras.
 - Replace awn-manager by awn-settings.
 - Drop build-depends on libgnome-desktop-dev, python*-dev, python2.5,
   awn-manager, libglade2-dev and libgnomeui-dev.
 - Add build-depends on libdesktop-agnostic-bin and vala-awn.
 - Bump build-depends of libawn-dev (>= 0.3.9~bzr1890), valac (>= 0.7.7) and
   debhelper (>= 7.0.50~).
 - Bump Standards-Version to 3.8.3 (no change needed).
 - Demote gconf-editor to Suggest, it's only needed for very advanced
   settings.
 - Update Recommends for python applets with new applets.
 - Suggest python-gconf for notification-area and alacarte for YAMA.
 - Add a debug package for C applets.
* debian/libawn-extras*: Removed, libawn-extras was removed upstream.
* debian/python-awnlib*: Merged with python-awn-extras.
* debian/rules:
 - Rewrite to use overrides.
* debian/copyright:
 - Update copyright and licenses.
* debian/README.source: Added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
#
3
 
# Copyright (C) 2006 Google Inc.
4
 
#
5
 
# Licensed under the Apache License, Version 2.0 (the "License");
6
 
# you may not use this file except in compliance with the License.
7
 
# You may obtain a copy of the License at
8
 
#
9
 
#      http://www.apache.org/licenses/LICENSE-2.0
10
 
#
11
 
# Unless required by applicable law or agreed to in writing, software
12
 
# distributed under the License is distributed on an "AS IS" BASIS,
13
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 
# See the License for the specific language governing permissions and
15
 
# limitations under the License.
16
 
 
17
 
 
18
 
# TODO:
19
 
#   add text=none to all inits
20
 
 
21
 
 
22
 
"""Contains extensions to ElementWrapper objects used with Google Calendar."""
23
 
 
24
 
__author__ = 'api.vli (Vivian Li), api.rboyd (Ryan Boyd)'
25
 
 
26
 
try:
27
 
  from xml.etree import cElementTree as ElementTree
28
 
except ImportError:
29
 
  try:
30
 
    import cElementTree as ElementTree
31
 
  except ImportError:
32
 
    from elementtree import ElementTree
33
 
import atom
34
 
import gdata
35
 
 
36
 
 
37
 
# XML namespaces which are often used in Google Calendar entities.
38
 
GCAL_NAMESPACE = 'http://schemas.google.com/gCal/2005'
39
 
GCAL_TEMPLATE = '{http://schemas.google.com/gCal/2005}%s'
40
 
WEB_CONTENT_LINK_REL = '%s/%s' % (GCAL_NAMESPACE, 'webContent')
41
 
GACL_NAMESPACE = gdata.GACL_NAMESPACE
42
 
GACL_TEMPLATE = gdata.GACL_TEMPLATE
43
 
 
44
 
 
45
 
 
46
 
class ValueAttributeContainer(atom.AtomBase):
47
 
  """A parent class for all Calendar classes which have a value attribute.
48
 
 
49
 
  Children include Color, AccessLevel, Hidden
50
 
  """
51
 
 
52
 
  _children = atom.AtomBase._children.copy()
53
 
  _attributes = atom.AtomBase._attributes.copy()
54
 
  _attributes['value'] = 'value'
55
 
 
56
 
  def __init__(self, value=None, extension_elements=None,
57
 
      extension_attributes=None, text=None):
58
 
    self.value = value
59
 
    self.text = text
60
 
    self.extension_elements = extension_elements or []
61
 
    self.extension_attributes = extension_attributes or {}
62
 
 
63
 
class Color(ValueAttributeContainer):
64
 
  """The Google Calendar color element"""
65
 
 
66
 
  _tag = 'color'
67
 
  _namespace = GCAL_NAMESPACE
68
 
  _children = ValueAttributeContainer._children.copy()
69
 
  _attributes = ValueAttributeContainer._attributes.copy()
70
 
  
71
 
 
72
 
 
73
 
class AccessLevel(ValueAttributeContainer):
74
 
  """The Google Calendar accesslevel element"""
75
 
 
76
 
  _tag = 'accesslevel'
77
 
  _namespace = GCAL_NAMESPACE
78
 
  _children = ValueAttributeContainer._children.copy()
79
 
  _attributes = ValueAttributeContainer._attributes.copy()
80
 
  
81
 
 
82
 
class Hidden(ValueAttributeContainer):
83
 
  """The Google Calendar hidden element"""
84
 
 
85
 
  _tag = 'hidden'
86
 
  _namespace = GCAL_NAMESPACE
87
 
  _children = ValueAttributeContainer._children.copy()
88
 
  _attributes = ValueAttributeContainer._attributes.copy()
89
 
  
90
 
 
91
 
class Selected(ValueAttributeContainer):
92
 
  """The Google Calendar selected element"""
93
 
 
94
 
  _tag = 'selected'
95
 
  _namespace = GCAL_NAMESPACE
96
 
  _children = ValueAttributeContainer._children.copy()
97
 
  _attributes = ValueAttributeContainer._attributes.copy()
98
 
 
99
 
 
100
 
class Timezone(ValueAttributeContainer):
101
 
  """The Google Calendar timezone element"""
102
 
 
103
 
  _tag = 'timezone'
104
 
  _namespace = GCAL_NAMESPACE
105
 
  _children = ValueAttributeContainer._children.copy()
106
 
  _attributes = ValueAttributeContainer._attributes.copy()
107
 
 
108
 
 
109
 
class Where(atom.AtomBase):
110
 
  """The Google Calendar Where element"""
111
 
 
112
 
  _tag = 'where'
113
 
  _namespace = gdata.GDATA_NAMESPACE
114
 
  _children = atom.AtomBase._children.copy()
115
 
  _attributes = atom.AtomBase._attributes.copy()
116
 
  _attributes['valueString'] = 'value_string'
117
 
 
118
 
  def __init__(self, value_string=None, extension_elements=None,
119
 
      extension_attributes=None, text=None):
120
 
    self.value_string = value_string 
121
 
    self.text = text
122
 
    self.extension_elements = extension_elements or []
123
 
    self.extension_attributes = extension_attributes or {}
124
 
 
125
 
 
126
 
class CalendarListEntry(gdata.GDataEntry, gdata.LinkFinder):
127
 
  """A Google Calendar meta Entry flavor of an Atom Entry """
128
 
 
129
 
  _tag = gdata.GDataEntry._tag
130
 
  _namespace = gdata.GDataEntry._namespace
131
 
  _children = gdata.GDataEntry._children.copy()
132
 
  _attributes = gdata.GDataEntry._attributes.copy()
133
 
  _children['{%s}color' % GCAL_NAMESPACE] = ('color', Color)
134
 
  _children['{%s}accesslevel' % GCAL_NAMESPACE] = ('access_level', 
135
 
                                                   AccessLevel)
136
 
  _children['{%s}hidden' % GCAL_NAMESPACE] = ('hidden', Hidden)
137
 
  _children['{%s}selected' % GCAL_NAMESPACE] = ('selected', Selected)
138
 
  _children['{%s}timezone' % GCAL_NAMESPACE] = ('timezone', Timezone)
139
 
  _children['{%s}where' % gdata.GDATA_NAMESPACE] = ('where', Where)
140
 
  
141
 
  def __init__(self, author=None, category=None, content=None,
142
 
      atom_id=None, link=None, published=None, 
143
 
      title=None, updated=None, 
144
 
      color=None, access_level=None, hidden=None, timezone=None,
145
 
      selected=None,
146
 
      where=None,
147
 
      extension_elements=None, extension_attributes=None, text=None):
148
 
    gdata.GDataEntry.__init__(self, author=author, category=category, 
149
 
                        content=content, atom_id=atom_id, link=link, 
150
 
                        published=published, title=title, 
151
 
                        updated=updated, text=None)
152
 
 
153
 
    self.color = color
154
 
    self.access_level = access_level
155
 
    self.hidden = hidden 
156
 
    self.selected = selected
157
 
    self.timezone = timezone
158
 
    self.where = where 
159
 
 
160
 
 
161
 
class CalendarListFeed(gdata.GDataFeed, gdata.LinkFinder):
162
 
  """A Google Calendar meta feed flavor of an Atom Feed"""
163
 
 
164
 
  _tag = gdata.GDataFeed._tag
165
 
  _namespace = gdata.GDataFeed._namespace
166
 
  _children = gdata.GDataFeed._children.copy()
167
 
  _attributes = gdata.GDataFeed._attributes.copy()
168
 
  _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', [CalendarListEntry])
169
 
  #_attributes = {}
170
 
 
171
 
 
172
 
class Scope(atom.AtomBase):
173
 
  """The Google ACL scope element"""
174
 
 
175
 
  _tag = 'scope'
176
 
  _namespace = GACL_NAMESPACE
177
 
  _children = atom.AtomBase._children.copy()
178
 
  _attributes = atom.AtomBase._attributes.copy()
179
 
  _attributes['value'] = 'value'
180
 
  _attributes['type'] = 'type'
181
 
  
182
 
  def __init__(self, extension_elements=None, value=None, scope_type=None,
183
 
      extension_attributes=None, text=None):
184
 
    self.value = value
185
 
    self.type = scope_type
186
 
    self.text = text
187
 
    self.extension_elements = extension_elements or []
188
 
    self.extension_attributes = extension_attributes or {}
189
 
 
190
 
 
191
 
class Role(ValueAttributeContainer):
192
 
  """The Google Calendar timezone element"""
193
 
 
194
 
  _tag = 'role'
195
 
  _namespace = GACL_NAMESPACE
196
 
  _children = ValueAttributeContainer._children.copy()
197
 
  _attributes = ValueAttributeContainer._attributes.copy()
198
 
 
199
 
 
200
 
class CalendarAclEntry(gdata.GDataEntry, gdata.LinkFinder):
201
 
  """A Google Calendar ACL Entry flavor of an Atom Entry """
202
 
 
203
 
  _tag = gdata.GDataEntry._tag
204
 
  _namespace = gdata.GDataEntry._namespace
205
 
  _children = gdata.GDataEntry._children.copy()
206
 
  _attributes = gdata.GDataEntry._attributes.copy()
207
 
  _children['{%s}scope' % GACL_NAMESPACE] = ('scope', Scope)
208
 
  _children['{%s}role' % GACL_NAMESPACE] = ('role', Role)
209
 
  
210
 
  def __init__(self, author=None, category=None, content=None,
211
 
      atom_id=None, link=None, published=None, 
212
 
      title=None, updated=None,
213
 
      scope=None, role=None,
214
 
      extension_elements=None, extension_attributes=None, text=None):
215
 
    gdata.GDataEntry.__init__(self, author=author, category=category, 
216
 
                        content=content, atom_id=atom_id, link=link, 
217
 
                        published=published, title=title, 
218
 
                        updated=updated, text=None)
219
 
 
220
 
    self.scope = scope
221
 
    self.role = role
222
 
 
223
 
 
224
 
 
225
 
class CalendarAclFeed(gdata.GDataFeed, gdata.LinkFinder):
226
 
  """A Google Calendar ACL feed flavor of an Atom Feed"""
227
 
 
228
 
  _tag = gdata.GDataFeed._tag
229
 
  _namespace = gdata.GDataFeed._namespace
230
 
  _children = gdata.GDataFeed._children.copy()
231
 
  _attributes = gdata.GDataFeed._attributes.copy()
232
 
  _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', [CalendarAclEntry])
233
 
 
234
 
 
235
 
class CalendarEventCommentEntry(gdata.GDataEntry, gdata.LinkFinder):
236
 
  """A Google Calendar event comments entry flavor of an Atom Entry"""
237
 
 
238
 
  _tag = gdata.GDataEntry._tag
239
 
  _namespace = gdata.GDataEntry._namespace
240
 
  _children = gdata.GDataEntry._children.copy()
241
 
  _attributes = gdata.GDataEntry._attributes.copy()
242
 
 
243
 
 
244
 
class CalendarEventCommentFeed(gdata.GDataFeed, gdata.LinkFinder):
245
 
  """A Google Calendar event comments feed flavor of an Atom Feed"""
246
 
 
247
 
  _tag = gdata.GDataFeed._tag
248
 
  _namespace = gdata.GDataFeed._namespace
249
 
  _children = gdata.GDataFeed._children.copy()
250
 
  _attributes = gdata.GDataFeed._attributes.copy()
251
 
  _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', 
252
 
      [CalendarEventCommentEntry])
253
 
 
254
 
 
255
 
class ExtendedProperty(atom.AtomBase):
256
 
  """The Google Calendar extendedProperty element"""
257
 
 
258
 
  _tag = 'extendedProperty'
259
 
  _namespace = gdata.GDATA_NAMESPACE
260
 
  _children = atom.AtomBase._children.copy()
261
 
  _attributes = atom.AtomBase._attributes.copy()
262
 
  _attributes['name'] = 'name'
263
 
  _attributes['value'] = 'value'
264
 
 
265
 
  def __init__(self, name=None, value=None, extension_elements=None,
266
 
      extension_attributes=None, text=None):
267
 
    self.name = name 
268
 
    self.value = value
269
 
    self.text = text
270
 
    self.extension_elements = extension_elements or []
271
 
    self.extension_attributes = extension_attributes or {}
272
 
 
273
 
    
274
 
class Reminder(atom.AtomBase):
275
 
  """The Google Calendar reminder element"""
276
 
  
277
 
  _tag = 'reminder'
278
 
  _namespace = gdata.GDATA_NAMESPACE
279
 
  _children = atom.AtomBase._children.copy()
280
 
  _attributes = atom.AtomBase._attributes.copy()
281
 
  _attributes['absoluteTime'] = 'absolute_time'
282
 
  _attributes['days'] = 'days'
283
 
  _attributes['hours'] = 'hours'
284
 
  _attributes['minutes'] = 'minutes'
285
 
 
286
 
  def __init__(self, absolute_time=None,
287
 
      days=None, hours=None, minutes=None, 
288
 
      extension_elements=None,
289
 
      extension_attributes=None, text=None):
290
 
    self.absolute_time = absolute_time
291
 
    if days is not None: 
292
 
      self.days = str(days)
293
 
    else:
294
 
      self.days = None
295
 
    if hours is not None:
296
 
      self.hours = str(hours)
297
 
    else:
298
 
      self.hours = None
299
 
    if minutes is not None:
300
 
      self.minutes = str(minutes)
301
 
    else:
302
 
      self.minutes = None
303
 
    self.text = text
304
 
    self.extension_elements = extension_elements or []
305
 
    self.extension_attributes = extension_attributes or {}
306
 
    
307
 
 
308
 
class When(atom.AtomBase):
309
 
  """The Google Calendar When element"""
310
 
 
311
 
  _tag = 'when'
312
 
  _namespace = gdata.GDATA_NAMESPACE
313
 
  _children = atom.AtomBase._children.copy()
314
 
  _attributes = atom.AtomBase._attributes.copy()
315
 
  _children['{%s}reminder' % gdata.GDATA_NAMESPACE] = ('reminder', [Reminder])
316
 
  _attributes['startTime'] = 'start_time'
317
 
  _attributes['endTime'] = 'end_time'
318
 
 
319
 
  def __init__(self, start_time=None, end_time=None, reminder=None, 
320
 
      extension_elements=None, extension_attributes=None, text=None):
321
 
    self.start_time = start_time 
322
 
    self.end_time = end_time 
323
 
    self.reminder = reminder or []
324
 
    self.text = text
325
 
    self.extension_elements = extension_elements or []
326
 
    self.extension_attributes = extension_attributes or {}
327
 
 
328
 
 
329
 
class Recurrence(atom.AtomBase):
330
 
  """The Google Calendar Recurrence element"""
331
 
 
332
 
  _tag = 'recurrence'
333
 
  _namespace = gdata.GDATA_NAMESPACE
334
 
  _children = atom.AtomBase._children.copy()
335
 
  _attributes = atom.AtomBase._attributes.copy()
336
 
 
337
 
  
338
 
class UriEnumElement(atom.AtomBase):
339
 
 
340
 
  _children = atom.AtomBase._children.copy()
341
 
  _attributes = atom.AtomBase._attributes.copy()
342
 
 
343
 
  def __init__(self, tag, enum_map, attrib_name='value', 
344
 
      extension_elements=None, extension_attributes=None, text=None):
345
 
    self.tag=tag
346
 
    self.enum_map=enum_map
347
 
    self.attrib_name=attrib_name
348
 
    self.value=None
349
 
    self.text=text
350
 
    self.extension_elements = extension_elements or []
351
 
    self.extension_attributes = extension_attributes or {}
352
 
     
353
 
  def findKey(self, value):
354
 
     res=[item[0] for item in self.enum_map.items() if item[1] == value]
355
 
     if res is None or len(res) == 0:
356
 
       return None
357
 
     return res[0]
358
 
 
359
 
  def _ConvertElementAttributeToMember(self, attribute, value):
360
 
    # Special logic to use the enum_map to set the value of the object's value member.
361
 
    if attribute == self.attrib_name and value != '':
362
 
      self.value = self.enum_map[value]
363
 
      return
364
 
    # Find the attribute in this class's list of attributes.
365
 
    if self.__class__._attributes.has_key(attribute):
366
 
      # Find the member of this class which corresponds to the XML attribute
367
 
      # (lookup in current_class._attributes) and set this member to the
368
 
      # desired value (using self.__dict__).
369
 
      setattr(self, self.__class__._attributes[attribute], value)
370
 
    else:
371
 
      # The current class doesn't map this attribute, so try to parent class.
372
 
      atom.ExtensionContainer._ConvertElementAttributeToMember(self, 
373
 
                                                               attribute,
374
 
                                                               value)
375
 
 
376
 
  def _AddMembersToElementTree(self, tree):
377
 
    # Convert the members of this class which are XML child nodes.
378
 
    # This uses the class's _children dictionary to find the members which
379
 
    # should become XML child nodes.
380
 
    member_node_names = [values[0] for tag, values in
381
 
                                       self.__class__._children.iteritems()]
382
 
    for member_name in member_node_names:
383
 
      member = getattr(self, member_name)
384
 
      if member is None:
385
 
        pass
386
 
      elif isinstance(member, list):
387
 
        for instance in member:
388
 
          instance._BecomeChildElement(tree)
389
 
      else:
390
 
        member._BecomeChildElement(tree)
391
 
    # Special logic to set the desired XML attribute.
392
 
    key = self.findKey(self.value)
393
 
    if key is not None:
394
 
      tree.attrib[self.attrib_name]=key
395
 
    # Convert the members of this class which are XML attributes.
396
 
    for xml_attribute, member_name in self.__class__._attributes.iteritems():
397
 
      member = getattr(self, member_name)
398
 
      if member is not None:
399
 
        tree.attrib[xml_attribute] = member
400
 
    # Lastly, call the parent's _AddMembersToElementTree to get any
401
 
    # extension elements.
402
 
    atom.ExtensionContainer._AddMembersToElementTree(self, tree)
403
 
    
404
 
    
405
 
 
406
 
class AttendeeStatus(UriEnumElement):
407
 
  """The Google Calendar attendeeStatus element"""
408
 
  
409
 
  _tag = 'attendeeStatus'
410
 
  _namespace = gdata.GDATA_NAMESPACE
411
 
  _children = UriEnumElement._children.copy()
412
 
  _attributes = UriEnumElement._attributes.copy()
413
 
  
414
 
  attendee_enum = { 
415
 
      'http://schemas.google.com/g/2005#event.accepted' : 'ACCEPTED',
416
 
      'http://schemas.google.com/g/2005#event.declined' : 'DECLINED',
417
 
      'http://schemas.google.com/g/2005#event.invited' : 'INVITED',
418
 
      'http://schemas.google.com/g/2005#event.tentative' : 'TENTATIVE'}
419
 
  
420
 
  def __init__(self, extension_elements=None, 
421
 
      extension_attributes=None, text=None):
422
 
    UriEnumElement.__init__(self, 'attendeeStatus', AttendeeStatus.attendee_enum,
423
 
                            extension_elements=extension_elements,
424
 
                            extension_attributes=extension_attributes, 
425
 
                            text=text)
426
 
 
427
 
 
428
 
class AttendeeType(UriEnumElement):
429
 
  """The Google Calendar attendeeType element"""
430
 
  
431
 
  _tag = 'attendeeType'
432
 
  _namespace = gdata.GDATA_NAMESPACE
433
 
  _children = UriEnumElement._children.copy()
434
 
  _attributes = UriEnumElement._attributes.copy()
435
 
  
436
 
  attendee_type_enum = { 
437
 
      'http://schemas.google.com/g/2005#event.optional' : 'OPTIONAL',
438
 
      'http://schemas.google.com/g/2005#event.required' : 'REQUIRED' }
439
 
  
440
 
  def __init__(self, extension_elements=None,
441
 
      extension_attributes=None, text=None):
442
 
    UriEnumElement.__init__(self, 'attendeeType', 
443
 
        AttendeeType.attendee_type_enum,
444
 
        extension_elements=extension_elements,
445
 
        extension_attributes=extension_attributes,text=text)
446
 
 
447
 
 
448
 
class Visibility(UriEnumElement):
449
 
  """The Google Calendar Visibility element"""
450
 
  
451
 
  _tag = 'visibility'
452
 
  _namespace = gdata.GDATA_NAMESPACE
453
 
  _children = UriEnumElement._children.copy()
454
 
  _attributes = UriEnumElement._attributes.copy()
455
 
  
456
 
  visibility_enum = { 
457
 
      'http://schemas.google.com/g/2005#event.confidential' : 'CONFIDENTIAL',
458
 
      'http://schemas.google.com/g/2005#event.default' : 'DEFAULT',
459
 
      'http://schemas.google.com/g/2005#event.private' : 'PRIVATE',
460
 
      'http://schemas.google.com/g/2005#event.public' : 'PUBLIC' }
461
 
 
462
 
  def __init__(self, extension_elements=None,
463
 
      extension_attributes=None, text=None):
464
 
    UriEnumElement.__init__(self, 'visibility', Visibility.visibility_enum,
465
 
                            extension_elements=extension_elements,
466
 
                            extension_attributes=extension_attributes, 
467
 
                            text=text)
468
 
 
469
 
 
470
 
class Transparency(UriEnumElement):
471
 
  """The Google Calendar Transparency element"""
472
 
  
473
 
  _tag = 'transparency'
474
 
  _namespace = gdata.GDATA_NAMESPACE
475
 
  _children = UriEnumElement._children.copy()
476
 
  _attributes = UriEnumElement._attributes.copy()
477
 
  
478
 
  transparency_enum = { 
479
 
      'http://schemas.google.com/g/2005#event.opaque' : 'OPAQUE',
480
 
      'http://schemas.google.com/g/2005#event.transparent' : 'TRANSPARENT' }
481
 
  
482
 
  def __init__(self, extension_elements=None,
483
 
      extension_attributes=None, text=None):
484
 
    UriEnumElement.__init__(self, tag='transparency', 
485
 
                            enum_map=Transparency.transparency_enum,
486
 
                            extension_elements=extension_elements,
487
 
                            extension_attributes=extension_attributes, 
488
 
                            text=text)
489
 
 
490
 
 
491
 
class Comments(atom.AtomBase):
492
 
  """The Google Calendar comments element"""
493
 
  
494
 
  _tag = 'comments'
495
 
  _namespace = gdata.GDATA_NAMESPACE
496
 
  _children = atom.AtomBase._children.copy()
497
 
  _attributes = atom.AtomBase._attributes.copy()
498
 
  _children['{%s}feedLink' % gdata.GDATA_NAMESPACE] = ('feed_link', 
499
 
                                                       gdata.FeedLink)
500
 
  _attributes['rel'] = 'rel'
501
 
 
502
 
  def __init__(self, rel=None, feed_link=None, extension_elements=None,
503
 
      extension_attributes=None, text=None):
504
 
    self.rel = rel 
505
 
    self.feed_link = feed_link
506
 
    self.text = text
507
 
    self.extension_elements = extension_elements or []
508
 
    self.extension_attributes = extension_attributes or {}
509
 
 
510
 
 
511
 
class EventStatus(UriEnumElement):
512
 
  """The Google Calendar eventStatus element"""
513
 
  
514
 
  _tag = 'eventStatus'
515
 
  _namespace = gdata.GDATA_NAMESPACE
516
 
  _children = UriEnumElement._children.copy()
517
 
  _attributes = UriEnumElement._attributes.copy()
518
 
  
519
 
  status_enum = { 'http://schemas.google.com/g/2005#event.canceled' : 'CANCELED',
520
 
                 'http://schemas.google.com/g/2005#event.confirmed' : 'CONFIRMED',
521
 
                 'http://schemas.google.com/g/2005#event.tentative' : 'TENTATIVE'}
522
 
  
523
 
  def __init__(self, extension_elements=None,
524
 
      extension_attributes=None, text=None):
525
 
    UriEnumElement.__init__(self, tag='eventStatus', 
526
 
        enum_map=EventStatus.status_enum,
527
 
        extension_elements=extension_elements,
528
 
        extension_attributes=extension_attributes, 
529
 
        text=text)
530
 
    
531
 
class Who(UriEnumElement):
532
 
  """The Google Calendar Who element"""
533
 
 
534
 
  _tag = 'who'
535
 
  _namespace = gdata.GDATA_NAMESPACE
536
 
  _children = UriEnumElement._children.copy()
537
 
  _attributes = UriEnumElement._attributes.copy()
538
 
  _children['{%s}attendeeStatus' % gdata.GDATA_NAMESPACE] = (
539
 
      'attendee_status', AttendeeStatus)
540
 
  _children['{%s}attendeeType' % gdata.GDATA_NAMESPACE] = ('attendee_type',
541
 
                                                           AttendeeType)
542
 
  _attributes['valueString'] = 'name'
543
 
  _attributes['email'] = 'email'
544
 
 
545
 
  relEnum = { 'http://schemas.google.com/g/2005#event.attendee' : 'ATTENDEE',
546
 
              'http://schemas.google.com/g/2005#event.organizer' : 'ORGANIZER',
547
 
              'http://schemas.google.com/g/2005#event.performer' : 'PERFORMER',
548
 
              'http://schemas.google.com/g/2005#event.speaker' : 'SPEAKER',
549
 
              'http://schemas.google.com/g/2005#message.bcc' : 'BCC',
550
 
              'http://schemas.google.com/g/2005#message.cc' : 'CC',
551
 
              'http://schemas.google.com/g/2005#message.from' : 'FROM',
552
 
              'http://schemas.google.com/g/2005#message.reply-to' : 'REPLY_TO',
553
 
              'http://schemas.google.com/g/2005#message.to' : 'TO' }
554
 
  
555
 
  def __init__(self, extension_elements=None, 
556
 
    extension_attributes=None, text=None):
557
 
    UriEnumElement.__init__(self, 'who', Who.relEnum, attrib_name='rel',
558
 
                            extension_elements=extension_elements,
559
 
                            extension_attributes=extension_attributes, 
560
 
                            text=text)
561
 
    self.name=None
562
 
    self.email=None
563
 
    self.attendee_status=None
564
 
    self.attendee_type=None
565
 
    self.rel=None
566
 
 
567
 
 
568
 
class OriginalEvent(atom.AtomBase):
569
 
  """The Google Calendar OriginalEvent element"""
570
 
  
571
 
  _tag = 'originalEvent'
572
 
  _namespace = gdata.GDATA_NAMESPACE
573
 
  _children = atom.AtomBase._children.copy()
574
 
  _attributes = atom.AtomBase._attributes.copy()
575
 
  # TODO: The when tag used to map to a EntryLink, make sure it should really be a When.
576
 
  _children['{%s}when' % gdata.GDATA_NAMESPACE] = ('when', When)
577
 
  _attributes['id'] = 'id'
578
 
  _attributes['href'] = 'href'
579
 
 
580
 
  def __init__(self, id=None, href=None, when=None, 
581
 
      extension_elements=None, extension_attributes=None, text=None):
582
 
    self.id = id
583
 
    self.href = href 
584
 
    self.when = when
585
 
    self.text = text
586
 
    self.extension_elements = extension_elements or []
587
 
    self.extension_attributes = extension_attributes or {}    
588
 
  
589
 
 
590
 
def GetCalendarEventEntryClass():
591
 
  return CalendarEventEntry
592
 
  
593
 
# This class is not completely defined here, because of a circular reference
594
 
# in which CalendarEventEntryLink and CalendarEventEntry refer to one another.
595
 
class CalendarEventEntryLink(gdata.EntryLink):
596
 
  """An entryLink which contains a calendar event entry
597
 
  
598
 
  Within an event's recurranceExceptions, an entry link
599
 
  points to a calendar event entry. This class exists
600
 
  to capture the calendar specific extensions in the entry.
601
 
  """
602
 
 
603
 
  _tag = 'entryLink'
604
 
  _namespace = gdata.GDATA_NAMESPACE
605
 
  _children = gdata.EntryLink._children.copy()
606
 
  _attributes = gdata.EntryLink._attributes.copy()
607
 
  # The CalendarEventEntryLink should like CalendarEventEntry as a child but
608
 
  # that class hasn't been defined yet, so we will wait until after defining
609
 
  # CalendarEventEntry to list it in _children.
610
 
 
611
 
  
612
 
class RecurrenceException(atom.AtomBase):
613
 
  """The Google Calendar RecurrenceException element"""
614
 
 
615
 
  _tag = 'recurrenceException'
616
 
  _namespace = gdata.GDATA_NAMESPACE
617
 
  _children = atom.AtomBase._children.copy()
618
 
  _attributes = atom.AtomBase._attributes.copy()
619
 
  _children['{%s}entryLink' % gdata.GDATA_NAMESPACE] = ('entry_link', 
620
 
      CalendarEventEntryLink)
621
 
  _children['{%s}originalEvent' % gdata.GDATA_NAMESPACE] = ('original_event',
622
 
                                                            OriginalEvent)
623
 
  _attributes['specialized'] = 'specialized'
624
 
  
625
 
  def __init__(self, specialized=None, entry_link=None, 
626
 
      original_event=None, extension_elements=None, 
627
 
      extension_attributes=None, text=None):
628
 
    self.specialized = specialized
629
 
    self.entry_link = entry_link
630
 
    self.original_event = original_event
631
 
    self.text = text
632
 
    self.extension_elements = extension_elements or []
633
 
    self.extension_attributes = extension_attributes or {}
634
 
    
635
 
 
636
 
class SendEventNotifications(atom.AtomBase):
637
 
  """The Google Calendar sendEventNotifications element"""
638
 
  
639
 
  _tag = 'sendEventNotifications'
640
 
  _namespace = GCAL_NAMESPACE
641
 
  _children = atom.AtomBase._children.copy()
642
 
  _attributes = atom.AtomBase._attributes.copy()
643
 
  _attributes['value'] = 'value'
644
 
 
645
 
  def __init__(self, extension_elements=None,
646
 
      value=None, extension_attributes=None, text=None):
647
 
    self.value = value
648
 
    self.text = text
649
 
    self.extension_elements = extension_elements or []
650
 
    self.extension_attributes = extension_attributes or {}
651
 
    
652
 
class QuickAdd(atom.AtomBase):
653
 
  """The Google Calendar quickadd element"""
654
 
  
655
 
  _tag = 'quickadd'
656
 
  _namespace = GCAL_NAMESPACE
657
 
  _children = atom.AtomBase._children.copy()
658
 
  _attributes = atom.AtomBase._attributes.copy()
659
 
  _attributes['value'] = 'value'
660
 
 
661
 
  def __init__(self, extension_elements=None,
662
 
      value=None, extension_attributes=None, text=None):
663
 
    self.value = value
664
 
    self.text = text
665
 
    self.extension_elements = extension_elements or []
666
 
    self.extension_attributes = extension_attributes or {}
667
 
 
668
 
  def _TransferToElementTree(self, element_tree):
669
 
    if self.value:
670
 
      element_tree.attrib['value'] = self.value
671
 
    element_tree.tag = GCAL_TEMPLATE % 'quickadd'
672
 
    atom.AtomBase._TransferToElementTree(self, element_tree)
673
 
    return element_tree
674
 
 
675
 
  def _TakeAttributeFromElementTree(self, attribute, element_tree):
676
 
    if attribute == 'value':
677
 
      self.value = element_tree.attrib[attribute]
678
 
      del element_tree.attrib[attribute]
679
 
    else:
680
 
      atom.AtomBase._TakeAttributeFromElementTree(self, attribute, 
681
 
          element_tree)
682
 
 
683
 
          
684
 
class WebContentGadgetPref(atom.AtomBase):
685
 
 
686
 
  _tag = 'webContentGadgetPref'
687
 
  _namespace = GCAL_NAMESPACE
688
 
  _children = atom.AtomBase._children.copy()
689
 
  _attributes = atom.AtomBase._attributes.copy()
690
 
  _attributes['name'] = 'name'
691
 
  _attributes['value'] = 'value'
692
 
 
693
 
  """The Google Calendar Web Content Gadget Preferences element"""
694
 
 
695
 
  def __init__(self, name=None, value=None, extension_elements=None,
696
 
      extension_attributes=None, text=None):
697
 
    self.name = name
698
 
    self.value = value
699
 
    self.text = text
700
 
    self.extension_elements = extension_elements or []
701
 
    self.extension_attributes = extension_attributes or {}          
702
 
          
703
 
      
704
 
class WebContent(atom.AtomBase):
705
 
 
706
 
  _tag = 'webContent'
707
 
  _namespace = GCAL_NAMESPACE
708
 
  _children = atom.AtomBase._children.copy()
709
 
  _attributes = atom.AtomBase._attributes.copy()
710
 
  _children['{%s}webContentGadgetPref' % GCAL_NAMESPACE] = ('gadget_pref', 
711
 
      [WebContentGadgetPref])
712
 
  _attributes['url'] = 'url'
713
 
  _attributes['width'] = 'width'
714
 
  _attributes['height'] = 'height'
715
 
 
716
 
  def __init__(self, url=None, width=None, height=None, text=None,
717
 
      gadget_pref=None, extension_elements=None, extension_attributes=None):
718
 
    self.url = url
719
 
    self.width = width
720
 
    self.height = height
721
 
    self.text = text
722
 
    self.gadget_pref = gadget_pref or []
723
 
    self.extension_elements = extension_elements or []
724
 
    self.extension_attributes = extension_attributes or {}  
725
 
 
726
 
      
727
 
class WebContentLink(atom.Link):
728
 
 
729
 
  _tag = 'link'
730
 
  _namespace = atom.ATOM_NAMESPACE
731
 
  _children = atom.Link._children.copy()
732
 
  _attributes = atom.Link._attributes.copy()
733
 
  _children['{%s}webContent' % GCAL_NAMESPACE] = ('web_content', WebContent)
734
 
    
735
 
  def __init__(self, title=None, href=None, link_type=None, 
736
 
        web_content=None):
737
 
    atom.Link.__init__(self, rel=WEB_CONTENT_LINK_REL, title=title, href=href, 
738
 
        link_type=link_type)
739
 
    self.web_content = web_content
740
 
 
741
 
 
742
 
class CalendarEventEntry(gdata.BatchEntry):
743
 
  """A Google Calendar flavor of an Atom Entry """
744
 
 
745
 
  _tag = gdata.BatchEntry._tag
746
 
  _namespace = gdata.BatchEntry._namespace
747
 
  _children = gdata.BatchEntry._children.copy()
748
 
  _attributes = gdata.BatchEntry._attributes.copy()
749
 
  # This class also contains WebContentLinks but converting those members
750
 
  # is handled in a special version of _ConvertElementTreeToMember.
751
 
  _children['{%s}where' % gdata.GDATA_NAMESPACE] = ('where', [Where])
752
 
  _children['{%s}when' % gdata.GDATA_NAMESPACE] = ('when', [When])
753
 
  _children['{%s}who' % gdata.GDATA_NAMESPACE] = ('who', [Who])
754
 
  _children['{%s}extendedProperty' % gdata.GDATA_NAMESPACE] = (
755
 
      'extended_property', [ExtendedProperty]) 
756
 
  _children['{%s}visibility' % gdata.GDATA_NAMESPACE] = ('visibility', 
757
 
                                                         Visibility)
758
 
  _children['{%s}transparency' % gdata.GDATA_NAMESPACE] = ('transparency', 
759
 
                                                           Transparency)
760
 
  _children['{%s}eventStatus' % gdata.GDATA_NAMESPACE] = ('event_status', 
761
 
                                                          EventStatus)
762
 
  _children['{%s}recurrence' % gdata.GDATA_NAMESPACE] = ('recurrence', 
763
 
                                                         Recurrence)
764
 
  _children['{%s}recurrenceException' % gdata.GDATA_NAMESPACE] = (
765
 
      'recurrence_exception', [RecurrenceException])
766
 
  _children['{%s}sendEventNotifications' % GCAL_NAMESPACE] = (
767
 
      'send_event_notifications', SendEventNotifications)
768
 
  _children['{%s}quickadd' % GCAL_NAMESPACE] = ('quick_add', QuickAdd)
769
 
  _children['{%s}comments' % gdata.GDATA_NAMESPACE] = ('comments', Comments)
770
 
  _children['{%s}originalEvent' % gdata.GDATA_NAMESPACE] = ('original_event',
771
 
                                                            OriginalEvent)
772
 
  
773
 
  def __init__(self, author=None, category=None, content=None,
774
 
      atom_id=None, link=None, published=None, 
775
 
      title=None, updated=None, 
776
 
      transparency=None, comments=None, event_status=None,
777
 
      send_event_notifications=None, visibility=None,
778
 
      recurrence=None, recurrence_exception=None,
779
 
      where=None, when=None, who=None, quick_add=None,
780
 
      extended_property=None, original_event=None,
781
 
      batch_operation=None, batch_id=None, batch_status=None,
782
 
      extension_elements=None, extension_attributes=None, text=None):
783
 
 
784
 
    gdata.BatchEntry.__init__(self, author=author, category=category, 
785
 
                        content=content,
786
 
                        atom_id=atom_id, link=link, published=published,
787
 
                        batch_operation=batch_operation, batch_id=batch_id, 
788
 
                        batch_status=batch_status,
789
 
                        title=title, updated=updated)
790
 
    
791
 
    self.transparency = transparency 
792
 
    self.comments = comments
793
 
    self.event_status = event_status 
794
 
    self.send_event_notifications = send_event_notifications
795
 
    self.visibility = visibility
796
 
    self.recurrence = recurrence 
797
 
    self.recurrence_exception = recurrence_exception or []
798
 
    self.where = where or []
799
 
    self.when = when or []
800
 
    self.who = who or []
801
 
    self.quick_add = quick_add
802
 
    self.extended_property = extended_property or []
803
 
    self.original_event = original_event
804
 
    self.text = text
805
 
    self.extension_elements = extension_elements or []
806
 
    self.extension_attributes = extension_attributes or {}
807
 
 
808
 
  # We needed to add special logic to _ConvertElementTreeToMember because we
809
 
  # want to make links with a rel of WEB_CONTENT_LINK_REL into a 
810
 
  # WebContentLink
811
 
  def _ConvertElementTreeToMember(self, child_tree):
812
 
    # Special logic to handle Web Content links
813
 
    if (child_tree.tag == '{%s}link' % atom.ATOM_NAMESPACE and 
814
 
        child_tree.attrib['rel'] == WEB_CONTENT_LINK_REL):
815
 
      if self.link is None:
816
 
        self.link = []
817
 
      self.link.append(atom._CreateClassFromElementTree(WebContentLink, 
818
 
                                                        child_tree))
819
 
      return
820
 
    # Find the element's tag in this class's list of child members
821
 
    if self.__class__._children.has_key(child_tree.tag):
822
 
      member_name = self.__class__._children[child_tree.tag][0]
823
 
      member_class = self.__class__._children[child_tree.tag][1]
824
 
      # If the class member is supposed to contain a list, make sure the
825
 
      # matching member is set to a list, then append the new member
826
 
      # instance to the list.
827
 
      if isinstance(member_class, list):
828
 
        if getattr(self, member_name) is None:
829
 
          setattr(self, member_name, [])
830
 
        getattr(self, member_name).append(atom._CreateClassFromElementTree(
831
 
            member_class[0], child_tree))
832
 
      else:
833
 
        setattr(self, member_name,
834
 
                atom._CreateClassFromElementTree(member_class, child_tree))
835
 
    else:
836
 
      atom.ExtensionContainer._ConvertElementTreeToMember(self, child_tree)
837
 
      
838
 
 
839
 
  def GetWebContentLink(self):
840
 
    """Finds the first link with rel set to WEB_CONTENT_REL
841
 
 
842
 
    Returns:
843
 
      A gdata.calendar.WebContentLink or none if none of the links had rel 
844
 
      equal to WEB_CONTENT_REL
845
 
    """
846
 
 
847
 
    for a_link in self.link:
848
 
      if a_link.rel == WEB_CONTENT_LINK_REL:
849
 
        return a_link
850
 
    return None
851
 
    
852
 
 
853
 
def CalendarEventEntryFromString(xml_string):
854
 
  return atom.CreateClassFromXMLString(CalendarEventEntry, xml_string)
855
 
 
856
 
 
857
 
def CalendarEventCommentEntryFromString(xml_string):
858
 
  return atom.CreateClassFromXMLString(CalendarEventCommentEntry, xml_string)
859
 
  
860
 
 
861
 
CalendarEventEntryLink._children = {'{%s}entry' % atom.ATOM_NAMESPACE: 
862
 
    ('entry', CalendarEventEntry)}
863
 
  
864
 
 
865
 
def CalendarEventEntryLinkFromString(xml_string):
866
 
  return atom.CreateClassFromXMLString(CalendarEventEntryLink, xml_string)
867
 
 
868
 
 
869
 
class CalendarEventFeed(gdata.BatchFeed, gdata.LinkFinder):
870
 
  """A Google Calendar event feed flavor of an Atom Feed"""
871
 
 
872
 
  _tag = gdata.BatchFeed._tag
873
 
  _namespace = gdata.BatchFeed._namespace
874
 
  _children = gdata.BatchFeed._children.copy()
875
 
  _attributes = gdata.BatchFeed._attributes.copy()
876
 
  _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', 
877
 
                                                  [CalendarEventEntry])
878
 
 
879
 
  def __init__(self, author=None, category=None, contributor=None,
880
 
      generator=None, icon=None, atom_id=None, link=None, logo=None, 
881
 
      rights=None, subtitle=None, title=None, updated=None, entry=None, 
882
 
      total_results=None, start_index=None, items_per_page=None,
883
 
      interrupted=None,
884
 
      extension_elements=None, extension_attributes=None, text=None):
885
 
     gdata.BatchFeed.__init__(self, author=author, category=category,
886
 
                              contributor=contributor, generator=generator,
887
 
                              icon=icon,  atom_id=atom_id, link=link,
888
 
                              logo=logo, rights=rights, subtitle=subtitle,
889
 
                              title=title, updated=updated, entry=entry,
890
 
                              total_results=total_results,
891
 
                              start_index=start_index,
892
 
                              items_per_page=items_per_page,
893
 
                              interrupted=interrupted,
894
 
                              extension_elements=extension_elements,
895
 
                              extension_attributes=extension_attributes,
896
 
                              text=text)
897
 
 
898
 
 
899
 
def CalendarListEntryFromString(xml_string):
900
 
  return atom.CreateClassFromXMLString(CalendarListEntry, xml_string)
901
 
 
902
 
 
903
 
def CalendarAclEntryFromString(xml_string):
904
 
  return atom.CreateClassFromXMLString(CalendarAclEntry, xml_string)
905
 
 
906
 
 
907
 
def CalendarListFeedFromString(xml_string):
908
 
  return atom.CreateClassFromXMLString(CalendarListFeed, xml_string)
909
 
  
910
 
  
911
 
def CalendarAclFeedFromString(xml_string):
912
 
  return atom.CreateClassFromXMLString(CalendarAclFeed, xml_string)
913
 
 
914
 
 
915
 
def CalendarEventFeedFromString(xml_string):
916
 
  return atom.CreateClassFromXMLString(CalendarEventFeed, xml_string)
917
 
 
918
 
  
919
 
def CalendarEventCommentFeedFromString(xml_string):
920
 
  return atom.CreateClassFromXMLString(CalendarEventCommentFeed, xml_string)
921
 
 
922
 
 
923
 
# Code to create atom feeds from element trees
924
 
#_CalendarListFeedFromElementTree = atom._AtomInstanceFromElementTree(
925
 
#    CalendarListFeed, 'feed', atom.ATOM_NAMESPACE)
926
 
#_CalendarListEntryFromElementTree = atom._AtomInstanceFromElementTree(
927
 
#    CalendarListEntry, 'entry', atom.ATOM_NAMESPACE)
928
 
#_CalendarAclFeedFromElementTree = atom._AtomInstanceFromElementTree(
929
 
#    CalendarAclFeed, 'feed', atom.ATOM_NAMESPACE)
930
 
#_CalendarAclEntryFromElementTree = atom._AtomInstanceFromElementTree(
931
 
#    CalendarAclEntry, 'entry', atom.ATOM_NAMESPACE)
932
 
#_CalendarEventFeedFromElementTree = atom._AtomInstanceFromElementTree(
933
 
#    CalendarEventFeed, 'feed', atom.ATOM_NAMESPACE)
934
 
#_CalendarEventEntryFromElementTree = atom._AtomInstanceFromElementTree(
935
 
#    CalendarEventEntry, 'entry', atom.ATOM_NAMESPACE)
936
 
#_CalendarEventCommentFeedFromElementTree = atom._AtomInstanceFromElementTree(
937
 
#    CalendarEventCommentFeed, 'feed', atom.ATOM_NAMESPACE)
938
 
#_CalendarEventCommentEntryFromElementTree = atom._AtomInstanceFromElementTree(
939
 
#    CalendarEventCommentEntry, 'entry', atom.ATOM_NAMESPACE)
940
 
#_WhereFromElementTree = atom._AtomInstanceFromElementTree(
941
 
#    Where, 'where', gdata.GDATA_NAMESPACE)
942
 
#_WhenFromElementTree = atom._AtomInstanceFromElementTree(
943
 
#    When, 'when', gdata.GDATA_NAMESPACE)
944
 
#_WhoFromElementTree = atom._AtomInstanceFromElementTree(
945
 
#    Who, 'who', gdata.GDATA_NAMESPACE)
946
 
#_VisibilityFromElementTree= atom._AtomInstanceFromElementTree(
947
 
#    Visibility, 'visibility', gdata.GDATA_NAMESPACE)
948
 
#_TransparencyFromElementTree = atom._AtomInstanceFromElementTree(
949
 
#    Transparency, 'transparency', gdata.GDATA_NAMESPACE)
950
 
#_CommentsFromElementTree = atom._AtomInstanceFromElementTree(
951
 
#    Comments, 'comments', gdata.GDATA_NAMESPACE)
952
 
#_EventStatusFromElementTree = atom._AtomInstanceFromElementTree(
953
 
#    EventStatus, 'eventStatus', gdata.GDATA_NAMESPACE)
954
 
#_SendEventNotificationsFromElementTree = atom._AtomInstanceFromElementTree(
955
 
#    SendEventNotifications, 'sendEventNotifications', GCAL_NAMESPACE)
956
 
#_QuickAddFromElementTree = atom._AtomInstanceFromElementTree(
957
 
#    QuickAdd, 'quickadd', GCAL_NAMESPACE)
958
 
#_AttendeeStatusFromElementTree = atom._AtomInstanceFromElementTree(
959
 
#    AttendeeStatus, 'attendeeStatus', gdata.GDATA_NAMESPACE)
960
 
#_AttendeeTypeFromElementTree = atom._AtomInstanceFromElementTree(
961
 
#    AttendeeType, 'attendeeType', gdata.GDATA_NAMESPACE)
962
 
#_ExtendedPropertyFromElementTree = atom._AtomInstanceFromElementTree(
963
 
#    ExtendedProperty, 'extendedProperty', gdata.GDATA_NAMESPACE)
964
 
#_RecurrenceFromElementTree = atom._AtomInstanceFromElementTree(
965
 
#    Recurrence, 'recurrence', gdata.GDATA_NAMESPACE)
966
 
#_RecurrenceExceptionFromElementTree = atom._AtomInstanceFromElementTree(
967
 
#    RecurrenceException, 'recurrenceException', gdata.GDATA_NAMESPACE)
968
 
#_OriginalEventFromElementTree = atom._AtomInstanceFromElementTree(
969
 
#    OriginalEvent, 'originalEvent', gdata.GDATA_NAMESPACE)
970
 
#_ColorFromElementTree = atom._AtomInstanceFromElementTree(
971
 
#    Color, 'color', GCAL_NAMESPACE)
972
 
#_HiddenFromElementTree = atom._AtomInstanceFromElementTree(
973
 
#    Hidden, 'hidden', GCAL_NAMESPACE)
974
 
#_SelectedFromElementTree = atom._AtomInstanceFromElementTree(
975
 
#    Selected, 'selected', GCAL_NAMESPACE)
976
 
#_TimezoneFromElementTree = atom._AtomInstanceFromElementTree(
977
 
#    Timezone, 'timezone', GCAL_NAMESPACE)
978
 
#_AccessLevelFromElementTree = atom._AtomInstanceFromElementTree(
979
 
#    AccessLevel, 'accesslevel', GCAL_NAMESPACE)
980
 
#_ReminderFromElementTree = atom._AtomInstanceFromElementTree(
981
 
#    Reminder, 'reminder', gdata.GDATA_NAMESPACE)
982
 
#_ScopeFromElementTree = atom._AtomInstanceFromElementTree(
983
 
#    Scope, 'scope', GACL_NAMESPACE)
984
 
#_RoleFromElementTree = atom._AtomInstanceFromElementTree(
985
 
#    Role, 'role', GACL_NAMESPACE)
986
 
#_WebContentLinkFromElementTree = atom._AtomInstanceFromElementTree(
987
 
#    WebContentLink, 'link', atom.ATOM_NAMESPACE)
988
 
#_WebContentFromElementTree = atom._AtomInstanceFromElementTree(
989
 
#    WebContent, 'webContent', GCAL_NAMESPACE)
990
 
#_WebContentGadgetPrefFromElementTree = atom._AtomInstanceFromElementTree(
991
 
#    WebContentGadgetPref, 'webContentGadgetPref', GCAL_NAMESPACE)