anyscale 0.26.32__py3-none-any.whl → 0.26.34__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/api.py +22 -0
- anyscale/aws_iam_policies.py +0 -3
- anyscale/client/README.md +20 -2
- anyscale/client/openapi_client/__init__.py +15 -1
- anyscale/client/openapi_client/api/default_api.py +625 -167
- anyscale/client/openapi_client/models/__init__.py +15 -1
- anyscale/client/openapi_client/models/cli_usage_payload.py +440 -0
- anyscale/client/openapi_client/models/cloud_deployment.py +31 -30
- anyscale/client/openapi_client/models/commit_ledger_item_type.py +111 -0
- anyscale/client/openapi_client/models/commit_ledger_record_v2.py +207 -0
- anyscale/client/openapi_client/models/complexity_level.py +101 -0
- anyscale/client/openapi_client/models/credit_grant_record_v2.py +181 -0
- anyscale/client/openapi_client/models/credit_ledger_item_type.py +104 -0
- anyscale/client/openapi_client/models/credit_ledger_record_v2.py +207 -0
- anyscale/client/openapi_client/models/credit_record_commit_v2.py +410 -0
- anyscale/client/openapi_client/models/credit_record_credit_v2.py +410 -0
- anyscale/client/openapi_client/models/credit_type.py +100 -0
- anyscale/client/openapi_client/models/credits_v2.py +355 -0
- anyscale/client/openapi_client/models/partition_info.py +152 -0
- anyscale/client/openapi_client/models/{pcp_config.py → summarize_machine_pool_request.py} +13 -12
- anyscale/client/openapi_client/models/summarize_machine_pool_response.py +181 -0
- anyscale/client/openapi_client/models/summarizemachinepoolresponse_response.py +121 -0
- anyscale/client/openapi_client/models/workspace_template.py +115 -3
- anyscale/client/openapi_client/models/workspace_template_readme.py +88 -3
- anyscale/commands/cloud_commands.py +12 -9
- anyscale/commands/command_examples.py +23 -6
- anyscale/commands/list_util.py +100 -38
- anyscale/integrations.py +0 -20
- anyscale/scripts.py +1 -0
- anyscale/shared_anyscale_utils/headers.py +4 -0
- anyscale/telemetry.py +424 -0
- anyscale/version.py +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/METADATA +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/RECORD +39 -24
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/LICENSE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/NOTICE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/WHEEL +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,111 @@
|
|
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 CommitLedgerItemType(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
|
+
PREPAID_COMMIT_SEGMENT_START = "PREPAID_COMMIT_SEGMENT_START"
|
32
|
+
PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
|
33
|
+
PREPAID_COMMIT_ROLLOVER = "PREPAID_COMMIT_ROLLOVER"
|
34
|
+
PREPAID_COMMIT_EXPIRATION = "PREPAID_COMMIT_EXPIRATION"
|
35
|
+
PREPAID_COMMIT_CANCELED = "PREPAID_COMMIT_CANCELED"
|
36
|
+
PREPAID_COMMIT_CREDITED = "PREPAID_COMMIT_CREDITED"
|
37
|
+
POSTPAID_COMMIT_INITIAL_BALANCE = "POSTPAID_COMMIT_INITIAL_BALANCE"
|
38
|
+
POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
|
39
|
+
POSTPAID_COMMIT_ROLLOVER = "POSTPAID_COMMIT_ROLLOVER"
|
40
|
+
POSTPAID_COMMIT_TRUEUP = "POSTPAID_COMMIT_TRUEUP"
|
41
|
+
PREPAID_COMMIT_MANUAL = "PREPAID_COMMIT_MANUAL"
|
42
|
+
POSTPAID_COMMIT_MANUAL = "POSTPAID_COMMIT_MANUAL"
|
43
|
+
POSTPAID_COMMIT_EXPIRATION = "POSTPAID_COMMIT_EXPIRATION"
|
44
|
+
|
45
|
+
allowable_values = [PREPAID_COMMIT_SEGMENT_START, PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION, PREPAID_COMMIT_ROLLOVER, PREPAID_COMMIT_EXPIRATION, PREPAID_COMMIT_CANCELED, PREPAID_COMMIT_CREDITED, POSTPAID_COMMIT_INITIAL_BALANCE, POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION, POSTPAID_COMMIT_ROLLOVER, POSTPAID_COMMIT_TRUEUP, PREPAID_COMMIT_MANUAL, POSTPAID_COMMIT_MANUAL, POSTPAID_COMMIT_EXPIRATION] # noqa: E501
|
46
|
+
|
47
|
+
"""
|
48
|
+
Attributes:
|
49
|
+
openapi_types (dict): The key is attribute name
|
50
|
+
and the value is attribute type.
|
51
|
+
attribute_map (dict): The key is attribute name
|
52
|
+
and the value is json key in definition.
|
53
|
+
"""
|
54
|
+
openapi_types = {
|
55
|
+
}
|
56
|
+
|
57
|
+
attribute_map = {
|
58
|
+
}
|
59
|
+
|
60
|
+
def __init__(self, local_vars_configuration=None): # noqa: E501
|
61
|
+
"""CommitLedgerItemType - a model defined in OpenAPI""" # noqa: E501
|
62
|
+
if local_vars_configuration is None:
|
63
|
+
local_vars_configuration = Configuration()
|
64
|
+
self.local_vars_configuration = local_vars_configuration
|
65
|
+
self.discriminator = None
|
66
|
+
|
67
|
+
def to_dict(self):
|
68
|
+
"""Returns the model properties as a dict"""
|
69
|
+
result = {}
|
70
|
+
|
71
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
72
|
+
value = getattr(self, attr)
|
73
|
+
if isinstance(value, list):
|
74
|
+
result[attr] = list(map(
|
75
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
76
|
+
value
|
77
|
+
))
|
78
|
+
elif hasattr(value, "to_dict"):
|
79
|
+
result[attr] = value.to_dict()
|
80
|
+
elif isinstance(value, dict):
|
81
|
+
result[attr] = dict(map(
|
82
|
+
lambda item: (item[0], item[1].to_dict())
|
83
|
+
if hasattr(item[1], "to_dict") else item,
|
84
|
+
value.items()
|
85
|
+
))
|
86
|
+
else:
|
87
|
+
result[attr] = value
|
88
|
+
|
89
|
+
return result
|
90
|
+
|
91
|
+
def to_str(self):
|
92
|
+
"""Returns the string representation of the model"""
|
93
|
+
return pprint.pformat(self.to_dict())
|
94
|
+
|
95
|
+
def __repr__(self):
|
96
|
+
"""For `print` and `pprint`"""
|
97
|
+
return self.to_str()
|
98
|
+
|
99
|
+
def __eq__(self, other):
|
100
|
+
"""Returns true if both objects are equal"""
|
101
|
+
if not isinstance(other, CommitLedgerItemType):
|
102
|
+
return False
|
103
|
+
|
104
|
+
return self.to_dict() == other.to_dict()
|
105
|
+
|
106
|
+
def __ne__(self, other):
|
107
|
+
"""Returns true if both objects are not equal"""
|
108
|
+
if not isinstance(other, CommitLedgerItemType):
|
109
|
+
return True
|
110
|
+
|
111
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,207 @@
|
|
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 CommitLedgerRecordV2(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
|
+
'ledger_record_type': 'CreditType',
|
37
|
+
'amount_usd': 'float',
|
38
|
+
'timestamp': 'datetime',
|
39
|
+
'commit_ledger_item_type': 'CommitLedgerItemType'
|
40
|
+
}
|
41
|
+
|
42
|
+
attribute_map = {
|
43
|
+
'ledger_record_type': 'ledger_record_type',
|
44
|
+
'amount_usd': 'amount_usd',
|
45
|
+
'timestamp': 'timestamp',
|
46
|
+
'commit_ledger_item_type': 'commit_ledger_item_type'
|
47
|
+
}
|
48
|
+
|
49
|
+
def __init__(self, ledger_record_type=None, amount_usd=None, timestamp=None, commit_ledger_item_type=None, local_vars_configuration=None): # noqa: E501
|
50
|
+
"""CommitLedgerRecordV2 - 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._ledger_record_type = None
|
56
|
+
self._amount_usd = None
|
57
|
+
self._timestamp = None
|
58
|
+
self._commit_ledger_item_type = None
|
59
|
+
self.discriminator = None
|
60
|
+
|
61
|
+
if ledger_record_type is not None:
|
62
|
+
self.ledger_record_type = ledger_record_type
|
63
|
+
self.amount_usd = amount_usd
|
64
|
+
self.timestamp = timestamp
|
65
|
+
self.commit_ledger_item_type = commit_ledger_item_type
|
66
|
+
|
67
|
+
@property
|
68
|
+
def ledger_record_type(self):
|
69
|
+
"""Gets the ledger_record_type of this CommitLedgerRecordV2. # noqa: E501
|
70
|
+
|
71
|
+
|
72
|
+
:return: The ledger_record_type of this CommitLedgerRecordV2. # noqa: E501
|
73
|
+
:rtype: CreditType
|
74
|
+
"""
|
75
|
+
return self._ledger_record_type
|
76
|
+
|
77
|
+
@ledger_record_type.setter
|
78
|
+
def ledger_record_type(self, ledger_record_type):
|
79
|
+
"""Sets the ledger_record_type of this CommitLedgerRecordV2.
|
80
|
+
|
81
|
+
|
82
|
+
:param ledger_record_type: The ledger_record_type of this CommitLedgerRecordV2. # noqa: E501
|
83
|
+
:type: CreditType
|
84
|
+
"""
|
85
|
+
|
86
|
+
self._ledger_record_type = ledger_record_type
|
87
|
+
|
88
|
+
@property
|
89
|
+
def amount_usd(self):
|
90
|
+
"""Gets the amount_usd of this CommitLedgerRecordV2. # noqa: E501
|
91
|
+
|
92
|
+
Amount of USD added or removed from the credit. # noqa: E501
|
93
|
+
|
94
|
+
:return: The amount_usd of this CommitLedgerRecordV2. # noqa: E501
|
95
|
+
:rtype: float
|
96
|
+
"""
|
97
|
+
return self._amount_usd
|
98
|
+
|
99
|
+
@amount_usd.setter
|
100
|
+
def amount_usd(self, amount_usd):
|
101
|
+
"""Sets the amount_usd of this CommitLedgerRecordV2.
|
102
|
+
|
103
|
+
Amount of USD added or removed from the credit. # noqa: E501
|
104
|
+
|
105
|
+
:param amount_usd: The amount_usd of this CommitLedgerRecordV2. # noqa: E501
|
106
|
+
:type: float
|
107
|
+
"""
|
108
|
+
if self.local_vars_configuration.client_side_validation and amount_usd is None: # noqa: E501
|
109
|
+
raise ValueError("Invalid value for `amount_usd`, must not be `None`") # noqa: E501
|
110
|
+
|
111
|
+
self._amount_usd = amount_usd
|
112
|
+
|
113
|
+
@property
|
114
|
+
def timestamp(self):
|
115
|
+
"""Gets the timestamp of this CommitLedgerRecordV2. # noqa: E501
|
116
|
+
|
117
|
+
UTC timestamp of when the record occurred. # noqa: E501
|
118
|
+
|
119
|
+
:return: The timestamp of this CommitLedgerRecordV2. # noqa: E501
|
120
|
+
:rtype: datetime
|
121
|
+
"""
|
122
|
+
return self._timestamp
|
123
|
+
|
124
|
+
@timestamp.setter
|
125
|
+
def timestamp(self, timestamp):
|
126
|
+
"""Sets the timestamp of this CommitLedgerRecordV2.
|
127
|
+
|
128
|
+
UTC timestamp of when the record occurred. # noqa: E501
|
129
|
+
|
130
|
+
:param timestamp: The timestamp of this CommitLedgerRecordV2. # noqa: E501
|
131
|
+
:type: datetime
|
132
|
+
"""
|
133
|
+
if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501
|
134
|
+
raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
|
135
|
+
|
136
|
+
self._timestamp = timestamp
|
137
|
+
|
138
|
+
@property
|
139
|
+
def commit_ledger_item_type(self):
|
140
|
+
"""Gets the commit_ledger_item_type of this CommitLedgerRecordV2. # noqa: E501
|
141
|
+
|
142
|
+
Type of commit ledger item. # noqa: E501
|
143
|
+
|
144
|
+
:return: The commit_ledger_item_type of this CommitLedgerRecordV2. # noqa: E501
|
145
|
+
:rtype: CommitLedgerItemType
|
146
|
+
"""
|
147
|
+
return self._commit_ledger_item_type
|
148
|
+
|
149
|
+
@commit_ledger_item_type.setter
|
150
|
+
def commit_ledger_item_type(self, commit_ledger_item_type):
|
151
|
+
"""Sets the commit_ledger_item_type of this CommitLedgerRecordV2.
|
152
|
+
|
153
|
+
Type of commit ledger item. # noqa: E501
|
154
|
+
|
155
|
+
:param commit_ledger_item_type: The commit_ledger_item_type of this CommitLedgerRecordV2. # noqa: E501
|
156
|
+
:type: CommitLedgerItemType
|
157
|
+
"""
|
158
|
+
if self.local_vars_configuration.client_side_validation and commit_ledger_item_type is None: # noqa: E501
|
159
|
+
raise ValueError("Invalid value for `commit_ledger_item_type`, must not be `None`") # noqa: E501
|
160
|
+
|
161
|
+
self._commit_ledger_item_type = commit_ledger_item_type
|
162
|
+
|
163
|
+
def to_dict(self):
|
164
|
+
"""Returns the model properties as a dict"""
|
165
|
+
result = {}
|
166
|
+
|
167
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
168
|
+
value = getattr(self, attr)
|
169
|
+
if isinstance(value, list):
|
170
|
+
result[attr] = list(map(
|
171
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
172
|
+
value
|
173
|
+
))
|
174
|
+
elif hasattr(value, "to_dict"):
|
175
|
+
result[attr] = value.to_dict()
|
176
|
+
elif isinstance(value, dict):
|
177
|
+
result[attr] = dict(map(
|
178
|
+
lambda item: (item[0], item[1].to_dict())
|
179
|
+
if hasattr(item[1], "to_dict") else item,
|
180
|
+
value.items()
|
181
|
+
))
|
182
|
+
else:
|
183
|
+
result[attr] = value
|
184
|
+
|
185
|
+
return result
|
186
|
+
|
187
|
+
def to_str(self):
|
188
|
+
"""Returns the string representation of the model"""
|
189
|
+
return pprint.pformat(self.to_dict())
|
190
|
+
|
191
|
+
def __repr__(self):
|
192
|
+
"""For `print` and `pprint`"""
|
193
|
+
return self.to_str()
|
194
|
+
|
195
|
+
def __eq__(self, other):
|
196
|
+
"""Returns true if both objects are equal"""
|
197
|
+
if not isinstance(other, CommitLedgerRecordV2):
|
198
|
+
return False
|
199
|
+
|
200
|
+
return self.to_dict() == other.to_dict()
|
201
|
+
|
202
|
+
def __ne__(self, other):
|
203
|
+
"""Returns true if both objects are not equal"""
|
204
|
+
if not isinstance(other, CommitLedgerRecordV2):
|
205
|
+
return True
|
206
|
+
|
207
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,101 @@
|
|
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 ComplexityLevel(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
|
+
BEGINNER = "Beginner"
|
32
|
+
INTERMEDIATE = "Intermediate"
|
33
|
+
ADVANCED = "Advanced"
|
34
|
+
|
35
|
+
allowable_values = [BEGINNER, INTERMEDIATE, ADVANCED] # noqa: E501
|
36
|
+
|
37
|
+
"""
|
38
|
+
Attributes:
|
39
|
+
openapi_types (dict): The key is attribute name
|
40
|
+
and the value is attribute type.
|
41
|
+
attribute_map (dict): The key is attribute name
|
42
|
+
and the value is json key in definition.
|
43
|
+
"""
|
44
|
+
openapi_types = {
|
45
|
+
}
|
46
|
+
|
47
|
+
attribute_map = {
|
48
|
+
}
|
49
|
+
|
50
|
+
def __init__(self, local_vars_configuration=None): # noqa: E501
|
51
|
+
"""ComplexityLevel - a model defined in OpenAPI""" # noqa: E501
|
52
|
+
if local_vars_configuration is None:
|
53
|
+
local_vars_configuration = Configuration()
|
54
|
+
self.local_vars_configuration = local_vars_configuration
|
55
|
+
self.discriminator = None
|
56
|
+
|
57
|
+
def to_dict(self):
|
58
|
+
"""Returns the model properties as a dict"""
|
59
|
+
result = {}
|
60
|
+
|
61
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
62
|
+
value = getattr(self, attr)
|
63
|
+
if isinstance(value, list):
|
64
|
+
result[attr] = list(map(
|
65
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
66
|
+
value
|
67
|
+
))
|
68
|
+
elif hasattr(value, "to_dict"):
|
69
|
+
result[attr] = value.to_dict()
|
70
|
+
elif isinstance(value, dict):
|
71
|
+
result[attr] = dict(map(
|
72
|
+
lambda item: (item[0], item[1].to_dict())
|
73
|
+
if hasattr(item[1], "to_dict") else item,
|
74
|
+
value.items()
|
75
|
+
))
|
76
|
+
else:
|
77
|
+
result[attr] = value
|
78
|
+
|
79
|
+
return result
|
80
|
+
|
81
|
+
def to_str(self):
|
82
|
+
"""Returns the string representation of the model"""
|
83
|
+
return pprint.pformat(self.to_dict())
|
84
|
+
|
85
|
+
def __repr__(self):
|
86
|
+
"""For `print` and `pprint`"""
|
87
|
+
return self.to_str()
|
88
|
+
|
89
|
+
def __eq__(self, other):
|
90
|
+
"""Returns true if both objects are equal"""
|
91
|
+
if not isinstance(other, ComplexityLevel):
|
92
|
+
return False
|
93
|
+
|
94
|
+
return self.to_dict() == other.to_dict()
|
95
|
+
|
96
|
+
def __ne__(self, other):
|
97
|
+
"""Returns true if both objects are not equal"""
|
98
|
+
if not isinstance(other, ComplexityLevel):
|
99
|
+
return True
|
100
|
+
|
101
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,181 @@
|
|
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 CreditGrantRecordV2(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
|
+
'amount_usd': 'float',
|
37
|
+
'effective_date_start': 'date',
|
38
|
+
'effective_date_end': 'date'
|
39
|
+
}
|
40
|
+
|
41
|
+
attribute_map = {
|
42
|
+
'amount_usd': 'amount_usd',
|
43
|
+
'effective_date_start': 'effective_date_start',
|
44
|
+
'effective_date_end': 'effective_date_end'
|
45
|
+
}
|
46
|
+
|
47
|
+
def __init__(self, amount_usd=None, effective_date_start=None, effective_date_end=None, local_vars_configuration=None): # noqa: E501
|
48
|
+
"""CreditGrantRecordV2 - 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._amount_usd = None
|
54
|
+
self._effective_date_start = None
|
55
|
+
self._effective_date_end = None
|
56
|
+
self.discriminator = None
|
57
|
+
|
58
|
+
self.amount_usd = amount_usd
|
59
|
+
self.effective_date_start = effective_date_start
|
60
|
+
self.effective_date_end = effective_date_end
|
61
|
+
|
62
|
+
@property
|
63
|
+
def amount_usd(self):
|
64
|
+
"""Gets the amount_usd of this CreditGrantRecordV2. # noqa: E501
|
65
|
+
|
66
|
+
Amount of USD available to use from the credit. # noqa: E501
|
67
|
+
|
68
|
+
:return: The amount_usd of this CreditGrantRecordV2. # noqa: E501
|
69
|
+
:rtype: float
|
70
|
+
"""
|
71
|
+
return self._amount_usd
|
72
|
+
|
73
|
+
@amount_usd.setter
|
74
|
+
def amount_usd(self, amount_usd):
|
75
|
+
"""Sets the amount_usd of this CreditGrantRecordV2.
|
76
|
+
|
77
|
+
Amount of USD available to use from the credit. # noqa: E501
|
78
|
+
|
79
|
+
:param amount_usd: The amount_usd of this CreditGrantRecordV2. # noqa: E501
|
80
|
+
:type: float
|
81
|
+
"""
|
82
|
+
if self.local_vars_configuration.client_side_validation and amount_usd is None: # noqa: E501
|
83
|
+
raise ValueError("Invalid value for `amount_usd`, must not be `None`") # noqa: E501
|
84
|
+
|
85
|
+
self._amount_usd = amount_usd
|
86
|
+
|
87
|
+
@property
|
88
|
+
def effective_date_start(self):
|
89
|
+
"""Gets the effective_date_start of this CreditGrantRecordV2. # noqa: E501
|
90
|
+
|
91
|
+
UTC date the credit can first be used (inclusive). # noqa: E501
|
92
|
+
|
93
|
+
:return: The effective_date_start of this CreditGrantRecordV2. # noqa: E501
|
94
|
+
:rtype: date
|
95
|
+
"""
|
96
|
+
return self._effective_date_start
|
97
|
+
|
98
|
+
@effective_date_start.setter
|
99
|
+
def effective_date_start(self, effective_date_start):
|
100
|
+
"""Sets the effective_date_start of this CreditGrantRecordV2.
|
101
|
+
|
102
|
+
UTC date the credit can first be used (inclusive). # noqa: E501
|
103
|
+
|
104
|
+
:param effective_date_start: The effective_date_start of this CreditGrantRecordV2. # noqa: E501
|
105
|
+
:type: date
|
106
|
+
"""
|
107
|
+
if self.local_vars_configuration.client_side_validation and effective_date_start is None: # noqa: E501
|
108
|
+
raise ValueError("Invalid value for `effective_date_start`, must not be `None`") # noqa: E501
|
109
|
+
|
110
|
+
self._effective_date_start = effective_date_start
|
111
|
+
|
112
|
+
@property
|
113
|
+
def effective_date_end(self):
|
114
|
+
"""Gets the effective_date_end of this CreditGrantRecordV2. # noqa: E501
|
115
|
+
|
116
|
+
UTC date the credit can last be used (inclusive). # noqa: E501
|
117
|
+
|
118
|
+
:return: The effective_date_end of this CreditGrantRecordV2. # noqa: E501
|
119
|
+
:rtype: date
|
120
|
+
"""
|
121
|
+
return self._effective_date_end
|
122
|
+
|
123
|
+
@effective_date_end.setter
|
124
|
+
def effective_date_end(self, effective_date_end):
|
125
|
+
"""Sets the effective_date_end of this CreditGrantRecordV2.
|
126
|
+
|
127
|
+
UTC date the credit can last be used (inclusive). # noqa: E501
|
128
|
+
|
129
|
+
:param effective_date_end: The effective_date_end of this CreditGrantRecordV2. # noqa: E501
|
130
|
+
:type: date
|
131
|
+
"""
|
132
|
+
if self.local_vars_configuration.client_side_validation and effective_date_end is None: # noqa: E501
|
133
|
+
raise ValueError("Invalid value for `effective_date_end`, must not be `None`") # noqa: E501
|
134
|
+
|
135
|
+
self._effective_date_end = effective_date_end
|
136
|
+
|
137
|
+
def to_dict(self):
|
138
|
+
"""Returns the model properties as a dict"""
|
139
|
+
result = {}
|
140
|
+
|
141
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
142
|
+
value = getattr(self, attr)
|
143
|
+
if isinstance(value, list):
|
144
|
+
result[attr] = list(map(
|
145
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
146
|
+
value
|
147
|
+
))
|
148
|
+
elif hasattr(value, "to_dict"):
|
149
|
+
result[attr] = value.to_dict()
|
150
|
+
elif isinstance(value, dict):
|
151
|
+
result[attr] = dict(map(
|
152
|
+
lambda item: (item[0], item[1].to_dict())
|
153
|
+
if hasattr(item[1], "to_dict") else item,
|
154
|
+
value.items()
|
155
|
+
))
|
156
|
+
else:
|
157
|
+
result[attr] = value
|
158
|
+
|
159
|
+
return result
|
160
|
+
|
161
|
+
def to_str(self):
|
162
|
+
"""Returns the string representation of the model"""
|
163
|
+
return pprint.pformat(self.to_dict())
|
164
|
+
|
165
|
+
def __repr__(self):
|
166
|
+
"""For `print` and `pprint`"""
|
167
|
+
return self.to_str()
|
168
|
+
|
169
|
+
def __eq__(self, other):
|
170
|
+
"""Returns true if both objects are equal"""
|
171
|
+
if not isinstance(other, CreditGrantRecordV2):
|
172
|
+
return False
|
173
|
+
|
174
|
+
return self.to_dict() == other.to_dict()
|
175
|
+
|
176
|
+
def __ne__(self, other):
|
177
|
+
"""Returns true if both objects are not equal"""
|
178
|
+
if not isinstance(other, CreditGrantRecordV2):
|
179
|
+
return True
|
180
|
+
|
181
|
+
return self.to_dict() != other.to_dict()
|