anyscale 0.26.22__py3-none-any.whl → 0.26.24__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +1 -1
  2. anyscale/_private/anyscale_client/common.py +1 -1
  3. anyscale/_private/docgen/__main__.py +0 -8
  4. anyscale/_private/docgen/models.md +41 -184
  5. anyscale/_private/workload/workload_config.py +1 -1
  6. anyscale/client/README.md +2 -35
  7. anyscale/client/openapi_client/__init__.py +2 -21
  8. anyscale/client/openapi_client/api/default_api.py +275 -1868
  9. anyscale/client/openapi_client/models/__init__.py +2 -21
  10. anyscale/client/openapi_client/models/baseimagesenum.py +68 -1
  11. anyscale/client/openapi_client/models/cloud_data_bucket_file_type.py +2 -1
  12. anyscale/client/openapi_client/models/cloud_deployment.py +2 -2
  13. anyscale/client/openapi_client/models/cloud_deployment_compute_config.py +291 -0
  14. anyscale/client/openapi_client/models/cloud_deployment_selector.py +206 -0
  15. anyscale/client/openapi_client/models/cloud_providers.py +2 -1
  16. anyscale/client/openapi_client/models/compute_template_config.py +61 -34
  17. anyscale/client/openapi_client/models/create_cluster_compute_config.py +59 -31
  18. anyscale/client/openapi_client/models/create_compute_template_config.py +61 -34
  19. anyscale/client/openapi_client/models/create_workspace_from_template.py +3 -2
  20. anyscale/client/openapi_client/models/decorated_compute_template_config.py +61 -34
  21. anyscale/client/openapi_client/models/decorated_session.py +31 -3
  22. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +68 -1
  23. anyscale/client/openapi_client/models/workspace_dataplane_proxied_artifacts.py +31 -3
  24. anyscale/cluster_compute.py +4 -4
  25. anyscale/commands/anyscale_api/sessions_commands.py +1 -70
  26. anyscale/commands/cloud_commands.py +5 -4
  27. anyscale/commands/image_commands.py +2 -2
  28. anyscale/commands/job_commands.py +1 -1
  29. anyscale/commands/service_commands.py +1 -1
  30. anyscale/commands/workspace_commands_v2.py +1 -1
  31. anyscale/connect_utils/prepare_cluster.py +1 -3
  32. anyscale/controllers/cloud_controller.py +12 -6
  33. anyscale/controllers/cloud_functional_verification_controller.py +2 -2
  34. anyscale/image/commands.py +1 -1
  35. anyscale/sdk/anyscale_client/__init__.py +2 -15
  36. anyscale/sdk/anyscale_client/api/default_api.py +1270 -2871
  37. anyscale/sdk/anyscale_client/models/__init__.py +2 -15
  38. anyscale/sdk/anyscale_client/models/baseimagesenum.py +68 -1
  39. anyscale/sdk/anyscale_client/models/cloud_deployment_compute_config.py +291 -0
  40. anyscale/sdk/anyscale_client/models/cloud_deployment_selector.py +206 -0
  41. anyscale/sdk/anyscale_client/models/cloud_providers.py +2 -1
  42. anyscale/sdk/anyscale_client/models/cluster_compute_config.py +61 -34
  43. anyscale/sdk/anyscale_client/models/cluster_services_urls.py +29 -1
  44. anyscale/sdk/anyscale_client/models/compute_template_config.py +61 -34
  45. anyscale/sdk/anyscale_client/models/create_cluster_compute_config.py +59 -31
  46. anyscale/sdk/anyscale_client/models/session.py +31 -3
  47. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +68 -1
  48. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  49. anyscale/shared_anyscale_utils/utils/id_gen.py +3 -1
  50. anyscale/version.py +1 -1
  51. anyscale/workspace/models.py +1 -1
  52. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/METADATA +1 -1
  53. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/RECORD +58 -90
  54. anyscale/client/openapi_client/models/bank_account_information.py +0 -239
  55. anyscale/client/openapi_client/models/billing_information.py +0 -181
  56. anyscale/client/openapi_client/models/credit_card_information.py +0 -268
  57. anyscale/client/openapi_client/models/decoratedunifiedjob_response.py +0 -121
  58. anyscale/client/openapi_client/models/invoice.py +0 -413
  59. anyscale/client/openapi_client/models/invoice_list_response.py +0 -147
  60. anyscale/client/openapi_client/models/invoice_status.py +0 -102
  61. anyscale/client/openapi_client/models/invoices_query.py +0 -150
  62. anyscale/client/openapi_client/models/log_stream.py +0 -151
  63. anyscale/client/openapi_client/models/logstream_response.py +0 -121
  64. anyscale/client/openapi_client/models/miniproject_list_response.py +0 -147
  65. anyscale/client/openapi_client/models/organization_project_collaborator.py +0 -175
  66. anyscale/client/openapi_client/models/organization_project_collaborator_value.py +0 -148
  67. anyscale/client/openapi_client/models/organizationprojectcollaborator_list_response.py +0 -147
  68. anyscale/client/openapi_client/models/product_type.py +0 -100
  69. anyscale/client/openapi_client/models/service_usage.py +0 -353
  70. anyscale/client/openapi_client/models/templatized_compute_configs.py +0 -202
  71. anyscale/client/openapi_client/models/templatized_decorated_application_templates.py +0 -202
  72. anyscale/client/openapi_client/models/templatizedcomputeconfigs_response.py +0 -121
  73. anyscale/client/openapi_client/models/templatizeddecoratedapplicationtemplates_response.py +0 -121
  74. anyscale/client/openapi_client/models/write_session.py +0 -147
  75. anyscale/sdk/anyscale_client/models/build_list_response.py +0 -147
  76. anyscale/sdk/anyscale_client/models/build_log_response.py +0 -123
  77. anyscale/sdk/anyscale_client/models/buildlogresponse_response.py +0 -121
  78. anyscale/sdk/anyscale_client/models/compute_template_query.py +0 -316
  79. anyscale/sdk/anyscale_client/models/computetemplate_list_response.py +0 -147
  80. anyscale/sdk/anyscale_client/models/create_build.py +0 -263
  81. anyscale/sdk/anyscale_client/models/create_compute_template.py +0 -229
  82. anyscale/sdk/anyscale_client/models/create_compute_template_config.py +0 -464
  83. anyscale/sdk/anyscale_client/models/session_list_response.py +0 -147
  84. anyscale/sdk/anyscale_client/models/sessions_query.py +0 -206
  85. anyscale/sdk/anyscale_client/models/start_session_options.py +0 -206
  86. anyscale/sdk/anyscale_client/models/terminate_session_options.py +0 -206
  87. anyscale/sdk/anyscale_client/models/update_compute_template.py +0 -146
  88. anyscale/sdk/anyscale_client/models/update_compute_template_config.py +0 -464
  89. anyscale/sdk/anyscale_client/models/update_session.py +0 -150
  90. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/LICENSE +0 -0
  91. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/NOTICE +0 -0
  92. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/WHEEL +0 -0
  93. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/entry_points.txt +0 -0
  94. {anyscale-0.26.22.dist-info → anyscale-0.26.24.dist-info}/top_level.txt +0 -0
@@ -1,175 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class OrganizationProjectCollaborator(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'id': 'str',
37
- 'value': 'OrganizationProjectCollaboratorValue',
38
- 'permission_level': 'PermissionLevel'
39
- }
40
-
41
- attribute_map = {
42
- 'id': 'id',
43
- 'value': 'value',
44
- 'permission_level': 'permission_level'
45
- }
46
-
47
- def __init__(self, id=None, value=None, permission_level=None, local_vars_configuration=None): # noqa: E501
48
- """OrganizationProjectCollaborator - a model defined in OpenAPI""" # noqa: E501
49
- if local_vars_configuration is None:
50
- local_vars_configuration = Configuration()
51
- self.local_vars_configuration = local_vars_configuration
52
-
53
- self._id = None
54
- self._value = None
55
- self._permission_level = None
56
- self.discriminator = None
57
-
58
- self.id = id
59
- self.value = value
60
- self.permission_level = permission_level
61
-
62
- @property
63
- def id(self):
64
- """Gets the id of this OrganizationProjectCollaborator. # noqa: E501
65
-
66
-
67
- :return: The id of this OrganizationProjectCollaborator. # noqa: E501
68
- :rtype: str
69
- """
70
- return self._id
71
-
72
- @id.setter
73
- def id(self, id):
74
- """Sets the id of this OrganizationProjectCollaborator.
75
-
76
-
77
- :param id: The id of this OrganizationProjectCollaborator. # noqa: E501
78
- :type: str
79
- """
80
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
81
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
82
-
83
- self._id = id
84
-
85
- @property
86
- def value(self):
87
- """Gets the value of this OrganizationProjectCollaborator. # noqa: E501
88
-
89
-
90
- :return: The value of this OrganizationProjectCollaborator. # noqa: E501
91
- :rtype: OrganizationProjectCollaboratorValue
92
- """
93
- return self._value
94
-
95
- @value.setter
96
- def value(self, value):
97
- """Sets the value of this OrganizationProjectCollaborator.
98
-
99
-
100
- :param value: The value of this OrganizationProjectCollaborator. # noqa: E501
101
- :type: OrganizationProjectCollaboratorValue
102
- """
103
- if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501
104
- raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501
105
-
106
- self._value = value
107
-
108
- @property
109
- def permission_level(self):
110
- """Gets the permission_level of this OrganizationProjectCollaborator. # noqa: E501
111
-
112
-
113
- :return: The permission_level of this OrganizationProjectCollaborator. # noqa: E501
114
- :rtype: PermissionLevel
115
- """
116
- return self._permission_level
117
-
118
- @permission_level.setter
119
- def permission_level(self, permission_level):
120
- """Sets the permission_level of this OrganizationProjectCollaborator.
121
-
122
-
123
- :param permission_level: The permission_level of this OrganizationProjectCollaborator. # noqa: E501
124
- :type: PermissionLevel
125
- """
126
- if self.local_vars_configuration.client_side_validation and permission_level is None: # noqa: E501
127
- raise ValueError("Invalid value for `permission_level`, must not be `None`") # noqa: E501
128
-
129
- self._permission_level = permission_level
130
-
131
- def to_dict(self):
132
- """Returns the model properties as a dict"""
133
- result = {}
134
-
135
- for attr, _ in six.iteritems(self.openapi_types):
136
- value = getattr(self, attr)
137
- if isinstance(value, list):
138
- result[attr] = list(map(
139
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
- value
141
- ))
142
- elif hasattr(value, "to_dict"):
143
- result[attr] = value.to_dict()
144
- elif isinstance(value, dict):
145
- result[attr] = dict(map(
146
- lambda item: (item[0], item[1].to_dict())
147
- if hasattr(item[1], "to_dict") else item,
148
- value.items()
149
- ))
150
- else:
151
- result[attr] = value
152
-
153
- return result
154
-
155
- def to_str(self):
156
- """Returns the string representation of the model"""
157
- return pprint.pformat(self.to_dict())
158
-
159
- def __repr__(self):
160
- """For `print` and `pprint`"""
161
- return self.to_str()
162
-
163
- def __eq__(self, other):
164
- """Returns true if both objects are equal"""
165
- if not isinstance(other, OrganizationProjectCollaborator):
166
- return False
167
-
168
- return self.to_dict() == other.to_dict()
169
-
170
- def __ne__(self, other):
171
- """Returns true if both objects are not equal"""
172
- if not isinstance(other, OrganizationProjectCollaborator):
173
- return True
174
-
175
- return self.to_dict() != other.to_dict()
@@ -1,148 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class OrganizationProjectCollaboratorValue(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'organization_id': 'str',
37
- 'organization_name': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'organization_id': 'organization_id',
42
- 'organization_name': 'organization_name'
43
- }
44
-
45
- def __init__(self, organization_id=None, organization_name=None, local_vars_configuration=None): # noqa: E501
46
- """OrganizationProjectCollaboratorValue - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._organization_id = None
52
- self._organization_name = None
53
- self.discriminator = None
54
-
55
- self.organization_id = organization_id
56
- self.organization_name = organization_name
57
-
58
- @property
59
- def organization_id(self):
60
- """Gets the organization_id of this OrganizationProjectCollaboratorValue. # noqa: E501
61
-
62
-
63
- :return: The organization_id of this OrganizationProjectCollaboratorValue. # noqa: E501
64
- :rtype: str
65
- """
66
- return self._organization_id
67
-
68
- @organization_id.setter
69
- def organization_id(self, organization_id):
70
- """Sets the organization_id of this OrganizationProjectCollaboratorValue.
71
-
72
-
73
- :param organization_id: The organization_id of this OrganizationProjectCollaboratorValue. # noqa: E501
74
- :type: str
75
- """
76
- if self.local_vars_configuration.client_side_validation and organization_id is None: # noqa: E501
77
- raise ValueError("Invalid value for `organization_id`, must not be `None`") # noqa: E501
78
-
79
- self._organization_id = organization_id
80
-
81
- @property
82
- def organization_name(self):
83
- """Gets the organization_name of this OrganizationProjectCollaboratorValue. # noqa: E501
84
-
85
-
86
- :return: The organization_name of this OrganizationProjectCollaboratorValue. # noqa: E501
87
- :rtype: str
88
- """
89
- return self._organization_name
90
-
91
- @organization_name.setter
92
- def organization_name(self, organization_name):
93
- """Sets the organization_name of this OrganizationProjectCollaboratorValue.
94
-
95
-
96
- :param organization_name: The organization_name of this OrganizationProjectCollaboratorValue. # noqa: E501
97
- :type: str
98
- """
99
- if self.local_vars_configuration.client_side_validation and organization_name is None: # noqa: E501
100
- raise ValueError("Invalid value for `organization_name`, must not be `None`") # noqa: E501
101
-
102
- self._organization_name = organization_name
103
-
104
- def to_dict(self):
105
- """Returns the model properties as a dict"""
106
- result = {}
107
-
108
- for attr, _ in six.iteritems(self.openapi_types):
109
- value = getattr(self, attr)
110
- if isinstance(value, list):
111
- result[attr] = list(map(
112
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
113
- value
114
- ))
115
- elif hasattr(value, "to_dict"):
116
- result[attr] = value.to_dict()
117
- elif isinstance(value, dict):
118
- result[attr] = dict(map(
119
- lambda item: (item[0], item[1].to_dict())
120
- if hasattr(item[1], "to_dict") else item,
121
- value.items()
122
- ))
123
- else:
124
- result[attr] = value
125
-
126
- return result
127
-
128
- def to_str(self):
129
- """Returns the string representation of the model"""
130
- return pprint.pformat(self.to_dict())
131
-
132
- def __repr__(self):
133
- """For `print` and `pprint`"""
134
- return self.to_str()
135
-
136
- def __eq__(self, other):
137
- """Returns true if both objects are equal"""
138
- if not isinstance(other, OrganizationProjectCollaboratorValue):
139
- return False
140
-
141
- return self.to_dict() == other.to_dict()
142
-
143
- def __ne__(self, other):
144
- """Returns true if both objects are not equal"""
145
- if not isinstance(other, OrganizationProjectCollaboratorValue):
146
- return True
147
-
148
- return self.to_dict() != other.to_dict()
@@ -1,147 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class OrganizationprojectcollaboratorListResponse(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'results': 'list[OrganizationProjectCollaborator]',
37
- 'metadata': 'ListResponseMetadata'
38
- }
39
-
40
- attribute_map = {
41
- 'results': 'results',
42
- 'metadata': 'metadata'
43
- }
44
-
45
- def __init__(self, results=None, metadata=None, local_vars_configuration=None): # noqa: E501
46
- """OrganizationprojectcollaboratorListResponse - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._results = None
52
- self._metadata = None
53
- self.discriminator = None
54
-
55
- self.results = results
56
- if metadata is not None:
57
- self.metadata = metadata
58
-
59
- @property
60
- def results(self):
61
- """Gets the results of this OrganizationprojectcollaboratorListResponse. # noqa: E501
62
-
63
-
64
- :return: The results of this OrganizationprojectcollaboratorListResponse. # noqa: E501
65
- :rtype: list[OrganizationProjectCollaborator]
66
- """
67
- return self._results
68
-
69
- @results.setter
70
- def results(self, results):
71
- """Sets the results of this OrganizationprojectcollaboratorListResponse.
72
-
73
-
74
- :param results: The results of this OrganizationprojectcollaboratorListResponse. # noqa: E501
75
- :type: list[OrganizationProjectCollaborator]
76
- """
77
- if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
78
- raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
79
-
80
- self._results = results
81
-
82
- @property
83
- def metadata(self):
84
- """Gets the metadata of this OrganizationprojectcollaboratorListResponse. # noqa: E501
85
-
86
-
87
- :return: The metadata of this OrganizationprojectcollaboratorListResponse. # noqa: E501
88
- :rtype: ListResponseMetadata
89
- """
90
- return self._metadata
91
-
92
- @metadata.setter
93
- def metadata(self, metadata):
94
- """Sets the metadata of this OrganizationprojectcollaboratorListResponse.
95
-
96
-
97
- :param metadata: The metadata of this OrganizationprojectcollaboratorListResponse. # noqa: E501
98
- :type: ListResponseMetadata
99
- """
100
-
101
- self._metadata = metadata
102
-
103
- def to_dict(self):
104
- """Returns the model properties as a dict"""
105
- result = {}
106
-
107
- for attr, _ in six.iteritems(self.openapi_types):
108
- value = getattr(self, attr)
109
- if isinstance(value, list):
110
- result[attr] = list(map(
111
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
112
- value
113
- ))
114
- elif hasattr(value, "to_dict"):
115
- result[attr] = value.to_dict()
116
- elif isinstance(value, dict):
117
- result[attr] = dict(map(
118
- lambda item: (item[0], item[1].to_dict())
119
- if hasattr(item[1], "to_dict") else item,
120
- value.items()
121
- ))
122
- else:
123
- result[attr] = value
124
-
125
- return result
126
-
127
- def to_str(self):
128
- """Returns the string representation of the model"""
129
- return pprint.pformat(self.to_dict())
130
-
131
- def __repr__(self):
132
- """For `print` and `pprint`"""
133
- return self.to_str()
134
-
135
- def __eq__(self, other):
136
- """Returns true if both objects are equal"""
137
- if not isinstance(other, OrganizationprojectcollaboratorListResponse):
138
- return False
139
-
140
- return self.to_dict() == other.to_dict()
141
-
142
- def __ne__(self, other):
143
- """Returns true if both objects are not equal"""
144
- if not isinstance(other, OrganizationprojectcollaboratorListResponse):
145
- return True
146
-
147
- return self.to_dict() != other.to_dict()
@@ -1,100 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class ProductType(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- allowed enum values
30
- """
31
- AICA = "AICA"
32
- AIOA = "AIOA"
33
-
34
- allowable_values = [AICA, AIOA] # noqa: E501
35
-
36
- """
37
- Attributes:
38
- openapi_types (dict): The key is attribute name
39
- and the value is attribute type.
40
- attribute_map (dict): The key is attribute name
41
- and the value is json key in definition.
42
- """
43
- openapi_types = {
44
- }
45
-
46
- attribute_map = {
47
- }
48
-
49
- def __init__(self, local_vars_configuration=None): # noqa: E501
50
- """ProductType - a model defined in OpenAPI""" # noqa: E501
51
- if local_vars_configuration is None:
52
- local_vars_configuration = Configuration()
53
- self.local_vars_configuration = local_vars_configuration
54
- self.discriminator = None
55
-
56
- def to_dict(self):
57
- """Returns the model properties as a dict"""
58
- result = {}
59
-
60
- for attr, _ in six.iteritems(self.openapi_types):
61
- value = getattr(self, attr)
62
- if isinstance(value, list):
63
- result[attr] = list(map(
64
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
65
- value
66
- ))
67
- elif hasattr(value, "to_dict"):
68
- result[attr] = value.to_dict()
69
- elif isinstance(value, dict):
70
- result[attr] = dict(map(
71
- lambda item: (item[0], item[1].to_dict())
72
- if hasattr(item[1], "to_dict") else item,
73
- value.items()
74
- ))
75
- else:
76
- result[attr] = value
77
-
78
- return result
79
-
80
- def to_str(self):
81
- """Returns the string representation of the model"""
82
- return pprint.pformat(self.to_dict())
83
-
84
- def __repr__(self):
85
- """For `print` and `pprint`"""
86
- return self.to_str()
87
-
88
- def __eq__(self, other):
89
- """Returns true if both objects are equal"""
90
- if not isinstance(other, ProductType):
91
- return False
92
-
93
- return self.to_dict() == other.to_dict()
94
-
95
- def __ne__(self, other):
96
- """Returns true if both objects are not equal"""
97
- if not isinstance(other, ProductType):
98
- return True
99
-
100
- return self.to_dict() != other.to_dict()