🔍 Code Extractor

class GroupCreationInformation_v1

Maturity: 36

A data class that encapsulates information required to create a SharePoint group, including display name, alias, visibility settings, and optional parameters.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/groups/creation_information.py
Lines:
5 - 17
Complexity:
simple

Purpose

This class serves as a data transfer object (DTO) for SharePoint group creation operations. It inherits from ClientValue, indicating it's part of the Office365 SharePoint API client library and is used to pass structured group creation data to SharePoint services. The class bundles together required and optional parameters needed when creating a new SharePoint group through the API.

Source Code

class GroupCreationInformation(ClientValue):
    def __init__(self, display_name, alias, is_public, optional_params=None):
        super(GroupCreationInformation, self).__init__()
        if optional_params is None:
            optional_params = GroupCreationParams()
        self.displayName = display_name
        self.alias = alias
        self.isPublic = is_public
        self.optionalParams = optional_params

    @property
    def entity_type_name(self):
        return None

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

display_name: The human-readable name of the group that will be displayed in SharePoint interfaces. This is the primary identifier users will see.

alias: A unique identifier or short name for the group, typically used in URLs and system references. Must be unique within the SharePoint environment.

is_public: Boolean flag indicating whether the group should be publicly visible (True) or private (False). Controls access and visibility settings for the group.

optional_params: An instance of GroupCreationParams containing additional optional configuration for the group. If not provided, a default GroupCreationParams instance is created automatically. Can include settings like description, owners, members, etc.

Return Value

Instantiation returns a GroupCreationInformation object that encapsulates all the data needed for group creation. The entity_type_name property returns None, indicating this is a value object without a specific entity type mapping in the SharePoint schema.

Class Interface

Methods

__init__(display_name, alias, is_public, optional_params=None)

Purpose: Initializes a new GroupCreationInformation instance with required and optional group creation parameters

Parameters:

  • display_name: The display name for the group
  • alias: The alias/short name for the group
  • is_public: Boolean indicating if the group is public
  • optional_params: Optional GroupCreationParams instance, defaults to new GroupCreationParams() if None

Returns: None (constructor)

entity_type_name() -> None property

Purpose: Returns the entity type name for this value object, which is None as this is a client-side value object without a direct entity mapping

Returns: None - indicates this is a value object without a specific SharePoint entity type

Attributes

Name Type Description Scope
displayName str The human-readable display name of the group to be created instance
alias str The unique alias or short identifier for the group instance
isPublic bool Flag indicating whether the group should be publicly visible (True) or private (False) instance
optionalParams GroupCreationParams Additional optional parameters for group creation, such as description, owners, and members instance

Dependencies

  • office365-runtime
  • office365-sharepoint

Required Imports

from office365.runtime.client_value import ClientValue
from office365.sharepoint.portal.groups.creation_params import GroupCreationParams

Usage Example

from office365.sharepoint.portal.groups.creation_information import GroupCreationInformation
from office365.sharepoint.portal.groups.creation_params import GroupCreationParams

# Create with default optional parameters
group_info = GroupCreationInformation(
    display_name="Marketing Team",
    alias="marketing-team",
    is_public=False
)

# Create with custom optional parameters
optional_params = GroupCreationParams()
group_info_custom = GroupCreationInformation(
    display_name="Sales Team",
    alias="sales-team",
    is_public=True,
    optional_params=optional_params
)

# Access attributes
print(group_info.displayName)  # "Marketing Team"
print(group_info.alias)  # "marketing-team"
print(group_info.isPublic)  # False
print(group_info.entity_type_name)  # None

Best Practices

  • Always provide a unique alias that follows SharePoint naming conventions (typically lowercase with hyphens)
  • Ensure the display_name is descriptive and user-friendly as it will be visible to all users who can see the group
  • Set is_public carefully based on security requirements - public groups are visible to all users in the organization
  • If you need to specify additional group properties (description, owners, members), create and configure a GroupCreationParams object before passing it to optional_params
  • This class is immutable after creation - create a new instance if you need to modify group creation parameters
  • The entity_type_name property returns None, which is expected behavior for value objects in the Office365 API
  • This object is typically passed to a SharePoint client method that handles the actual group creation API call

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class GroupCreationInformation 86.8% similar

    A data transfer object (DTO) class that encapsulates information required to create a cross-site SharePoint group.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/principal/groups/creation_information.py
  • class ViewCreationInformation 76.1% similar

    A data transfer object (DTO) class that encapsulates the properties required to create a new SharePoint list view, inheriting from ClientValue for serialization support.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/views/create_information.py
  • class RoleDefinitionCreationInformation 75.5% similar

    A data class that encapsulates properties used to initialize a SharePoint role definition, including name, description, permissions, and display order.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/permissions/roles/definitions/creation_information.py
  • class ListItemCreationInformation 75.5% similar

    A data class that encapsulates the properties required to create a new list item in SharePoint, including file/folder specification, name, and location.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listitems/creation_information.py
  • class ContentTypeCreationInformation 75.3% similar

    A data transfer object that encapsulates properties required to create a new SharePoint content type, inheriting from ClientValue for serialization support.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/contenttypes/creation_information.py
← Back to Browse