This repository was archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmail_folder_move.py
More file actions
76 lines (56 loc) · 2.43 KB
/
Copy pathmail_folder_move.py
File metadata and controls
76 lines (56 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
#from ..model.mail_folder import MailFolder
from ..request_base import RequestBase
from ..request_builder_base import RequestBuilderBase
from ..options import *
import json
class MailFolderMoveRequest(RequestBase):
def __init__(self, request_url, client, options, destination_id=None):
super(MailFolderMoveRequest, self).__init__(request_url, client, options)
self.method = "POST"
self.body_options={}
if destination_id:
self.body_options["DestinationId"] = destination_id
@property
def body_options(self):
return self._body_options
@body_options.setter
def body_options(self, value):
self._body_options=value
def post(self):
"""Sends the POST request
Returns:
:class:`MailFolder<microsoft.msgraph.model.mail_folder.MailFolder>`:
The resulting entity from the operation
"""
self.content_type = "application/json"
entity = MailFolder(json.loads(self.send(self.body_options).content))
return entity
class MailFolderMoveRequestBuilder(RequestBuilderBase):
def __init__(self, request_url, client, destination_id=None):
super(MailFolderMoveRequestBuilder, self).__init__(request_url, client)
self._method_options = {}
self._method_options["DestinationId"] = destination_id
def request(self, options=None):
"""Builds the request for the MailFolderMove
Args:
options (list of :class:`Option<microsoft.msgraph.options.Option>`):
Default to None, list of options to include in the request
Returns:
:class:`MailFolderMoveRequest<microsoft.msgraph.request.mail_folder_move.MailFolderMoveRequest>`:
The request
"""
req = MailFolderMoveRequest(self._request_url, self._client, options, destination_id=self._method_options["DestinationId"])
return req
def post(self):
"""Sends the POST request
Returns:
:class:`MailFolder<microsoft.msgraph.model.mail_folder.MailFolder>`:
The resulting MailFolder from the operation
"""
return self.request().post()