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 pathevent_accept.py
More file actions
78 lines (58 loc) · 2.49 KB
/
Copy pathevent_accept.py
File metadata and controls
78 lines (58 loc) · 2.49 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
76
77
# -*- 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 ..request_base import RequestBase
from ..request_builder_base import RequestBuilderBase
from ..options import *
import json
class EventAcceptRequest(RequestBase):
def __init__(self, request_url, client, options, comment=None, send_response=None):
super(EventAcceptRequest, self).__init__(request_url, client, options)
self.method = "POST"
self.body_options={}
if comment:
self.body_options["Comment"] = comment
if send_response:
self.body_options["SendResponse"] = send_response
@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:`None<microsoft.msgraph.model.none.None>`:
The resulting entity from the operation
"""
self.content_type = "application/json"
entity = None(json.loads(self.send(self.body_options).content))
return entity
class EventAcceptRequestBuilder(RequestBuilderBase):
def __init__(self, request_url, client, comment=None, send_response=None):
super(EventAcceptRequestBuilder, self).__init__(request_url, client)
self._method_options = {}
self._method_options["Comment"] = comment
self._method_options["SendResponse"] = send_response
def request(self, options=None):
"""Builds the request for the EventAccept
Args:
options (list of :class:`Option<microsoft.msgraph.options.Option>`):
Default to None, list of options to include in the request
Returns:
:class:`EventAcceptRequest<microsoft.msgraph.request.event_accept.EventAcceptRequest>`:
The request
"""
req = EventAcceptRequest(self._request_url, self._client, options, comment=self._method_options["Comment"], send_response=self._method_options["SendResponse"])
return req
def post(self):
"""Sends the POST request
Returns:
:class:`None<microsoft.msgraph.model.none.None>`:
The resulting None from the operation
"""
return self.request().post()