|
1 | 1 | from office365.entity import Entity |
| 2 | +from office365.planner.category_descriptions import PlannerCategoryDescriptions |
| 3 | +from office365.planner.user_ids import PlannerUserIds |
2 | 4 |
|
3 | 5 |
|
4 | 6 | class PlannerPlanDetails(Entity): |
5 | 7 | """ |
6 | 8 | The plannerPlanDetails resource represents the additional information about a plan. |
7 | 9 | Each plan object has a details object. |
8 | 10 | """ |
| 11 | + |
| 12 | + @property |
| 13 | + def category_descriptions(self): |
| 14 | + # type: () -> PlannerCategoryDescriptions |
| 15 | + """ |
| 16 | + An object that specifies the descriptions of the 25 categories that can be associated with tasks in the plan. |
| 17 | + """ |
| 18 | + return self.properties.get( |
| 19 | + "categoryDescriptions", PlannerCategoryDescriptions() |
| 20 | + ) |
| 21 | + |
| 22 | + @property |
| 23 | + def shared_with(self): |
| 24 | + # type: () -> PlannerUserIds |
| 25 | + """ |
| 26 | + Set of user IDs that this plan is shared with. If you're using Microsoft 365 groups, use the Groups |
| 27 | + API to manage group membership to share the group's plan. You can also add existing members of the group to |
| 28 | + this collection, although it isn't required for them to access the plan owned by the group. |
| 29 | + """ |
| 30 | + return self.properties.get("sharedWith", PlannerUserIds()) |
| 31 | + |
| 32 | + def get_property(self, name, default_value=None): |
| 33 | + if default_value is None: |
| 34 | + property_mapping = { |
| 35 | + "categoryDescriptions": self.category_descriptions, |
| 36 | + "sharedWith": self.shared_with, |
| 37 | + } |
| 38 | + default_value = property_mapping.get(name, None) |
| 39 | + return super(PlannerPlanDetails, self).get_property(name, default_value) |
0 commit comments