stackit-intake 0.1.0__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.
- stackit/intake/__init__.py +115 -0
- stackit/intake/api/__init__.py +4 -0
- stackit/intake/api/default_api.py +4461 -0
- stackit/intake/api_client.py +639 -0
- stackit/intake/api_response.py +23 -0
- stackit/intake/configuration.py +164 -0
- stackit/intake/exceptions.py +217 -0
- stackit/intake/models/__init__.py +37 -0
- stackit/intake/models/catalog_auth.py +93 -0
- stackit/intake/models/catalog_auth_patch.py +93 -0
- stackit/intake/models/catalog_auth_type.py +36 -0
- stackit/intake/models/client_config.py +82 -0
- stackit/intake/models/create_intake_payload.py +112 -0
- stackit/intake/models/create_intake_runner_payload.py +115 -0
- stackit/intake/models/create_intake_user_payload.py +107 -0
- stackit/intake/models/dremio_auth.py +88 -0
- stackit/intake/models/dremio_auth_patch.py +88 -0
- stackit/intake/models/intake_catalog.py +118 -0
- stackit/intake/models/intake_catalog_patch.py +110 -0
- stackit/intake/models/intake_response.py +158 -0
- stackit/intake/models/intake_runner_response.py +135 -0
- stackit/intake/models/intake_user_response.py +139 -0
- stackit/intake/models/list_intake_runners_response.py +102 -0
- stackit/intake/models/list_intake_users_response.py +102 -0
- stackit/intake/models/list_intakes_response.py +102 -0
- stackit/intake/models/update_intake_payload.py +115 -0
- stackit/intake/models/update_intake_runner_payload.py +118 -0
- stackit/intake/models/update_intake_user_payload.py +112 -0
- stackit/intake/models/user_type.py +36 -0
- stackit/intake/py.typed +0 -0
- stackit/intake/rest.py +148 -0
- stackit_intake-0.1.0.dist-info/LICENSE.md +201 -0
- stackit_intake-0.1.0.dist-info/METADATA +46 -0
- stackit_intake-0.1.0.dist-info/NOTICE.txt +2 -0
- stackit_intake-0.1.0.dist-info/RECORD +36 -0
- stackit_intake-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ClientConfig(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
Configuration properties for supported clients.
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
java: StrictStr = Field(description="Configuration for Java Kafka clients.")
|
|
30
|
+
librdkafka: StrictStr = Field(description="Configuration for Kafka clients using librdkafka")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["java", "librdkafka"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of ClientConfig from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of ClientConfig from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"java": obj.get("java"), "librdkafka": obj.get("librdkafka")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing_extensions import Annotated, Self
|
|
22
|
+
|
|
23
|
+
from stackit.intake.models.intake_catalog import IntakeCatalog
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class CreateIntakePayload(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CreateIntakePayload
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
catalog: IntakeCatalog
|
|
32
|
+
description: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
33
|
+
default=None,
|
|
34
|
+
description="The description is a longer text chosen by the user to provide more context for the resource.",
|
|
35
|
+
)
|
|
36
|
+
display_name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] = Field(
|
|
37
|
+
description="The display name is a short name chosen by the user to identify the resource.", alias="displayName"
|
|
38
|
+
)
|
|
39
|
+
intake_runner_id: StrictStr = Field(
|
|
40
|
+
description="The unique id of the intake runner this intake should run on.", alias="intakeRunnerId"
|
|
41
|
+
)
|
|
42
|
+
labels: Optional[Dict[str, StrictStr]] = Field(
|
|
43
|
+
default=None, description="Labels are a set of key-value pairs assigned to resources."
|
|
44
|
+
)
|
|
45
|
+
__properties: ClassVar[List[str]] = ["catalog", "description", "displayName", "intakeRunnerId", "labels"]
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of CreateIntakePayload from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of catalog
|
|
85
|
+
if self.catalog:
|
|
86
|
+
_dict["catalog"] = self.catalog.to_dict()
|
|
87
|
+
# set to None if labels (nullable) is None
|
|
88
|
+
# and model_fields_set contains the field
|
|
89
|
+
if self.labels is None and "labels" in self.model_fields_set:
|
|
90
|
+
_dict["labels"] = None
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of CreateIntakePayload from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate(
|
|
104
|
+
{
|
|
105
|
+
"catalog": IntakeCatalog.from_dict(obj["catalog"]) if obj.get("catalog") is not None else None,
|
|
106
|
+
"description": obj.get("description"),
|
|
107
|
+
"displayName": obj.get("displayName"),
|
|
108
|
+
"intakeRunnerId": obj.get("intakeRunnerId"),
|
|
109
|
+
"labels": obj.get("labels"),
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
return _obj
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing_extensions import Annotated, Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CreateIntakeRunnerPayload(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
CreateIntakeRunnerPayload
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
description: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
30
|
+
default=None,
|
|
31
|
+
description="The description is a longer text chosen by the user to provide more context for the resource.",
|
|
32
|
+
)
|
|
33
|
+
display_name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] = Field(
|
|
34
|
+
description="The display name is a short name chosen by the user to identify the resource.", alias="displayName"
|
|
35
|
+
)
|
|
36
|
+
labels: Optional[Dict[str, StrictStr]] = Field(
|
|
37
|
+
default=None, description="Labels are a set of key-value pairs assigned to resources."
|
|
38
|
+
)
|
|
39
|
+
max_message_size_ki_b: StrictInt = Field(
|
|
40
|
+
description="The maximum size of a message in kibibytes (1 KiB = 1024 bytes).", alias="maxMessageSizeKiB"
|
|
41
|
+
)
|
|
42
|
+
max_messages_per_hour: StrictInt = Field(
|
|
43
|
+
description="The maximum number of messages per hour.", alias="maxMessagesPerHour"
|
|
44
|
+
)
|
|
45
|
+
__properties: ClassVar[List[str]] = [
|
|
46
|
+
"description",
|
|
47
|
+
"displayName",
|
|
48
|
+
"labels",
|
|
49
|
+
"maxMessageSizeKiB",
|
|
50
|
+
"maxMessagesPerHour",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
model_config = ConfigDict(
|
|
54
|
+
populate_by_name=True,
|
|
55
|
+
validate_assignment=True,
|
|
56
|
+
protected_namespaces=(),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
def to_str(self) -> str:
|
|
60
|
+
"""Returns the string representation of the model using alias"""
|
|
61
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
62
|
+
|
|
63
|
+
def to_json(self) -> str:
|
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
|
65
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
66
|
+
return json.dumps(self.to_dict())
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
70
|
+
"""Create an instance of CreateIntakeRunnerPayload from a JSON string"""
|
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
|
72
|
+
|
|
73
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
74
|
+
"""Return the dictionary representation of the model using alias.
|
|
75
|
+
|
|
76
|
+
This has the following differences from calling pydantic's
|
|
77
|
+
`self.model_dump(by_alias=True)`:
|
|
78
|
+
|
|
79
|
+
* `None` is only added to the output dict for nullable fields that
|
|
80
|
+
were set at model initialization. Other fields with value `None`
|
|
81
|
+
are ignored.
|
|
82
|
+
"""
|
|
83
|
+
excluded_fields: Set[str] = set([])
|
|
84
|
+
|
|
85
|
+
_dict = self.model_dump(
|
|
86
|
+
by_alias=True,
|
|
87
|
+
exclude=excluded_fields,
|
|
88
|
+
exclude_none=True,
|
|
89
|
+
)
|
|
90
|
+
# set to None if labels (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.labels is None and "labels" in self.model_fields_set:
|
|
93
|
+
_dict["labels"] = None
|
|
94
|
+
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
+
"""Create an instance of CreateIntakeRunnerPayload from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return cls.model_validate(obj)
|
|
105
|
+
|
|
106
|
+
_obj = cls.model_validate(
|
|
107
|
+
{
|
|
108
|
+
"description": obj.get("description"),
|
|
109
|
+
"displayName": obj.get("displayName"),
|
|
110
|
+
"labels": obj.get("labels"),
|
|
111
|
+
"maxMessageSizeKiB": obj.get("maxMessageSizeKiB"),
|
|
112
|
+
"maxMessagesPerHour": obj.get("maxMessagesPerHour"),
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
return _obj
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing_extensions import Annotated, Self
|
|
22
|
+
|
|
23
|
+
from stackit.intake.models.user_type import UserType
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class CreateIntakeUserPayload(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CreateIntakeUserPayload
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
description: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
32
|
+
default=None,
|
|
33
|
+
description="The description is a longer text chosen by the user to provide more context for the resource.",
|
|
34
|
+
)
|
|
35
|
+
display_name: Annotated[str, Field(min_length=1, strict=True, max_length=32)] = Field(
|
|
36
|
+
description="The display name is a short name chosen by the user to identify the resource.", alias="displayName"
|
|
37
|
+
)
|
|
38
|
+
labels: Optional[Dict[str, StrictStr]] = Field(
|
|
39
|
+
default=None, description="Labels are key-value pairs associated with the resource."
|
|
40
|
+
)
|
|
41
|
+
password: Annotated[str, Field(strict=True, max_length=128)] = Field(description="A password chosen by the user.")
|
|
42
|
+
type: Optional[UserType] = UserType.INTAKE
|
|
43
|
+
__properties: ClassVar[List[str]] = ["description", "displayName", "labels", "password", "type"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of CreateIntakeUserPayload from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# set to None if labels (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.labels is None and "labels" in self.model_fields_set:
|
|
85
|
+
_dict["labels"] = None
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of CreateIntakeUserPayload 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
|
+
{
|
|
100
|
+
"description": obj.get("description"),
|
|
101
|
+
"displayName": obj.get("displayName"),
|
|
102
|
+
"labels": obj.get("labels"),
|
|
103
|
+
"password": obj.get("password"),
|
|
104
|
+
"type": obj.get("type") if obj.get("type") is not None else UserType.INTAKE,
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
return _obj
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing_extensions import Annotated, Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class DremioAuth(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
DremioAuth
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
personal_access_token: Annotated[str, Field(strict=True, max_length=1024)] = Field(
|
|
30
|
+
description="A Dremio personal access token for authentication", alias="personalAccessToken"
|
|
31
|
+
)
|
|
32
|
+
token_endpoint: Annotated[str, Field(strict=True, max_length=1024)] = Field(
|
|
33
|
+
description="The URL to the Dremio instance's OAuth 2.0 token endpoint", alias="tokenEndpoint"
|
|
34
|
+
)
|
|
35
|
+
__properties: ClassVar[List[str]] = ["personalAccessToken", "tokenEndpoint"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DremioAuth from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of DremioAuth from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate(
|
|
86
|
+
{"personalAccessToken": obj.get("personalAccessToken"), "tokenEndpoint": obj.get("tokenEndpoint")}
|
|
87
|
+
)
|
|
88
|
+
return _obj
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Intake API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Intakes.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing_extensions import Annotated, Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class DremioAuthPatch(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
DremioAuthPatch
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
personal_access_token: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
30
|
+
default=None, description="A Dremio personal access token for authentication", alias="personalAccessToken"
|
|
31
|
+
)
|
|
32
|
+
token_endpoint: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
33
|
+
default=None, description="The URL to the Dremio instance's OAuth 2.0 token endpoint", alias="tokenEndpoint"
|
|
34
|
+
)
|
|
35
|
+
__properties: ClassVar[List[str]] = ["personalAccessToken", "tokenEndpoint"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DremioAuthPatch from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of DremioAuthPatch from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate(
|
|
86
|
+
{"personalAccessToken": obj.get("personalAccessToken"), "tokenEndpoint": obj.get("tokenEndpoint")}
|
|
87
|
+
)
|
|
88
|
+
return _obj
|