🔍 Code Extractor

class PlannerPlan

Maturity: 39

The plannerPlan resource represents a plan in Microsoft 365. A plan can be owned by a group and contains a collection of plannerTasks. It can also have a collection of plannerBuckets. Each plan object has a details object that can contain more information about the plan. For more information about the relationships between groups, plans, and tasks, see Planner.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/plans/plan.py
Lines:
13 - 80
Complexity:
moderate

Purpose

The plannerPlan resource represents a plan in Microsoft 365. A plan can be owned by a group and contains a collection of plannerTasks. It can also have a collection of plannerBuckets. Each plan object has a details object that can contain more information about the plan. For more information about the relationships between groups, plans, and tasks, see Planner.

Source Code

class PlannerPlan(Entity):
    """The plannerPlan resource represents a plan in Microsoft 365. A plan can be owned by a group
    and contains a collection of plannerTasks. It can also have a collection of plannerBuckets.
    Each plan object has a details object that can contain more information about the plan.
    For more information about the relationships between groups, plans, and tasks, see Planner.
    """

    def __str__(self):
        return self.title

    def __repr__(self):
        return self.id or self.entity_type_name

    @property
    def container(self):
        """Identity of the user, device, or application which created the plan."""
        return self.properties.get("container", PlannerPlanContainer())

    @property
    def title(self):
        # type: () -> Optional[str]
        """Required. Title of the plan."""
        return self.properties.get("title", None)

    @property
    def created_by(self):
        """Identity of the user, device, or application which created the plan."""
        return self.properties.get("createdBy", IdentitySet())

    @property
    def buckets(self):
        # type: () -> EntityCollection[PlannerBucket]
        """Collection of buckets in the plan."""
        return self.properties.get(
            "buckets",
            EntityCollection(
                self.context, PlannerBucket, ResourcePath("buckets", self.resource_path)
            ),
        )

    @property
    def details(self):
        """Additional details about the plan."""
        return self.properties.get(
            "details",
            PlannerPlanDetails(
                self.context, ResourcePath("details", self.resource_path)
            ),
        )

    @property
    def tasks(self):
        # type: () -> EntityCollection[PlannerTask]
        """Collection of tasks in the plan."""
        return self.properties.get(
            "tasks",
            EntityCollection(
                self.context, PlannerTask, ResourcePath("tasks", self.resource_path)
            ),
        )

    def get_property(self, name, default_value=None):
        if default_value is None:
            property_mapping = {
                "createdBy": self.created_by,
            }
            default_value = property_mapping.get(name, None)
        return super(PlannerPlan, self).get_property(name, default_value)

Parameters

Name Type Default Kind
bases Entity -

Parameter Details

bases: Parameter of type Entity

Return Value

Returns unspecified type

Class Interface

Methods

__str__(self)

Purpose: Internal method: str

Returns: None

__repr__(self)

Purpose: Internal method: repr

Returns: None

container(self) property

Purpose: Identity of the user, device, or application which created the plan.

Returns: None

title(self) property

Purpose: Required. Title of the plan.

Returns: None

created_by(self) property

Purpose: Identity of the user, device, or application which created the plan.

Returns: None

buckets(self) property

Purpose: Collection of buckets in the plan.

Returns: None

details(self) property

Purpose: Additional details about the plan.

Returns: None

tasks(self) property

Purpose: Collection of tasks in the plan.

Returns: None

get_property(self, name, default_value)

Purpose: Retrieves property

Parameters:

  • name: Parameter
  • default_value: Parameter

Returns: None

Required Imports

from typing import Optional
from office365.directory.permissions.identity_set import IdentitySet
from office365.entity import Entity
from office365.entity_collection import EntityCollection
from office365.planner.buckets.bucket import PlannerBucket

Usage Example

# Example usage:
# result = PlannerPlan(bases)

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class PlannerTask 75.6% similar

    Represents a Microsoft 365 Planner task entity with properties for title and detailed task information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/tasks/task.py
  • class Planner 75.4% similar

    The Planner class is a singleton entry point for accessing Microsoft Planner resources, providing access to buckets, tasks, and plans assigned to a user.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/planner.py
  • class PlannerPlanDetails 74.4% similar

    A class representing additional details about a planner plan in Microsoft 365, inheriting from Entity base class.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/plans/details.py
  • class PlannerGroup 74.0% similar

    PlannerGroup is a class that provides access to Microsoft Planner resources associated with a group, specifically enabling retrieval of planner plans owned by the group.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/group.py
  • class PlannerBucket 73.7% similar

    Represents a bucket (custom column) for organizing tasks within a Microsoft 365 Planner plan, providing access to the collection of tasks contained in the bucket.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/buckets/bucket.py
← Back to Browse