anyscale 0.26.2__py3-none-any.whl → 0.26.3__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.
- anyscale/client/README.md +1 -33
- anyscale/client/openapi_client/__init__.py +0 -20
- anyscale/client/openapi_client/api/default_api.py +114 -1544
- anyscale/client/openapi_client/models/__init__.py +0 -20
- anyscale/version.py +1 -1
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/METADATA +1 -1
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/RECORD +12 -32
- anyscale/client/openapi_client/models/aica_endpoint.py +0 -527
- anyscale/client/openapi_client/models/aica_endpoint_event.py +0 -433
- anyscale/client/openapi_client/models/aica_endpoint_event_level.py +0 -103
- anyscale/client/openapi_client/models/aica_endpoint_event_type.py +0 -120
- anyscale/client/openapi_client/models/aica_endpoint_scope.py +0 -102
- anyscale/client/openapi_client/models/aica_model.py +0 -398
- anyscale/client/openapi_client/models/aica_model_accelerator_map.py +0 -123
- anyscale/client/openapi_client/models/aica_model_configuration.py +0 -209
- anyscale/client/openapi_client/models/aica_observability_urls.py +0 -178
- anyscale/client/openapi_client/models/aicaendpoint_list_response.py +0 -147
- anyscale/client/openapi_client/models/aicaendpoint_response.py +0 -121
- anyscale/client/openapi_client/models/aicaendpointevent_list_response.py +0 -147
- anyscale/client/openapi_client/models/aicamodel_list_response.py +0 -147
- anyscale/client/openapi_client/models/aicamodel_response.py +0 -121
- anyscale/client/openapi_client/models/aws_credentials.py +0 -181
- anyscale/client/openapi_client/models/create_aica_endpoint.py +0 -210
- anyscale/client/openapi_client/models/import_aica_model.py +0 -241
- anyscale/client/openapi_client/models/named_entity.py +0 -148
- anyscale/client/openapi_client/models/update_endpoint.py +0 -152
- anyscale/client/openapi_client/models/update_model_deployment.py +0 -152
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/LICENSE +0 -0
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/NOTICE +0 -0
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/WHEEL +0 -0
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.2.dist-info → anyscale-0.26.3.dist-info}/top_level.txt +0 -0
@@ -1,210 +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 CreateAicaEndpoint(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
|
-
'name': 'str',
|
37
|
-
'cloud_id': 'str',
|
38
|
-
'aviary_version': 'str',
|
39
|
-
'model_config': 'object'
|
40
|
-
}
|
41
|
-
|
42
|
-
attribute_map = {
|
43
|
-
'name': 'name',
|
44
|
-
'cloud_id': 'cloud_id',
|
45
|
-
'aviary_version': 'aviary_version',
|
46
|
-
'model_config': 'model_config'
|
47
|
-
}
|
48
|
-
|
49
|
-
def __init__(self, name=None, cloud_id=None, aviary_version=None, model_config=None, local_vars_configuration=None): # noqa: E501
|
50
|
-
"""CreateAicaEndpoint - 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
|
-
|
55
|
-
self._name = None
|
56
|
-
self._cloud_id = None
|
57
|
-
self._aviary_version = None
|
58
|
-
self._model_config = None
|
59
|
-
self.discriminator = None
|
60
|
-
|
61
|
-
self.name = name
|
62
|
-
self.cloud_id = cloud_id
|
63
|
-
self.aviary_version = aviary_version
|
64
|
-
self.model_config = model_config
|
65
|
-
|
66
|
-
@property
|
67
|
-
def name(self):
|
68
|
-
"""Gets the name of this CreateAicaEndpoint. # noqa: E501
|
69
|
-
|
70
|
-
Name of the endpoint to be created. # noqa: E501
|
71
|
-
|
72
|
-
:return: The name of this CreateAicaEndpoint. # noqa: E501
|
73
|
-
:rtype: str
|
74
|
-
"""
|
75
|
-
return self._name
|
76
|
-
|
77
|
-
@name.setter
|
78
|
-
def name(self, name):
|
79
|
-
"""Sets the name of this CreateAicaEndpoint.
|
80
|
-
|
81
|
-
Name of the endpoint to be created. # noqa: E501
|
82
|
-
|
83
|
-
:param name: The name of this CreateAicaEndpoint. # noqa: E501
|
84
|
-
:type: str
|
85
|
-
"""
|
86
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
87
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
88
|
-
|
89
|
-
self._name = name
|
90
|
-
|
91
|
-
@property
|
92
|
-
def cloud_id(self):
|
93
|
-
"""Gets the cloud_id of this CreateAicaEndpoint. # noqa: E501
|
94
|
-
|
95
|
-
The cloud id for the endpoint. # noqa: E501
|
96
|
-
|
97
|
-
:return: The cloud_id of this CreateAicaEndpoint. # noqa: E501
|
98
|
-
:rtype: str
|
99
|
-
"""
|
100
|
-
return self._cloud_id
|
101
|
-
|
102
|
-
@cloud_id.setter
|
103
|
-
def cloud_id(self, cloud_id):
|
104
|
-
"""Sets the cloud_id of this CreateAicaEndpoint.
|
105
|
-
|
106
|
-
The cloud id for the endpoint. # noqa: E501
|
107
|
-
|
108
|
-
:param cloud_id: The cloud_id of this CreateAicaEndpoint. # noqa: E501
|
109
|
-
:type: str
|
110
|
-
"""
|
111
|
-
if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
|
112
|
-
raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
|
113
|
-
|
114
|
-
self._cloud_id = cloud_id
|
115
|
-
|
116
|
-
@property
|
117
|
-
def aviary_version(self):
|
118
|
-
"""Gets the aviary_version of this CreateAicaEndpoint. # noqa: E501
|
119
|
-
|
120
|
-
The version of aviary that this endpoint is running. # noqa: E501
|
121
|
-
|
122
|
-
:return: The aviary_version of this CreateAicaEndpoint. # noqa: E501
|
123
|
-
:rtype: str
|
124
|
-
"""
|
125
|
-
return self._aviary_version
|
126
|
-
|
127
|
-
@aviary_version.setter
|
128
|
-
def aviary_version(self, aviary_version):
|
129
|
-
"""Sets the aviary_version of this CreateAicaEndpoint.
|
130
|
-
|
131
|
-
The version of aviary that this endpoint is running. # noqa: E501
|
132
|
-
|
133
|
-
:param aviary_version: The aviary_version of this CreateAicaEndpoint. # noqa: E501
|
134
|
-
:type: str
|
135
|
-
"""
|
136
|
-
if self.local_vars_configuration.client_side_validation and aviary_version is None: # noqa: E501
|
137
|
-
raise ValueError("Invalid value for `aviary_version`, must not be `None`") # noqa: E501
|
138
|
-
|
139
|
-
self._aviary_version = aviary_version
|
140
|
-
|
141
|
-
@property
|
142
|
-
def model_config(self):
|
143
|
-
"""Gets the model_config of this CreateAicaEndpoint. # noqa: E501
|
144
|
-
|
145
|
-
The configuration for the endpoints models. Key is the model name. # noqa: E501
|
146
|
-
|
147
|
-
:return: The model_config of this CreateAicaEndpoint. # noqa: E501
|
148
|
-
:rtype: object
|
149
|
-
"""
|
150
|
-
return self._model_config
|
151
|
-
|
152
|
-
@model_config.setter
|
153
|
-
def model_config(self, model_config):
|
154
|
-
"""Sets the model_config of this CreateAicaEndpoint.
|
155
|
-
|
156
|
-
The configuration for the endpoints models. Key is the model name. # noqa: E501
|
157
|
-
|
158
|
-
:param model_config: The model_config of this CreateAicaEndpoint. # noqa: E501
|
159
|
-
:type: object
|
160
|
-
"""
|
161
|
-
if self.local_vars_configuration.client_side_validation and model_config is None: # noqa: E501
|
162
|
-
raise ValueError("Invalid value for `model_config`, must not be `None`") # noqa: E501
|
163
|
-
|
164
|
-
self._model_config = model_config
|
165
|
-
|
166
|
-
def to_dict(self):
|
167
|
-
"""Returns the model properties as a dict"""
|
168
|
-
result = {}
|
169
|
-
|
170
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
171
|
-
value = getattr(self, attr)
|
172
|
-
if isinstance(value, list):
|
173
|
-
result[attr] = list(map(
|
174
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
175
|
-
value
|
176
|
-
))
|
177
|
-
elif hasattr(value, "to_dict"):
|
178
|
-
result[attr] = value.to_dict()
|
179
|
-
elif isinstance(value, dict):
|
180
|
-
result[attr] = dict(map(
|
181
|
-
lambda item: (item[0], item[1].to_dict())
|
182
|
-
if hasattr(item[1], "to_dict") else item,
|
183
|
-
value.items()
|
184
|
-
))
|
185
|
-
else:
|
186
|
-
result[attr] = value
|
187
|
-
|
188
|
-
return result
|
189
|
-
|
190
|
-
def to_str(self):
|
191
|
-
"""Returns the string representation of the model"""
|
192
|
-
return pprint.pformat(self.to_dict())
|
193
|
-
|
194
|
-
def __repr__(self):
|
195
|
-
"""For `print` and `pprint`"""
|
196
|
-
return self.to_str()
|
197
|
-
|
198
|
-
def __eq__(self, other):
|
199
|
-
"""Returns true if both objects are equal"""
|
200
|
-
if not isinstance(other, CreateAicaEndpoint):
|
201
|
-
return False
|
202
|
-
|
203
|
-
return self.to_dict() == other.to_dict()
|
204
|
-
|
205
|
-
def __ne__(self, other):
|
206
|
-
"""Returns true if both objects are not equal"""
|
207
|
-
if not isinstance(other, CreateAicaEndpoint):
|
208
|
-
return True
|
209
|
-
|
210
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,241 +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 ImportAicaModel(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
|
-
'model_object_storage_uri': 'str',
|
38
|
-
'generation_configuration_json': 'object',
|
39
|
-
'params_size_in_billions': 'int',
|
40
|
-
'cloud_id': 'str'
|
41
|
-
}
|
42
|
-
|
43
|
-
attribute_map = {
|
44
|
-
'id': 'id',
|
45
|
-
'model_object_storage_uri': 'model_object_storage_uri',
|
46
|
-
'generation_configuration_json': 'generation_configuration_json',
|
47
|
-
'params_size_in_billions': 'params_size_in_billions',
|
48
|
-
'cloud_id': 'cloud_id'
|
49
|
-
}
|
50
|
-
|
51
|
-
def __init__(self, id=None, model_object_storage_uri=None, generation_configuration_json=None, params_size_in_billions=None, cloud_id=None, local_vars_configuration=None): # noqa: E501
|
52
|
-
"""ImportAicaModel - a model defined in OpenAPI""" # noqa: E501
|
53
|
-
if local_vars_configuration is None:
|
54
|
-
local_vars_configuration = Configuration()
|
55
|
-
self.local_vars_configuration = local_vars_configuration
|
56
|
-
|
57
|
-
self._id = None
|
58
|
-
self._model_object_storage_uri = None
|
59
|
-
self._generation_configuration_json = None
|
60
|
-
self._params_size_in_billions = None
|
61
|
-
self._cloud_id = None
|
62
|
-
self.discriminator = None
|
63
|
-
|
64
|
-
self.id = id
|
65
|
-
if model_object_storage_uri is not None:
|
66
|
-
self.model_object_storage_uri = model_object_storage_uri
|
67
|
-
self.generation_configuration_json = generation_configuration_json
|
68
|
-
self.params_size_in_billions = params_size_in_billions
|
69
|
-
self.cloud_id = cloud_id
|
70
|
-
|
71
|
-
@property
|
72
|
-
def id(self):
|
73
|
-
"""Gets the id of this ImportAicaModel. # noqa: E501
|
74
|
-
|
75
|
-
Name of the model to be imported. # noqa: E501
|
76
|
-
|
77
|
-
:return: The id of this ImportAicaModel. # noqa: E501
|
78
|
-
:rtype: str
|
79
|
-
"""
|
80
|
-
return self._id
|
81
|
-
|
82
|
-
@id.setter
|
83
|
-
def id(self, id):
|
84
|
-
"""Sets the id of this ImportAicaModel.
|
85
|
-
|
86
|
-
Name of the model to be imported. # noqa: E501
|
87
|
-
|
88
|
-
:param id: The id of this ImportAicaModel. # noqa: E501
|
89
|
-
:type: str
|
90
|
-
"""
|
91
|
-
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
|
92
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
93
|
-
|
94
|
-
self._id = id
|
95
|
-
|
96
|
-
@property
|
97
|
-
def model_object_storage_uri(self):
|
98
|
-
"""Gets the model_object_storage_uri of this ImportAicaModel. # noqa: E501
|
99
|
-
|
100
|
-
The URI of the model object in the object storage. # noqa: E501
|
101
|
-
|
102
|
-
:return: The model_object_storage_uri of this ImportAicaModel. # noqa: E501
|
103
|
-
:rtype: str
|
104
|
-
"""
|
105
|
-
return self._model_object_storage_uri
|
106
|
-
|
107
|
-
@model_object_storage_uri.setter
|
108
|
-
def model_object_storage_uri(self, model_object_storage_uri):
|
109
|
-
"""Sets the model_object_storage_uri of this ImportAicaModel.
|
110
|
-
|
111
|
-
The URI of the model object in the object storage. # noqa: E501
|
112
|
-
|
113
|
-
:param model_object_storage_uri: The model_object_storage_uri of this ImportAicaModel. # noqa: E501
|
114
|
-
:type: str
|
115
|
-
"""
|
116
|
-
|
117
|
-
self._model_object_storage_uri = model_object_storage_uri
|
118
|
-
|
119
|
-
@property
|
120
|
-
def generation_configuration_json(self):
|
121
|
-
"""Gets the generation_configuration_json of this ImportAicaModel. # noqa: E501
|
122
|
-
|
123
|
-
The configuration for the generation section. # noqa: E501
|
124
|
-
|
125
|
-
:return: The generation_configuration_json of this ImportAicaModel. # noqa: E501
|
126
|
-
:rtype: object
|
127
|
-
"""
|
128
|
-
return self._generation_configuration_json
|
129
|
-
|
130
|
-
@generation_configuration_json.setter
|
131
|
-
def generation_configuration_json(self, generation_configuration_json):
|
132
|
-
"""Sets the generation_configuration_json of this ImportAicaModel.
|
133
|
-
|
134
|
-
The configuration for the generation section. # noqa: E501
|
135
|
-
|
136
|
-
:param generation_configuration_json: The generation_configuration_json of this ImportAicaModel. # noqa: E501
|
137
|
-
:type: object
|
138
|
-
"""
|
139
|
-
if self.local_vars_configuration.client_side_validation and generation_configuration_json is None: # noqa: E501
|
140
|
-
raise ValueError("Invalid value for `generation_configuration_json`, must not be `None`") # noqa: E501
|
141
|
-
|
142
|
-
self._generation_configuration_json = generation_configuration_json
|
143
|
-
|
144
|
-
@property
|
145
|
-
def params_size_in_billions(self):
|
146
|
-
"""Gets the params_size_in_billions of this ImportAicaModel. # noqa: E501
|
147
|
-
|
148
|
-
User provided model parameter size in billions. This value will be used to provide the default rayllm serving configurations of the model. # noqa: E501
|
149
|
-
|
150
|
-
:return: The params_size_in_billions of this ImportAicaModel. # noqa: E501
|
151
|
-
:rtype: int
|
152
|
-
"""
|
153
|
-
return self._params_size_in_billions
|
154
|
-
|
155
|
-
@params_size_in_billions.setter
|
156
|
-
def params_size_in_billions(self, params_size_in_billions):
|
157
|
-
"""Sets the params_size_in_billions of this ImportAicaModel.
|
158
|
-
|
159
|
-
User provided model parameter size in billions. This value will be used to provide the default rayllm serving configurations of the model. # noqa: E501
|
160
|
-
|
161
|
-
:param params_size_in_billions: The params_size_in_billions of this ImportAicaModel. # noqa: E501
|
162
|
-
:type: int
|
163
|
-
"""
|
164
|
-
if self.local_vars_configuration.client_side_validation and params_size_in_billions is None: # noqa: E501
|
165
|
-
raise ValueError("Invalid value for `params_size_in_billions`, must not be `None`") # noqa: E501
|
166
|
-
if (self.local_vars_configuration.client_side_validation and
|
167
|
-
params_size_in_billions is not None and params_size_in_billions < 0): # noqa: E501
|
168
|
-
raise ValueError("Invalid value for `params_size_in_billions`, must be a value greater than or equal to `0`") # noqa: E501
|
169
|
-
|
170
|
-
self._params_size_in_billions = params_size_in_billions
|
171
|
-
|
172
|
-
@property
|
173
|
-
def cloud_id(self):
|
174
|
-
"""Gets the cloud_id of this ImportAicaModel. # noqa: E501
|
175
|
-
|
176
|
-
The cloud id for the model. # noqa: E501
|
177
|
-
|
178
|
-
:return: The cloud_id of this ImportAicaModel. # noqa: E501
|
179
|
-
:rtype: str
|
180
|
-
"""
|
181
|
-
return self._cloud_id
|
182
|
-
|
183
|
-
@cloud_id.setter
|
184
|
-
def cloud_id(self, cloud_id):
|
185
|
-
"""Sets the cloud_id of this ImportAicaModel.
|
186
|
-
|
187
|
-
The cloud id for the model. # noqa: E501
|
188
|
-
|
189
|
-
:param cloud_id: The cloud_id of this ImportAicaModel. # noqa: E501
|
190
|
-
:type: str
|
191
|
-
"""
|
192
|
-
if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
|
193
|
-
raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
|
194
|
-
|
195
|
-
self._cloud_id = cloud_id
|
196
|
-
|
197
|
-
def to_dict(self):
|
198
|
-
"""Returns the model properties as a dict"""
|
199
|
-
result = {}
|
200
|
-
|
201
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
202
|
-
value = getattr(self, attr)
|
203
|
-
if isinstance(value, list):
|
204
|
-
result[attr] = list(map(
|
205
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
206
|
-
value
|
207
|
-
))
|
208
|
-
elif hasattr(value, "to_dict"):
|
209
|
-
result[attr] = value.to_dict()
|
210
|
-
elif isinstance(value, dict):
|
211
|
-
result[attr] = dict(map(
|
212
|
-
lambda item: (item[0], item[1].to_dict())
|
213
|
-
if hasattr(item[1], "to_dict") else item,
|
214
|
-
value.items()
|
215
|
-
))
|
216
|
-
else:
|
217
|
-
result[attr] = value
|
218
|
-
|
219
|
-
return result
|
220
|
-
|
221
|
-
def to_str(self):
|
222
|
-
"""Returns the string representation of the model"""
|
223
|
-
return pprint.pformat(self.to_dict())
|
224
|
-
|
225
|
-
def __repr__(self):
|
226
|
-
"""For `print` and `pprint`"""
|
227
|
-
return self.to_str()
|
228
|
-
|
229
|
-
def __eq__(self, other):
|
230
|
-
"""Returns true if both objects are equal"""
|
231
|
-
if not isinstance(other, ImportAicaModel):
|
232
|
-
return False
|
233
|
-
|
234
|
-
return self.to_dict() == other.to_dict()
|
235
|
-
|
236
|
-
def __ne__(self, other):
|
237
|
-
"""Returns true if both objects are not equal"""
|
238
|
-
if not isinstance(other, ImportAicaModel):
|
239
|
-
return True
|
240
|
-
|
241
|
-
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 NamedEntity(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
|
-
'name': 'str',
|
37
|
-
'id': 'str'
|
38
|
-
}
|
39
|
-
|
40
|
-
attribute_map = {
|
41
|
-
'name': 'name',
|
42
|
-
'id': 'id'
|
43
|
-
}
|
44
|
-
|
45
|
-
def __init__(self, name=None, id=None, local_vars_configuration=None): # noqa: E501
|
46
|
-
"""NamedEntity - 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._name = None
|
52
|
-
self._id = None
|
53
|
-
self.discriminator = None
|
54
|
-
|
55
|
-
self.name = name
|
56
|
-
self.id = id
|
57
|
-
|
58
|
-
@property
|
59
|
-
def name(self):
|
60
|
-
"""Gets the name of this NamedEntity. # noqa: E501
|
61
|
-
|
62
|
-
|
63
|
-
:return: The name of this NamedEntity. # noqa: E501
|
64
|
-
:rtype: str
|
65
|
-
"""
|
66
|
-
return self._name
|
67
|
-
|
68
|
-
@name.setter
|
69
|
-
def name(self, name):
|
70
|
-
"""Sets the name of this NamedEntity.
|
71
|
-
|
72
|
-
|
73
|
-
:param name: The name of this NamedEntity. # noqa: E501
|
74
|
-
:type: str
|
75
|
-
"""
|
76
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
77
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
78
|
-
|
79
|
-
self._name = name
|
80
|
-
|
81
|
-
@property
|
82
|
-
def id(self):
|
83
|
-
"""Gets the id of this NamedEntity. # noqa: E501
|
84
|
-
|
85
|
-
|
86
|
-
:return: The id of this NamedEntity. # noqa: E501
|
87
|
-
:rtype: str
|
88
|
-
"""
|
89
|
-
return self._id
|
90
|
-
|
91
|
-
@id.setter
|
92
|
-
def id(self, id):
|
93
|
-
"""Sets the id of this NamedEntity.
|
94
|
-
|
95
|
-
|
96
|
-
:param id: The id of this NamedEntity. # noqa: E501
|
97
|
-
:type: str
|
98
|
-
"""
|
99
|
-
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
|
100
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
101
|
-
|
102
|
-
self._id = id
|
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, NamedEntity):
|
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, NamedEntity):
|
146
|
-
return True
|
147
|
-
|
148
|
-
return self.to_dict() != other.to_dict()
|