def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_collection_of_enum_values("allowedOnlineMeetingProviders", self.allowed_online_meeting_providers)
        writer.write_collection_of_object_values("calendarPermissions", self.calendar_permissions)
        writer.write_collection_of_object_values("calendarView", self.calendar_view)
        writer.write_bool_value("canEdit", self.can_edit)
        writer.write_bool_value("canShare", self.can_share)
        writer.write_bool_value("canViewPrivateItems", self.can_view_private_items)
        writer.write_str_value("changeKey", self.change_key)
        writer.write_enum_value("color", self.color)
        writer.write_enum_value("defaultOnlineMeetingProvider", self.default_online_meeting_provider)
        writer.write_collection_of_object_values("events", self.events)
        writer.write_str_value("hexColor", self.hex_color)
        writer.write_bool_value("isDefaultCalendar", self.is_default_calendar)
        writer.write_bool_value("isRemovable", self.is_removable)
        writer.write_bool_value("isTallyingResponses", self.is_tallying_responses)
        writer.write_collection_of_object_values("multiValueExtendedProperties", self.multi_value_extended_properties)
        writer.write_str_value("name", self.name)
        writer.write_object_value("owner", self.owner)
        writer.write_collection_of_object_values("singleValueExtendedProperties", self.single_value_extended_properties)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/calendar.py