Skip to content

Commit 5ca1994

Browse files
jv-asanaactions-user
authored andcommitted
Updated Python SDK
1 parent 6a23ba3 commit 5ca1994

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+523
-88
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Python client library for Asana
44

55
- API version: 1.0
6-
- Package version: 4.0.3
6+
- Package version: 4.0.4
77

88
## Requirements.
99

@@ -417,6 +417,7 @@ Class | Method | HTTP request | Description
417417
- [AttachmentResponseArray](docs/AttachmentResponseArray.md)
418418
- [AttachmentResponseData](docs/AttachmentResponseData.md)
419419
- [AttachmentResponseParent](docs/AttachmentResponseParent.md)
420+
- [AttachmentResponseParentCreatedBy](docs/AttachmentResponseParentCreatedBy.md)
420421
- [AuditLogEvent](docs/AuditLogEvent.md)
421422
- [AuditLogEventActor](docs/AuditLogEventActor.md)
422423
- [AuditLogEventArray](docs/AuditLogEventArray.md)

asana/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
from asana.models.attachment_response_array import AttachmentResponseArray
8282
from asana.models.attachment_response_data import AttachmentResponseData
8383
from asana.models.attachment_response_parent import AttachmentResponseParent
84+
from asana.models.attachment_response_parent_created_by import AttachmentResponseParentCreatedBy
8485
from asana.models.audit_log_event import AuditLogEvent
8586
from asana.models.audit_log_event_actor import AuditLogEventActor
8687
from asana.models.audit_log_event_array import AuditLogEventArray

asana/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7575
self.default_headers[header_name] = header_value
7676
self.cookie = cookie
7777
# Set default User-Agent.
78-
self.user_agent = 'Swagger-Codegen/4.0.3/python'
78+
self.user_agent = 'Swagger-Codegen/4.0.4/python'
7979
# Add custom header
8080
self.default_headers['X-Asana-Client-Lib'] = urlencode(
8181
{
8282
'language': 'Python',
83-
'version': '4.0.3',
83+
'version': '4.0.4',
8484
'language_version': platform.python_version(),
8585
'os': platform.system(),
8686
'os_version': platform.release()

asana/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,5 @@ def to_debug_report(self):
249249
"OS: {env}\n"\
250250
"Python Version: {pyversion}\n"\
251251
"Version of the API: 1.0\n"\
252-
"SDK Package Version: 4.0.3".\
252+
"SDK Package Version: 4.0.4".\
253253
format(env=sys.platform, pyversion=sys.version)

asana/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from asana.models.attachment_response_array import AttachmentResponseArray
4343
from asana.models.attachment_response_data import AttachmentResponseData
4444
from asana.models.attachment_response_parent import AttachmentResponseParent
45+
from asana.models.attachment_response_parent_created_by import AttachmentResponseParentCreatedBy
4546
from asana.models.audit_log_event import AuditLogEvent
4647
from asana.models.audit_log_event_actor import AuditLogEventActor
4748
from asana.models.audit_log_event_array import AuditLogEventArray

asana/models/attachment_response_parent.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,25 @@ class AttachmentResponseParent(object):
3131
'gid': 'str',
3232
'resource_type': 'str',
3333
'name': 'str',
34-
'resource_subtype': 'str'
34+
'resource_subtype': 'str',
35+
'created_by': 'AttachmentResponseParentCreatedBy'
3536
}
3637

3738
attribute_map = {
3839
'gid': 'gid',
3940
'resource_type': 'resource_type',
4041
'name': 'name',
41-
'resource_subtype': 'resource_subtype'
42+
'resource_subtype': 'resource_subtype',
43+
'created_by': 'created_by'
4244
}
4345

44-
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None): # noqa: E501
46+
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None, created_by=None): # noqa: E501
4547
"""AttachmentResponseParent - a model defined in Swagger""" # noqa: E501
4648
self._gid = None
4749
self._resource_type = None
4850
self._name = None
4951
self._resource_subtype = None
52+
self._created_by = None
5053
self.discriminator = None
5154
if gid is not None:
5255
self.gid = gid
@@ -56,6 +59,8 @@ def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=Non
5659
self.name = name
5760
if resource_subtype is not None:
5861
self.resource_subtype = resource_subtype
62+
if created_by is not None:
63+
self.created_by = created_by
5964

6065
@property
6166
def gid(self):
@@ -149,6 +154,27 @@ def resource_subtype(self, resource_subtype):
149154

150155
self._resource_subtype = resource_subtype
151156

157+
@property
158+
def created_by(self):
159+
"""Gets the created_by of this AttachmentResponseParent. # noqa: E501
160+
161+
162+
:return: The created_by of this AttachmentResponseParent. # noqa: E501
163+
:rtype: AttachmentResponseParentCreatedBy
164+
"""
165+
return self._created_by
166+
167+
@created_by.setter
168+
def created_by(self, created_by):
169+
"""Sets the created_by of this AttachmentResponseParent.
170+
171+
172+
:param created_by: The created_by of this AttachmentResponseParent. # noqa: E501
173+
:type: AttachmentResponseParentCreatedBy
174+
"""
175+
176+
self._created_by = created_by
177+
152178
def to_dict(self):
153179
"""Returns the model properties as a dict"""
154180
result = {}
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# coding: utf-8
2+
3+
"""
4+
Asana
5+
6+
This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml). # noqa: E501
7+
8+
OpenAPI spec version: 1.0
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
import pprint
14+
import re # noqa: F401
15+
16+
import six
17+
18+
class AttachmentResponseParentCreatedBy(object):
19+
"""NOTE: This class is auto generated by the swagger code generator program.
20+
21+
Do not edit the class manually.
22+
"""
23+
"""
24+
Attributes:
25+
swagger_types (dict): The key is attribute name
26+
and the value is attribute type.
27+
attribute_map (dict): The key is attribute name
28+
and the value is json key in definition.
29+
"""
30+
swagger_types = {
31+
'gid': 'str',
32+
'resource_type': 'str'
33+
}
34+
35+
attribute_map = {
36+
'gid': 'gid',
37+
'resource_type': 'resource_type'
38+
}
39+
40+
def __init__(self, gid=None, resource_type=None): # noqa: E501
41+
"""AttachmentResponseParentCreatedBy - a model defined in Swagger""" # noqa: E501
42+
self._gid = None
43+
self._resource_type = None
44+
self.discriminator = None
45+
if gid is not None:
46+
self.gid = gid
47+
if resource_type is not None:
48+
self.resource_type = resource_type
49+
50+
@property
51+
def gid(self):
52+
"""Gets the gid of this AttachmentResponseParentCreatedBy. # noqa: E501
53+
54+
Globally unique identifier of the resource. # noqa: E501
55+
56+
:return: The gid of this AttachmentResponseParentCreatedBy. # noqa: E501
57+
:rtype: str
58+
"""
59+
return self._gid
60+
61+
@gid.setter
62+
def gid(self, gid):
63+
"""Sets the gid of this AttachmentResponseParentCreatedBy.
64+
65+
Globally unique identifier of the resource. # noqa: E501
66+
67+
:param gid: The gid of this AttachmentResponseParentCreatedBy. # noqa: E501
68+
:type: str
69+
"""
70+
71+
self._gid = gid
72+
73+
@property
74+
def resource_type(self):
75+
"""Gets the resource_type of this AttachmentResponseParentCreatedBy. # noqa: E501
76+
77+
The type of resource. # noqa: E501
78+
79+
:return: The resource_type of this AttachmentResponseParentCreatedBy. # noqa: E501
80+
:rtype: str
81+
"""
82+
return self._resource_type
83+
84+
@resource_type.setter
85+
def resource_type(self, resource_type):
86+
"""Sets the resource_type of this AttachmentResponseParentCreatedBy.
87+
88+
The type of resource. # noqa: E501
89+
90+
:param resource_type: The resource_type of this AttachmentResponseParentCreatedBy. # noqa: E501
91+
:type: str
92+
"""
93+
94+
self._resource_type = resource_type
95+
96+
def to_dict(self):
97+
"""Returns the model properties as a dict"""
98+
result = {}
99+
100+
for attr, _ in six.iteritems(self.swagger_types):
101+
value = getattr(self, attr)
102+
if isinstance(value, list):
103+
result[attr] = list(map(
104+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
105+
value
106+
))
107+
elif hasattr(value, "to_dict"):
108+
result[attr] = value.to_dict()
109+
elif isinstance(value, dict):
110+
result[attr] = dict(map(
111+
lambda item: (item[0], item[1].to_dict())
112+
if hasattr(item[1], "to_dict") else item,
113+
value.items()
114+
))
115+
else:
116+
result[attr] = value
117+
if issubclass(AttachmentResponseParentCreatedBy, dict):
118+
for key, value in self.items():
119+
result[key] = value
120+
121+
return result
122+
123+
def to_str(self):
124+
"""Returns the string representation of the model"""
125+
return pprint.pformat(self.to_dict())
126+
127+
def __repr__(self):
128+
"""For `print` and `pprint`"""
129+
return self.to_str()
130+
131+
def __eq__(self, other):
132+
"""Returns true if both objects are equal"""
133+
if not isinstance(other, AttachmentResponseParentCreatedBy):
134+
return False
135+
136+
return self.__dict__ == other.__dict__
137+
138+
def __ne__(self, other):
139+
"""Returns true if both objects are not equal"""
140+
return not self == other

asana/models/job_base_new_task.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,25 @@ class JobBaseNewTask(object):
3131
'gid': 'str',
3232
'resource_type': 'str',
3333
'name': 'str',
34-
'resource_subtype': 'str'
34+
'resource_subtype': 'str',
35+
'created_by': 'AttachmentResponseParentCreatedBy'
3536
}
3637

3738
attribute_map = {
3839
'gid': 'gid',
3940
'resource_type': 'resource_type',
4041
'name': 'name',
41-
'resource_subtype': 'resource_subtype'
42+
'resource_subtype': 'resource_subtype',
43+
'created_by': 'created_by'
4244
}
4345

44-
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None): # noqa: E501
46+
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None, created_by=None): # noqa: E501
4547
"""JobBaseNewTask - a model defined in Swagger""" # noqa: E501
4648
self._gid = None
4749
self._resource_type = None
4850
self._name = None
4951
self._resource_subtype = None
52+
self._created_by = None
5053
self.discriminator = None
5154
if gid is not None:
5255
self.gid = gid
@@ -56,6 +59,8 @@ def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=Non
5659
self.name = name
5760
if resource_subtype is not None:
5861
self.resource_subtype = resource_subtype
62+
if created_by is not None:
63+
self.created_by = created_by
5964

6065
@property
6166
def gid(self):
@@ -155,6 +160,27 @@ def resource_subtype(self, resource_subtype):
155160

156161
self._resource_subtype = resource_subtype
157162

163+
@property
164+
def created_by(self):
165+
"""Gets the created_by of this JobBaseNewTask. # noqa: E501
166+
167+
168+
:return: The created_by of this JobBaseNewTask. # noqa: E501
169+
:rtype: AttachmentResponseParentCreatedBy
170+
"""
171+
return self._created_by
172+
173+
@created_by.setter
174+
def created_by(self, created_by):
175+
"""Sets the created_by of this JobBaseNewTask.
176+
177+
178+
:param created_by: The created_by of this JobBaseNewTask. # noqa: E501
179+
:type: AttachmentResponseParentCreatedBy
180+
"""
181+
182+
self._created_by = created_by
183+
158184
def to_dict(self):
159185
"""Returns the model properties as a dict"""
160186
result = {}

asana/models/story_response_target.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,25 @@ class StoryResponseTarget(object):
3131
'gid': 'str',
3232
'resource_type': 'str',
3333
'name': 'str',
34-
'resource_subtype': 'str'
34+
'resource_subtype': 'str',
35+
'created_by': 'AttachmentResponseParentCreatedBy'
3536
}
3637

3738
attribute_map = {
3839
'gid': 'gid',
3940
'resource_type': 'resource_type',
4041
'name': 'name',
41-
'resource_subtype': 'resource_subtype'
42+
'resource_subtype': 'resource_subtype',
43+
'created_by': 'created_by'
4244
}
4345

44-
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None): # noqa: E501
46+
def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=None, created_by=None): # noqa: E501
4547
"""StoryResponseTarget - a model defined in Swagger""" # noqa: E501
4648
self._gid = None
4749
self._resource_type = None
4850
self._name = None
4951
self._resource_subtype = None
52+
self._created_by = None
5053
self.discriminator = None
5154
if gid is not None:
5255
self.gid = gid
@@ -56,6 +59,8 @@ def __init__(self, gid=None, resource_type=None, name=None, resource_subtype=Non
5659
self.name = name
5760
if resource_subtype is not None:
5861
self.resource_subtype = resource_subtype
62+
if created_by is not None:
63+
self.created_by = created_by
5964

6065
@property
6166
def gid(self):
@@ -155,6 +160,27 @@ def resource_subtype(self, resource_subtype):
155160

156161
self._resource_subtype = resource_subtype
157162

163+
@property
164+
def created_by(self):
165+
"""Gets the created_by of this StoryResponseTarget. # noqa: E501
166+
167+
168+
:return: The created_by of this StoryResponseTarget. # noqa: E501
169+
:rtype: AttachmentResponseParentCreatedBy
170+
"""
171+
return self._created_by
172+
173+
@created_by.setter
174+
def created_by(self, created_by):
175+
"""Sets the created_by of this StoryResponseTarget.
176+
177+
178+
:param created_by: The created_by of this StoryResponseTarget. # noqa: E501
179+
:type: AttachmentResponseParentCreatedBy
180+
"""
181+
182+
self._created_by = created_by
183+
158184
def to_dict(self):
159185
"""Returns the model properties as a dict"""
160186
result = {}

0 commit comments

Comments
 (0)