├── .gitignore ├── DESCRIPTION.rst ├── LICENSE ├── MANIFEST.in ├── README.md ├── appveyor.yml ├── appveyor ├── install.ps1 └── run_with_compiler.cmd ├── clean_build.bat ├── setup.cfg ├── setup.py ├── src ├── __init__.py ├── msgraph │ ├── __init__.py │ ├── auth_provider_base.py │ ├── client │ │ ├── __init__.py │ │ └── graph_service_client.py │ ├── collection_base.py │ ├── error.py │ ├── extensions │ │ ├── __init__.py │ │ └── graph_client_helper.py │ ├── graph_object_base.py │ ├── http_provider.py │ ├── http_provider_base.py │ ├── http_response.py │ ├── model │ │ ├── __init__.py │ │ ├── alternative_security_id.py │ │ ├── assigned_license.py │ │ ├── assigned_plan.py │ │ ├── attachment.py │ │ ├── attendee.py │ │ ├── attendee_type.py │ │ ├── audio.py │ │ ├── body_type.py │ │ ├── calendar.py │ │ ├── calendar_color.py │ │ ├── calendar_group.py │ │ ├── contact.py │ │ ├── contact_folder.py │ │ ├── conversation.py │ │ ├── conversation_thread.py │ │ ├── date_time_time_zone.py │ │ ├── day_of_week.py │ │ ├── deleted.py │ │ ├── device.py │ │ ├── directory_object.py │ │ ├── directory_role.py │ │ ├── directory_role_template.py │ │ ├── drive.py │ │ ├── drive_item.py │ │ ├── email_address.py │ │ ├── entity.py │ │ ├── event.py │ │ ├── event_message.py │ │ ├── event_type.py │ │ ├── extension.py │ │ ├── file.py │ │ ├── file_attachment.py │ │ ├── file_system_info.py │ │ ├── folder.py │ │ ├── free_busy_status.py │ │ ├── geo_coordinates.py │ │ ├── group.py │ │ ├── hashes.py │ │ ├── identity.py │ │ ├── identity_set.py │ │ ├── image.py │ │ ├── importance.py │ │ ├── inference_classification.py │ │ ├── inference_classification_override.py │ │ ├── inference_classification_type.py │ │ ├── item_attachment.py │ │ ├── item_body.py │ │ ├── item_reference.py │ │ ├── license_units_detail.py │ │ ├── location.py │ │ ├── mail_folder.py │ │ ├── meeting_message_type.py │ │ ├── message.py │ │ ├── open_type_extension.py │ │ ├── organization.py │ │ ├── outlook_item.py │ │ ├── package.py │ │ ├── password_profile.py │ │ ├── patterned_recurrence.py │ │ ├── permission.py │ │ ├── photo.py │ │ ├── physical_address.py │ │ ├── post.py │ │ ├── profile_photo.py │ │ ├── provisioned_plan.py │ │ ├── quota.py │ │ ├── recipient.py │ │ ├── recurrence_pattern.py │ │ ├── recurrence_pattern_type.py │ │ ├── recurrence_range.py │ │ ├── recurrence_range_type.py │ │ ├── reference_attachment.py │ │ ├── reminder.py │ │ ├── remote_item.py │ │ ├── response_status.py │ │ ├── response_type.py │ │ ├── search_result.py │ │ ├── sensitivity.py │ │ ├── service_plan_info.py │ │ ├── shared.py │ │ ├── sharing_invitation.py │ │ ├── sharing_link.py │ │ ├── special_folder.py │ │ ├── subscribed_sku.py │ │ ├── subscription.py │ │ ├── thumbnail.py │ │ ├── thumbnail_set.py │ │ ├── user.py │ │ ├── verified_domain.py │ │ ├── video.py │ │ └── week_index.py │ ├── options.py │ ├── request_base.py │ ├── request_builder_base.py │ ├── session_base.py │ ├── version.py │ └── version.txt ├── python2 │ ├── __init__.py │ ├── accepted_senders_collection.py │ ├── attachment_collection.py │ ├── attachment_request.py │ ├── attachment_request_builder.py │ ├── attachments_collection.py │ ├── calendar_collection.py │ ├── calendar_group_collection.py │ ├── calendar_group_request.py │ ├── calendar_group_request_builder.py │ ├── calendar_groups_collection.py │ ├── calendar_request.py │ ├── calendar_request_builder.py │ ├── calendar_view_collection.py │ ├── calendars_collection.py │ ├── child_folders_collection.py │ ├── children_collection.py │ ├── contact_collection.py │ ├── contact_folder_collection.py │ ├── contact_folder_request.py │ ├── contact_folder_request_builder.py │ ├── contact_folders_collection.py │ ├── contact_request.py │ ├── contact_request_builder.py │ ├── contacts_collection.py │ ├── conversation_collection.py │ ├── conversation_request.py │ ├── conversation_request_builder.py │ ├── conversation_thread_collection.py │ ├── conversation_thread_reply.py │ ├── conversation_thread_request.py │ ├── conversation_thread_request_builder.py │ ├── conversations_collection.py │ ├── device_collection.py │ ├── device_request.py │ ├── device_request_builder.py │ ├── devices_collection.py │ ├── directory_object_check_member_groups.py │ ├── directory_object_collection.py │ ├── directory_object_get_member_groups.py │ ├── directory_object_get_member_objects.py │ ├── directory_object_request.py │ ├── directory_object_request_builder.py │ ├── directory_objects_collection.py │ ├── directory_role_collection.py │ ├── directory_role_request.py │ ├── directory_role_request_builder.py │ ├── directory_role_template_collection.py │ ├── directory_role_template_request.py │ ├── directory_role_template_request_builder.py │ ├── directory_role_templates_collection.py │ ├── directory_roles_collection.py │ ├── drive_collection.py │ ├── drive_item_collection.py │ ├── drive_item_content_request.py │ ├── drive_item_create_link.py │ ├── drive_item_request.py │ ├── drive_item_request_builder.py │ ├── drive_item_search.py │ ├── drive_request.py │ ├── drive_request_builder.py │ ├── drives_collection.py │ ├── entity_collection.py │ ├── entity_request.py │ ├── entity_request_builder.py │ ├── event_accept.py │ ├── event_collection.py │ ├── event_decline.py │ ├── event_dismiss_reminder.py │ ├── event_message_collection.py │ ├── event_message_request.py │ ├── event_message_request_builder.py │ ├── event_request.py │ ├── event_request_builder.py │ ├── event_snooze_reminder.py │ ├── event_tentatively_accept.py │ ├── events_collection.py │ ├── file_attachment_collection.py │ ├── file_attachment_request.py │ ├── file_attachment_request_builder.py │ ├── group_add_favorite.py │ ├── group_collection.py │ ├── group_remove_favorite.py │ ├── group_request.py │ ├── group_request_builder.py │ ├── group_reset_unseen_count.py │ ├── group_subscribe_by_mail.py │ ├── group_unsubscribe_by_mail.py │ ├── groups_collection.py │ ├── instances_collection.py │ ├── item_attachment_collection.py │ ├── item_attachment_request.py │ ├── item_attachment_request_builder.py │ ├── items_collection.py │ ├── mail_folder_collection.py │ ├── mail_folder_copy.py │ ├── mail_folder_move.py │ ├── mail_folder_request.py │ ├── mail_folder_request_builder.py │ ├── mail_folders_collection.py │ ├── message_collection.py │ ├── message_copy.py │ ├── message_create_forward.py │ ├── message_create_reply.py │ ├── message_create_reply_all.py │ ├── message_forward.py │ ├── message_move.py │ ├── message_reply.py │ ├── message_reply_all.py │ ├── message_request.py │ ├── message_request_builder.py │ ├── message_send.py │ ├── messages_collection.py │ ├── organization_collection.py │ ├── organization_request.py │ ├── organization_request_builder.py │ ├── outlook_item_collection.py │ ├── outlook_item_request.py │ ├── outlook_item_request_builder.py │ ├── permission_collection.py │ ├── permission_request.py │ ├── permission_request_builder.py │ ├── permissions_collection.py │ ├── post_collection.py │ ├── post_forward.py │ ├── post_reply.py │ ├── post_request.py │ ├── post_request_builder.py │ ├── posts_collection.py │ ├── profile_photo_collection.py │ ├── profile_photo_request.py │ ├── profile_photo_request_builder.py │ ├── reference_attachment_collection.py │ ├── reference_attachment_request.py │ ├── reference_attachment_request_builder.py │ ├── rejected_senders_collection.py │ ├── request │ │ ├── __init__.py │ │ ├── accepted_senders_collection.py │ │ ├── attachment_collection.py │ │ ├── attachment_request.py │ │ ├── attachment_request_builder.py │ │ ├── attachments_collection.py │ │ ├── calendar_collection.py │ │ ├── calendar_group_collection.py │ │ ├── calendar_group_request.py │ │ ├── calendar_group_request_builder.py │ │ ├── calendar_groups_collection.py │ │ ├── calendar_request.py │ │ ├── calendar_request_builder.py │ │ ├── calendar_view_collection.py │ │ ├── calendars_collection.py │ │ ├── child_folders_collection.py │ │ ├── children_collection.py │ │ ├── contact_collection.py │ │ ├── contact_folder_collection.py │ │ ├── contact_folder_request.py │ │ ├── contact_folder_request_builder.py │ │ ├── contact_folders_collection.py │ │ ├── contact_request.py │ │ ├── contact_request_builder.py │ │ ├── contacts_collection.py │ │ ├── conversation_collection.py │ │ ├── conversation_request.py │ │ ├── conversation_request_builder.py │ │ ├── conversation_thread_collection.py │ │ ├── conversation_thread_reply.py │ │ ├── conversation_thread_request.py │ │ ├── conversation_thread_request_builder.py │ │ ├── conversations_collection.py │ │ ├── device_collection.py │ │ ├── device_request.py │ │ ├── device_request_builder.py │ │ ├── devices_collection.py │ │ ├── directory_object_check_member_groups.py │ │ ├── directory_object_collection.py │ │ ├── directory_object_get_member_groups.py │ │ ├── directory_object_get_member_objects.py │ │ ├── directory_object_request.py │ │ ├── directory_object_request_builder.py │ │ ├── directory_objects_collection.py │ │ ├── directory_role_collection.py │ │ ├── directory_role_request.py │ │ ├── directory_role_request_builder.py │ │ ├── directory_role_template_collection.py │ │ ├── directory_role_template_request.py │ │ ├── directory_role_template_request_builder.py │ │ ├── directory_role_templates_collection.py │ │ ├── directory_roles_collection.py │ │ ├── drive_collection.py │ │ ├── drive_item_collection.py │ │ ├── drive_item_content_request.py │ │ ├── drive_item_create_link.py │ │ ├── drive_item_request.py │ │ ├── drive_item_request_builder.py │ │ ├── drive_item_search.py │ │ ├── drive_request.py │ │ ├── drive_request_builder.py │ │ ├── drives_collection.py │ │ ├── entity_collection.py │ │ ├── entity_request.py │ │ ├── entity_request_builder.py │ │ ├── event_accept.py │ │ ├── event_collection.py │ │ ├── event_decline.py │ │ ├── event_dismiss_reminder.py │ │ ├── event_message_collection.py │ │ ├── event_message_request.py │ │ ├── event_message_request_builder.py │ │ ├── event_request.py │ │ ├── event_request_builder.py │ │ ├── event_snooze_reminder.py │ │ ├── event_tentatively_accept.py │ │ ├── events_collection.py │ │ ├── file_attachment_collection.py │ │ ├── file_attachment_request.py │ │ ├── file_attachment_request_builder.py │ │ ├── group_add_favorite.py │ │ ├── group_collection.py │ │ ├── group_remove_favorite.py │ │ ├── group_request.py │ │ ├── group_request_builder.py │ │ ├── group_reset_unseen_count.py │ │ ├── group_subscribe_by_mail.py │ │ ├── group_unsubscribe_by_mail.py │ │ ├── groups_collection.py │ │ ├── instances_collection.py │ │ ├── item_attachment_collection.py │ │ ├── item_attachment_request.py │ │ ├── item_attachment_request_builder.py │ │ ├── items_collection.py │ │ ├── mail_folder_collection.py │ │ ├── mail_folder_copy.py │ │ ├── mail_folder_move.py │ │ ├── mail_folder_request.py │ │ ├── mail_folder_request_builder.py │ │ ├── mail_folders_collection.py │ │ ├── message_collection.py │ │ ├── message_copy.py │ │ ├── message_create_forward.py │ │ ├── message_create_reply.py │ │ ├── message_create_reply_all.py │ │ ├── message_forward.py │ │ ├── message_move.py │ │ ├── message_reply.py │ │ ├── message_reply_all.py │ │ ├── message_request.py │ │ ├── message_request_builder.py │ │ ├── message_send.py │ │ ├── messages_collection.py │ │ ├── organization_collection.py │ │ ├── organization_request.py │ │ ├── organization_request_builder.py │ │ ├── outlook_item_collection.py │ │ ├── outlook_item_request.py │ │ ├── outlook_item_request_builder.py │ │ ├── permission_collection.py │ │ ├── permission_request.py │ │ ├── permission_request_builder.py │ │ ├── permissions_collection.py │ │ ├── post_collection.py │ │ ├── post_forward.py │ │ ├── post_reply.py │ │ ├── post_request.py │ │ ├── post_request_builder.py │ │ ├── posts_collection.py │ │ ├── profile_photo_collection.py │ │ ├── profile_photo_request.py │ │ ├── profile_photo_request_builder.py │ │ ├── reference_attachment_collection.py │ │ ├── reference_attachment_request.py │ │ ├── reference_attachment_request_builder.py │ │ ├── rejected_senders_collection.py │ │ ├── special_collection.py │ │ ├── subscribed_sku_collection.py │ │ ├── subscribed_sku_request.py │ │ ├── subscribed_sku_request_builder.py │ │ ├── subscribed_skus_collection.py │ │ ├── threads_collection.py │ │ ├── thumbnail_content_request.py │ │ ├── thumbnail_request.py │ │ ├── thumbnail_request_builder.py │ │ ├── thumbnail_set_collection.py │ │ ├── thumbnail_set_request.py │ │ ├── thumbnail_set_request_builder.py │ │ ├── thumbnails_collection.py │ │ ├── user_assign_license.py │ │ ├── user_change_password.py │ │ ├── user_collection.py │ │ ├── user_reminder_view.py │ │ ├── user_request.py │ │ ├── user_request_builder.py │ │ ├── user_send_mail.py │ │ └── users_collection.py │ ├── special_collection.py │ ├── subscribed_sku_collection.py │ ├── subscribed_sku_request.py │ ├── subscribed_sku_request_builder.py │ ├── subscribed_skus_collection.py │ ├── threads_collection.py │ ├── thumbnail_content_request.py │ ├── thumbnail_request.py │ ├── thumbnail_request_builder.py │ ├── thumbnail_set_collection.py │ ├── thumbnail_set_request.py │ ├── thumbnail_set_request_builder.py │ ├── thumbnails_collection.py │ ├── user_assign_license.py │ ├── user_change_password.py │ ├── user_collection.py │ ├── user_reminder_view.py │ ├── user_request.py │ ├── user_request_builder.py │ ├── user_send_mail.py │ └── users_collection.py └── python3 │ ├── __init__.py │ └── request │ ├── __init__.py │ ├── accepted_senders_collection.py │ ├── attachment_collection.py │ ├── attachment_request.py │ ├── attachment_request_builder.py │ ├── attachments_collection.py │ ├── calendar_collection.py │ ├── calendar_group_collection.py │ ├── calendar_group_request.py │ ├── calendar_group_request_builder.py │ ├── calendar_groups_collection.py │ ├── calendar_request.py │ ├── calendar_request_builder.py │ ├── calendar_view_collection.py │ ├── calendars_collection.py │ ├── child_folders_collection.py │ ├── children_collection.py │ ├── contact_collection.py │ ├── contact_folder_collection.py │ ├── contact_folder_request.py │ ├── contact_folder_request_builder.py │ ├── contact_folders_collection.py │ ├── contact_request.py │ ├── contact_request_builder.py │ ├── contacts_collection.py │ ├── conversation_collection.py │ ├── conversation_request.py │ ├── conversation_request_builder.py │ ├── conversation_thread_collection.py │ ├── conversation_thread_reply.py │ ├── conversation_thread_request.py │ ├── conversation_thread_request_builder.py │ ├── conversations_collection.py │ ├── device_collection.py │ ├── device_request.py │ ├── device_request_builder.py │ ├── devices_collection.py │ ├── directory_object_check_member_groups.py │ ├── directory_object_collection.py │ ├── directory_object_get_member_groups.py │ ├── directory_object_get_member_objects.py │ ├── directory_object_request.py │ ├── directory_object_request_builder.py │ ├── directory_objects_collection.py │ ├── directory_role_collection.py │ ├── directory_role_request.py │ ├── directory_role_request_builder.py │ ├── directory_role_template_collection.py │ ├── directory_role_template_request.py │ ├── directory_role_template_request_builder.py │ ├── directory_role_templates_collection.py │ ├── directory_roles_collection.py │ ├── drive_collection.py │ ├── drive_item_collection.py │ ├── drive_item_content_request.py │ ├── drive_item_copy.py │ ├── drive_item_create_link.py │ ├── drive_item_delta.py │ ├── drive_item_request.py │ ├── drive_item_request_builder.py │ ├── drive_item_search.py │ ├── drive_recent.py │ ├── drive_request.py │ ├── drive_request_builder.py │ ├── drive_shared_with_me.py │ ├── drives_collection.py │ ├── entity_collection.py │ ├── entity_request.py │ ├── entity_request_builder.py │ ├── event_accept.py │ ├── event_collection.py │ ├── event_decline.py │ ├── event_dismiss_reminder.py │ ├── event_message_collection.py │ ├── event_message_request.py │ ├── event_message_request_builder.py │ ├── event_request.py │ ├── event_request_builder.py │ ├── event_snooze_reminder.py │ ├── event_tentatively_accept.py │ ├── events_collection.py │ ├── extension_collection.py │ ├── extension_request.py │ ├── extension_request_builder.py │ ├── extensions_collection.py │ ├── file_attachment_collection.py │ ├── file_attachment_request.py │ ├── file_attachment_request_builder.py │ ├── graph_service_client.py │ ├── group_add_favorite.py │ ├── group_collection.py │ ├── group_remove_favorite.py │ ├── group_request.py │ ├── group_request_builder.py │ ├── group_reset_unseen_count.py │ ├── group_subscribe_by_mail.py │ ├── group_unsubscribe_by_mail.py │ ├── groups_collection.py │ ├── inference_classification_collection.py │ ├── inference_classification_override_collection.py │ ├── inference_classification_override_request.py │ ├── inference_classification_override_request_builder.py │ ├── inference_classification_request.py │ ├── inference_classification_request_builder.py │ ├── instances_collection.py │ ├── item_attachment_collection.py │ ├── item_attachment_request.py │ ├── item_attachment_request_builder.py │ ├── items_collection.py │ ├── mail_folder_collection.py │ ├── mail_folder_copy.py │ ├── mail_folder_move.py │ ├── mail_folder_request.py │ ├── mail_folder_request_builder.py │ ├── mail_folders_collection.py │ ├── message_collection.py │ ├── message_copy.py │ ├── message_create_forward.py │ ├── message_create_reply.py │ ├── message_create_reply_all.py │ ├── message_forward.py │ ├── message_move.py │ ├── message_reply.py │ ├── message_reply_all.py │ ├── message_request.py │ ├── message_request_builder.py │ ├── message_send.py │ ├── messages_collection.py │ ├── open_type_extension_collection.py │ ├── open_type_extension_request.py │ ├── open_type_extension_request_builder.py │ ├── organization_collection.py │ ├── organization_request.py │ ├── organization_request_builder.py │ ├── outlook_item_collection.py │ ├── outlook_item_request.py │ ├── outlook_item_request_builder.py │ ├── overrides_collection.py │ ├── permission_collection.py │ ├── permission_request.py │ ├── permission_request_builder.py │ ├── permissions_collection.py │ ├── post_collection.py │ ├── post_forward.py │ ├── post_reply.py │ ├── post_request.py │ ├── post_request_builder.py │ ├── posts_collection.py │ ├── profile_photo_collection.py │ ├── profile_photo_request.py │ ├── profile_photo_request_builder.py │ ├── reference_attachment_collection.py │ ├── reference_attachment_request.py │ ├── reference_attachment_request_builder.py │ ├── rejected_senders_collection.py │ ├── special_collection.py │ ├── subscribed_sku_collection.py │ ├── subscribed_sku_request.py │ ├── subscribed_sku_request_builder.py │ ├── subscribed_skus_collection.py │ ├── subscription_collection.py │ ├── subscription_request.py │ ├── subscription_request_builder.py │ ├── subscriptions_collection.py │ ├── threads_collection.py │ ├── thumbnail_content_request.py │ ├── thumbnail_request.py │ ├── thumbnail_request_builder.py │ ├── thumbnail_set_collection.py │ ├── thumbnail_set_request.py │ ├── thumbnail_set_request_builder.py │ ├── thumbnails_collection.py │ ├── user_assign_license.py │ ├── user_change_password.py │ ├── user_collection.py │ ├── user_reminder_view.py │ ├── user_request.py │ ├── user_request_builder.py │ ├── user_send_mail.py │ └── users_collection.py └── test_graph_sdk ├── __init__.py ├── test_collections.py ├── test_models.py ├── test_requests.py └── test_streams.py /.gitignore: -------------------------------------------------------------------------------- 1 | venv*/ 2 | .idea/ 3 | __pycache__/ 4 | *.py[cod] 5 | dist/ 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | *.py[cod] 9 | *$py.class 10 | 11 | # C extensions 12 | *.so 13 | 14 | # Distribution / packaging 15 | .Python 16 | env/ 17 | build/ 18 | develop-eggs/ 19 | dist/ 20 | downloads/ 21 | eggs/ 22 | .eggs/ 23 | lib/ 24 | lib64/ 25 | parts/ 26 | sdist/ 27 | var/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *,cover 51 | .hypothesis/ 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | 60 | # Sphinx documentation 61 | docs/_build/ 62 | 63 | # PyBuilder 64 | target/ 65 | 66 | #Ipython Notebook 67 | .ipynb_checkpoints 68 | -------------------------------------------------------------------------------- /DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | Microsoft Graph Python SDK 2 | =================== 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | msgraph-sdk-python 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include DESCRIPTION.rst 3 | recursive-include src\python2 * 4 | recursive-include src\python3 * -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | 3 | global: 4 | # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the 5 | # /E:ON and /V:ON options are not enabled in the batch script intepreter 6 | # See: http://stackoverflow.com/a/13751649/163740 7 | WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd" 8 | 9 | matrix: 10 | 11 | - PYTHON: "C:\\Python27" 12 | PYTHON_VERSION: "2.7.x" # currently 2.7.9 13 | PYTHON_ARCH: "32" 14 | 15 | - PYTHON: "C:\\Python33" 16 | PYTHON_VERSION: "3.3.x" # currently 3.3.5 17 | PYTHON_ARCH: "32" 18 | 19 | - PYTHON: "C:\\Python34" 20 | PYTHON_VERSION: "3.4.x" # currently 3.4.3 21 | PYTHON_ARCH: "32" 22 | 23 | - PYTHON: "C:\\Python27-x64" 24 | PYTHON_VERSION: "2.7.x" # currently 2.7.9 25 | PYTHON_ARCH: "64" 26 | WINDOWS_SDK_VERSION: "v7.0" 27 | 28 | - PYTHON: "C:\\Python33-x64" 29 | PYTHON_VERSION: "3.3.x" # currently 3.3.5 30 | PYTHON_ARCH: "64" 31 | WINDOWS_SDK_VERSION: "v7.1" 32 | 33 | - PYTHON: "C:\\Python34-x64" 34 | PYTHON_VERSION: "3.4.x" # currently 3.4.3 35 | PYTHON_ARCH: "64" 36 | WINDOWS_SDK_VERSION: "v7.1" 37 | 38 | init: 39 | - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" 40 | 41 | install: 42 | - "powershell appveyor\\install.ps1" 43 | - "%PYTHON%/python -m pip install Mock" 44 | - "%PYTHON%/python setup.py install" 45 | 46 | build: off 47 | 48 | test_script: 49 | - "%WITH_COMPILER% %PYTHON%/python setup.py test" 50 | 51 | after_test: 52 | - "%WITH_COMPILER% %PYTHON%/python setup.py bdist_wheel" 53 | 54 | artifacts: 55 | - path: dist\* -------------------------------------------------------------------------------- /appveyor/run_with_compiler.cmd: -------------------------------------------------------------------------------- 1 | :: To build extensions for 64 bit Python 3, we need to configure environment 2 | :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: 3 | :: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) 4 | :: 5 | :: To build extensions for 64 bit Python 2, we need to configure environment 6 | :: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: 7 | :: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) 8 | :: 9 | :: 32 bit builds do not require specific environment configurations. 10 | :: 11 | :: Note: this script needs to be run with the /E:ON and /V:ON flags for the 12 | :: cmd interpreter, at least for (SDK v7.0) 13 | :: 14 | :: More details at: 15 | :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows 16 | :: http://stackoverflow.com/a/13751649/163740 17 | :: 18 | :: Author: Olivier Grisel 19 | :: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ 20 | @ECHO OFF 21 | 22 | SET COMMAND_TO_RUN=%* 23 | SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows 24 | 25 | SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" 26 | IF %MAJOR_PYTHON_VERSION% == "2" ( 27 | SET WINDOWS_SDK_VERSION="v7.0" 28 | ) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( 29 | SET WINDOWS_SDK_VERSION="v7.1" 30 | ) ELSE ( 31 | ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" 32 | EXIT 1 33 | ) 34 | 35 | IF "%PYTHON_ARCH%"=="64" ( 36 | ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture 37 | SET DISTUTILS_USE_SDK=1 38 | SET MSSdk=1 39 | "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% 40 | "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release 41 | ECHO Executing: %COMMAND_TO_RUN% 42 | call %COMMAND_TO_RUN% || EXIT 1 43 | ) ELSE ( 44 | ECHO Using default MSVC build environment for 32 bit architecture 45 | ECHO Executing: %COMMAND_TO_RUN% 46 | call %COMMAND_TO_RUN% || EXIT 1 47 | ) 48 | -------------------------------------------------------------------------------- /clean_build.bat: -------------------------------------------------------------------------------- 1 | rd build /Q /S -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from __future__ import with_statement 2 | from setuptools import setup 3 | from codecs import open 4 | from os import path 5 | import sys 6 | 7 | here = path.abspath(path.dirname(__file__)) 8 | with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: 9 | long_description = f.read() 10 | 11 | with open(path.join(here, 'src', 'msgraph', 'version.txt'), encoding='utf-8') as f: 12 | version = f.read() 13 | 14 | 15 | def main(): 16 | package_list = ['msgraph', 17 | 'msgraph.request', 18 | 'msgraph.model', 19 | 'msgraph.extensions'] 20 | 21 | required_packages = ['requests>=2.6.1'] 22 | 23 | if sys.version_info >= (3, 4): 24 | base_dir = 'python3' 25 | else: 26 | base_dir = 'python2' 27 | required_packages.append('enum>=0.4.6') 28 | 29 | 30 | setup( 31 | name='msgraph', 32 | 33 | version=version, 34 | 35 | description='Python SDK for the Microsoft Graph API [DEPRECATED]', 36 | long_description=long_description, 37 | 38 | url='http://graph.microsoft.io', 39 | 40 | author='Microsoft', 41 | author_email='', 42 | 43 | license='MIT', 44 | 45 | classifiers=[ 46 | 'Development Status :: 4 - Beta', 47 | 'Intended Audience :: Developers', 48 | 'Topic :: Software Development :: Libraries :: Python Modules', 49 | 'License :: OSI Approved :: MIT License', 50 | 'Programming Language :: Python :: 3.5', 51 | 'Operating System :: OS Independent', 52 | 'Operating System :: POSIX', 53 | 'Operating System :: Microsoft :: Windows', 54 | 'Operating System :: MacOS :: MacOS X', 55 | ], 56 | 57 | keywords='msgraph msgraph sdk microsoft', 58 | 59 | packages=package_list, 60 | 61 | package_dir={'msgraph': path.join('src', 'msgraph'), 62 | 'msgraph.request': path.join('src', base_dir, 'request')}, 63 | 64 | package_data={'msgraph': [r'version.txt']}, 65 | 66 | install_requires=required_packages, 67 | 68 | extras_require={ 69 | "samples": ["Pillow"], 70 | "tests": ["Mock"] 71 | }, 72 | 73 | test_suite='test_graph_sdk' 74 | ) 75 | 76 | if __name__ == '__main__': 77 | main() 78 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/__init__.py -------------------------------------------------------------------------------- /src/msgraph/client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/msgraph/client/__init__.py -------------------------------------------------------------------------------- /src/msgraph/collection_base.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | from __future__ import unicode_literals 6 | from .request_base import RequestBase 7 | 8 | 9 | class CollectionRequestBase(RequestBase): 10 | 11 | def __init__(self, request_url, client, options): 12 | super(CollectionRequestBase, self).__init__(request_url, client, options) 13 | 14 | def _init_next_page_request(self, next_page_link, client, options): 15 | # implemented in each collection request 16 | pass 17 | 18 | def _page_from_response(self, response): 19 | """Get the collection page from within the response 20 | 21 | Args: 22 | response (:class:`CollectionResponseBase`): 23 | The response to get the collection page from 24 | 25 | Returns: 26 | The collection page from within the response 27 | """ 28 | if response: 29 | if "@odata.nextLink" in response._prop_dict: 30 | next_page_link = response._prop_dict["@odata.nextLink"] 31 | response.collection_page._init_next_page_request(next_page_link, self._client, None) 32 | return response.collection_page 33 | return None 34 | 35 | 36 | class CollectionResponseBase(object): 37 | 38 | def __init__(self, prop_dict={}): 39 | self._prop_dict = prop_dict 40 | self._collection_page = None 41 | 42 | @property 43 | def collection_page(self): 44 | pass 45 | 46 | 47 | class CollectionPageBase(object): 48 | 49 | def __init__(self, prop_list = []): 50 | self._prop_list = prop_list 51 | 52 | def __len__(self): 53 | return len(self._prop_list) 54 | 55 | @property 56 | def next_page_request(self): 57 | """Gets a request for the next page of a collection, if one exists 58 | 59 | Returns: 60 | The request object to send 61 | """ 62 | try: 63 | return self._next_page_request 64 | except: 65 | return None 66 | -------------------------------------------------------------------------------- /src/msgraph/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | ------------------------------------------------------------------------------ 3 | Copyright (c) 2015 Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | ------------------------------------------------------------------------------ 23 | ''' 24 | 25 | import os 26 | import glob 27 | modules = glob.glob(os.path.dirname(__file__)+"/*.py") 28 | __all__ = [ os.path.basename(f)[:-3] for f in modules if not os.path.basename(f).startswith('_')] -------------------------------------------------------------------------------- /src/msgraph/graph_object_base.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | 6 | class GraphObjectBase(object): 7 | 8 | def to_dict(self): 9 | """Returns the serialized form of the :class:`GraphObjectBase` 10 | as a dict. All sub-objects that are based off of :class:`GraphObjectBase` 11 | are also serialized and inserted into the dict 12 | 13 | Returns: 14 | dict: The serialized form of the :class:`GraphObjectBase` 15 | """ 16 | serialized = {} 17 | 18 | for prop in self._prop_dict: 19 | if isinstance(self._prop_dict[prop], GraphObjectBase): 20 | serialized[prop] = self._prop_dict[prop].to_dict() 21 | else: 22 | serialized[prop] = self._prop_dict[prop] 23 | 24 | return serialized 25 | -------------------------------------------------------------------------------- /src/msgraph/http_provider_base.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | 6 | import abc 7 | 8 | 9 | class HttpProviderBase(object): 10 | __metaclass__ = abc.ABCMeta 11 | 12 | @abc.abstractmethod 13 | def send(self, method, headers, url, data=None, content=None, path=None): 14 | """Send the built request using all the specified 15 | parameters. 16 | 17 | Args: 18 | method (str): The HTTP method to use (ex. GET) 19 | headers (dict of (str, str)): A dictionary of name-value 20 | pairs for headers in the request 21 | url (str): The URL for the request to be sent to 22 | data (str): Defaults to None, data to include in the body 23 | of the request which is not in JSON format 24 | content (dict): Defaults to None, a dictionary to include 25 | in JSON format in the body of the request 26 | path (str): Defaults to None, the path to the local file 27 | to send in the body of the request 28 | 29 | Returns: 30 | :class:`HttpResponse`: 31 | The response to the request 32 | """ 33 | pass 34 | 35 | @abc.abstractmethod 36 | def download(self, headers, url, path): 37 | """Downloads a file to the stated path 38 | 39 | Args: 40 | headers (dict of (str, str)): A dictionary of name-value 41 | pairs to be used as headers in the request 42 | url (str): The URL from which to download the file 43 | path (str): The local path to save the downloaded file 44 | 45 | Returns: 46 | :class:`HttpResponse`: 47 | The response to the request 48 | """ 49 | pass 50 | -------------------------------------------------------------------------------- /src/msgraph/http_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | from __future__ import generators, unicode_literals 6 | import json 7 | from .error import GraphError 8 | 9 | 10 | class HttpResponse(object): 11 | 12 | def __init__(self, status, headers, content): 13 | """Initialize the HttpResponse class returned after 14 | an HTTP request is made 15 | 16 | Args: 17 | status (int): HTTP status (ex. 200, 201, etc.) 18 | headers (dict of (str, str)): The headers in the 19 | response 20 | content (str): The body of the response 21 | """ 22 | self._status = status 23 | self._headers = headers 24 | self._content = content 25 | 26 | if self.content and (self.status < 200 or self.status >= 300): 27 | message = json.loads(self.content) 28 | if "error" in message: 29 | if type(message["error"]) == dict: 30 | raise GraphError(message["error"], self.status) 31 | else: 32 | raise Exception(str(message["error"])) 33 | 34 | def __str__(self): 35 | properties = { 36 | 'Status': self.status, 37 | 'Headers': self.headers, 38 | 'Content': self.content 39 | } 40 | ret = "" 41 | for k, v in properties.items(): 42 | ret += "{}: {}\n".format(k, v) 43 | return ret 44 | 45 | @property 46 | def status(self): 47 | """The HTTP status of the response 48 | 49 | Returns: 50 | int: HTTP status 51 | """ 52 | return self._status 53 | 54 | @property 55 | def headers(self): 56 | """The headers of the response 57 | 58 | Returns: 59 | dict of (str, str): 60 | The headers used by the response 61 | """ 62 | return self._headers 63 | 64 | @property 65 | def content(self): 66 | """The content of the response 67 | 68 | Returns: 69 | str: The body of the response 70 | """ 71 | return self._content 72 | -------------------------------------------------------------------------------- /src/msgraph/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/msgraph/model/__init__.py -------------------------------------------------------------------------------- /src/msgraph/model/alternative_security_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class AlternativeSecurityId(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def type(self): 19 | """Gets and sets the type 20 | 21 | Returns: 22 | int: 23 | The type 24 | """ 25 | if "type" in self._prop_dict: 26 | return self._prop_dict["type"] 27 | else: 28 | return None 29 | 30 | @type.setter 31 | def type(self, val): 32 | self._prop_dict["type"] = val 33 | 34 | @property 35 | def identity_provider(self): 36 | """Gets and sets the identityProvider 37 | 38 | Returns: 39 | str: 40 | The identityProvider 41 | """ 42 | if "identityProvider" in self._prop_dict: 43 | return self._prop_dict["identityProvider"] 44 | else: 45 | return None 46 | 47 | @identity_provider.setter 48 | def identity_provider(self, val): 49 | self._prop_dict["identityProvider"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/assigned_license.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class AssignedLicense(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def disabled_plans(self): 19 | """Gets and sets the disabledPlans 20 | 21 | Returns: 22 | UUID: 23 | The disabledPlans 24 | """ 25 | if "disabledPlans" in self._prop_dict: 26 | return self._prop_dict["disabledPlans"] 27 | else: 28 | return None 29 | 30 | @disabled_plans.setter 31 | def disabled_plans(self, val): 32 | self._prop_dict["disabledPlans"] = val 33 | 34 | @property 35 | def sku_id(self): 36 | """Gets and sets the skuId 37 | 38 | Returns: 39 | UUID: 40 | The skuId 41 | """ 42 | if "skuId" in self._prop_dict: 43 | return self._prop_dict["skuId"] 44 | else: 45 | return None 46 | 47 | @sku_id.setter 48 | def sku_id(self, val): 49 | self._prop_dict["skuId"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/attendee.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.response_status import ResponseStatus 10 | from ..model.attendee_type import AttendeeType 11 | from ..graph_object_base import GraphObjectBase 12 | 13 | 14 | class Attendee(GraphObjectBase): 15 | 16 | def __init__(self, prop_dict={}): 17 | self._prop_dict = prop_dict 18 | 19 | @property 20 | def status(self): 21 | """ 22 | Gets and sets the status 23 | 24 | Returns: 25 | :class:`ResponseStatus`: 26 | The status 27 | """ 28 | if "status" in self._prop_dict: 29 | if isinstance(self._prop_dict["status"], GraphObjectBase): 30 | return self._prop_dict["status"] 31 | else : 32 | self._prop_dict["status"] = ResponseStatus(self._prop_dict["status"]) 33 | return self._prop_dict["status"] 34 | 35 | return None 36 | 37 | @status.setter 38 | def status(self, val): 39 | self._prop_dict["status"] = val 40 | @property 41 | def type(self): 42 | """ 43 | Gets and sets the type 44 | 45 | Returns: 46 | :class:`AttendeeType`: 47 | The type 48 | """ 49 | if "type" in self._prop_dict: 50 | if isinstance(self._prop_dict["type"], GraphObjectBase): 51 | return self._prop_dict["type"] 52 | else : 53 | self._prop_dict["type"] = AttendeeType(self._prop_dict["type"]) 54 | return self._prop_dict["type"] 55 | 56 | return None 57 | 58 | @type.setter 59 | def type(self, val): 60 | self._prop_dict["type"] = val 61 | -------------------------------------------------------------------------------- /src/msgraph/model/attendee_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class AttendeeType(Enum): 11 | """The Enum AttendeeType.""" 12 | #required 13 | required = "0" 14 | #optional 15 | optional = "1" 16 | #resource 17 | resource = "2" 18 | -------------------------------------------------------------------------------- /src/msgraph/model/body_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class BodyType(Enum): 11 | """The Enum BodyType.""" 12 | #text 13 | text = "0" 14 | #html 15 | html = "1" 16 | -------------------------------------------------------------------------------- /src/msgraph/model/calendar_color.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class CalendarColor(Enum): 11 | """The Enum CalendarColor.""" 12 | #light Blue 13 | lightBlue = "0" 14 | #light Green 15 | lightGreen = "1" 16 | #light Orange 17 | lightOrange = "2" 18 | #light Gray 19 | lightGray = "3" 20 | #light Yellow 21 | lightYellow = "4" 22 | #light Teal 23 | lightTeal = "5" 24 | #light Pink 25 | lightPink = "6" 26 | #light Brown 27 | lightBrown = "7" 28 | #light Red 29 | lightRed = "8" 30 | #max Color 31 | maxColor = "9" 32 | #auto 33 | auto = "10" 34 | -------------------------------------------------------------------------------- /src/msgraph/model/calendar_group.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class CalendarGroup(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def name(self): 18 | """ 19 | Gets and sets the name 20 | 21 | Returns: 22 | str: 23 | The name 24 | """ 25 | if "name" in self._prop_dict: 26 | return self._prop_dict["name"] 27 | else: 28 | return None 29 | 30 | @name.setter 31 | def name(self, val): 32 | self._prop_dict["name"] = val 33 | 34 | @property 35 | def class_id(self): 36 | """ 37 | Gets and sets the classId 38 | 39 | Returns: 40 | UUID: 41 | The classId 42 | """ 43 | if "classId" in self._prop_dict: 44 | return self._prop_dict["classId"] 45 | else: 46 | return None 47 | 48 | @class_id.setter 49 | def class_id(self, val): 50 | self._prop_dict["classId"] = val 51 | 52 | @property 53 | def change_key(self): 54 | """ 55 | Gets and sets the changeKey 56 | 57 | Returns: 58 | str: 59 | The changeKey 60 | """ 61 | if "changeKey" in self._prop_dict: 62 | return self._prop_dict["changeKey"] 63 | else: 64 | return None 65 | 66 | @change_key.setter 67 | def change_key(self, val): 68 | self._prop_dict["changeKey"] = val 69 | 70 | @property 71 | def calendars(self): 72 | """Gets and sets the calendars 73 | 74 | Returns: 75 | :class:`CalendarsCollectionPage`: 76 | The calendars 77 | """ 78 | if "calendars" in self._prop_dict: 79 | return CalendarsCollectionPage(self._prop_dict["calendars"]) 80 | else: 81 | return None 82 | 83 | -------------------------------------------------------------------------------- /src/msgraph/model/contact_folder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class ContactFolder(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def parent_folder_id(self): 18 | """ 19 | Gets and sets the parentFolderId 20 | 21 | Returns: 22 | str: 23 | The parentFolderId 24 | """ 25 | if "parentFolderId" in self._prop_dict: 26 | return self._prop_dict["parentFolderId"] 27 | else: 28 | return None 29 | 30 | @parent_folder_id.setter 31 | def parent_folder_id(self, val): 32 | self._prop_dict["parentFolderId"] = val 33 | 34 | @property 35 | def display_name(self): 36 | """ 37 | Gets and sets the displayName 38 | 39 | Returns: 40 | str: 41 | The displayName 42 | """ 43 | if "displayName" in self._prop_dict: 44 | return self._prop_dict["displayName"] 45 | else: 46 | return None 47 | 48 | @display_name.setter 49 | def display_name(self, val): 50 | self._prop_dict["displayName"] = val 51 | 52 | @property 53 | def contacts(self): 54 | """Gets and sets the contacts 55 | 56 | Returns: 57 | :class:`ContactsCollectionPage`: 58 | The contacts 59 | """ 60 | if "contacts" in self._prop_dict: 61 | return ContactsCollectionPage(self._prop_dict["contacts"]) 62 | else: 63 | return None 64 | 65 | @property 66 | def child_folders(self): 67 | """Gets and sets the childFolders 68 | 69 | Returns: 70 | :class:`ChildFoldersCollectionPage`: 71 | The childFolders 72 | """ 73 | if "childFolders" in self._prop_dict: 74 | return ChildFoldersCollectionPage(self._prop_dict["childFolders"]) 75 | else: 76 | return None 77 | 78 | -------------------------------------------------------------------------------- /src/msgraph/model/date_time_time_zone.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class DateTimeTimeZone(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def date_time(self): 19 | """Gets and sets the dateTime 20 | 21 | Returns: 22 | str: 23 | The dateTime 24 | """ 25 | if "dateTime" in self._prop_dict: 26 | return self._prop_dict["dateTime"] 27 | else: 28 | return None 29 | 30 | @date_time.setter 31 | def date_time(self, val): 32 | self._prop_dict["dateTime"] = val 33 | 34 | @property 35 | def time_zone(self): 36 | """Gets and sets the timeZone 37 | 38 | Returns: 39 | str: 40 | The timeZone 41 | """ 42 | if "timeZone" in self._prop_dict: 43 | return self._prop_dict["timeZone"] 44 | else: 45 | return None 46 | 47 | @time_zone.setter 48 | def time_zone(self, val): 49 | self._prop_dict["timeZone"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/day_of_week.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class DayOfWeek(Enum): 11 | """The Enum DayOfWeek.""" 12 | #sunday 13 | sunday = "0" 14 | #monday 15 | monday = "1" 16 | #tuesday 17 | tuesday = "2" 18 | #wednesday 19 | wednesday = "3" 20 | #thursday 21 | thursday = "4" 22 | #friday 23 | friday = "5" 24 | #saturday 25 | saturday = "6" 26 | -------------------------------------------------------------------------------- /src/msgraph/model/deleted.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Deleted(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def state(self): 19 | """Gets and sets the state 20 | 21 | Returns: 22 | str: 23 | The state 24 | """ 25 | if "state" in self._prop_dict: 26 | return self._prop_dict["state"] 27 | else: 28 | return None 29 | 30 | @state.setter 31 | def state(self, val): 32 | self._prop_dict["state"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/directory_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class DirectoryObject(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | -------------------------------------------------------------------------------- /src/msgraph/model/directory_role.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .directory_object import DirectoryObject 11 | 12 | class DirectoryRole(DirectoryObject): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def description(self): 18 | """ 19 | Gets and sets the description 20 | 21 | Returns: 22 | str: 23 | The description 24 | """ 25 | if "description" in self._prop_dict: 26 | return self._prop_dict["description"] 27 | else: 28 | return None 29 | 30 | @description.setter 31 | def description(self, val): 32 | self._prop_dict["description"] = val 33 | 34 | @property 35 | def display_name(self): 36 | """ 37 | Gets and sets the displayName 38 | 39 | Returns: 40 | str: 41 | The displayName 42 | """ 43 | if "displayName" in self._prop_dict: 44 | return self._prop_dict["displayName"] 45 | else: 46 | return None 47 | 48 | @display_name.setter 49 | def display_name(self, val): 50 | self._prop_dict["displayName"] = val 51 | 52 | @property 53 | def role_template_id(self): 54 | """ 55 | Gets and sets the roleTemplateId 56 | 57 | Returns: 58 | str: 59 | The roleTemplateId 60 | """ 61 | if "roleTemplateId" in self._prop_dict: 62 | return self._prop_dict["roleTemplateId"] 63 | else: 64 | return None 65 | 66 | @role_template_id.setter 67 | def role_template_id(self, val): 68 | self._prop_dict["roleTemplateId"] = val 69 | 70 | @property 71 | def members(self): 72 | """Gets and sets the members 73 | 74 | Returns: 75 | :class:`MembersCollectionPage`: 76 | The members 77 | """ 78 | if "members" in self._prop_dict: 79 | return MembersCollectionPage(self._prop_dict["members"]) 80 | else: 81 | return None 82 | 83 | -------------------------------------------------------------------------------- /src/msgraph/model/directory_role_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .directory_object import DirectoryObject 11 | 12 | class DirectoryRoleTemplate(DirectoryObject): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def description(self): 18 | """ 19 | Gets and sets the description 20 | 21 | Returns: 22 | str: 23 | The description 24 | """ 25 | if "description" in self._prop_dict: 26 | return self._prop_dict["description"] 27 | else: 28 | return None 29 | 30 | @description.setter 31 | def description(self, val): 32 | self._prop_dict["description"] = val 33 | 34 | @property 35 | def display_name(self): 36 | """ 37 | Gets and sets the displayName 38 | 39 | Returns: 40 | str: 41 | The displayName 42 | """ 43 | if "displayName" in self._prop_dict: 44 | return self._prop_dict["displayName"] 45 | else: 46 | return None 47 | 48 | @display_name.setter 49 | def display_name(self, val): 50 | self._prop_dict["displayName"] = val 51 | 52 | -------------------------------------------------------------------------------- /src/msgraph/model/email_address.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class EmailAddress(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def name(self): 19 | """Gets and sets the name 20 | 21 | Returns: 22 | str: 23 | The name 24 | """ 25 | if "name" in self._prop_dict: 26 | return self._prop_dict["name"] 27 | else: 28 | return None 29 | 30 | @name.setter 31 | def name(self, val): 32 | self._prop_dict["name"] = val 33 | 34 | @property 35 | def address(self): 36 | """Gets and sets the address 37 | 38 | Returns: 39 | str: 40 | The address 41 | """ 42 | if "address" in self._prop_dict: 43 | return self._prop_dict["address"] 44 | else: 45 | return None 46 | 47 | @address.setter 48 | def address(self, val): 49 | self._prop_dict["address"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/entity.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | class Entity(GraphObjectBase): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def id_(self): 18 | """ 19 | Gets and sets the id 20 | 21 | Returns: 22 | str: 23 | The id 24 | """ 25 | if "id" in self._prop_dict: 26 | return self._prop_dict["id"] 27 | else: 28 | return None 29 | 30 | @id_.setter 31 | def id_(self, val): 32 | self._prop_dict["id"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/event_message.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.meeting_message_type import MeetingMessageType 10 | 11 | from .message import Message 12 | 13 | class EventMessage(Message): 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def meeting_message_type(self): 19 | """ 20 | Gets and sets the meetingMessageType 21 | 22 | Returns: 23 | :class:`MeetingMessageType`: 24 | The meetingMessageType 25 | """ 26 | if "meetingMessageType" in self._prop_dict: 27 | if isinstance(self._prop_dict["meetingMessageType"], GraphObjectBase): 28 | return self._prop_dict["meetingMessageType"] 29 | else: 30 | self._prop_dict["meetingMessageType"] = MeetingMessageType(self._prop_dict["meetingMessageType"]) 31 | return self._prop_dict["meetingMessageType"] 32 | 33 | return None 34 | 35 | @meeting_message_type.setter 36 | def meeting_message_type(self, val): 37 | self._prop_dict["meetingMessageType"] = val 38 | 39 | @property 40 | def event(self): 41 | """ 42 | Gets and sets the event 43 | 44 | Returns: 45 | :class:`Event`: 46 | The event 47 | """ 48 | if "event" in self._prop_dict: 49 | if isinstance(self._prop_dict["event"], GraphObjectBase): 50 | return self._prop_dict["event"] 51 | else: 52 | self._prop_dict["event"] = Event(self._prop_dict["event"]) 53 | return self._prop_dict["event"] 54 | 55 | return None 56 | 57 | @event.setter 58 | def event(self, val): 59 | self._prop_dict["event"] = val 60 | 61 | -------------------------------------------------------------------------------- /src/msgraph/model/event_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class EventType(Enum): 11 | """The Enum EventType.""" 12 | #single Instance 13 | singleInstance = "0" 14 | #occurrence 15 | occurrence = "1" 16 | #exception 17 | exception = "2" 18 | #series Master 19 | seriesMaster = "3" 20 | -------------------------------------------------------------------------------- /src/msgraph/model/extension.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class Extension(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | -------------------------------------------------------------------------------- /src/msgraph/model/file.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.hashes import Hashes 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class File(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def hashes(self): 20 | """ 21 | Gets and sets the hashes 22 | 23 | Returns: 24 | :class:`Hashes`: 25 | The hashes 26 | """ 27 | if "hashes" in self._prop_dict: 28 | if isinstance(self._prop_dict["hashes"], GraphObjectBase): 29 | return self._prop_dict["hashes"] 30 | else : 31 | self._prop_dict["hashes"] = Hashes(self._prop_dict["hashes"]) 32 | return self._prop_dict["hashes"] 33 | 34 | return None 35 | 36 | @hashes.setter 37 | def hashes(self, val): 38 | self._prop_dict["hashes"] = val 39 | @property 40 | def mime_type(self): 41 | """Gets and sets the mimeType 42 | 43 | Returns: 44 | str: 45 | The mimeType 46 | """ 47 | if "mimeType" in self._prop_dict: 48 | return self._prop_dict["mimeType"] 49 | else: 50 | return None 51 | 52 | @mime_type.setter 53 | def mime_type(self, val): 54 | self._prop_dict["mimeType"] = val 55 | 56 | -------------------------------------------------------------------------------- /src/msgraph/model/file_attachment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .attachment import Attachment 11 | 12 | class FileAttachment(Attachment): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def content_id(self): 18 | """ 19 | Gets and sets the contentId 20 | 21 | Returns: 22 | str: 23 | The contentId 24 | """ 25 | if "contentId" in self._prop_dict: 26 | return self._prop_dict["contentId"] 27 | else: 28 | return None 29 | 30 | @content_id.setter 31 | def content_id(self, val): 32 | self._prop_dict["contentId"] = val 33 | 34 | @property 35 | def content_location(self): 36 | """ 37 | Gets and sets the contentLocation 38 | 39 | Returns: 40 | str: 41 | The contentLocation 42 | """ 43 | if "contentLocation" in self._prop_dict: 44 | return self._prop_dict["contentLocation"] 45 | else: 46 | return None 47 | 48 | @content_location.setter 49 | def content_location(self, val): 50 | self._prop_dict["contentLocation"] = val 51 | 52 | -------------------------------------------------------------------------------- /src/msgraph/model/file_system_info.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from datetime import datetime 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class FileSystemInfo(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def created_date_time(self): 20 | """Gets and sets the createdDateTime 21 | 22 | Returns: 23 | datetime: 24 | The createdDateTime 25 | """ 26 | if "createdDateTime" in self._prop_dict: 27 | return datetime.strptime(self._prop_dict["createdDateTime"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f") 28 | else: 29 | return None 30 | 31 | @created_date_time.setter 32 | def created_date_time(self, val): 33 | self._prop_dict["createdDateTime"] = val.isoformat()+"Z" 34 | 35 | @property 36 | def last_modified_date_time(self): 37 | """Gets and sets the lastModifiedDateTime 38 | 39 | Returns: 40 | datetime: 41 | The lastModifiedDateTime 42 | """ 43 | if "lastModifiedDateTime" in self._prop_dict: 44 | return datetime.strptime(self._prop_dict["lastModifiedDateTime"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f") 45 | else: 46 | return None 47 | 48 | @last_modified_date_time.setter 49 | def last_modified_date_time(self, val): 50 | self._prop_dict["lastModifiedDateTime"] = val.isoformat()+"Z" 51 | 52 | -------------------------------------------------------------------------------- /src/msgraph/model/folder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Folder(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def child_count(self): 19 | """Gets and sets the childCount 20 | 21 | Returns: 22 | int: 23 | The childCount 24 | """ 25 | if "childCount" in self._prop_dict: 26 | return self._prop_dict["childCount"] 27 | else: 28 | return None 29 | 30 | @child_count.setter 31 | def child_count(self, val): 32 | self._prop_dict["childCount"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/free_busy_status.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class FreeBusyStatus(Enum): 11 | """The Enum FreeBusyStatus.""" 12 | #free 13 | free = "0" 14 | #tentative 15 | tentative = "1" 16 | #busy 17 | busy = "2" 18 | #oof 19 | oof = "3" 20 | #working Elsewhere 21 | workingElsewhere = "4" 22 | #unknown 23 | unknown = "5" 24 | -------------------------------------------------------------------------------- /src/msgraph/model/geo_coordinates.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class GeoCoordinates(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def altitude(self): 19 | """Gets and sets the altitude 20 | 21 | Returns: 22 | float: 23 | The altitude 24 | """ 25 | if "altitude" in self._prop_dict: 26 | return self._prop_dict["altitude"] 27 | else: 28 | return None 29 | 30 | @altitude.setter 31 | def altitude(self, val): 32 | self._prop_dict["altitude"] = val 33 | 34 | @property 35 | def latitude(self): 36 | """Gets and sets the latitude 37 | 38 | Returns: 39 | float: 40 | The latitude 41 | """ 42 | if "latitude" in self._prop_dict: 43 | return self._prop_dict["latitude"] 44 | else: 45 | return None 46 | 47 | @latitude.setter 48 | def latitude(self, val): 49 | self._prop_dict["latitude"] = val 50 | 51 | @property 52 | def longitude(self): 53 | """Gets and sets the longitude 54 | 55 | Returns: 56 | float: 57 | The longitude 58 | """ 59 | if "longitude" in self._prop_dict: 60 | return self._prop_dict["longitude"] 61 | else: 62 | return None 63 | 64 | @longitude.setter 65 | def longitude(self, val): 66 | self._prop_dict["longitude"] = val 67 | 68 | -------------------------------------------------------------------------------- /src/msgraph/model/hashes.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Hashes(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def crc32_hash(self): 19 | """Gets and sets the crc32Hash 20 | 21 | Returns: 22 | str: 23 | The crc32Hash 24 | """ 25 | if "crc32Hash" in self._prop_dict: 26 | return self._prop_dict["crc32Hash"] 27 | else: 28 | return None 29 | 30 | @crc32_hash.setter 31 | def crc32_hash(self, val): 32 | self._prop_dict["crc32Hash"] = val 33 | 34 | @property 35 | def sha1_hash(self): 36 | """Gets and sets the sha1Hash 37 | 38 | Returns: 39 | str: 40 | The sha1Hash 41 | """ 42 | if "sha1Hash" in self._prop_dict: 43 | return self._prop_dict["sha1Hash"] 44 | else: 45 | return None 46 | 47 | @sha1_hash.setter 48 | def sha1_hash(self, val): 49 | self._prop_dict["sha1Hash"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/identity.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Identity(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def display_name(self): 19 | """Gets and sets the displayName 20 | 21 | Returns: 22 | str: 23 | The displayName 24 | """ 25 | if "displayName" in self._prop_dict: 26 | return self._prop_dict["displayName"] 27 | else: 28 | return None 29 | 30 | @display_name.setter 31 | def display_name(self, val): 32 | self._prop_dict["displayName"] = val 33 | 34 | @property 35 | def id(self): 36 | """Gets and sets the id 37 | 38 | Returns: 39 | str: 40 | The id 41 | """ 42 | if "id" in self._prop_dict: 43 | return self._prop_dict["id"] 44 | else: 45 | return None 46 | 47 | @id.setter 48 | def id(self, val): 49 | self._prop_dict["id"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/image.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Image(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def height(self): 19 | """Gets and sets the height 20 | 21 | Returns: 22 | int: 23 | The height 24 | """ 25 | if "height" in self._prop_dict: 26 | return self._prop_dict["height"] 27 | else: 28 | return None 29 | 30 | @height.setter 31 | def height(self, val): 32 | self._prop_dict["height"] = val 33 | 34 | @property 35 | def width(self): 36 | """Gets and sets the width 37 | 38 | Returns: 39 | int: 40 | The width 41 | """ 42 | if "width" in self._prop_dict: 43 | return self._prop_dict["width"] 44 | else: 45 | return None 46 | 47 | @width.setter 48 | def width(self, val): 49 | self._prop_dict["width"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/importance.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class Importance(Enum): 11 | """The Enum Importance.""" 12 | #low 13 | low = "0" 14 | #normal 15 | normal = "1" 16 | #high 17 | high = "2" 18 | -------------------------------------------------------------------------------- /src/msgraph/model/inference_classification.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class InferenceClassification(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def overrides(self): 18 | """Gets and sets the overrides 19 | 20 | Returns: 21 | :class:`OverridesCollectionPage`: 22 | The overrides 23 | """ 24 | if "overrides" in self._prop_dict: 25 | return OverridesCollectionPage(self._prop_dict["overrides"]) 26 | else: 27 | return None 28 | 29 | -------------------------------------------------------------------------------- /src/msgraph/model/inference_classification_override.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.inference_classification_type import InferenceClassificationType 10 | from ..model.email_address import EmailAddress 11 | 12 | from .entity import Entity 13 | 14 | class InferenceClassificationOverride(Entity): 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def classify_as(self): 20 | """ 21 | Gets and sets the classifyAs 22 | 23 | Returns: 24 | :class:`InferenceClassificationType`: 25 | The classifyAs 26 | """ 27 | if "classifyAs" in self._prop_dict: 28 | if isinstance(self._prop_dict["classifyAs"], GraphObjectBase): 29 | return self._prop_dict["classifyAs"] 30 | else: 31 | self._prop_dict["classifyAs"] = InferenceClassificationType(self._prop_dict["classifyAs"]) 32 | return self._prop_dict["classifyAs"] 33 | 34 | return None 35 | 36 | @classify_as.setter 37 | def classify_as(self, val): 38 | self._prop_dict["classifyAs"] = val 39 | 40 | @property 41 | def sender_email_address(self): 42 | """ 43 | Gets and sets the senderEmailAddress 44 | 45 | Returns: 46 | :class:`EmailAddress`: 47 | The senderEmailAddress 48 | """ 49 | if "senderEmailAddress" in self._prop_dict: 50 | if isinstance(self._prop_dict["senderEmailAddress"], GraphObjectBase): 51 | return self._prop_dict["senderEmailAddress"] 52 | else: 53 | self._prop_dict["senderEmailAddress"] = EmailAddress(self._prop_dict["senderEmailAddress"]) 54 | return self._prop_dict["senderEmailAddress"] 55 | 56 | return None 57 | 58 | @sender_email_address.setter 59 | def sender_email_address(self, val): 60 | self._prop_dict["senderEmailAddress"] = val 61 | 62 | -------------------------------------------------------------------------------- /src/msgraph/model/inference_classification_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class InferenceClassificationType(Enum): 11 | """The Enum InferenceClassificationType.""" 12 | #focused 13 | focused = "0" 14 | #other 15 | other = "1" 16 | -------------------------------------------------------------------------------- /src/msgraph/model/item_attachment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .attachment import Attachment 11 | 12 | class ItemAttachment(Attachment): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def item(self): 18 | """ 19 | Gets and sets the item 20 | 21 | Returns: 22 | :class:`OutlookItem`: 23 | The item 24 | """ 25 | if "item" in self._prop_dict: 26 | if isinstance(self._prop_dict["item"], GraphObjectBase): 27 | return self._prop_dict["item"] 28 | else: 29 | self._prop_dict["item"] = OutlookItem(self._prop_dict["item"]) 30 | return self._prop_dict["item"] 31 | 32 | return None 33 | 34 | @item.setter 35 | def item(self, val): 36 | self._prop_dict["item"] = val 37 | 38 | -------------------------------------------------------------------------------- /src/msgraph/model/item_body.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.body_type import BodyType 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class ItemBody(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def content_type(self): 20 | """ 21 | Gets and sets the contentType 22 | 23 | Returns: 24 | :class:`BodyType`: 25 | The contentType 26 | """ 27 | if "contentType" in self._prop_dict: 28 | if isinstance(self._prop_dict["contentType"], GraphObjectBase): 29 | return self._prop_dict["contentType"] 30 | else : 31 | self._prop_dict["contentType"] = BodyType(self._prop_dict["contentType"]) 32 | return self._prop_dict["contentType"] 33 | 34 | return None 35 | 36 | @content_type.setter 37 | def content_type(self, val): 38 | self._prop_dict["contentType"] = val 39 | @property 40 | def content(self): 41 | """Gets and sets the content 42 | 43 | Returns: 44 | str: 45 | The content 46 | """ 47 | if "content" in self._prop_dict: 48 | return self._prop_dict["content"] 49 | else: 50 | return None 51 | 52 | @content.setter 53 | def content(self, val): 54 | self._prop_dict["content"] = val 55 | 56 | -------------------------------------------------------------------------------- /src/msgraph/model/item_reference.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class ItemReference(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def drive_id(self): 19 | """Gets and sets the driveId 20 | 21 | Returns: 22 | str: 23 | The driveId 24 | """ 25 | if "driveId" in self._prop_dict: 26 | return self._prop_dict["driveId"] 27 | else: 28 | return None 29 | 30 | @drive_id.setter 31 | def drive_id(self, val): 32 | self._prop_dict["driveId"] = val 33 | 34 | @property 35 | def id(self): 36 | """Gets and sets the id 37 | 38 | Returns: 39 | str: 40 | The id 41 | """ 42 | if "id" in self._prop_dict: 43 | return self._prop_dict["id"] 44 | else: 45 | return None 46 | 47 | @id.setter 48 | def id(self, val): 49 | self._prop_dict["id"] = val 50 | 51 | @property 52 | def path(self): 53 | """Gets and sets the path 54 | 55 | Returns: 56 | str: 57 | The path 58 | """ 59 | if "path" in self._prop_dict: 60 | return self._prop_dict["path"] 61 | else: 62 | return None 63 | 64 | @path.setter 65 | def path(self, val): 66 | self._prop_dict["path"] = val 67 | 68 | -------------------------------------------------------------------------------- /src/msgraph/model/license_units_detail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class LicenseUnitsDetail(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def enabled(self): 19 | """Gets and sets the enabled 20 | 21 | Returns: 22 | int: 23 | The enabled 24 | """ 25 | if "enabled" in self._prop_dict: 26 | return self._prop_dict["enabled"] 27 | else: 28 | return None 29 | 30 | @enabled.setter 31 | def enabled(self, val): 32 | self._prop_dict["enabled"] = val 33 | 34 | @property 35 | def suspended(self): 36 | """Gets and sets the suspended 37 | 38 | Returns: 39 | int: 40 | The suspended 41 | """ 42 | if "suspended" in self._prop_dict: 43 | return self._prop_dict["suspended"] 44 | else: 45 | return None 46 | 47 | @suspended.setter 48 | def suspended(self, val): 49 | self._prop_dict["suspended"] = val 50 | 51 | @property 52 | def warning(self): 53 | """Gets and sets the warning 54 | 55 | Returns: 56 | int: 57 | The warning 58 | """ 59 | if "warning" in self._prop_dict: 60 | return self._prop_dict["warning"] 61 | else: 62 | return None 63 | 64 | @warning.setter 65 | def warning(self, val): 66 | self._prop_dict["warning"] = val 67 | 68 | -------------------------------------------------------------------------------- /src/msgraph/model/location.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.physical_address import PhysicalAddress 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class Location(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def display_name(self): 20 | """Gets and sets the displayName 21 | 22 | Returns: 23 | str: 24 | The displayName 25 | """ 26 | if "displayName" in self._prop_dict: 27 | return self._prop_dict["displayName"] 28 | else: 29 | return None 30 | 31 | @display_name.setter 32 | def display_name(self, val): 33 | self._prop_dict["displayName"] = val 34 | 35 | @property 36 | def address(self): 37 | """ 38 | Gets and sets the address 39 | 40 | Returns: 41 | :class:`PhysicalAddress`: 42 | The address 43 | """ 44 | if "address" in self._prop_dict: 45 | if isinstance(self._prop_dict["address"], GraphObjectBase): 46 | return self._prop_dict["address"] 47 | else : 48 | self._prop_dict["address"] = PhysicalAddress(self._prop_dict["address"]) 49 | return self._prop_dict["address"] 50 | 51 | return None 52 | 53 | @address.setter 54 | def address(self, val): 55 | self._prop_dict["address"] = val 56 | -------------------------------------------------------------------------------- /src/msgraph/model/meeting_message_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class MeetingMessageType(Enum): 11 | """The Enum MeetingMessageType.""" 12 | #none 13 | none = "0" 14 | #meeting Request 15 | meetingRequest = "1" 16 | #meeting Cancelled 17 | meetingCancelled = "2" 18 | #meeting Accepted 19 | meetingAccepted = "3" 20 | #meeting Tenatively Accepted 21 | meetingTenativelyAccepted = "4" 22 | #meeting Declined 23 | meetingDeclined = "5" 24 | -------------------------------------------------------------------------------- /src/msgraph/model/open_type_extension.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .extension import Extension 11 | 12 | class OpenTypeExtension(Extension): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def extension_name(self): 18 | """ 19 | Gets and sets the extensionName 20 | 21 | Returns: 22 | str: 23 | The extensionName 24 | """ 25 | if "extensionName" in self._prop_dict: 26 | return self._prop_dict["extensionName"] 27 | else: 28 | return None 29 | 30 | @extension_name.setter 31 | def extension_name(self, val): 32 | self._prop_dict["extensionName"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/package.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Package(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def type(self): 19 | """Gets and sets the type 20 | 21 | Returns: 22 | str: 23 | The type 24 | """ 25 | if "type" in self._prop_dict: 26 | return self._prop_dict["type"] 27 | else: 28 | return None 29 | 30 | @type.setter 31 | def type(self, val): 32 | self._prop_dict["type"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/password_profile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class PasswordProfile(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def password(self): 19 | """Gets and sets the password 20 | 21 | Returns: 22 | str: 23 | The password 24 | """ 25 | if "password" in self._prop_dict: 26 | return self._prop_dict["password"] 27 | else: 28 | return None 29 | 30 | @password.setter 31 | def password(self, val): 32 | self._prop_dict["password"] = val 33 | 34 | @property 35 | def force_change_password_next_sign_in(self): 36 | """Gets and sets the forceChangePasswordNextSignIn 37 | 38 | Returns: 39 | bool: 40 | The forceChangePasswordNextSignIn 41 | """ 42 | if "forceChangePasswordNextSignIn" in self._prop_dict: 43 | return self._prop_dict["forceChangePasswordNextSignIn"] 44 | else: 45 | return None 46 | 47 | @force_change_password_next_sign_in.setter 48 | def force_change_password_next_sign_in(self, val): 49 | self._prop_dict["forceChangePasswordNextSignIn"] = val 50 | 51 | -------------------------------------------------------------------------------- /src/msgraph/model/patterned_recurrence.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.recurrence_pattern import RecurrencePattern 10 | from ..model.recurrence_range import RecurrenceRange 11 | from ..graph_object_base import GraphObjectBase 12 | 13 | 14 | class PatternedRecurrence(GraphObjectBase): 15 | 16 | def __init__(self, prop_dict={}): 17 | self._prop_dict = prop_dict 18 | 19 | @property 20 | def pattern(self): 21 | """ 22 | Gets and sets the pattern 23 | 24 | Returns: 25 | :class:`RecurrencePattern`: 26 | The pattern 27 | """ 28 | if "pattern" in self._prop_dict: 29 | if isinstance(self._prop_dict["pattern"], GraphObjectBase): 30 | return self._prop_dict["pattern"] 31 | else : 32 | self._prop_dict["pattern"] = RecurrencePattern(self._prop_dict["pattern"]) 33 | return self._prop_dict["pattern"] 34 | 35 | return None 36 | 37 | @pattern.setter 38 | def pattern(self, val): 39 | self._prop_dict["pattern"] = val 40 | @property 41 | def range(self): 42 | """ 43 | Gets and sets the range 44 | 45 | Returns: 46 | :class:`RecurrenceRange`: 47 | The range 48 | """ 49 | if "range" in self._prop_dict: 50 | if isinstance(self._prop_dict["range"], GraphObjectBase): 51 | return self._prop_dict["range"] 52 | else : 53 | self._prop_dict["range"] = RecurrenceRange(self._prop_dict["range"]) 54 | return self._prop_dict["range"] 55 | 56 | return None 57 | 58 | @range.setter 59 | def range(self, val): 60 | self._prop_dict["range"] = val 61 | -------------------------------------------------------------------------------- /src/msgraph/model/profile_photo.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .entity import Entity 11 | 12 | class ProfilePhoto(Entity): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | @property 17 | def height(self): 18 | """ 19 | Gets and sets the height 20 | 21 | Returns: 22 | int: 23 | The height 24 | """ 25 | if "height" in self._prop_dict: 26 | return self._prop_dict["height"] 27 | else: 28 | return None 29 | 30 | @height.setter 31 | def height(self, val): 32 | self._prop_dict["height"] = val 33 | 34 | @property 35 | def width(self): 36 | """ 37 | Gets and sets the width 38 | 39 | Returns: 40 | int: 41 | The width 42 | """ 43 | if "width" in self._prop_dict: 44 | return self._prop_dict["width"] 45 | else: 46 | return None 47 | 48 | @width.setter 49 | def width(self, val): 50 | self._prop_dict["width"] = val 51 | 52 | -------------------------------------------------------------------------------- /src/msgraph/model/provisioned_plan.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class ProvisionedPlan(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def capability_status(self): 19 | """Gets and sets the capabilityStatus 20 | 21 | Returns: 22 | str: 23 | The capabilityStatus 24 | """ 25 | if "capabilityStatus" in self._prop_dict: 26 | return self._prop_dict["capabilityStatus"] 27 | else: 28 | return None 29 | 30 | @capability_status.setter 31 | def capability_status(self, val): 32 | self._prop_dict["capabilityStatus"] = val 33 | 34 | @property 35 | def provisioning_status(self): 36 | """Gets and sets the provisioningStatus 37 | 38 | Returns: 39 | str: 40 | The provisioningStatus 41 | """ 42 | if "provisioningStatus" in self._prop_dict: 43 | return self._prop_dict["provisioningStatus"] 44 | else: 45 | return None 46 | 47 | @provisioning_status.setter 48 | def provisioning_status(self, val): 49 | self._prop_dict["provisioningStatus"] = val 50 | 51 | @property 52 | def service(self): 53 | """Gets and sets the service 54 | 55 | Returns: 56 | str: 57 | The service 58 | """ 59 | if "service" in self._prop_dict: 60 | return self._prop_dict["service"] 61 | else: 62 | return None 63 | 64 | @service.setter 65 | def service(self, val): 66 | self._prop_dict["service"] = val 67 | 68 | -------------------------------------------------------------------------------- /src/msgraph/model/recipient.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.email_address import EmailAddress 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class Recipient(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def email_address(self): 20 | """ 21 | Gets and sets the emailAddress 22 | 23 | Returns: 24 | :class:`EmailAddress`: 25 | The emailAddress 26 | """ 27 | if "emailAddress" in self._prop_dict: 28 | if isinstance(self._prop_dict["emailAddress"], GraphObjectBase): 29 | return self._prop_dict["emailAddress"] 30 | else : 31 | self._prop_dict["emailAddress"] = EmailAddress(self._prop_dict["emailAddress"]) 32 | return self._prop_dict["emailAddress"] 33 | 34 | return None 35 | 36 | @email_address.setter 37 | def email_address(self, val): 38 | self._prop_dict["emailAddress"] = val 39 | -------------------------------------------------------------------------------- /src/msgraph/model/recurrence_pattern_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class RecurrencePatternType(Enum): 11 | """The Enum RecurrencePatternType.""" 12 | #daily 13 | daily = "0" 14 | #weekly 15 | weekly = "1" 16 | #absolute Monthly 17 | absoluteMonthly = "2" 18 | #relative Monthly 19 | relativeMonthly = "3" 20 | #absolute Yearly 21 | absoluteYearly = "4" 22 | #relative Yearly 23 | relativeYearly = "5" 24 | -------------------------------------------------------------------------------- /src/msgraph/model/recurrence_range_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class RecurrenceRangeType(Enum): 11 | """The Enum RecurrenceRangeType.""" 12 | #end Date 13 | endDate = "0" 14 | #no End 15 | noEnd = "1" 16 | #numbered 17 | numbered = "2" 18 | -------------------------------------------------------------------------------- /src/msgraph/model/reference_attachment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | from .attachment import Attachment 11 | 12 | class ReferenceAttachment(Attachment): 13 | def __init__(self, prop_dict={}): 14 | self._prop_dict = prop_dict 15 | 16 | -------------------------------------------------------------------------------- /src/msgraph/model/response_status.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.response_type import ResponseType 10 | from datetime import datetime 11 | from ..graph_object_base import GraphObjectBase 12 | 13 | 14 | class ResponseStatus(GraphObjectBase): 15 | 16 | def __init__(self, prop_dict={}): 17 | self._prop_dict = prop_dict 18 | 19 | @property 20 | def response(self): 21 | """ 22 | Gets and sets the response 23 | 24 | Returns: 25 | :class:`ResponseType`: 26 | The response 27 | """ 28 | if "response" in self._prop_dict: 29 | if isinstance(self._prop_dict["response"], GraphObjectBase): 30 | return self._prop_dict["response"] 31 | else : 32 | self._prop_dict["response"] = ResponseType(self._prop_dict["response"]) 33 | return self._prop_dict["response"] 34 | 35 | return None 36 | 37 | @response.setter 38 | def response(self, val): 39 | self._prop_dict["response"] = val 40 | @property 41 | def time(self): 42 | """Gets and sets the time 43 | 44 | Returns: 45 | datetime: 46 | The time 47 | """ 48 | if "time" in self._prop_dict: 49 | return datetime.strptime(self._prop_dict["time"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f") 50 | else: 51 | return None 52 | 53 | @time.setter 54 | def time(self, val): 55 | self._prop_dict["time"] = val.isoformat()+"Z" 56 | 57 | -------------------------------------------------------------------------------- /src/msgraph/model/response_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class ResponseType(Enum): 11 | """The Enum ResponseType.""" 12 | #none 13 | none = "0" 14 | #organizer 15 | organizer = "1" 16 | #tentatively Accepted 17 | tentativelyAccepted = "2" 18 | #accepted 19 | accepted = "3" 20 | #declined 21 | declined = "4" 22 | #not Responded 23 | notResponded = "5" 24 | -------------------------------------------------------------------------------- /src/msgraph/model/search_result.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class SearchResult(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def on_click_telemetry_url(self): 19 | """Gets and sets the onClickTelemetryUrl 20 | 21 | Returns: 22 | str: 23 | The onClickTelemetryUrl 24 | """ 25 | if "onClickTelemetryUrl" in self._prop_dict: 26 | return self._prop_dict["onClickTelemetryUrl"] 27 | else: 28 | return None 29 | 30 | @on_click_telemetry_url.setter 31 | def on_click_telemetry_url(self, val): 32 | self._prop_dict["onClickTelemetryUrl"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/sensitivity.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class Sensitivity(Enum): 11 | """The Enum Sensitivity.""" 12 | #normal 13 | normal = "0" 14 | #personal 15 | personal = "1" 16 | #private 17 | private = "2" 18 | #confidential 19 | confidential = "3" 20 | -------------------------------------------------------------------------------- /src/msgraph/model/service_plan_info.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class ServicePlanInfo(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def service_plan_id(self): 19 | """Gets and sets the servicePlanId 20 | 21 | Returns: 22 | UUID: 23 | The servicePlanId 24 | """ 25 | if "servicePlanId" in self._prop_dict: 26 | return self._prop_dict["servicePlanId"] 27 | else: 28 | return None 29 | 30 | @service_plan_id.setter 31 | def service_plan_id(self, val): 32 | self._prop_dict["servicePlanId"] = val 33 | 34 | @property 35 | def service_plan_name(self): 36 | """Gets and sets the servicePlanName 37 | 38 | Returns: 39 | str: 40 | The servicePlanName 41 | """ 42 | if "servicePlanName" in self._prop_dict: 43 | return self._prop_dict["servicePlanName"] 44 | else: 45 | return None 46 | 47 | @service_plan_name.setter 48 | def service_plan_name(self, val): 49 | self._prop_dict["servicePlanName"] = val 50 | 51 | @property 52 | def provisioning_status(self): 53 | """Gets and sets the provisioningStatus 54 | 55 | Returns: 56 | str: 57 | The provisioningStatus 58 | """ 59 | if "provisioningStatus" in self._prop_dict: 60 | return self._prop_dict["provisioningStatus"] 61 | else: 62 | return None 63 | 64 | @provisioning_status.setter 65 | def provisioning_status(self, val): 66 | self._prop_dict["provisioningStatus"] = val 67 | 68 | @property 69 | def applies_to(self): 70 | """Gets and sets the appliesTo 71 | 72 | Returns: 73 | str: 74 | The appliesTo 75 | """ 76 | if "appliesTo" in self._prop_dict: 77 | return self._prop_dict["appliesTo"] 78 | else: 79 | return None 80 | 81 | @applies_to.setter 82 | def applies_to(self, val): 83 | self._prop_dict["appliesTo"] = val 84 | 85 | -------------------------------------------------------------------------------- /src/msgraph/model/shared.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.identity_set import IdentitySet 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class Shared(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def owner(self): 20 | """ 21 | Gets and sets the owner 22 | 23 | Returns: 24 | :class:`IdentitySet`: 25 | The owner 26 | """ 27 | if "owner" in self._prop_dict: 28 | if isinstance(self._prop_dict["owner"], GraphObjectBase): 29 | return self._prop_dict["owner"] 30 | else : 31 | self._prop_dict["owner"] = IdentitySet(self._prop_dict["owner"]) 32 | return self._prop_dict["owner"] 33 | 34 | return None 35 | 36 | @owner.setter 37 | def owner(self, val): 38 | self._prop_dict["owner"] = val 39 | @property 40 | def scope(self): 41 | """Gets and sets the scope 42 | 43 | Returns: 44 | str: 45 | The scope 46 | """ 47 | if "scope" in self._prop_dict: 48 | return self._prop_dict["scope"] 49 | else: 50 | return None 51 | 52 | @scope.setter 53 | def scope(self, val): 54 | self._prop_dict["scope"] = val 55 | 56 | -------------------------------------------------------------------------------- /src/msgraph/model/sharing_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..model.identity import Identity 10 | from ..graph_object_base import GraphObjectBase 11 | 12 | 13 | class SharingLink(GraphObjectBase): 14 | 15 | def __init__(self, prop_dict={}): 16 | self._prop_dict = prop_dict 17 | 18 | @property 19 | def application(self): 20 | """ 21 | Gets and sets the application 22 | 23 | Returns: 24 | :class:`Identity`: 25 | The application 26 | """ 27 | if "application" in self._prop_dict: 28 | if isinstance(self._prop_dict["application"], GraphObjectBase): 29 | return self._prop_dict["application"] 30 | else : 31 | self._prop_dict["application"] = Identity(self._prop_dict["application"]) 32 | return self._prop_dict["application"] 33 | 34 | return None 35 | 36 | @application.setter 37 | def application(self, val): 38 | self._prop_dict["application"] = val 39 | @property 40 | def type(self): 41 | """Gets and sets the type 42 | 43 | Returns: 44 | str: 45 | The type 46 | """ 47 | if "type" in self._prop_dict: 48 | return self._prop_dict["type"] 49 | else: 50 | return None 51 | 52 | @type.setter 53 | def type(self, val): 54 | self._prop_dict["type"] = val 55 | 56 | @property 57 | def web_url(self): 58 | """Gets and sets the webUrl 59 | 60 | Returns: 61 | str: 62 | The webUrl 63 | """ 64 | if "webUrl" in self._prop_dict: 65 | return self._prop_dict["webUrl"] 66 | else: 67 | return None 68 | 69 | @web_url.setter 70 | def web_url(self, val): 71 | self._prop_dict["webUrl"] = val 72 | 73 | -------------------------------------------------------------------------------- /src/msgraph/model/special_folder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class SpecialFolder(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def name(self): 19 | """Gets and sets the name 20 | 21 | Returns: 22 | str: 23 | The name 24 | """ 25 | if "name" in self._prop_dict: 26 | return self._prop_dict["name"] 27 | else: 28 | return None 29 | 30 | @name.setter 31 | def name(self, val): 32 | self._prop_dict["name"] = val 33 | 34 | -------------------------------------------------------------------------------- /src/msgraph/model/thumbnail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Thumbnail(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def height(self): 19 | """Gets and sets the height 20 | 21 | Returns: 22 | int: 23 | The height 24 | """ 25 | if "height" in self._prop_dict: 26 | return self._prop_dict["height"] 27 | else: 28 | return None 29 | 30 | @height.setter 31 | def height(self, val): 32 | self._prop_dict["height"] = val 33 | 34 | @property 35 | def url(self): 36 | """Gets and sets the url 37 | 38 | Returns: 39 | str: 40 | The url 41 | """ 42 | if "url" in self._prop_dict: 43 | return self._prop_dict["url"] 44 | else: 45 | return None 46 | 47 | @url.setter 48 | def url(self, val): 49 | self._prop_dict["url"] = val 50 | 51 | @property 52 | def width(self): 53 | """Gets and sets the width 54 | 55 | Returns: 56 | int: 57 | The width 58 | """ 59 | if "width" in self._prop_dict: 60 | return self._prop_dict["width"] 61 | else: 62 | return None 63 | 64 | @width.setter 65 | def width(self, val): 66 | self._prop_dict["width"] = val 67 | 68 | -------------------------------------------------------------------------------- /src/msgraph/model/video.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | from ..graph_object_base import GraphObjectBase 10 | 11 | 12 | class Video(GraphObjectBase): 13 | 14 | def __init__(self, prop_dict={}): 15 | self._prop_dict = prop_dict 16 | 17 | @property 18 | def bitrate(self): 19 | """Gets and sets the bitrate 20 | 21 | Returns: 22 | int: 23 | The bitrate 24 | """ 25 | if "bitrate" in self._prop_dict: 26 | return self._prop_dict["bitrate"] 27 | else: 28 | return None 29 | 30 | @bitrate.setter 31 | def bitrate(self, val): 32 | self._prop_dict["bitrate"] = val 33 | 34 | @property 35 | def duration(self): 36 | """Gets and sets the duration 37 | 38 | Returns: 39 | int: 40 | The duration 41 | """ 42 | if "duration" in self._prop_dict: 43 | return self._prop_dict["duration"] 44 | else: 45 | return None 46 | 47 | @duration.setter 48 | def duration(self, val): 49 | self._prop_dict["duration"] = val 50 | 51 | @property 52 | def height(self): 53 | """Gets and sets the height 54 | 55 | Returns: 56 | int: 57 | The height 58 | """ 59 | if "height" in self._prop_dict: 60 | return self._prop_dict["height"] 61 | else: 62 | return None 63 | 64 | @height.setter 65 | def height(self, val): 66 | self._prop_dict["height"] = val 67 | 68 | @property 69 | def width(self): 70 | """Gets and sets the width 71 | 72 | Returns: 73 | int: 74 | The width 75 | """ 76 | if "width" in self._prop_dict: 77 | return self._prop_dict["width"] 78 | else: 79 | return None 80 | 81 | @width.setter 82 | def width(self, val): 83 | self._prop_dict["width"] = val 84 | 85 | -------------------------------------------------------------------------------- /src/msgraph/model/week_index.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from enum import Enum 9 | 10 | class WeekIndex(Enum): 11 | """The Enum WeekIndex.""" 12 | #first 13 | first = "0" 14 | #second 15 | second = "1" 16 | #third 17 | third = "3" 18 | #fourth 19 | fourth = "4" 20 | #last 21 | last = "5" 22 | -------------------------------------------------------------------------------- /src/msgraph/options.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | 6 | class Option(object): 7 | 8 | def __init__(self, key, value): 9 | """Initialize the Option, used for passing 10 | options into requests 11 | 12 | Args: 13 | key (str): The key for the option 14 | value (str): The value for the option 15 | 16 | """ 17 | self._key = key 18 | self._value = value 19 | 20 | @property 21 | def key(self): 22 | """Gets and sets the key of the :class:`Option` 23 | 24 | Returns: 25 | str: The key""" 26 | return self._key 27 | 28 | @key.setter 29 | def key(self, value): 30 | self._key = value 31 | 32 | @property 33 | def value(self): 34 | """Gets and sets the value of the :class:`Option` 35 | 36 | Returns: 37 | str: The value""" 38 | return self._value 39 | 40 | @value.setter 41 | def value(self, value): 42 | self._value = value 43 | 44 | 45 | class QueryOption(Option): 46 | """Option used for the query string of a request""" 47 | pass 48 | 49 | 50 | class HeaderOption(Option): 51 | """Option used for the header of the request""" 52 | pass 53 | -------------------------------------------------------------------------------- /src/msgraph/request_builder_base.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | 6 | class RequestBuilderBase(object): 7 | 8 | def __init__(self, request_url, client): 9 | """Initialize a request builder which returns a request 10 | when request() is called 11 | 12 | Args: 13 | request_url (str): The URL to construct the request 14 | for 15 | client (:class:`GraphClient`): 16 | The client with which the request will be made 17 | """ 18 | self._request_url = request_url 19 | self._client = client 20 | 21 | def append_to_request_url(self, url_segment): 22 | """Appends a URL portion to the current request URL 23 | 24 | Args: 25 | url_segment (str): The segment you would like to append 26 | to the existing request URL. 27 | """ 28 | return self._request_url + "/" + url_segment 29 | -------------------------------------------------------------------------------- /src/msgraph/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 3 | """ 4 | 5 | from __future__ import with_statement 6 | from codecs import open 7 | from os import path 8 | 9 | here = path.abspath(path.dirname(__file__)) 10 | with open(path.join(here, 'version.txt'), encoding='utf-8') as f: 11 | __version__ = f.read() 12 | -------------------------------------------------------------------------------- /src/msgraph/version.txt: -------------------------------------------------------------------------------- 1 | 0.1.2 -------------------------------------------------------------------------------- /src/python2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/python2/__init__.py -------------------------------------------------------------------------------- /src/python2/attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.attachment import Attachment 10 | import json 11 | 12 | class AttachmentRequest(RequestBase): 13 | """The type AttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new AttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the AttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(AttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Attachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Attachment. 35 | 36 | Returns: 37 | :class:`Attachment`: 38 | The Attachment. 39 | """ 40 | self.method = "GET" 41 | entity = Attachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, attachment): 46 | """Updates the specified Attachment. 47 | 48 | Args: 49 | attachment (:class:`Attachment`): 50 | The Attachment to update. 51 | 52 | Returns: 53 | :class:`Attachment`: 54 | The updated Attachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Attachment(json.loads(self.send(attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/directory_object_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.directory_object import DirectoryObject 10 | import json 11 | 12 | class DirectoryObjectRequest(RequestBase): 13 | """The type DirectoryObjectRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new DirectoryObjectRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the DirectoryObjectRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(DirectoryObjectRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified DirectoryObject.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified DirectoryObject. 35 | 36 | Returns: 37 | :class:`DirectoryObject`: 38 | The DirectoryObject. 39 | """ 40 | self.method = "GET" 41 | entity = DirectoryObject(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, directory_object): 46 | """Updates the specified DirectoryObject. 47 | 48 | Args: 49 | directory_object (:class:`DirectoryObject`): 50 | The DirectoryObject to update. 51 | 52 | Returns: 53 | :class:`DirectoryObject`: 54 | The updated DirectoryObject. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = DirectoryObject(json.loads(self.send(directory_object).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/entity_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.entity import Entity 10 | import json 11 | 12 | class EntityRequest(RequestBase): 13 | """The type EntityRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new EntityRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the EntityRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(EntityRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Entity.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Entity. 35 | 36 | Returns: 37 | :class:`Entity`: 38 | The Entity. 39 | """ 40 | self.method = "GET" 41 | entity = Entity(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, entity): 46 | """Updates the specified Entity. 47 | 48 | Args: 49 | entity (:class:`Entity`): 50 | The Entity to update. 51 | 52 | Returns: 53 | :class:`Entity`: 54 | The updated Entity. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Entity(json.loads(self.send(entity).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/event_dismiss_reminder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class EventDismissReminderRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(EventDismissReminderRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class EventDismissReminderRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(EventDismissReminderRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the EventDismissReminder 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`EventDismissReminderRequest`: 55 | The request 56 | """ 57 | req = EventDismissReminderRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/event_message_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.event_message import EventMessage 10 | import json 11 | 12 | class EventMessageRequest(RequestBase): 13 | """The type EventMessageRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new EventMessageRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the EventMessageRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(EventMessageRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified EventMessage.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified EventMessage. 35 | 36 | Returns: 37 | :class:`EventMessage`: 38 | The EventMessage. 39 | """ 40 | self.method = "GET" 41 | entity = EventMessage(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, event_message): 46 | """Updates the specified EventMessage. 47 | 48 | Args: 49 | event_message (:class:`EventMessage`): 50 | The EventMessage to update. 51 | 52 | Returns: 53 | :class:`EventMessage`: 54 | The updated EventMessage. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = EventMessage(json.loads(self.send(event_message).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/file_attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.file_attachment import FileAttachment 10 | import json 11 | 12 | class FileAttachmentRequest(RequestBase): 13 | """The type FileAttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new FileAttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the FileAttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(FileAttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified FileAttachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified FileAttachment. 35 | 36 | Returns: 37 | :class:`FileAttachment`: 38 | The FileAttachment. 39 | """ 40 | self.method = "GET" 41 | entity = FileAttachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, file_attachment): 46 | """Updates the specified FileAttachment. 47 | 48 | Args: 49 | file_attachment (:class:`FileAttachment`): 50 | The FileAttachment to update. 51 | 52 | Returns: 53 | :class:`FileAttachment`: 54 | The updated FileAttachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = FileAttachment(json.loads(self.send(file_attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/group_add_favorite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupAddFavoriteRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupAddFavoriteRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupAddFavoriteRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupAddFavoriteRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupAddFavorite 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupAddFavoriteRequest`: 55 | The request 56 | """ 57 | req = GroupAddFavoriteRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/group_remove_favorite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupRemoveFavoriteRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupRemoveFavoriteRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupRemoveFavoriteRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupRemoveFavoriteRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupRemoveFavorite 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupRemoveFavoriteRequest`: 55 | The request 56 | """ 57 | req = GroupRemoveFavoriteRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/group_reset_unseen_count.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupResetUnseenCountRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupResetUnseenCountRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupResetUnseenCountRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupResetUnseenCountRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupResetUnseenCount 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupResetUnseenCountRequest`: 55 | The request 56 | """ 57 | req = GroupResetUnseenCountRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/group_subscribe_by_mail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupSubscribeByMailRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupSubscribeByMailRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupSubscribeByMailRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupSubscribeByMailRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupSubscribeByMail 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupSubscribeByMailRequest`: 55 | The request 56 | """ 57 | req = GroupSubscribeByMailRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/group_unsubscribe_by_mail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupUnsubscribeByMailRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupUnsubscribeByMailRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupUnsubscribeByMailRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupUnsubscribeByMailRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupUnsubscribeByMail 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupUnsubscribeByMailRequest`: 55 | The request 56 | """ 57 | req = GroupUnsubscribeByMailRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/item_attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.item_attachment import ItemAttachment 10 | import json 11 | 12 | class ItemAttachmentRequest(RequestBase): 13 | """The type ItemAttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ItemAttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ItemAttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ItemAttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ItemAttachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ItemAttachment. 35 | 36 | Returns: 37 | :class:`ItemAttachment`: 38 | The ItemAttachment. 39 | """ 40 | self.method = "GET" 41 | entity = ItemAttachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, item_attachment): 46 | """Updates the specified ItemAttachment. 47 | 48 | Args: 49 | item_attachment (:class:`ItemAttachment`): 50 | The ItemAttachment to update. 51 | 52 | Returns: 53 | :class:`ItemAttachment`: 54 | The updated ItemAttachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ItemAttachment(json.loads(self.send(item_attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/message_create_forward.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateForwardRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateForwardRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateForwardRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateForwardRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateForward 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateForwardRequest`: 56 | The request 57 | """ 58 | req = MessageCreateForwardRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/message_create_reply.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateReplyRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateReplyRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateReplyRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateReplyRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateReply 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateReplyRequest`: 56 | The request 57 | """ 58 | req = MessageCreateReplyRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/message_create_reply_all.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateReplyAllRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateReplyAllRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateReplyAllRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateReplyAllRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateReplyAll 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateReplyAllRequest`: 56 | The request 57 | """ 58 | req = MessageCreateReplyAllRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/message_send.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class MessageSendRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(MessageSendRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class MessageSendRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(MessageSendRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the MessageSend 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`MessageSendRequest`: 55 | The request 56 | """ 57 | req = MessageSendRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/outlook_item_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.outlook_item import OutlookItem 10 | import json 11 | 12 | class OutlookItemRequest(RequestBase): 13 | """The type OutlookItemRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new OutlookItemRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the OutlookItemRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(OutlookItemRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified OutlookItem.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified OutlookItem. 35 | 36 | Returns: 37 | :class:`OutlookItem`: 38 | The OutlookItem. 39 | """ 40 | self.method = "GET" 41 | entity = OutlookItem(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, outlook_item): 46 | """Updates the specified OutlookItem. 47 | 48 | Args: 49 | outlook_item (:class:`OutlookItem`): 50 | The OutlookItem to update. 51 | 52 | Returns: 53 | :class:`OutlookItem`: 54 | The updated OutlookItem. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = OutlookItem(json.loads(self.send(outlook_item).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/permission_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.permission import Permission 10 | import json 11 | 12 | class PermissionRequest(RequestBase): 13 | """The type PermissionRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new PermissionRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the PermissionRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(PermissionRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Permission.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Permission. 35 | 36 | Returns: 37 | :class:`Permission`: 38 | The Permission. 39 | """ 40 | self.method = "GET" 41 | entity = Permission(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, permission): 46 | """Updates the specified Permission. 47 | 48 | Args: 49 | permission (:class:`Permission`): 50 | The Permission to update. 51 | 52 | Returns: 53 | :class:`Permission`: 54 | The updated Permission. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Permission(json.loads(self.send(permission).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/post_reply.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class PostReplyRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options, post): 17 | super(PostReplyRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | if post: 22 | self.body_options["Post"] = post 23 | 24 | @property 25 | def body_options(self): 26 | return self._body_options 27 | 28 | @body_options.setter 29 | def body_options(self, value): 30 | self._body_options=value 31 | 32 | def post(self): 33 | """Sends the POST request 34 | 35 | Returns: 36 | :class:`None`: 37 | The resulting entity from the operation 38 | """ 39 | self.content_type = "application/json" 40 | entity = None(json.loads(self.send(self.body_options).content)) 41 | return entity 42 | 43 | 44 | 45 | class PostReplyRequestBuilder(RequestBuilderBase): 46 | 47 | def __init__(self, request_url, client, post): 48 | super(PostReplyRequestBuilder, self).__init__(request_url, client) 49 | self._method_options = {} 50 | 51 | self._method_options["Post"] = post._prop_dict 52 | 53 | def request(self, options=None): 54 | """Builds the request for the PostReply 55 | 56 | Args: 57 | options (list of :class:`Option`): 58 | Default to None, list of options to include in the request 59 | 60 | Returns: 61 | :class:`PostReplyRequest`: 62 | The request 63 | """ 64 | req = PostReplyRequest(self._request_url, self._client, options, self._method_options["Post"]) 65 | return req 66 | 67 | def post(self): 68 | """Sends the POST request 69 | 70 | Returns: 71 | :class:`None`: 72 | The resulting None from the operation 73 | """ 74 | return self.request().post() 75 | 76 | -------------------------------------------------------------------------------- /src/python2/profile_photo_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.profile_photo import ProfilePhoto 10 | import json 11 | 12 | class ProfilePhotoRequest(RequestBase): 13 | """The type ProfilePhotoRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ProfilePhotoRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ProfilePhotoRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ProfilePhotoRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ProfilePhoto.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ProfilePhoto. 35 | 36 | Returns: 37 | :class:`ProfilePhoto`: 38 | The ProfilePhoto. 39 | """ 40 | self.method = "GET" 41 | entity = ProfilePhoto(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, profile_photo): 46 | """Updates the specified ProfilePhoto. 47 | 48 | Args: 49 | profile_photo (:class:`ProfilePhoto`): 50 | The ProfilePhoto to update. 51 | 52 | Returns: 53 | :class:`ProfilePhoto`: 54 | The updated ProfilePhoto. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ProfilePhoto(json.loads(self.send(profile_photo).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/python2/request/__init__.py -------------------------------------------------------------------------------- /src/python2/request/attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.attachment import Attachment 10 | import json 11 | 12 | class AttachmentRequest(RequestBase): 13 | """The type AttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new AttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the AttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(AttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Attachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Attachment. 35 | 36 | Returns: 37 | :class:`Attachment`: 38 | The Attachment. 39 | """ 40 | self.method = "GET" 41 | entity = Attachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, attachment): 46 | """Updates the specified Attachment. 47 | 48 | Args: 49 | attachment (:class:`Attachment`): 50 | The Attachment to update. 51 | 52 | Returns: 53 | :class:`Attachment`: 54 | The updated Attachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Attachment(json.loads(self.send(attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/directory_object_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.directory_object import DirectoryObject 10 | import json 11 | 12 | class DirectoryObjectRequest(RequestBase): 13 | """The type DirectoryObjectRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new DirectoryObjectRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the DirectoryObjectRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(DirectoryObjectRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified DirectoryObject.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified DirectoryObject. 35 | 36 | Returns: 37 | :class:`DirectoryObject`: 38 | The DirectoryObject. 39 | """ 40 | self.method = "GET" 41 | entity = DirectoryObject(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, directory_object): 46 | """Updates the specified DirectoryObject. 47 | 48 | Args: 49 | directory_object (:class:`DirectoryObject`): 50 | The DirectoryObject to update. 51 | 52 | Returns: 53 | :class:`DirectoryObject`: 54 | The updated DirectoryObject. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = DirectoryObject(json.loads(self.send(directory_object).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/entity_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.entity import Entity 10 | import json 11 | 12 | class EntityRequest(RequestBase): 13 | """The type EntityRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new EntityRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the EntityRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(EntityRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Entity.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Entity. 35 | 36 | Returns: 37 | :class:`Entity`: 38 | The Entity. 39 | """ 40 | self.method = "GET" 41 | entity = Entity(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, entity): 46 | """Updates the specified Entity. 47 | 48 | Args: 49 | entity (:class:`Entity`): 50 | The Entity to update. 51 | 52 | Returns: 53 | :class:`Entity`: 54 | The updated Entity. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Entity(json.loads(self.send(entity).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/event_dismiss_reminder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class EventDismissReminderRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(EventDismissReminderRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class EventDismissReminderRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(EventDismissReminderRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the EventDismissReminder 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`EventDismissReminderRequest`: 55 | The request 56 | """ 57 | req = EventDismissReminderRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/event_message_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.event_message import EventMessage 10 | import json 11 | 12 | class EventMessageRequest(RequestBase): 13 | """The type EventMessageRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new EventMessageRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the EventMessageRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(EventMessageRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified EventMessage.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified EventMessage. 35 | 36 | Returns: 37 | :class:`EventMessage`: 38 | The EventMessage. 39 | """ 40 | self.method = "GET" 41 | entity = EventMessage(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, event_message): 46 | """Updates the specified EventMessage. 47 | 48 | Args: 49 | event_message (:class:`EventMessage`): 50 | The EventMessage to update. 51 | 52 | Returns: 53 | :class:`EventMessage`: 54 | The updated EventMessage. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = EventMessage(json.loads(self.send(event_message).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/file_attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.file_attachment import FileAttachment 10 | import json 11 | 12 | class FileAttachmentRequest(RequestBase): 13 | """The type FileAttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new FileAttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the FileAttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(FileAttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified FileAttachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified FileAttachment. 35 | 36 | Returns: 37 | :class:`FileAttachment`: 38 | The FileAttachment. 39 | """ 40 | self.method = "GET" 41 | entity = FileAttachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, file_attachment): 46 | """Updates the specified FileAttachment. 47 | 48 | Args: 49 | file_attachment (:class:`FileAttachment`): 50 | The FileAttachment to update. 51 | 52 | Returns: 53 | :class:`FileAttachment`: 54 | The updated FileAttachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = FileAttachment(json.loads(self.send(file_attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/group_add_favorite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupAddFavoriteRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupAddFavoriteRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupAddFavoriteRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupAddFavoriteRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupAddFavorite 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupAddFavoriteRequest`: 55 | The request 56 | """ 57 | req = GroupAddFavoriteRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/group_remove_favorite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupRemoveFavoriteRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupRemoveFavoriteRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupRemoveFavoriteRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupRemoveFavoriteRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupRemoveFavorite 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupRemoveFavoriteRequest`: 55 | The request 56 | """ 57 | req = GroupRemoveFavoriteRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/group_reset_unseen_count.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupResetUnseenCountRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupResetUnseenCountRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupResetUnseenCountRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupResetUnseenCountRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupResetUnseenCount 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupResetUnseenCountRequest`: 55 | The request 56 | """ 57 | req = GroupResetUnseenCountRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/group_subscribe_by_mail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupSubscribeByMailRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupSubscribeByMailRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupSubscribeByMailRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupSubscribeByMailRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupSubscribeByMail 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupSubscribeByMailRequest`: 55 | The request 56 | """ 57 | req = GroupSubscribeByMailRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/group_unsubscribe_by_mail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class GroupUnsubscribeByMailRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(GroupUnsubscribeByMailRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class GroupUnsubscribeByMailRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(GroupUnsubscribeByMailRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the GroupUnsubscribeByMail 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`GroupUnsubscribeByMailRequest`: 55 | The request 56 | """ 57 | req = GroupUnsubscribeByMailRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/item_attachment_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.item_attachment import ItemAttachment 10 | import json 11 | 12 | class ItemAttachmentRequest(RequestBase): 13 | """The type ItemAttachmentRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ItemAttachmentRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ItemAttachmentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ItemAttachmentRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ItemAttachment.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ItemAttachment. 35 | 36 | Returns: 37 | :class:`ItemAttachment`: 38 | The ItemAttachment. 39 | """ 40 | self.method = "GET" 41 | entity = ItemAttachment(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, item_attachment): 46 | """Updates the specified ItemAttachment. 47 | 48 | Args: 49 | item_attachment (:class:`ItemAttachment`): 50 | The ItemAttachment to update. 51 | 52 | Returns: 53 | :class:`ItemAttachment`: 54 | The updated ItemAttachment. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ItemAttachment(json.loads(self.send(item_attachment).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/message_create_forward.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateForwardRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateForwardRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateForwardRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateForwardRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateForward 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateForwardRequest`: 56 | The request 57 | """ 58 | req = MessageCreateForwardRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/request/message_create_reply.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateReplyRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateReplyRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateReplyRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateReplyRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateReply 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateReplyRequest`: 56 | The request 57 | """ 58 | req = MessageCreateReplyRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/request/message_create_reply_all.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | #from ..model.message import Message 9 | from ..request_base import RequestBase 10 | from ..request_builder_base import RequestBuilderBase 11 | from ..options import * 12 | import json 13 | 14 | 15 | class MessageCreateReplyAllRequest(RequestBase): 16 | 17 | def __init__(self, request_url, client, options): 18 | super(MessageCreateReplyAllRequest, self).__init__(request_url, client, options) 19 | self.method = "POST" 20 | self.body_options={} 21 | 22 | @property 23 | def body_options(self): 24 | return self._body_options 25 | 26 | @body_options.setter 27 | def body_options(self, value): 28 | self._body_options=value 29 | 30 | def post(self): 31 | """Sends the POST request 32 | 33 | Returns: 34 | :class:`Message`: 35 | The resulting entity from the operation 36 | """ 37 | entity = Message(json.loads(self.send().content)) 38 | return entity 39 | 40 | 41 | 42 | class MessageCreateReplyAllRequestBuilder(RequestBuilderBase): 43 | 44 | def __init__(self, request_url, client): 45 | super(MessageCreateReplyAllRequestBuilder, self).__init__(request_url, client) 46 | 47 | def request(self, options=None): 48 | """Builds the request for the MessageCreateReplyAll 49 | 50 | Args: 51 | options (list of :class:`Option`): 52 | Default to None, list of options to include in the request 53 | 54 | Returns: 55 | :class:`MessageCreateReplyAllRequest`: 56 | The request 57 | """ 58 | req = MessageCreateReplyAllRequest(self._request_url, self._client, options) 59 | return req 60 | 61 | def post(self): 62 | """Sends the POST request 63 | 64 | Returns: 65 | :class:`Message`: 66 | The resulting Message from the operation 67 | """ 68 | return self.request().post() 69 | 70 | -------------------------------------------------------------------------------- /src/python2/request/message_send.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class MessageSendRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options): 17 | super(MessageSendRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | @property 22 | def body_options(self): 23 | return self._body_options 24 | 25 | @body_options.setter 26 | def body_options(self, value): 27 | self._body_options=value 28 | 29 | def post(self): 30 | """Sends the POST request 31 | 32 | Returns: 33 | :class:`None`: 34 | The resulting entity from the operation 35 | """ 36 | entity = None(json.loads(self.send().content)) 37 | return entity 38 | 39 | 40 | 41 | class MessageSendRequestBuilder(RequestBuilderBase): 42 | 43 | def __init__(self, request_url, client): 44 | super(MessageSendRequestBuilder, self).__init__(request_url, client) 45 | 46 | def request(self, options=None): 47 | """Builds the request for the MessageSend 48 | 49 | Args: 50 | options (list of :class:`Option`): 51 | Default to None, list of options to include in the request 52 | 53 | Returns: 54 | :class:`MessageSendRequest`: 55 | The request 56 | """ 57 | req = MessageSendRequest(self._request_url, self._client, options) 58 | return req 59 | 60 | def post(self): 61 | """Sends the POST request 62 | 63 | Returns: 64 | :class:`None`: 65 | The resulting None from the operation 66 | """ 67 | return self.request().post() 68 | 69 | -------------------------------------------------------------------------------- /src/python2/request/outlook_item_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.outlook_item import OutlookItem 10 | import json 11 | 12 | class OutlookItemRequest(RequestBase): 13 | """The type OutlookItemRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new OutlookItemRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the OutlookItemRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(OutlookItemRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified OutlookItem.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified OutlookItem. 35 | 36 | Returns: 37 | :class:`OutlookItem`: 38 | The OutlookItem. 39 | """ 40 | self.method = "GET" 41 | entity = OutlookItem(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, outlook_item): 46 | """Updates the specified OutlookItem. 47 | 48 | Args: 49 | outlook_item (:class:`OutlookItem`): 50 | The OutlookItem to update. 51 | 52 | Returns: 53 | :class:`OutlookItem`: 54 | The updated OutlookItem. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = OutlookItem(json.loads(self.send(outlook_item).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/permission_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.permission import Permission 10 | import json 11 | 12 | class PermissionRequest(RequestBase): 13 | """The type PermissionRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new PermissionRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the PermissionRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(PermissionRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Permission.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Permission. 35 | 36 | Returns: 37 | :class:`Permission`: 38 | The Permission. 39 | """ 40 | self.method = "GET" 41 | entity = Permission(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, permission): 46 | """Updates the specified Permission. 47 | 48 | Args: 49 | permission (:class:`Permission`): 50 | The Permission to update. 51 | 52 | Returns: 53 | :class:`Permission`: 54 | The updated Permission. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Permission(json.loads(self.send(permission).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/post_reply.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..options import * 11 | import json 12 | 13 | 14 | class PostReplyRequest(RequestBase): 15 | 16 | def __init__(self, request_url, client, options, post): 17 | super(PostReplyRequest, self).__init__(request_url, client, options) 18 | self.method = "POST" 19 | self.body_options={} 20 | 21 | if post: 22 | self.body_options["Post"] = post 23 | 24 | @property 25 | def body_options(self): 26 | return self._body_options 27 | 28 | @body_options.setter 29 | def body_options(self, value): 30 | self._body_options=value 31 | 32 | def post(self): 33 | """Sends the POST request 34 | 35 | Returns: 36 | :class:`None`: 37 | The resulting entity from the operation 38 | """ 39 | self.content_type = "application/json" 40 | entity = None(json.loads(self.send(self.body_options).content)) 41 | return entity 42 | 43 | 44 | 45 | class PostReplyRequestBuilder(RequestBuilderBase): 46 | 47 | def __init__(self, request_url, client, post): 48 | super(PostReplyRequestBuilder, self).__init__(request_url, client) 49 | self._method_options = {} 50 | 51 | self._method_options["Post"] = post._prop_dict 52 | 53 | def request(self, options=None): 54 | """Builds the request for the PostReply 55 | 56 | Args: 57 | options (list of :class:`Option`): 58 | Default to None, list of options to include in the request 59 | 60 | Returns: 61 | :class:`PostReplyRequest`: 62 | The request 63 | """ 64 | req = PostReplyRequest(self._request_url, self._client, options, self._method_options["Post"]) 65 | return req 66 | 67 | def post(self): 68 | """Sends the POST request 69 | 70 | Returns: 71 | :class:`None`: 72 | The resulting None from the operation 73 | """ 74 | return self.request().post() 75 | 76 | -------------------------------------------------------------------------------- /src/python2/request/profile_photo_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.profile_photo import ProfilePhoto 10 | import json 11 | 12 | class ProfilePhotoRequest(RequestBase): 13 | """The type ProfilePhotoRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ProfilePhotoRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ProfilePhotoRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ProfilePhotoRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ProfilePhoto.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ProfilePhoto. 35 | 36 | Returns: 37 | :class:`ProfilePhoto`: 38 | The ProfilePhoto. 39 | """ 40 | self.method = "GET" 41 | entity = ProfilePhoto(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, profile_photo): 46 | """Updates the specified ProfilePhoto. 47 | 48 | Args: 49 | profile_photo (:class:`ProfilePhoto`): 50 | The ProfilePhoto to update. 51 | 52 | Returns: 53 | :class:`ProfilePhoto`: 54 | The updated ProfilePhoto. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ProfilePhoto(json.loads(self.send(profile_photo).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/thumbnail_content_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..model.thumbnail import Thumbnail 11 | import json 12 | 13 | 14 | class ThumbnailContentRequest(RequestBase): 15 | def __init__(self, request_url, client, options): 16 | """Initialize the ThumbnailContentRequest 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailContentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailContentRequest, self).__init__(request_url, client, options) 27 | 28 | def download(self, content_local_path): 29 | """Downloads the specified Thumbnail. 30 | 31 | Args: 32 | content_local_path (str): 33 | The path where the Thumbnail should be downloaded to 34 | """ 35 | self.download_item(content_local_path) 36 | 37 | 38 | class ThumbnailContentRequestBuilder(RequestBuilderBase): 39 | 40 | def __init__(self, request_url, client): 41 | """Initialize the ThumbnailContentRequestBuilder 42 | 43 | Args: 44 | request_url (str): The request URL to initialize 45 | the ThumbnailContentRequestBuilder at 46 | client (:class:`GraphClient`): 47 | The client to use for requests made by the 48 | ThumbnailContentRequestBuilder 49 | """ 50 | super(ThumbnailContentRequestBuilder, self).__init__(request_url, client) 51 | 52 | def request(self): 53 | """Builds the ThumbnailContentRequest 54 | 55 | Returns: 56 | :class:`ThumbnailContentRequest`: 57 | The ThumbnailContentRequest 58 | """ 59 | return ThumbnailContentRequest(self._request_url, self._client, None) 60 | -------------------------------------------------------------------------------- /src/python2/request/thumbnail_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.thumbnail import Thumbnail 10 | import json 11 | 12 | class ThumbnailRequest(RequestBase): 13 | """The type ThumbnailRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ThumbnailRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Thumbnail.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Thumbnail. 35 | 36 | Returns: 37 | :class:`Thumbnail`: 38 | The Thumbnail. 39 | """ 40 | self.method = "GET" 41 | entity = Thumbnail(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, thumbnail): 46 | """Updates the specified Thumbnail. 47 | 48 | Args: 49 | thumbnail (:class:`Thumbnail`): 50 | The Thumbnail to update. 51 | 52 | Returns: 53 | :class:`Thumbnail`: 54 | The updated Thumbnail. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Thumbnail(json.loads(self.send(thumbnail).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/request/thumbnail_set_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.thumbnail_set import ThumbnailSet 10 | import json 11 | 12 | class ThumbnailSetRequest(RequestBase): 13 | """The type ThumbnailSetRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ThumbnailSetRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailSetRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailSetRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ThumbnailSet.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ThumbnailSet. 35 | 36 | Returns: 37 | :class:`ThumbnailSet`: 38 | The ThumbnailSet. 39 | """ 40 | self.method = "GET" 41 | entity = ThumbnailSet(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, thumbnail_set): 46 | """Updates the specified ThumbnailSet. 47 | 48 | Args: 49 | thumbnail_set (:class:`ThumbnailSet`): 50 | The ThumbnailSet to update. 51 | 52 | Returns: 53 | :class:`ThumbnailSet`: 54 | The updated ThumbnailSet. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ThumbnailSet(json.loads(self.send(thumbnail_set).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/thumbnail_content_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..request_builder_base import RequestBuilderBase 10 | from ..model.thumbnail import Thumbnail 11 | import json 12 | 13 | 14 | class ThumbnailContentRequest(RequestBase): 15 | def __init__(self, request_url, client, options): 16 | """Initialize the ThumbnailContentRequest 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailContentRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailContentRequest, self).__init__(request_url, client, options) 27 | 28 | def download(self, content_local_path): 29 | """Downloads the specified Thumbnail. 30 | 31 | Args: 32 | content_local_path (str): 33 | The path where the Thumbnail should be downloaded to 34 | """ 35 | self.download_item(content_local_path) 36 | 37 | 38 | class ThumbnailContentRequestBuilder(RequestBuilderBase): 39 | 40 | def __init__(self, request_url, client): 41 | """Initialize the ThumbnailContentRequestBuilder 42 | 43 | Args: 44 | request_url (str): The request URL to initialize 45 | the ThumbnailContentRequestBuilder at 46 | client (:class:`GraphClient`): 47 | The client to use for requests made by the 48 | ThumbnailContentRequestBuilder 49 | """ 50 | super(ThumbnailContentRequestBuilder, self).__init__(request_url, client) 51 | 52 | def request(self): 53 | """Builds the ThumbnailContentRequest 54 | 55 | Returns: 56 | :class:`ThumbnailContentRequest`: 57 | The ThumbnailContentRequest 58 | """ 59 | return ThumbnailContentRequest(self._request_url, self._client, None) 60 | -------------------------------------------------------------------------------- /src/python2/thumbnail_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.thumbnail import Thumbnail 10 | import json 11 | 12 | class ThumbnailRequest(RequestBase): 13 | """The type ThumbnailRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ThumbnailRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified Thumbnail.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified Thumbnail. 35 | 36 | Returns: 37 | :class:`Thumbnail`: 38 | The Thumbnail. 39 | """ 40 | self.method = "GET" 41 | entity = Thumbnail(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, thumbnail): 46 | """Updates the specified Thumbnail. 47 | 48 | Args: 49 | thumbnail (:class:`Thumbnail`): 50 | The Thumbnail to update. 51 | 52 | Returns: 53 | :class:`Thumbnail`: 54 | The updated Thumbnail. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = Thumbnail(json.loads(self.send(thumbnail).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python2/thumbnail_set_request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. 4 | # 5 | # This file was generated and any changes will be overwritten. 6 | """ 7 | 8 | from ..request_base import RequestBase 9 | from ..model.thumbnail_set import ThumbnailSet 10 | import json 11 | 12 | class ThumbnailSetRequest(RequestBase): 13 | """The type ThumbnailSetRequest.""" 14 | 15 | def __init__(self, request_url, client, options): 16 | """Constructs a new ThumbnailSetRequest. 17 | 18 | Args: 19 | request_url (str): The url to perform the ThumbnailSetRequest 20 | on 21 | client (:class:`GraphClient`): 22 | The client which will be used for the request 23 | options (list of :class:`Option`): 24 | A list of options to pass into the request 25 | """ 26 | super(ThumbnailSetRequest, self).__init__(request_url, client, options) 27 | 28 | def delete(self): 29 | """Deletes the specified ThumbnailSet.""" 30 | self.method = "DELETE" 31 | self.send() 32 | 33 | def get(self): 34 | """Gets the specified ThumbnailSet. 35 | 36 | Returns: 37 | :class:`ThumbnailSet`: 38 | The ThumbnailSet. 39 | """ 40 | self.method = "GET" 41 | entity = ThumbnailSet(json.loads(self.send().content)) 42 | self._initialize_collection_properties(entity) 43 | return entity 44 | 45 | def update(self, thumbnail_set): 46 | """Updates the specified ThumbnailSet. 47 | 48 | Args: 49 | thumbnail_set (:class:`ThumbnailSet`): 50 | The ThumbnailSet to update. 51 | 52 | Returns: 53 | :class:`ThumbnailSet`: 54 | The updated ThumbnailSet. 55 | """ 56 | self.content_type = "application/json" 57 | self.method = "PATCH" 58 | entity = ThumbnailSet(json.loads(self.send(thumbnail_set).content)) 59 | self._initialize_collection_properties(entity) 60 | return entity 61 | 62 | -------------------------------------------------------------------------------- /src/python3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/python3/__init__.py -------------------------------------------------------------------------------- /src/python3/request/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/src/python3/request/__init__.py -------------------------------------------------------------------------------- /test_graph_sdk/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftarchive/msgraph-sdk-python/1320ba9116be0d00a1d7fce3484ea979e24ee82d/test_graph_sdk/__init__.py -------------------------------------------------------------------------------- /test_graph_sdk/test_models.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from microsoft.model.folder import Folder 4 | from microsoft.model.item import Item 5 | from microsoft.model.item_reference import ItemReference 6 | from datetime import datetime 7 | 8 | 9 | class TestModels(unittest.TestCase): 10 | 11 | def test_serialization(self): 12 | """ 13 | Test the serialization of the dict-backed models, seeing that 14 | the correct objects are returned when called 15 | """ 16 | ref = ItemReference(); 17 | ref._prop_dict = {"id": "thisisa!test"} 18 | 19 | response = {"name":"test1", "folder":{}, "parentReference":ref._prop_dict, "lastModifiedDateTime": "2015-07-09T22:22:53.993000Z"} 20 | 21 | item = Item(); 22 | item._prop_dict = response 23 | 24 | assert type(item.folder) is Folder 25 | assert item.name == "test1" 26 | assert type(item.parent_reference) is ItemReference 27 | assert item.parent_reference.id == "thisisa!test" 28 | assert type(item.last_modified_date_time) == datetime 29 | assert item.last_modified_date_time.isoformat()+"Z" == response["lastModifiedDateTime"] 30 | 31 | 32 | if __name__ == '__main__': 33 | unittest.main() 34 | -------------------------------------------------------------------------------- /test_graph_sdk/test_streams.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | try: 3 | from unittest.mock import patch 4 | except ImportError: 5 | from mock import patch 6 | 7 | import msgraph 8 | from msgraph import HttpResponse 9 | import json 10 | 11 | 12 | class TestStreams(unittest.TestCase): 13 | 14 | @patch('msgraph.HttpProvider') 15 | @patch('msgraph.AuthProvider') 16 | def test_put(self, MockHttpProvider, MockAuthProvider): 17 | 18 | response = HttpResponse(200, None, json.dumps({"name":"test1", "folder":{}, "id":"test!id"})) 19 | 20 | instance = MockHttpProvider.return_value 21 | instance.send.return_value = response 22 | 23 | instance = MockAuthProvider.return_value 24 | instance.authenticate.return_value = "blah" 25 | instance.authenticate_request.return_value = None 26 | 27 | http_provider = msgraph.HttpProvider() 28 | auth_provider = msgraph.AuthProvider() 29 | client = msgraph.GraphClient("/", http_provider, auth_provider) 30 | 31 | response_item = client.drives["me"].items["root"].children["newFile.txt"].content.request().upload("./myPath/myFile.txt") 32 | 33 | assert client.http_provider.send.call_args[1]["path"] == "./myPath/myFile.txt" 34 | assert client.http_provider.send.call_args[0][2] == "/drives/me/items/root/children/newFile.txt/content" 35 | assert all(item in response_item._prop_dict.items() for item in json.loads(response.content).items()) 36 | 37 | @patch('msgraph.HttpProvider') 38 | @patch('msgraph.AuthProvider') 39 | def test_download(self, MockHttpProvider, MockAuthProvider): 40 | 41 | path = "./myPath/myFile.txt" 42 | response = HttpResponse(200, None, None) 43 | 44 | instance = MockHttpProvider.return_value 45 | instance.download.return_value = response 46 | 47 | instance = MockAuthProvider.return_value 48 | instance.authenticate.return_value = "blah" 49 | instance.authenticate_request.return_value = None 50 | 51 | http_provider = msgraph.HttpProvider() 52 | auth_provider = msgraph.AuthProvider() 53 | client = msgraph.GraphClient("/", http_provider, auth_provider) 54 | client.drives["me"].items["root"].children["newFile.txt"].content.request().download(path) 55 | 56 | assert client.http_provider.download.call_args[0][2] == path 57 | assert client.http_provider.download.call_args[0][1] == "/drives/me/items/root/children/newFile.txt/content" 58 | --------------------------------------------------------------------------------