anyscale 0.26.32__py3-none-any.whl → 0.26.33__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 +15 -1
- anyscale/client/openapi_client/__init__.py +11 -0
- anyscale/client/openapi_client/api/default_api.py +454 -114
- anyscale/client/openapi_client/models/__init__.py +11 -0
- anyscale/client/openapi_client/models/cli_usage_payload.py +440 -0
- 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/workspace_template.py +115 -3
- anyscale/client/openapi_client/models/workspace_template_readme.py +59 -3
- 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.33.dist-info}/METADATA +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/RECORD +32 -20
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/LICENSE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/NOTICE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/WHEEL +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/top_level.txt +0 -0
@@ -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 CreditLedgerRecordV2(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
|
+
'credit_ledger_item_type': 'CreditLedgerItemType'
|
40
|
+
}
|
41
|
+
|
42
|
+
attribute_map = {
|
43
|
+
'ledger_record_type': 'ledger_record_type',
|
44
|
+
'amount_usd': 'amount_usd',
|
45
|
+
'timestamp': 'timestamp',
|
46
|
+
'credit_ledger_item_type': 'credit_ledger_item_type'
|
47
|
+
}
|
48
|
+
|
49
|
+
def __init__(self, ledger_record_type=None, amount_usd=None, timestamp=None, credit_ledger_item_type=None, local_vars_configuration=None): # noqa: E501
|
50
|
+
"""CreditLedgerRecordV2 - 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._credit_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.credit_ledger_item_type = credit_ledger_item_type
|
66
|
+
|
67
|
+
@property
|
68
|
+
def ledger_record_type(self):
|
69
|
+
"""Gets the ledger_record_type of this CreditLedgerRecordV2. # noqa: E501
|
70
|
+
|
71
|
+
|
72
|
+
:return: The ledger_record_type of this CreditLedgerRecordV2. # 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 CreditLedgerRecordV2.
|
80
|
+
|
81
|
+
|
82
|
+
:param ledger_record_type: The ledger_record_type of this CreditLedgerRecordV2. # 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 CreditLedgerRecordV2. # noqa: E501
|
91
|
+
|
92
|
+
Amount of USD added or removed from the credit. # noqa: E501
|
93
|
+
|
94
|
+
:return: The amount_usd of this CreditLedgerRecordV2. # 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 CreditLedgerRecordV2.
|
102
|
+
|
103
|
+
Amount of USD added or removed from the credit. # noqa: E501
|
104
|
+
|
105
|
+
:param amount_usd: The amount_usd of this CreditLedgerRecordV2. # 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 CreditLedgerRecordV2. # noqa: E501
|
116
|
+
|
117
|
+
UTC timestamp of when the record occurred. # noqa: E501
|
118
|
+
|
119
|
+
:return: The timestamp of this CreditLedgerRecordV2. # 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 CreditLedgerRecordV2.
|
127
|
+
|
128
|
+
UTC timestamp of when the record occurred. # noqa: E501
|
129
|
+
|
130
|
+
:param timestamp: The timestamp of this CreditLedgerRecordV2. # 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 credit_ledger_item_type(self):
|
140
|
+
"""Gets the credit_ledger_item_type of this CreditLedgerRecordV2. # noqa: E501
|
141
|
+
|
142
|
+
Type of credit ledger item. # noqa: E501
|
143
|
+
|
144
|
+
:return: The credit_ledger_item_type of this CreditLedgerRecordV2. # noqa: E501
|
145
|
+
:rtype: CreditLedgerItemType
|
146
|
+
"""
|
147
|
+
return self._credit_ledger_item_type
|
148
|
+
|
149
|
+
@credit_ledger_item_type.setter
|
150
|
+
def credit_ledger_item_type(self, credit_ledger_item_type):
|
151
|
+
"""Sets the credit_ledger_item_type of this CreditLedgerRecordV2.
|
152
|
+
|
153
|
+
Type of credit ledger item. # noqa: E501
|
154
|
+
|
155
|
+
:param credit_ledger_item_type: The credit_ledger_item_type of this CreditLedgerRecordV2. # noqa: E501
|
156
|
+
:type: CreditLedgerItemType
|
157
|
+
"""
|
158
|
+
if self.local_vars_configuration.client_side_validation and credit_ledger_item_type is None: # noqa: E501
|
159
|
+
raise ValueError("Invalid value for `credit_ledger_item_type`, must not be `None`") # noqa: E501
|
160
|
+
|
161
|
+
self._credit_ledger_item_type = credit_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, CreditLedgerRecordV2):
|
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, CreditLedgerRecordV2):
|
205
|
+
return True
|
206
|
+
|
207
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,410 @@
|
|
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 CreditRecordCommitV2(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
|
+
'credit_name': 'str',
|
37
|
+
'contract_name': 'str',
|
38
|
+
'effective_date_start': 'date',
|
39
|
+
'effective_date_end': 'date',
|
40
|
+
'total_balance_usd': 'float',
|
41
|
+
'last_month_usage_usd': 'float',
|
42
|
+
'amount_consumed_usd': 'float',
|
43
|
+
'total_granted_usd': 'float',
|
44
|
+
'ledger': 'list[CommitLedgerRecordV2]',
|
45
|
+
'grants': 'list[CreditGrantRecordV2]',
|
46
|
+
'credit_type': 'CreditType'
|
47
|
+
}
|
48
|
+
|
49
|
+
attribute_map = {
|
50
|
+
'credit_name': 'credit_name',
|
51
|
+
'contract_name': 'contract_name',
|
52
|
+
'effective_date_start': 'effective_date_start',
|
53
|
+
'effective_date_end': 'effective_date_end',
|
54
|
+
'total_balance_usd': 'total_balance_usd',
|
55
|
+
'last_month_usage_usd': 'last_month_usage_usd',
|
56
|
+
'amount_consumed_usd': 'amount_consumed_usd',
|
57
|
+
'total_granted_usd': 'total_granted_usd',
|
58
|
+
'ledger': 'ledger',
|
59
|
+
'grants': 'grants',
|
60
|
+
'credit_type': 'credit_type'
|
61
|
+
}
|
62
|
+
|
63
|
+
def __init__(self, credit_name=None, contract_name=None, effective_date_start=None, effective_date_end=None, total_balance_usd=None, last_month_usage_usd=None, amount_consumed_usd=None, total_granted_usd=None, ledger=None, grants=None, credit_type=None, local_vars_configuration=None): # noqa: E501
|
64
|
+
"""CreditRecordCommitV2 - a model defined in OpenAPI""" # noqa: E501
|
65
|
+
if local_vars_configuration is None:
|
66
|
+
local_vars_configuration = Configuration()
|
67
|
+
self.local_vars_configuration = local_vars_configuration
|
68
|
+
|
69
|
+
self._credit_name = None
|
70
|
+
self._contract_name = None
|
71
|
+
self._effective_date_start = None
|
72
|
+
self._effective_date_end = None
|
73
|
+
self._total_balance_usd = None
|
74
|
+
self._last_month_usage_usd = None
|
75
|
+
self._amount_consumed_usd = None
|
76
|
+
self._total_granted_usd = None
|
77
|
+
self._ledger = None
|
78
|
+
self._grants = None
|
79
|
+
self._credit_type = None
|
80
|
+
self.discriminator = None
|
81
|
+
|
82
|
+
self.credit_name = credit_name
|
83
|
+
self.contract_name = contract_name
|
84
|
+
self.effective_date_start = effective_date_start
|
85
|
+
self.effective_date_end = effective_date_end
|
86
|
+
self.total_balance_usd = total_balance_usd
|
87
|
+
self.last_month_usage_usd = last_month_usage_usd
|
88
|
+
self.amount_consumed_usd = amount_consumed_usd
|
89
|
+
self.total_granted_usd = total_granted_usd
|
90
|
+
self.ledger = ledger
|
91
|
+
self.grants = grants
|
92
|
+
if credit_type is not None:
|
93
|
+
self.credit_type = credit_type
|
94
|
+
|
95
|
+
@property
|
96
|
+
def credit_name(self):
|
97
|
+
"""Gets the credit_name of this CreditRecordCommitV2. # noqa: E501
|
98
|
+
|
99
|
+
Name of the credit. # noqa: E501
|
100
|
+
|
101
|
+
:return: The credit_name of this CreditRecordCommitV2. # noqa: E501
|
102
|
+
:rtype: str
|
103
|
+
"""
|
104
|
+
return self._credit_name
|
105
|
+
|
106
|
+
@credit_name.setter
|
107
|
+
def credit_name(self, credit_name):
|
108
|
+
"""Sets the credit_name of this CreditRecordCommitV2.
|
109
|
+
|
110
|
+
Name of the credit. # noqa: E501
|
111
|
+
|
112
|
+
:param credit_name: The credit_name of this CreditRecordCommitV2. # noqa: E501
|
113
|
+
:type: str
|
114
|
+
"""
|
115
|
+
if self.local_vars_configuration.client_side_validation and credit_name is None: # noqa: E501
|
116
|
+
raise ValueError("Invalid value for `credit_name`, must not be `None`") # noqa: E501
|
117
|
+
|
118
|
+
self._credit_name = credit_name
|
119
|
+
|
120
|
+
@property
|
121
|
+
def contract_name(self):
|
122
|
+
"""Gets the contract_name of this CreditRecordCommitV2. # noqa: E501
|
123
|
+
|
124
|
+
Name of the contract the credit is attached to. # noqa: E501
|
125
|
+
|
126
|
+
:return: The contract_name of this CreditRecordCommitV2. # noqa: E501
|
127
|
+
:rtype: str
|
128
|
+
"""
|
129
|
+
return self._contract_name
|
130
|
+
|
131
|
+
@contract_name.setter
|
132
|
+
def contract_name(self, contract_name):
|
133
|
+
"""Sets the contract_name of this CreditRecordCommitV2.
|
134
|
+
|
135
|
+
Name of the contract the credit is attached to. # noqa: E501
|
136
|
+
|
137
|
+
:param contract_name: The contract_name of this CreditRecordCommitV2. # noqa: E501
|
138
|
+
:type: str
|
139
|
+
"""
|
140
|
+
if self.local_vars_configuration.client_side_validation and contract_name is None: # noqa: E501
|
141
|
+
raise ValueError("Invalid value for `contract_name`, must not be `None`") # noqa: E501
|
142
|
+
|
143
|
+
self._contract_name = contract_name
|
144
|
+
|
145
|
+
@property
|
146
|
+
def effective_date_start(self):
|
147
|
+
"""Gets the effective_date_start of this CreditRecordCommitV2. # noqa: E501
|
148
|
+
|
149
|
+
UTC date the credit can first be used (inclusive). # noqa: E501
|
150
|
+
|
151
|
+
:return: The effective_date_start of this CreditRecordCommitV2. # noqa: E501
|
152
|
+
:rtype: date
|
153
|
+
"""
|
154
|
+
return self._effective_date_start
|
155
|
+
|
156
|
+
@effective_date_start.setter
|
157
|
+
def effective_date_start(self, effective_date_start):
|
158
|
+
"""Sets the effective_date_start of this CreditRecordCommitV2.
|
159
|
+
|
160
|
+
UTC date the credit can first be used (inclusive). # noqa: E501
|
161
|
+
|
162
|
+
:param effective_date_start: The effective_date_start of this CreditRecordCommitV2. # noqa: E501
|
163
|
+
:type: date
|
164
|
+
"""
|
165
|
+
if self.local_vars_configuration.client_side_validation and effective_date_start is None: # noqa: E501
|
166
|
+
raise ValueError("Invalid value for `effective_date_start`, must not be `None`") # noqa: E501
|
167
|
+
|
168
|
+
self._effective_date_start = effective_date_start
|
169
|
+
|
170
|
+
@property
|
171
|
+
def effective_date_end(self):
|
172
|
+
"""Gets the effective_date_end of this CreditRecordCommitV2. # noqa: E501
|
173
|
+
|
174
|
+
UTC date the credit can last be used (inclusive). # noqa: E501
|
175
|
+
|
176
|
+
:return: The effective_date_end of this CreditRecordCommitV2. # noqa: E501
|
177
|
+
:rtype: date
|
178
|
+
"""
|
179
|
+
return self._effective_date_end
|
180
|
+
|
181
|
+
@effective_date_end.setter
|
182
|
+
def effective_date_end(self, effective_date_end):
|
183
|
+
"""Sets the effective_date_end of this CreditRecordCommitV2.
|
184
|
+
|
185
|
+
UTC date the credit can last be used (inclusive). # noqa: E501
|
186
|
+
|
187
|
+
:param effective_date_end: The effective_date_end of this CreditRecordCommitV2. # noqa: E501
|
188
|
+
:type: date
|
189
|
+
"""
|
190
|
+
if self.local_vars_configuration.client_side_validation and effective_date_end is None: # noqa: E501
|
191
|
+
raise ValueError("Invalid value for `effective_date_end`, must not be `None`") # noqa: E501
|
192
|
+
|
193
|
+
self._effective_date_end = effective_date_end
|
194
|
+
|
195
|
+
@property
|
196
|
+
def total_balance_usd(self):
|
197
|
+
"""Gets the total_balance_usd of this CreditRecordCommitV2. # noqa: E501
|
198
|
+
|
199
|
+
Total balance of the credit in USD. # noqa: E501
|
200
|
+
|
201
|
+
:return: The total_balance_usd of this CreditRecordCommitV2. # noqa: E501
|
202
|
+
:rtype: float
|
203
|
+
"""
|
204
|
+
return self._total_balance_usd
|
205
|
+
|
206
|
+
@total_balance_usd.setter
|
207
|
+
def total_balance_usd(self, total_balance_usd):
|
208
|
+
"""Sets the total_balance_usd of this CreditRecordCommitV2.
|
209
|
+
|
210
|
+
Total balance of the credit in USD. # noqa: E501
|
211
|
+
|
212
|
+
:param total_balance_usd: The total_balance_usd of this CreditRecordCommitV2. # noqa: E501
|
213
|
+
:type: float
|
214
|
+
"""
|
215
|
+
if self.local_vars_configuration.client_side_validation and total_balance_usd is None: # noqa: E501
|
216
|
+
raise ValueError("Invalid value for `total_balance_usd`, must not be `None`") # noqa: E501
|
217
|
+
|
218
|
+
self._total_balance_usd = total_balance_usd
|
219
|
+
|
220
|
+
@property
|
221
|
+
def last_month_usage_usd(self):
|
222
|
+
"""Gets the last_month_usage_usd of this CreditRecordCommitV2. # noqa: E501
|
223
|
+
|
224
|
+
Amount of USD consumed from the credit in the last month. # noqa: E501
|
225
|
+
|
226
|
+
:return: The last_month_usage_usd of this CreditRecordCommitV2. # noqa: E501
|
227
|
+
:rtype: float
|
228
|
+
"""
|
229
|
+
return self._last_month_usage_usd
|
230
|
+
|
231
|
+
@last_month_usage_usd.setter
|
232
|
+
def last_month_usage_usd(self, last_month_usage_usd):
|
233
|
+
"""Sets the last_month_usage_usd of this CreditRecordCommitV2.
|
234
|
+
|
235
|
+
Amount of USD consumed from the credit in the last month. # noqa: E501
|
236
|
+
|
237
|
+
:param last_month_usage_usd: The last_month_usage_usd of this CreditRecordCommitV2. # noqa: E501
|
238
|
+
:type: float
|
239
|
+
"""
|
240
|
+
if self.local_vars_configuration.client_side_validation and last_month_usage_usd is None: # noqa: E501
|
241
|
+
raise ValueError("Invalid value for `last_month_usage_usd`, must not be `None`") # noqa: E501
|
242
|
+
|
243
|
+
self._last_month_usage_usd = last_month_usage_usd
|
244
|
+
|
245
|
+
@property
|
246
|
+
def amount_consumed_usd(self):
|
247
|
+
"""Gets the amount_consumed_usd of this CreditRecordCommitV2. # noqa: E501
|
248
|
+
|
249
|
+
Amount of USD consumed from the credit. # noqa: E501
|
250
|
+
|
251
|
+
:return: The amount_consumed_usd of this CreditRecordCommitV2. # noqa: E501
|
252
|
+
:rtype: float
|
253
|
+
"""
|
254
|
+
return self._amount_consumed_usd
|
255
|
+
|
256
|
+
@amount_consumed_usd.setter
|
257
|
+
def amount_consumed_usd(self, amount_consumed_usd):
|
258
|
+
"""Sets the amount_consumed_usd of this CreditRecordCommitV2.
|
259
|
+
|
260
|
+
Amount of USD consumed from the credit. # noqa: E501
|
261
|
+
|
262
|
+
:param amount_consumed_usd: The amount_consumed_usd of this CreditRecordCommitV2. # noqa: E501
|
263
|
+
:type: float
|
264
|
+
"""
|
265
|
+
if self.local_vars_configuration.client_side_validation and amount_consumed_usd is None: # noqa: E501
|
266
|
+
raise ValueError("Invalid value for `amount_consumed_usd`, must not be `None`") # noqa: E501
|
267
|
+
|
268
|
+
self._amount_consumed_usd = amount_consumed_usd
|
269
|
+
|
270
|
+
@property
|
271
|
+
def total_granted_usd(self):
|
272
|
+
"""Gets the total_granted_usd of this CreditRecordCommitV2. # noqa: E501
|
273
|
+
|
274
|
+
Total amount of USD granted to the credit. # noqa: E501
|
275
|
+
|
276
|
+
:return: The total_granted_usd of this CreditRecordCommitV2. # noqa: E501
|
277
|
+
:rtype: float
|
278
|
+
"""
|
279
|
+
return self._total_granted_usd
|
280
|
+
|
281
|
+
@total_granted_usd.setter
|
282
|
+
def total_granted_usd(self, total_granted_usd):
|
283
|
+
"""Sets the total_granted_usd of this CreditRecordCommitV2.
|
284
|
+
|
285
|
+
Total amount of USD granted to the credit. # noqa: E501
|
286
|
+
|
287
|
+
:param total_granted_usd: The total_granted_usd of this CreditRecordCommitV2. # noqa: E501
|
288
|
+
:type: float
|
289
|
+
"""
|
290
|
+
if self.local_vars_configuration.client_side_validation and total_granted_usd is None: # noqa: E501
|
291
|
+
raise ValueError("Invalid value for `total_granted_usd`, must not be `None`") # noqa: E501
|
292
|
+
|
293
|
+
self._total_granted_usd = total_granted_usd
|
294
|
+
|
295
|
+
@property
|
296
|
+
def ledger(self):
|
297
|
+
"""Gets the ledger of this CreditRecordCommitV2. # noqa: E501
|
298
|
+
|
299
|
+
List of ledger records for this credit. # noqa: E501
|
300
|
+
|
301
|
+
:return: The ledger of this CreditRecordCommitV2. # noqa: E501
|
302
|
+
:rtype: list[CommitLedgerRecordV2]
|
303
|
+
"""
|
304
|
+
return self._ledger
|
305
|
+
|
306
|
+
@ledger.setter
|
307
|
+
def ledger(self, ledger):
|
308
|
+
"""Sets the ledger of this CreditRecordCommitV2.
|
309
|
+
|
310
|
+
List of ledger records for this credit. # noqa: E501
|
311
|
+
|
312
|
+
:param ledger: The ledger of this CreditRecordCommitV2. # noqa: E501
|
313
|
+
:type: list[CommitLedgerRecordV2]
|
314
|
+
"""
|
315
|
+
if self.local_vars_configuration.client_side_validation and ledger is None: # noqa: E501
|
316
|
+
raise ValueError("Invalid value for `ledger`, must not be `None`") # noqa: E501
|
317
|
+
|
318
|
+
self._ledger = ledger
|
319
|
+
|
320
|
+
@property
|
321
|
+
def grants(self):
|
322
|
+
"""Gets the grants of this CreditRecordCommitV2. # noqa: E501
|
323
|
+
|
324
|
+
List of grant records for this credit. # noqa: E501
|
325
|
+
|
326
|
+
:return: The grants of this CreditRecordCommitV2. # noqa: E501
|
327
|
+
:rtype: list[CreditGrantRecordV2]
|
328
|
+
"""
|
329
|
+
return self._grants
|
330
|
+
|
331
|
+
@grants.setter
|
332
|
+
def grants(self, grants):
|
333
|
+
"""Sets the grants of this CreditRecordCommitV2.
|
334
|
+
|
335
|
+
List of grant records for this credit. # noqa: E501
|
336
|
+
|
337
|
+
:param grants: The grants of this CreditRecordCommitV2. # noqa: E501
|
338
|
+
:type: list[CreditGrantRecordV2]
|
339
|
+
"""
|
340
|
+
if self.local_vars_configuration.client_side_validation and grants is None: # noqa: E501
|
341
|
+
raise ValueError("Invalid value for `grants`, must not be `None`") # noqa: E501
|
342
|
+
|
343
|
+
self._grants = grants
|
344
|
+
|
345
|
+
@property
|
346
|
+
def credit_type(self):
|
347
|
+
"""Gets the credit_type of this CreditRecordCommitV2. # noqa: E501
|
348
|
+
|
349
|
+
|
350
|
+
:return: The credit_type of this CreditRecordCommitV2. # noqa: E501
|
351
|
+
:rtype: CreditType
|
352
|
+
"""
|
353
|
+
return self._credit_type
|
354
|
+
|
355
|
+
@credit_type.setter
|
356
|
+
def credit_type(self, credit_type):
|
357
|
+
"""Sets the credit_type of this CreditRecordCommitV2.
|
358
|
+
|
359
|
+
|
360
|
+
:param credit_type: The credit_type of this CreditRecordCommitV2. # noqa: E501
|
361
|
+
:type: CreditType
|
362
|
+
"""
|
363
|
+
|
364
|
+
self._credit_type = credit_type
|
365
|
+
|
366
|
+
def to_dict(self):
|
367
|
+
"""Returns the model properties as a dict"""
|
368
|
+
result = {}
|
369
|
+
|
370
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
371
|
+
value = getattr(self, attr)
|
372
|
+
if isinstance(value, list):
|
373
|
+
result[attr] = list(map(
|
374
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
375
|
+
value
|
376
|
+
))
|
377
|
+
elif hasattr(value, "to_dict"):
|
378
|
+
result[attr] = value.to_dict()
|
379
|
+
elif isinstance(value, dict):
|
380
|
+
result[attr] = dict(map(
|
381
|
+
lambda item: (item[0], item[1].to_dict())
|
382
|
+
if hasattr(item[1], "to_dict") else item,
|
383
|
+
value.items()
|
384
|
+
))
|
385
|
+
else:
|
386
|
+
result[attr] = value
|
387
|
+
|
388
|
+
return result
|
389
|
+
|
390
|
+
def to_str(self):
|
391
|
+
"""Returns the string representation of the model"""
|
392
|
+
return pprint.pformat(self.to_dict())
|
393
|
+
|
394
|
+
def __repr__(self):
|
395
|
+
"""For `print` and `pprint`"""
|
396
|
+
return self.to_str()
|
397
|
+
|
398
|
+
def __eq__(self, other):
|
399
|
+
"""Returns true if both objects are equal"""
|
400
|
+
if not isinstance(other, CreditRecordCommitV2):
|
401
|
+
return False
|
402
|
+
|
403
|
+
return self.to_dict() == other.to_dict()
|
404
|
+
|
405
|
+
def __ne__(self, other):
|
406
|
+
"""Returns true if both objects are not equal"""
|
407
|
+
if not isinstance(other, CreditRecordCommitV2):
|
408
|
+
return True
|
409
|
+
|
410
|
+
return self.to_dict() != other.to_dict()
|