daytona_api_client 0.108.0rc1__py3-none-any.whl → 0.108.1__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.

Potentially problematic release.


This version of daytona_api_client might be problematic. Click here for more details.

@@ -1,108 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Daytona
5
-
6
- Daytona AI platform API Docs
7
-
8
- The version of the OpenAPI document: 1.0
9
- Contact: support@daytona.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class UpdateOrganizationMemberRole(BaseModel):
27
- """
28
- UpdateOrganizationMemberRole
29
- """ # noqa: E501
30
- role: StrictStr = Field(description="Organization member role")
31
- additional_properties: Dict[str, Any] = {}
32
- __properties: ClassVar[List[str]] = ["role"]
33
-
34
- @field_validator('role')
35
- def role_validate_enum(cls, value):
36
- """Validates the enum"""
37
- if value not in set(['owner', 'member']):
38
- raise ValueError("must be one of enum values ('owner', 'member')")
39
- return value
40
-
41
- model_config = ConfigDict(
42
- populate_by_name=True,
43
- validate_assignment=True,
44
- protected_namespaces=(),
45
- )
46
-
47
-
48
- def to_str(self) -> str:
49
- """Returns the string representation of the model using alias"""
50
- return pprint.pformat(self.model_dump(by_alias=True))
51
-
52
- def to_json(self) -> str:
53
- """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
-
57
- @classmethod
58
- def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of UpdateOrganizationMemberRole from a JSON string"""
60
- return cls.from_dict(json.loads(json_str))
61
-
62
- def to_dict(self) -> Dict[str, Any]:
63
- """Return the dictionary representation of the model using alias.
64
-
65
- This has the following differences from calling pydantic's
66
- `self.model_dump(by_alias=True)`:
67
-
68
- * `None` is only added to the output dict for nullable fields that
69
- were set at model initialization. Other fields with value `None`
70
- are ignored.
71
- * Fields in `self.additional_properties` are added to the output dict.
72
- """
73
- excluded_fields: Set[str] = set([
74
- "additional_properties",
75
- ])
76
-
77
- _dict = self.model_dump(
78
- by_alias=True,
79
- exclude=excluded_fields,
80
- exclude_none=True,
81
- )
82
- # puts key-value pairs in additional_properties in the top level
83
- if self.additional_properties is not None:
84
- for _key, _value in self.additional_properties.items():
85
- _dict[_key] = _value
86
-
87
- return _dict
88
-
89
- @classmethod
90
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
- """Create an instance of UpdateOrganizationMemberRole from a dict"""
92
- if obj is None:
93
- return None
94
-
95
- if not isinstance(obj, dict):
96
- return cls.model_validate(obj)
97
-
98
- _obj = cls.model_validate({
99
- "role": obj.get("role")
100
- })
101
- # store additional fields in additional_properties
102
- for _key in obj.keys():
103
- if _key not in cls.__properties:
104
- _obj.additional_properties[_key] = obj.get(_key)
105
-
106
- return _obj
107
-
108
-