cribl-control-plane 0.1.0b2__py3-none-any.whl → 0.2.0b1__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 cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_hooks/clientcredentials.py +91 -41
- cribl_control_plane/_version.py +4 -4
- cribl_control_plane/errors/apierror.py +1 -1
- cribl_control_plane/errors/criblcontrolplaneerror.py +1 -1
- cribl_control_plane/errors/error.py +1 -1
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/errors/no_response_error.py +1 -1
- cribl_control_plane/errors/responsevalidationerror.py +1 -1
- cribl_control_plane/httpclient.py +0 -1
- cribl_control_plane/models/__init__.py +68 -7
- cribl_control_plane/models/createversionundoop.py +3 -3
- cribl_control_plane/models/distributedsummary.py +6 -0
- cribl_control_plane/models/gitinfo.py +14 -3
- cribl_control_plane/models/input.py +65 -63
- cribl_control_plane/models/inputappscope.py +4 -0
- cribl_control_plane/models/inputazureblob.py +4 -0
- cribl_control_plane/models/inputcollection.py +4 -0
- cribl_control_plane/models/inputconfluentcloud.py +8 -0
- cribl_control_plane/models/inputcribl.py +4 -0
- cribl_control_plane/models/inputcriblhttp.py +4 -0
- cribl_control_plane/models/inputcribllakehttp.py +4 -0
- cribl_control_plane/models/inputcriblmetrics.py +4 -0
- cribl_control_plane/models/inputcribltcp.py +4 -0
- cribl_control_plane/models/inputcrowdstrike.py +7 -0
- cribl_control_plane/models/inputdatadogagent.py +4 -0
- cribl_control_plane/models/inputdatagen.py +4 -0
- cribl_control_plane/models/inputedgeprometheus.py +12 -0
- cribl_control_plane/models/inputelastic.py +11 -0
- cribl_control_plane/models/inputeventhub.py +6 -0
- cribl_control_plane/models/inputexec.py +4 -0
- cribl_control_plane/models/inputfile.py +6 -0
- cribl_control_plane/models/inputfirehose.py +4 -0
- cribl_control_plane/models/inputgooglepubsub.py +7 -0
- cribl_control_plane/models/inputgrafana.py +8 -0
- cribl_control_plane/models/inputhttp.py +4 -0
- cribl_control_plane/models/inputhttpraw.py +4 -0
- cribl_control_plane/models/inputjournalfiles.py +4 -0
- cribl_control_plane/models/inputkafka.py +8 -0
- cribl_control_plane/models/inputkinesis.py +15 -0
- cribl_control_plane/models/inputkubeevents.py +4 -0
- cribl_control_plane/models/inputkubelogs.py +4 -0
- cribl_control_plane/models/inputkubemetrics.py +4 -0
- cribl_control_plane/models/inputloki.py +4 -0
- cribl_control_plane/models/inputmetrics.py +4 -0
- cribl_control_plane/models/inputmodeldriventelemetry.py +4 -0
- cribl_control_plane/models/inputmsk.py +7 -0
- cribl_control_plane/models/inputnetflow.py +4 -0
- cribl_control_plane/models/inputoffice365mgmt.py +11 -0
- cribl_control_plane/models/inputoffice365msgtrace.py +11 -0
- cribl_control_plane/models/inputoffice365service.py +11 -0
- cribl_control_plane/models/inputopentelemetry.py +8 -0
- cribl_control_plane/models/inputprometheus.py +10 -0
- cribl_control_plane/models/inputprometheusrw.py +4 -0
- cribl_control_plane/models/inputrawudp.py +4 -0
- cribl_control_plane/models/inputs3.py +7 -0
- cribl_control_plane/models/inputs3inventory.py +7 -0
- cribl_control_plane/models/inputsecuritylake.py +7 -0
- cribl_control_plane/models/inputsnmp.py +11 -0
- cribl_control_plane/models/inputsplunk.py +9 -0
- cribl_control_plane/models/inputsplunkhec.py +4 -0
- cribl_control_plane/models/inputsplunksearch.py +7 -0
- cribl_control_plane/models/inputsqs.py +17 -10
- cribl_control_plane/models/inputsyslog.py +8 -0
- cribl_control_plane/models/inputsystemmetrics.py +32 -0
- cribl_control_plane/models/inputsystemstate.py +4 -0
- cribl_control_plane/models/inputtcp.py +4 -0
- cribl_control_plane/models/inputtcpjson.py +4 -0
- cribl_control_plane/models/inputwef.py +6 -0
- cribl_control_plane/models/inputwindowsmetrics.py +28 -0
- cribl_control_plane/models/inputwineventlogs.py +8 -0
- cribl_control_plane/models/inputwiz.py +7 -0
- cribl_control_plane/models/inputwizwebhook.py +4 -0
- cribl_control_plane/models/inputzscalerhec.py +4 -0
- cribl_control_plane/models/jobinfo.py +4 -1
- cribl_control_plane/models/nodeprovidedinfo.py +4 -1
- cribl_control_plane/models/output.py +74 -69
- cribl_control_plane/models/outputazureblob.py +20 -0
- cribl_control_plane/models/outputazuredataexplorer.py +28 -0
- cribl_control_plane/models/outputazureeventhub.py +17 -0
- cribl_control_plane/models/outputazurelogs.py +13 -0
- cribl_control_plane/models/outputchronicle.py +444 -0
- cribl_control_plane/models/outputclickhouse.py +17 -0
- cribl_control_plane/models/outputcloudwatch.py +13 -0
- cribl_control_plane/models/outputconfluentcloud.py +24 -0
- cribl_control_plane/models/outputcriblhttp.py +15 -0
- cribl_control_plane/models/outputcribllake.py +21 -0
- cribl_control_plane/models/outputcribltcp.py +12 -0
- cribl_control_plane/models/outputcrowdstrikenextgensiem.py +15 -0
- cribl_control_plane/models/outputdatabricks.py +9 -0
- cribl_control_plane/models/outputdatadog.py +30 -0
- cribl_control_plane/models/outputdataset.py +23 -0
- cribl_control_plane/models/outputdls3.py +35 -0
- cribl_control_plane/models/outputdynatracehttp.py +22 -0
- cribl_control_plane/models/outputdynatraceotlp.py +22 -0
- cribl_control_plane/models/outputelastic.py +18 -0
- cribl_control_plane/models/outputelasticcloud.py +13 -0
- cribl_control_plane/models/outputexabeam.py +14 -0
- cribl_control_plane/models/outputfilesystem.py +15 -0
- cribl_control_plane/models/outputgooglechronicle.py +26 -4
- cribl_control_plane/models/outputgooglecloudlogging.py +28 -4
- cribl_control_plane/models/outputgooglecloudstorage.py +28 -0
- cribl_control_plane/models/outputgooglepubsub.py +13 -0
- cribl_control_plane/models/outputgrafanacloud.py +50 -0
- cribl_control_plane/models/outputgraphite.py +12 -0
- cribl_control_plane/models/outputhoneycomb.py +13 -0
- cribl_control_plane/models/outputhumiohec.py +15 -0
- cribl_control_plane/models/outputinfluxdb.py +19 -0
- cribl_control_plane/models/outputkafka.py +24 -0
- cribl_control_plane/models/outputkinesis.py +15 -0
- cribl_control_plane/models/outputloki.py +20 -0
- cribl_control_plane/models/outputminio.py +28 -0
- cribl_control_plane/models/outputmsk.py +23 -0
- cribl_control_plane/models/outputnewrelic.py +16 -0
- cribl_control_plane/models/outputnewrelicevents.py +16 -0
- cribl_control_plane/models/outputopentelemetry.py +22 -0
- cribl_control_plane/models/outputprometheus.py +13 -0
- cribl_control_plane/models/outputring.py +2 -0
- cribl_control_plane/models/outputs3.py +35 -0
- cribl_control_plane/models/outputsecuritylake.py +29 -0
- cribl_control_plane/models/outputsentinel.py +15 -0
- cribl_control_plane/models/outputsentineloneaisiem.py +13 -0
- cribl_control_plane/models/outputservicenow.py +21 -0
- cribl_control_plane/models/outputsignalfx.py +13 -0
- cribl_control_plane/models/outputsns.py +13 -0
- cribl_control_plane/models/outputsplunk.py +15 -0
- cribl_control_plane/models/outputsplunkhec.py +13 -0
- cribl_control_plane/models/outputsplunklb.py +15 -0
- cribl_control_plane/models/outputsqs.py +23 -10
- cribl_control_plane/models/outputstatsd.py +12 -0
- cribl_control_plane/models/outputstatsdext.py +12 -0
- cribl_control_plane/models/outputsumologic.py +15 -0
- cribl_control_plane/models/outputsyslog.py +24 -0
- cribl_control_plane/models/outputtcpjson.py +12 -0
- cribl_control_plane/models/outputwavefront.py +13 -0
- cribl_control_plane/models/outputwebhook.py +23 -0
- cribl_control_plane/models/outputxsiam.py +13 -0
- cribl_control_plane/models/packinfo.py +3 -0
- cribl_control_plane/models/packinstallinfo.py +3 -0
- cribl_control_plane/models/runnablejobcollection.py +4 -0
- {cribl_control_plane-0.1.0b2.dist-info → cribl_control_plane-0.2.0b1.dist-info}/METADATA +1 -8
- {cribl_control_plane-0.1.0b2.dist-info → cribl_control_plane-0.2.0b1.dist-info}/RECORD +142 -141
- {cribl_control_plane-0.1.0b2.dist-info → cribl_control_plane-0.2.0b1.dist-info}/WHEEL +0 -0
|
@@ -21,6 +21,7 @@ class Credentials:
|
|
|
21
21
|
client_id: str
|
|
22
22
|
client_secret: str
|
|
23
23
|
token_url: str
|
|
24
|
+
scopes: Optional[List[str]]
|
|
24
25
|
additional_properties: Dict[str, str]
|
|
25
26
|
|
|
26
27
|
def __init__(
|
|
@@ -28,25 +29,27 @@ class Credentials:
|
|
|
28
29
|
client_id: str,
|
|
29
30
|
client_secret: str,
|
|
30
31
|
token_url: str,
|
|
32
|
+
scopes: Optional[List[str]],
|
|
31
33
|
additional_properties: Optional[Dict[str, str]] = None,
|
|
32
34
|
):
|
|
33
35
|
self.client_id = client_id
|
|
34
36
|
self.client_secret = client_secret
|
|
35
37
|
self.token_url = token_url
|
|
38
|
+
self.scopes = scopes
|
|
36
39
|
self.additional_properties = additional_properties or {}
|
|
37
40
|
|
|
38
41
|
|
|
39
42
|
class Session:
|
|
40
43
|
credentials: Credentials
|
|
41
44
|
token: str
|
|
42
|
-
scopes:
|
|
45
|
+
scopes: List[str]
|
|
43
46
|
expires_at: Optional[int] = None
|
|
44
47
|
|
|
45
48
|
def __init__(
|
|
46
49
|
self,
|
|
47
50
|
credentials: Credentials,
|
|
48
51
|
token: str,
|
|
49
|
-
scopes:
|
|
52
|
+
scopes: List[str],
|
|
50
53
|
expires_at: Optional[int] = None,
|
|
51
54
|
):
|
|
52
55
|
self.credentials = credentials
|
|
@@ -57,7 +60,7 @@ class Session:
|
|
|
57
60
|
|
|
58
61
|
class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
59
62
|
client: HttpClient
|
|
60
|
-
sessions: Dict[str, Session] = {}
|
|
63
|
+
sessions: Dict[str, Dict[str, Session]] = {}
|
|
61
64
|
|
|
62
65
|
def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
|
|
63
66
|
if config.client is None:
|
|
@@ -69,8 +72,7 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
69
72
|
def before_request(
|
|
70
73
|
self, hook_ctx: BeforeRequestContext, request: httpx.Request
|
|
71
74
|
) -> httpx.Request:
|
|
72
|
-
if hook_ctx
|
|
73
|
-
# OAuth2 not in use
|
|
75
|
+
if self.is_hook_disabled(hook_ctx):
|
|
74
76
|
return request
|
|
75
77
|
|
|
76
78
|
credentials = self.get_credentials(hook_ctx)
|
|
@@ -81,22 +83,24 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
81
83
|
credentials.client_id, credentials.client_secret
|
|
82
84
|
)
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
):
|
|
91
|
-
sess = self.do_token_request(
|
|
86
|
+
scopes = self.get_required_scopes(credentials, hook_ctx)
|
|
87
|
+
session = self.get_existing_session(session_key, scopes)
|
|
88
|
+
|
|
89
|
+
if session is None:
|
|
90
|
+
# Create new session
|
|
91
|
+
session = self.do_token_request(
|
|
92
92
|
hook_ctx,
|
|
93
93
|
credentials,
|
|
94
|
-
|
|
94
|
+
scopes,
|
|
95
95
|
)
|
|
96
96
|
|
|
97
|
-
self.sessions
|
|
97
|
+
if session_key not in self.sessions:
|
|
98
|
+
self.sessions[session_key] = {}
|
|
99
|
+
|
|
100
|
+
scope_key = self.get_scope_key(scopes)
|
|
101
|
+
self.sessions[session_key][scope_key] = session
|
|
98
102
|
|
|
99
|
-
request.headers["Authorization"] = f"Bearer {
|
|
103
|
+
request.headers["Authorization"] = f"Bearer {session.token}"
|
|
100
104
|
|
|
101
105
|
return request
|
|
102
106
|
|
|
@@ -106,8 +110,7 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
106
110
|
response: Optional[httpx.Response],
|
|
107
111
|
error: Optional[Exception],
|
|
108
112
|
) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]:
|
|
109
|
-
if hook_ctx
|
|
110
|
-
# OAuth2 not in use
|
|
113
|
+
if self.is_hook_disabled(hook_ctx):
|
|
111
114
|
return (response, error)
|
|
112
115
|
|
|
113
116
|
# We don't want to refresh the token if the error is not related to the token
|
|
@@ -122,12 +125,15 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
122
125
|
session_key = self.get_session_key(
|
|
123
126
|
credentials.client_id, credentials.client_secret
|
|
124
127
|
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
scopes = self.get_required_scopes(credentials, hook_ctx)
|
|
129
|
+
scope_key = self.get_scope_key(scopes)
|
|
130
|
+
self.remove_session(session_key, scope_key)
|
|
128
131
|
|
|
129
132
|
return (response, error)
|
|
130
133
|
|
|
134
|
+
def is_hook_disabled(self, hook_ctx: HookContext) -> bool:
|
|
135
|
+
return hook_ctx.oauth2_scopes is None
|
|
136
|
+
|
|
131
137
|
def get_credentials(self, hook_ctx: HookContext) -> Optional[Credentials]:
|
|
132
138
|
source = hook_ctx.security_source
|
|
133
139
|
|
|
@@ -145,21 +151,19 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
145
151
|
# Extract additional properties from security object
|
|
146
152
|
additional_properties = {}
|
|
147
153
|
for key, value in dict(security.client_oauth).items():
|
|
148
|
-
if key not in ["client_id", "client_secret", "token_url"]:
|
|
154
|
+
if key not in ["client_id", "client_secret", "token_url", "scopes"]:
|
|
149
155
|
additional_properties[key] = value
|
|
150
156
|
|
|
151
157
|
return Credentials(
|
|
152
158
|
client_id=security.client_oauth.client_id,
|
|
153
159
|
client_secret=security.client_oauth.client_secret,
|
|
154
160
|
token_url=security.client_oauth.token_url,
|
|
161
|
+
scopes=None,
|
|
155
162
|
additional_properties=additional_properties,
|
|
156
163
|
)
|
|
157
164
|
|
|
158
165
|
def do_token_request(
|
|
159
|
-
self,
|
|
160
|
-
hook_ctx: HookContext,
|
|
161
|
-
credentials: Credentials,
|
|
162
|
-
scopes: Optional[List[str]],
|
|
166
|
+
self, hook_ctx: HookContext, credentials: Credentials, scopes: List[str]
|
|
163
167
|
) -> Session:
|
|
164
168
|
payload = {
|
|
165
169
|
"grant_type": "client_credentials",
|
|
@@ -167,7 +171,7 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
167
171
|
"client_secret": credentials.client_secret,
|
|
168
172
|
}
|
|
169
173
|
|
|
170
|
-
if
|
|
174
|
+
if len(scopes) > 0:
|
|
171
175
|
payload["scope"] = " ".join(scopes)
|
|
172
176
|
|
|
173
177
|
# Add additional properties to payload
|
|
@@ -203,24 +207,70 @@ class ClientCredentialsHook(SDKInitHook, BeforeRequestHook, AfterErrorHook):
|
|
|
203
207
|
)
|
|
204
208
|
|
|
205
209
|
def get_session_key(self, client_id: str, client_secret: str) -> str:
|
|
210
|
+
"""Generate a consistent session key for the given client ID and secret."""
|
|
206
211
|
return hashlib.md5(f"{client_id}:{client_secret}".encode()).hexdigest()
|
|
207
212
|
|
|
213
|
+
def get_required_scopes(
|
|
214
|
+
self, credentials: Credentials, hook_ctx: HookContext
|
|
215
|
+
) -> List[str]:
|
|
216
|
+
"""Return the list of scopes that need to be requested."""
|
|
217
|
+
if credentials.scopes is not None:
|
|
218
|
+
return credentials.scopes
|
|
219
|
+
return hook_ctx.oauth2_scopes or []
|
|
220
|
+
|
|
221
|
+
def get_scope_key(self, scopes: List[str]) -> str:
|
|
222
|
+
"""Generate a consistent scope key for the given scopes."""
|
|
223
|
+
if not scopes:
|
|
224
|
+
return ""
|
|
225
|
+
|
|
226
|
+
sorted_scopes = sorted(scopes)
|
|
227
|
+
return "&".join(sorted_scopes)
|
|
228
|
+
|
|
229
|
+
def remove_session(self, client_key: str, scope_key: str) -> None:
|
|
230
|
+
"""Remove a session and clean up empty client session maps."""
|
|
231
|
+
if client_key in self.sessions and scope_key in self.sessions[client_key]:
|
|
232
|
+
del self.sessions[client_key][scope_key]
|
|
233
|
+
|
|
234
|
+
# Clean up empty client sessions
|
|
235
|
+
if not self.sessions[client_key]:
|
|
236
|
+
del self.sessions[client_key]
|
|
237
|
+
|
|
238
|
+
def get_existing_session(
|
|
239
|
+
self, client_key: str, required_scopes: List[str]
|
|
240
|
+
) -> Optional[Session]:
|
|
241
|
+
"""Find the best session for the required scopes."""
|
|
242
|
+
if client_key not in self.sessions:
|
|
243
|
+
return None
|
|
244
|
+
|
|
245
|
+
client_sessions = self.sessions[client_key]
|
|
246
|
+
scope_key = self.get_scope_key(required_scopes)
|
|
247
|
+
|
|
248
|
+
if scope_key in client_sessions:
|
|
249
|
+
exact_match = client_sessions[scope_key]
|
|
250
|
+
if self.has_token_expired(exact_match.expires_at):
|
|
251
|
+
self.remove_session(client_key, scope_key)
|
|
252
|
+
else:
|
|
253
|
+
return exact_match
|
|
254
|
+
|
|
255
|
+
# If no exact match was found, look for a superset match
|
|
256
|
+
for key, session in client_sessions.items():
|
|
257
|
+
if self.has_token_expired(session.expires_at):
|
|
258
|
+
self.remove_session(client_key, key)
|
|
259
|
+
elif self.has_required_scopes(session.scopes, required_scopes):
|
|
260
|
+
return session
|
|
261
|
+
|
|
262
|
+
return None
|
|
263
|
+
|
|
208
264
|
def has_required_scopes(
|
|
209
|
-
self, scopes:
|
|
265
|
+
self, scopes: List[str], required_scopes: List[str]
|
|
210
266
|
) -> bool:
|
|
211
|
-
if scopes
|
|
212
|
-
return False
|
|
213
|
-
|
|
267
|
+
"""Check if all required scopes are present in the given scopes."""
|
|
214
268
|
return all(scope in scopes for scope in required_scopes)
|
|
215
269
|
|
|
216
|
-
def get_scopes(
|
|
217
|
-
self, required_scopes: List[str], sess: Optional[Session]
|
|
218
|
-
) -> List[str]:
|
|
219
|
-
scopes = required_scopes.copy()
|
|
220
|
-
if sess is not None and sess.scopes is not None:
|
|
221
|
-
scopes.extend(sess.scopes)
|
|
222
|
-
scopes = list(set(scopes))
|
|
223
|
-
return scopes
|
|
224
|
-
|
|
225
270
|
def has_token_expired(self, expires_at: Optional[int]) -> bool:
|
|
226
|
-
|
|
271
|
+
"""
|
|
272
|
+
Check if the token has expired.
|
|
273
|
+
If no expires_in field was returned by the authorization server, the token is considered to never expire.
|
|
274
|
+
A 60-second buffer is applied to refresh tokens before they actually expire.
|
|
275
|
+
"""
|
|
276
|
+
return expires_at is not None and time.time() + 60 >= expires_at
|
cribl_control_plane/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "cribl-control-plane"
|
|
6
|
-
__version__: str = "0.
|
|
7
|
-
__openapi_doc_version__: str = "4.15.0-alpha.
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.
|
|
6
|
+
__version__: str = "0.2.0b1"
|
|
7
|
+
__openapi_doc_version__: str = "4.15.0-alpha.1760137873808-498c0e83"
|
|
8
|
+
__gen_version__: str = "2.723.11"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.2.0b1 2.723.11 4.15.0-alpha.1760137873808-498c0e83 cribl-control-plane"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -9,7 +9,7 @@ from cribl_control_plane.errors import CriblControlPlaneError
|
|
|
9
9
|
MAX_MESSAGE_LEN = 10_000
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@dataclass(
|
|
12
|
+
@dataclass(unsafe_hash=True)
|
|
13
13
|
class APIError(CriblControlPlaneError):
|
|
14
14
|
"""The fallback error class if no more specific error class is matched."""
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ from dataclasses import dataclass
|
|
|
7
7
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@dataclass(
|
|
10
|
+
@dataclass(unsafe_hash=True)
|
|
11
11
|
class ResponseValidationError(CriblControlPlaneError):
|
|
12
12
|
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
|
13
13
|
|
|
@@ -336,7 +336,7 @@ if TYPE_CHECKING:
|
|
|
336
336
|
from .gitdiffresult import GitDiffResult, GitDiffResultTypedDict
|
|
337
337
|
from .gitfile import GitFile, GitFileTypedDict
|
|
338
338
|
from .gitfilesresponse import GitFilesResponse, GitFilesResponseTypedDict
|
|
339
|
-
from .gitinfo import GitInfo, GitInfoTypedDict, Remote, RemoteTypedDict
|
|
339
|
+
from .gitinfo import GitInfo, GitInfoTypedDict, Remote, RemoteEnum, RemoteTypedDict
|
|
340
340
|
from .gitlogresult import GitLogResult, GitLogResultTypedDict
|
|
341
341
|
from .gitrevertparams import GitRevertParams, GitRevertParamsTypedDict
|
|
342
342
|
from .gitrevertresult import (
|
|
@@ -1921,6 +1921,27 @@ if TYPE_CHECKING:
|
|
|
1921
1921
|
OutputAzureLogsType,
|
|
1922
1922
|
OutputAzureLogsTypedDict,
|
|
1923
1923
|
)
|
|
1924
|
+
from .outputchronicle import (
|
|
1925
|
+
OutputChronicle,
|
|
1926
|
+
OutputChronicleAuthenticationMethod,
|
|
1927
|
+
OutputChronicleBackpressureBehavior,
|
|
1928
|
+
OutputChronicleCompression,
|
|
1929
|
+
OutputChronicleCustomLabel,
|
|
1930
|
+
OutputChronicleCustomLabelTypedDict,
|
|
1931
|
+
OutputChronicleExtraHTTPHeader,
|
|
1932
|
+
OutputChronicleExtraHTTPHeaderTypedDict,
|
|
1933
|
+
OutputChronicleFailedRequestLoggingMode,
|
|
1934
|
+
OutputChronicleMode,
|
|
1935
|
+
OutputChroniclePqControls,
|
|
1936
|
+
OutputChroniclePqControlsTypedDict,
|
|
1937
|
+
OutputChronicleQueueFullBehavior,
|
|
1938
|
+
OutputChronicleResponseRetrySetting,
|
|
1939
|
+
OutputChronicleResponseRetrySettingTypedDict,
|
|
1940
|
+
OutputChronicleTimeoutRetrySettings,
|
|
1941
|
+
OutputChronicleTimeoutRetrySettingsTypedDict,
|
|
1942
|
+
OutputChronicleType,
|
|
1943
|
+
OutputChronicleTypedDict,
|
|
1944
|
+
)
|
|
1924
1945
|
from .outputclickhouse import (
|
|
1925
1946
|
ColumnMapping,
|
|
1926
1947
|
ColumnMappingTypedDict,
|
|
@@ -2272,8 +2293,6 @@ if TYPE_CHECKING:
|
|
|
2272
2293
|
OutputFilesystemTypedDict,
|
|
2273
2294
|
)
|
|
2274
2295
|
from .outputgooglechronicle import (
|
|
2275
|
-
CustomLabel,
|
|
2276
|
-
CustomLabelTypedDict,
|
|
2277
2296
|
ExtraLogType,
|
|
2278
2297
|
ExtraLogTypeTypedDict,
|
|
2279
2298
|
OutputGoogleChronicle,
|
|
@@ -2281,6 +2300,8 @@ if TYPE_CHECKING:
|
|
|
2281
2300
|
OutputGoogleChronicleAuthenticationMethod,
|
|
2282
2301
|
OutputGoogleChronicleBackpressureBehavior,
|
|
2283
2302
|
OutputGoogleChronicleCompression,
|
|
2303
|
+
OutputGoogleChronicleCustomLabel,
|
|
2304
|
+
OutputGoogleChronicleCustomLabelTypedDict,
|
|
2284
2305
|
OutputGoogleChronicleExtraHTTPHeader,
|
|
2285
2306
|
OutputGoogleChronicleExtraHTTPHeaderTypedDict,
|
|
2286
2307
|
OutputGoogleChronicleFailedRequestLoggingMode,
|
|
@@ -3398,8 +3419,6 @@ __all__ = [
|
|
|
3398
3419
|
"CriblLakeDatasetTypedDict",
|
|
3399
3420
|
"CurrentBranchResult",
|
|
3400
3421
|
"CurrentBranchResultTypedDict",
|
|
3401
|
-
"CustomLabel",
|
|
3402
|
-
"CustomLabelTypedDict",
|
|
3403
3422
|
"DNS",
|
|
3404
3423
|
"DNSTypedDict",
|
|
3405
3424
|
"DataSetSite",
|
|
@@ -4993,6 +5012,25 @@ __all__ = [
|
|
|
4993
5012
|
"OutputAzureLogsTimeoutRetrySettingsTypedDict",
|
|
4994
5013
|
"OutputAzureLogsType",
|
|
4995
5014
|
"OutputAzureLogsTypedDict",
|
|
5015
|
+
"OutputChronicle",
|
|
5016
|
+
"OutputChronicleAuthenticationMethod",
|
|
5017
|
+
"OutputChronicleBackpressureBehavior",
|
|
5018
|
+
"OutputChronicleCompression",
|
|
5019
|
+
"OutputChronicleCustomLabel",
|
|
5020
|
+
"OutputChronicleCustomLabelTypedDict",
|
|
5021
|
+
"OutputChronicleExtraHTTPHeader",
|
|
5022
|
+
"OutputChronicleExtraHTTPHeaderTypedDict",
|
|
5023
|
+
"OutputChronicleFailedRequestLoggingMode",
|
|
5024
|
+
"OutputChronicleMode",
|
|
5025
|
+
"OutputChroniclePqControls",
|
|
5026
|
+
"OutputChroniclePqControlsTypedDict",
|
|
5027
|
+
"OutputChronicleQueueFullBehavior",
|
|
5028
|
+
"OutputChronicleResponseRetrySetting",
|
|
5029
|
+
"OutputChronicleResponseRetrySettingTypedDict",
|
|
5030
|
+
"OutputChronicleTimeoutRetrySettings",
|
|
5031
|
+
"OutputChronicleTimeoutRetrySettingsTypedDict",
|
|
5032
|
+
"OutputChronicleType",
|
|
5033
|
+
"OutputChronicleTypedDict",
|
|
4996
5034
|
"OutputClickHouse",
|
|
4997
5035
|
"OutputClickHouseAuthenticationType",
|
|
4998
5036
|
"OutputClickHouseBackpressureBehavior",
|
|
@@ -5304,6 +5342,8 @@ __all__ = [
|
|
|
5304
5342
|
"OutputGoogleChronicleAuthenticationMethod",
|
|
5305
5343
|
"OutputGoogleChronicleBackpressureBehavior",
|
|
5306
5344
|
"OutputGoogleChronicleCompression",
|
|
5345
|
+
"OutputGoogleChronicleCustomLabel",
|
|
5346
|
+
"OutputGoogleChronicleCustomLabelTypedDict",
|
|
5307
5347
|
"OutputGoogleChronicleExtraHTTPHeader",
|
|
5308
5348
|
"OutputGoogleChronicleExtraHTTPHeaderTypedDict",
|
|
5309
5349
|
"OutputGoogleChronicleFailedRequestLoggingMode",
|
|
@@ -6063,6 +6103,7 @@ __all__ = [
|
|
|
6063
6103
|
"RbacResource",
|
|
6064
6104
|
"ReadMode",
|
|
6065
6105
|
"Remote",
|
|
6106
|
+
"RemoteEnum",
|
|
6066
6107
|
"RemoteTypedDict",
|
|
6067
6108
|
"Renamed",
|
|
6068
6109
|
"RenamedTypedDict",
|
|
@@ -6472,6 +6513,7 @@ _dynamic_imports: dict[str, str] = {
|
|
|
6472
6513
|
"GitInfo": ".gitinfo",
|
|
6473
6514
|
"GitInfoTypedDict": ".gitinfo",
|
|
6474
6515
|
"Remote": ".gitinfo",
|
|
6516
|
+
"RemoteEnum": ".gitinfo",
|
|
6475
6517
|
"RemoteTypedDict": ".gitinfo",
|
|
6476
6518
|
"GitLogResult": ".gitlogresult",
|
|
6477
6519
|
"GitLogResultTypedDict": ".gitlogresult",
|
|
@@ -7931,6 +7973,25 @@ _dynamic_imports: dict[str, str] = {
|
|
|
7931
7973
|
"OutputAzureLogsTimeoutRetrySettingsTypedDict": ".outputazurelogs",
|
|
7932
7974
|
"OutputAzureLogsType": ".outputazurelogs",
|
|
7933
7975
|
"OutputAzureLogsTypedDict": ".outputazurelogs",
|
|
7976
|
+
"OutputChronicle": ".outputchronicle",
|
|
7977
|
+
"OutputChronicleAuthenticationMethod": ".outputchronicle",
|
|
7978
|
+
"OutputChronicleBackpressureBehavior": ".outputchronicle",
|
|
7979
|
+
"OutputChronicleCompression": ".outputchronicle",
|
|
7980
|
+
"OutputChronicleCustomLabel": ".outputchronicle",
|
|
7981
|
+
"OutputChronicleCustomLabelTypedDict": ".outputchronicle",
|
|
7982
|
+
"OutputChronicleExtraHTTPHeader": ".outputchronicle",
|
|
7983
|
+
"OutputChronicleExtraHTTPHeaderTypedDict": ".outputchronicle",
|
|
7984
|
+
"OutputChronicleFailedRequestLoggingMode": ".outputchronicle",
|
|
7985
|
+
"OutputChronicleMode": ".outputchronicle",
|
|
7986
|
+
"OutputChroniclePqControls": ".outputchronicle",
|
|
7987
|
+
"OutputChroniclePqControlsTypedDict": ".outputchronicle",
|
|
7988
|
+
"OutputChronicleQueueFullBehavior": ".outputchronicle",
|
|
7989
|
+
"OutputChronicleResponseRetrySetting": ".outputchronicle",
|
|
7990
|
+
"OutputChronicleResponseRetrySettingTypedDict": ".outputchronicle",
|
|
7991
|
+
"OutputChronicleTimeoutRetrySettings": ".outputchronicle",
|
|
7992
|
+
"OutputChronicleTimeoutRetrySettingsTypedDict": ".outputchronicle",
|
|
7993
|
+
"OutputChronicleType": ".outputchronicle",
|
|
7994
|
+
"OutputChronicleTypedDict": ".outputchronicle",
|
|
7934
7995
|
"ColumnMapping": ".outputclickhouse",
|
|
7935
7996
|
"ColumnMappingTypedDict": ".outputclickhouse",
|
|
7936
7997
|
"MappingType": ".outputclickhouse",
|
|
@@ -8249,8 +8310,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
8249
8310
|
"OutputFilesystemParquetVersion": ".outputfilesystem",
|
|
8250
8311
|
"OutputFilesystemType": ".outputfilesystem",
|
|
8251
8312
|
"OutputFilesystemTypedDict": ".outputfilesystem",
|
|
8252
|
-
"CustomLabel": ".outputgooglechronicle",
|
|
8253
|
-
"CustomLabelTypedDict": ".outputgooglechronicle",
|
|
8254
8313
|
"ExtraLogType": ".outputgooglechronicle",
|
|
8255
8314
|
"ExtraLogTypeTypedDict": ".outputgooglechronicle",
|
|
8256
8315
|
"OutputGoogleChronicle": ".outputgooglechronicle",
|
|
@@ -8258,6 +8317,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
8258
8317
|
"OutputGoogleChronicleAuthenticationMethod": ".outputgooglechronicle",
|
|
8259
8318
|
"OutputGoogleChronicleBackpressureBehavior": ".outputgooglechronicle",
|
|
8260
8319
|
"OutputGoogleChronicleCompression": ".outputgooglechronicle",
|
|
8320
|
+
"OutputGoogleChronicleCustomLabel": ".outputgooglechronicle",
|
|
8321
|
+
"OutputGoogleChronicleCustomLabelTypedDict": ".outputgooglechronicle",
|
|
8261
8322
|
"OutputGoogleChronicleExtraHTTPHeader": ".outputgooglechronicle",
|
|
8262
8323
|
"OutputGoogleChronicleExtraHTTPHeaderTypedDict": ".outputgooglechronicle",
|
|
8263
8324
|
"OutputGoogleChronicleFailedRequestLoggingMode": ".outputgooglechronicle",
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from cribl_control_plane.types import BaseModel
|
|
5
5
|
from cribl_control_plane.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
import pydantic
|
|
7
|
-
from typing import List, Optional
|
|
7
|
+
from typing import Any, Dict, List, Optional
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
@@ -27,7 +27,7 @@ class CreateVersionUndoResponseTypedDict(TypedDict):
|
|
|
27
27
|
|
|
28
28
|
count: NotRequired[int]
|
|
29
29
|
r"""number of items present in the items array"""
|
|
30
|
-
items: NotRequired[List[str]]
|
|
30
|
+
items: NotRequired[List[Dict[str, Any]]]
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class CreateVersionUndoResponse(BaseModel):
|
|
@@ -36,4 +36,4 @@ class CreateVersionUndoResponse(BaseModel):
|
|
|
36
36
|
count: Optional[int] = None
|
|
37
37
|
r"""number of items present in the items array"""
|
|
38
38
|
|
|
39
|
-
items: Optional[List[str]] = None
|
|
39
|
+
items: Optional[List[Dict[str, Any]]] = None
|
|
@@ -9,7 +9,9 @@ from typing_extensions import Annotated, TypedDict
|
|
|
9
9
|
class DistributedSummaryGroupsTypedDict(TypedDict):
|
|
10
10
|
count: float
|
|
11
11
|
destinations: float
|
|
12
|
+
packs: float
|
|
12
13
|
pipelines: float
|
|
14
|
+
quick_connects: float
|
|
13
15
|
routes: float
|
|
14
16
|
sources: float
|
|
15
17
|
|
|
@@ -19,8 +21,12 @@ class DistributedSummaryGroups(BaseModel):
|
|
|
19
21
|
|
|
20
22
|
destinations: float
|
|
21
23
|
|
|
24
|
+
packs: float
|
|
25
|
+
|
|
22
26
|
pipelines: float
|
|
23
27
|
|
|
28
|
+
quick_connects: Annotated[float, pydantic.Field(alias="quickConnects")]
|
|
29
|
+
|
|
24
30
|
routes: float
|
|
25
31
|
|
|
26
32
|
sources: float
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from cribl_control_plane import utils
|
|
4
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from pydantic.functional_validators import PlainValidator
|
|
5
9
|
from typing import Union
|
|
6
|
-
from typing_extensions import TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
7
11
|
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
class RemoteEnum(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
14
|
+
FALSE = "false"
|
|
10
15
|
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
RemoteTypedDict = TypeAliasType("RemoteTypedDict", Union[str, RemoteEnum])
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Remote = TypeAliasType(
|
|
21
|
+
"Remote",
|
|
22
|
+
Union[str, Annotated[RemoteEnum, PlainValidator(validate_open_enum(False))]],
|
|
23
|
+
)
|
|
13
24
|
|
|
14
25
|
|
|
15
26
|
class GitInfoTypedDict(TypedDict):
|