cribl-control-plane 0.0.38__py3-none-any.whl → 0.4.0a6__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 +92 -42
- cribl_control_plane/_version.py +4 -4
- cribl_control_plane/acl.py +5 -3
- cribl_control_plane/auth_sdk.py +6 -3
- cribl_control_plane/basesdk.py +11 -1
- cribl_control_plane/commits.py +7 -5
- cribl_control_plane/destinations.py +6 -4
- cribl_control_plane/destinations_pq.py +2 -2
- cribl_control_plane/errors/__init__.py +23 -8
- cribl_control_plane/errors/apierror.py +2 -0
- cribl_control_plane/errors/criblcontrolplaneerror.py +11 -7
- cribl_control_plane/errors/error.py +4 -2
- cribl_control_plane/errors/healthserverstatus_error.py +41 -0
- cribl_control_plane/errors/no_response_error.py +5 -1
- cribl_control_plane/errors/responsevalidationerror.py +2 -0
- cribl_control_plane/groups_configs.py +8 -3
- cribl_control_plane/groups_sdk.py +64 -38
- cribl_control_plane/health.py +22 -12
- cribl_control_plane/httpclient.py +0 -1
- cribl_control_plane/lakedatasets.py +40 -12
- cribl_control_plane/models/__init__.py +1180 -54
- cribl_control_plane/models/authtoken.py +5 -1
- cribl_control_plane/models/{routecloneconf.py → branchinfo.py} +4 -4
- cribl_control_plane/models/cacheconnection.py +30 -2
- cribl_control_plane/models/cacheconnectionbackfillstatus.py +2 -1
- cribl_control_plane/models/cloudprovider.py +2 -1
- cribl_control_plane/models/configgroup.py +66 -11
- cribl_control_plane/models/configgroupcloud.py +17 -3
- cribl_control_plane/models/createconfiggroupbyproductop.py +27 -9
- cribl_control_plane/models/createinputhectokenbyidop.py +6 -5
- cribl_control_plane/models/createroutesappendbyidop.py +2 -2
- cribl_control_plane/models/createversionpushop.py +5 -5
- cribl_control_plane/models/createversionrevertop.py +2 -2
- cribl_control_plane/models/createversionundoop.py +3 -3
- cribl_control_plane/models/cribllakedataset.py +22 -2
- cribl_control_plane/models/cribllakedatasetupdate.py +95 -0
- cribl_control_plane/models/datasetmetadata.py +18 -2
- cribl_control_plane/models/deleteconfiggroupbyproductandidop.py +18 -2
- cribl_control_plane/models/deleteoutputpqbyidop.py +5 -5
- cribl_control_plane/models/deletepipelinebyidop.py +2 -2
- cribl_control_plane/models/difffiles.py +171 -0
- cribl_control_plane/models/distributedsummary.py +6 -0
- cribl_control_plane/models/getconfiggroupaclbyproductandidop.py +24 -2
- cribl_control_plane/models/getconfiggroupaclteamsbyproductandidop.py +24 -2
- cribl_control_plane/models/getconfiggroupbyproductandidop.py +14 -1
- cribl_control_plane/models/getconfiggroupconfigversionbyproductandidop.py +18 -2
- cribl_control_plane/models/getoutputpqbyidop.py +6 -5
- cribl_control_plane/models/getpipelinebyidop.py +2 -2
- cribl_control_plane/models/getroutesbyidop.py +2 -2
- cribl_control_plane/models/getsummaryop.py +18 -2
- cribl_control_plane/models/getversionbranchop.py +6 -5
- cribl_control_plane/models/getversioncountop.py +6 -5
- cribl_control_plane/models/getversiondiffop.py +6 -5
- cribl_control_plane/models/getversionshowop.py +6 -5
- cribl_control_plane/models/gitcountresult.py +13 -0
- cribl_control_plane/models/gitdiffresult.py +16 -0
- cribl_control_plane/models/gitinfo.py +14 -3
- cribl_control_plane/models/gitshowresult.py +19 -0
- cribl_control_plane/models/groupcreaterequest.py +171 -0
- cribl_control_plane/models/hbcriblinfo.py +39 -3
- cribl_control_plane/models/healthserverstatus.py +55 -0
- cribl_control_plane/models/heartbeatmetadata.py +3 -0
- cribl_control_plane/models/input.py +83 -78
- cribl_control_plane/models/inputappscope.py +126 -30
- cribl_control_plane/models/inputazureblob.py +62 -6
- cribl_control_plane/models/inputcloudflarehec.py +513 -0
- cribl_control_plane/models/inputcollection.py +47 -4
- cribl_control_plane/models/inputconfluentcloud.py +254 -30
- cribl_control_plane/models/inputcribl.py +47 -4
- cribl_control_plane/models/inputcriblhttp.py +121 -30
- cribl_control_plane/models/inputcribllakehttp.py +122 -30
- cribl_control_plane/models/inputcriblmetrics.py +48 -4
- cribl_control_plane/models/inputcribltcp.py +122 -24
- cribl_control_plane/models/inputcrowdstrike.py +92 -10
- cribl_control_plane/models/inputdatadogagent.py +98 -24
- cribl_control_plane/models/inputdatagen.py +47 -4
- cribl_control_plane/models/inputedgeprometheus.py +210 -50
- cribl_control_plane/models/inputelastic.py +167 -36
- cribl_control_plane/models/inputeventhub.py +209 -6
- cribl_control_plane/models/inputexec.py +59 -6
- cribl_control_plane/models/inputfile.py +78 -10
- cribl_control_plane/models/inputfirehose.py +97 -24
- cribl_control_plane/models/inputgooglepubsub.py +67 -6
- cribl_control_plane/models/inputgrafana.py +251 -71
- cribl_control_plane/models/inputhttp.py +97 -24
- cribl_control_plane/models/inputhttpraw.py +97 -24
- cribl_control_plane/models/inputjournalfiles.py +48 -4
- cribl_control_plane/models/inputkafka.py +248 -26
- cribl_control_plane/models/inputkinesis.py +130 -14
- cribl_control_plane/models/inputkubeevents.py +47 -4
- cribl_control_plane/models/inputkubelogs.py +61 -8
- cribl_control_plane/models/inputkubemetrics.py +61 -8
- cribl_control_plane/models/inputloki.py +113 -34
- cribl_control_plane/models/inputmetrics.py +97 -24
- cribl_control_plane/models/inputmodeldriventelemetry.py +107 -26
- cribl_control_plane/models/inputmsk.py +141 -30
- cribl_control_plane/models/inputnetflow.py +47 -4
- cribl_control_plane/models/inputoffice365mgmt.py +112 -14
- cribl_control_plane/models/inputoffice365msgtrace.py +114 -16
- cribl_control_plane/models/inputoffice365service.py +114 -16
- cribl_control_plane/models/inputopentelemetry.py +143 -32
- cribl_control_plane/models/inputprometheus.py +193 -44
- cribl_control_plane/models/inputprometheusrw.py +114 -27
- cribl_control_plane/models/inputrawudp.py +47 -4
- cribl_control_plane/models/inputs3.py +78 -8
- cribl_control_plane/models/inputs3inventory.py +92 -10
- cribl_control_plane/models/inputsecuritylake.py +93 -10
- cribl_control_plane/models/inputsnmp.py +68 -6
- cribl_control_plane/models/inputsplunk.py +130 -28
- cribl_control_plane/models/inputsplunkhec.py +111 -25
- cribl_control_plane/models/inputsplunksearch.py +108 -14
- cribl_control_plane/models/inputsqs.py +99 -16
- cribl_control_plane/models/inputsyslog.py +189 -47
- cribl_control_plane/models/inputsystemmetrics.py +202 -32
- cribl_control_plane/models/inputsystemstate.py +61 -8
- cribl_control_plane/models/inputtcp.py +122 -26
- cribl_control_plane/models/inputtcpjson.py +112 -26
- cribl_control_plane/models/inputwef.py +121 -15
- cribl_control_plane/models/inputwindowsmetrics.py +186 -33
- cribl_control_plane/models/inputwineventlogs.py +93 -11
- cribl_control_plane/models/inputwiz.py +78 -8
- cribl_control_plane/models/inputwizwebhook.py +97 -24
- cribl_control_plane/models/inputzscalerhec.py +111 -25
- cribl_control_plane/models/jobinfo.py +34 -0
- cribl_control_plane/models/jobstatus.py +48 -0
- cribl_control_plane/models/lakedatasetmetrics.py +17 -0
- cribl_control_plane/models/lakehouseconnectiontype.py +2 -1
- cribl_control_plane/models/listconfiggroupbyproductop.py +14 -1
- cribl_control_plane/models/logininfo.py +3 -3
- cribl_control_plane/models/masterworkerentry.py +17 -2
- cribl_control_plane/models/nodeactiveupgradestatus.py +2 -1
- cribl_control_plane/models/nodefailedupgradestatus.py +2 -1
- cribl_control_plane/models/nodeprovidedinfo.py +11 -1
- cribl_control_plane/models/nodeskippedupgradestatus.py +2 -1
- cribl_control_plane/models/nodeupgradestate.py +2 -1
- cribl_control_plane/models/nodeupgradestatus.py +51 -5
- cribl_control_plane/models/outpostnodeinfo.py +16 -0
- cribl_control_plane/models/output.py +104 -90
- cribl_control_plane/models/outputazureblob.py +171 -18
- cribl_control_plane/models/outputazuredataexplorer.py +514 -90
- cribl_control_plane/models/outputazureeventhub.py +315 -31
- cribl_control_plane/models/outputazurelogs.py +145 -26
- cribl_control_plane/models/outputchronicle.py +532 -0
- cribl_control_plane/models/outputclickhouse.py +205 -34
- cribl_control_plane/models/outputcloudflarer2.py +632 -0
- cribl_control_plane/models/outputcloudwatch.py +129 -23
- cribl_control_plane/models/outputconfluentcloud.py +384 -57
- cribl_control_plane/models/outputcriblhttp.py +199 -32
- cribl_control_plane/models/outputcribllake.py +156 -16
- cribl_control_plane/models/outputcribltcp.py +194 -29
- cribl_control_plane/models/outputcrowdstrikenextgensiem.py +172 -28
- cribl_control_plane/models/outputdatabricks.py +501 -0
- cribl_control_plane/models/outputdatadog.py +199 -31
- cribl_control_plane/models/outputdataset.py +181 -29
- cribl_control_plane/models/outputdiskspool.py +17 -2
- cribl_control_plane/models/outputdls3.py +233 -24
- cribl_control_plane/models/outputdynatracehttp.py +208 -34
- cribl_control_plane/models/outputdynatraceotlp.py +210 -36
- cribl_control_plane/models/outputelastic.py +199 -30
- cribl_control_plane/models/outputelasticcloud.py +171 -26
- cribl_control_plane/models/outputexabeam.py +96 -10
- cribl_control_plane/models/outputfilesystem.py +139 -14
- cribl_control_plane/models/outputgooglechronicle.py +216 -35
- cribl_control_plane/models/outputgooglecloudlogging.py +174 -31
- cribl_control_plane/models/outputgooglecloudstorage.py +215 -24
- cribl_control_plane/models/outputgooglepubsub.py +131 -23
- cribl_control_plane/models/outputgrafanacloud.py +376 -74
- cribl_control_plane/models/outputgraphite.py +128 -25
- cribl_control_plane/models/outputhoneycomb.py +145 -26
- cribl_control_plane/models/outputhumiohec.py +162 -28
- cribl_control_plane/models/outputinfluxdb.py +165 -28
- cribl_control_plane/models/outputkafka.py +375 -52
- cribl_control_plane/models/outputkinesis.py +165 -27
- cribl_control_plane/models/outputloki.py +164 -34
- cribl_control_plane/models/outputmicrosoftfabric.py +540 -0
- cribl_control_plane/models/outputminio.py +225 -25
- cribl_control_plane/models/outputmsk.py +267 -54
- cribl_control_plane/models/outputnewrelic.py +171 -29
- cribl_control_plane/models/outputnewrelicevents.py +163 -28
- cribl_control_plane/models/outputopentelemetry.py +240 -40
- cribl_control_plane/models/outputprometheus.py +145 -26
- cribl_control_plane/models/outputring.py +49 -8
- cribl_control_plane/models/outputs3.py +233 -26
- cribl_control_plane/models/outputsecuritylake.py +179 -18
- cribl_control_plane/models/outputsentinel.py +172 -29
- cribl_control_plane/models/outputsentineloneaisiem.py +181 -35
- cribl_control_plane/models/outputservicenow.py +223 -38
- cribl_control_plane/models/outputsignalfx.py +145 -26
- cribl_control_plane/models/outputsns.py +143 -25
- cribl_control_plane/models/outputsplunk.py +206 -36
- cribl_control_plane/models/outputsplunkhec.py +238 -26
- cribl_control_plane/models/outputsplunklb.py +253 -43
- cribl_control_plane/models/outputsqs.py +163 -33
- cribl_control_plane/models/outputstatsd.py +127 -25
- cribl_control_plane/models/outputstatsdext.py +128 -25
- cribl_control_plane/models/outputsumologic.py +146 -25
- cribl_control_plane/models/outputsyslog.py +318 -46
- cribl_control_plane/models/outputtcpjson.py +186 -32
- cribl_control_plane/models/outputwavefront.py +145 -26
- cribl_control_plane/models/outputwebhook.py +211 -33
- cribl_control_plane/models/outputxsiam.py +143 -26
- cribl_control_plane/models/packinfo.py +8 -5
- cribl_control_plane/models/packinstallinfo.py +11 -8
- cribl_control_plane/models/productscore.py +2 -1
- cribl_control_plane/models/rbacresource.py +2 -1
- cribl_control_plane/models/resourcepolicy.py +15 -2
- cribl_control_plane/models/routeconf.py +3 -4
- cribl_control_plane/models/runnablejob.py +27 -0
- cribl_control_plane/models/runnablejobcollection.py +669 -0
- cribl_control_plane/models/runnablejobexecutor.py +368 -0
- cribl_control_plane/models/runnablejobscheduledsearch.py +286 -0
- cribl_control_plane/models/updateconfiggroupbyproductandidop.py +19 -2
- cribl_control_plane/models/updateconfiggroupdeploybyproductandidop.py +19 -2
- cribl_control_plane/models/updatecribllakedatasetbylakeidandidop.py +9 -5
- cribl_control_plane/models/updateinputhectokenbyidandtokenop.py +6 -5
- cribl_control_plane/models/updatepacksop.py +25 -0
- cribl_control_plane/models/updatepipelinebyidop.py +6 -6
- cribl_control_plane/models/updateroutesbyidop.py +2 -2
- cribl_control_plane/models/uploadpackresponse.py +13 -0
- cribl_control_plane/models/workertypes.py +2 -1
- cribl_control_plane/nodes.py +5 -3
- cribl_control_plane/packs.py +202 -7
- cribl_control_plane/pipelines.py +18 -18
- cribl_control_plane/routes_sdk.py +22 -22
- cribl_control_plane/sdk.py +19 -6
- cribl_control_plane/sources.py +5 -3
- cribl_control_plane/tokens.py +23 -15
- cribl_control_plane/utils/__init__.py +15 -3
- cribl_control_plane/utils/annotations.py +32 -8
- cribl_control_plane/utils/eventstreaming.py +10 -0
- cribl_control_plane/utils/retries.py +69 -5
- cribl_control_plane/utils/unmarshal_json_response.py +15 -1
- cribl_control_plane/versions.py +11 -6
- {cribl_control_plane-0.0.38.dist-info → cribl_control_plane-0.4.0a6.dist-info}/METADATA +69 -23
- cribl_control_plane-0.4.0a6.dist-info/RECORD +336 -0
- {cribl_control_plane-0.0.38.dist-info → cribl_control_plane-0.4.0a6.dist-info}/WHEEL +1 -1
- cribl_control_plane-0.4.0a6.dist-info/licenses/LICENSE +201 -0
- cribl_control_plane/errors/healthstatus_error.py +0 -32
- cribl_control_plane/models/appmode.py +0 -13
- cribl_control_plane/models/healthstatus.py +0 -33
- cribl_control_plane-0.0.38.dist-info/RECORD +0 -315
|
@@ -1,9 +1,13 @@
|
|
|
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 models, utils
|
|
4
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
5
7
|
from enum import Enum
|
|
6
8
|
import pydantic
|
|
9
|
+
from pydantic import field_serializer
|
|
10
|
+
from pydantic.functional_validators import PlainValidator
|
|
7
11
|
from typing import List, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
@@ -23,20 +27,32 @@ class InputExecConnection(BaseModel):
|
|
|
23
27
|
pipeline: Optional[str] = None
|
|
24
28
|
|
|
25
29
|
|
|
26
|
-
class InputExecMode(str, Enum):
|
|
30
|
+
class InputExecMode(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
27
31
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
28
32
|
|
|
33
|
+
# Smart
|
|
29
34
|
SMART = "smart"
|
|
35
|
+
# Always On
|
|
30
36
|
ALWAYS = "always"
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class InputExecCompression(str, Enum):
|
|
39
|
+
class InputExecCompression(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
34
40
|
r"""Codec to use to compress the persisted data"""
|
|
35
41
|
|
|
42
|
+
# None
|
|
36
43
|
NONE = "none"
|
|
44
|
+
# Gzip
|
|
37
45
|
GZIP = "gzip"
|
|
38
46
|
|
|
39
47
|
|
|
48
|
+
class InputExecPqControlsTypedDict(TypedDict):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InputExecPqControls(BaseModel):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
40
56
|
class InputExecPqTypedDict(TypedDict):
|
|
41
57
|
mode: NotRequired[InputExecMode]
|
|
42
58
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
@@ -52,10 +68,13 @@ class InputExecPqTypedDict(TypedDict):
|
|
|
52
68
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
53
69
|
compress: NotRequired[InputExecCompression]
|
|
54
70
|
r"""Codec to use to compress the persisted data"""
|
|
71
|
+
pq_controls: NotRequired[InputExecPqControlsTypedDict]
|
|
55
72
|
|
|
56
73
|
|
|
57
74
|
class InputExecPq(BaseModel):
|
|
58
|
-
mode:
|
|
75
|
+
mode: Annotated[
|
|
76
|
+
Optional[InputExecMode], PlainValidator(validate_open_enum(False))
|
|
77
|
+
] = InputExecMode.ALWAYS
|
|
59
78
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
60
79
|
|
|
61
80
|
max_buffer_size: Annotated[
|
|
@@ -79,11 +98,35 @@ class InputExecPq(BaseModel):
|
|
|
79
98
|
path: Optional[str] = "$CRIBL_HOME/state/queues"
|
|
80
99
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
81
100
|
|
|
82
|
-
compress:
|
|
101
|
+
compress: Annotated[
|
|
102
|
+
Optional[InputExecCompression], PlainValidator(validate_open_enum(False))
|
|
103
|
+
] = InputExecCompression.NONE
|
|
83
104
|
r"""Codec to use to compress the persisted data"""
|
|
84
105
|
|
|
106
|
+
pq_controls: Annotated[
|
|
107
|
+
Optional[InputExecPqControls], pydantic.Field(alias="pqControls")
|
|
108
|
+
] = None
|
|
85
109
|
|
|
86
|
-
|
|
110
|
+
@field_serializer("mode")
|
|
111
|
+
def serialize_mode(self, value):
|
|
112
|
+
if isinstance(value, str):
|
|
113
|
+
try:
|
|
114
|
+
return models.InputExecMode(value)
|
|
115
|
+
except ValueError:
|
|
116
|
+
return value
|
|
117
|
+
return value
|
|
118
|
+
|
|
119
|
+
@field_serializer("compress")
|
|
120
|
+
def serialize_compress(self, value):
|
|
121
|
+
if isinstance(value, str):
|
|
122
|
+
try:
|
|
123
|
+
return models.InputExecCompression(value)
|
|
124
|
+
except ValueError:
|
|
125
|
+
return value
|
|
126
|
+
return value
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class ScheduleType(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
87
130
|
r"""Select a schedule type; either an interval (in seconds) or a cron-style schedule."""
|
|
88
131
|
|
|
89
132
|
INTERVAL = "interval"
|
|
@@ -177,7 +220,8 @@ class InputExec(BaseModel):
|
|
|
177
220
|
r"""Maximum number of retry attempts in the event that the command fails"""
|
|
178
221
|
|
|
179
222
|
schedule_type: Annotated[
|
|
180
|
-
Optional[ScheduleType],
|
|
223
|
+
Annotated[Optional[ScheduleType], PlainValidator(validate_open_enum(False))],
|
|
224
|
+
pydantic.Field(alias="scheduleType"),
|
|
181
225
|
] = ScheduleType.INTERVAL
|
|
182
226
|
r"""Select a schedule type; either an interval (in seconds) or a cron-style schedule."""
|
|
183
227
|
|
|
@@ -203,3 +247,12 @@ class InputExec(BaseModel):
|
|
|
203
247
|
"* * * * *"
|
|
204
248
|
)
|
|
205
249
|
r"""Cron schedule to execute the command on."""
|
|
250
|
+
|
|
251
|
+
@field_serializer("schedule_type")
|
|
252
|
+
def serialize_schedule_type(self, value):
|
|
253
|
+
if isinstance(value, str):
|
|
254
|
+
try:
|
|
255
|
+
return models.ScheduleType(value)
|
|
256
|
+
except ValueError:
|
|
257
|
+
return value
|
|
258
|
+
return value
|
|
@@ -1,9 +1,13 @@
|
|
|
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 models, utils
|
|
4
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
5
7
|
from enum import Enum
|
|
6
8
|
import pydantic
|
|
9
|
+
from pydantic import field_serializer
|
|
10
|
+
from pydantic.functional_validators import PlainValidator
|
|
7
11
|
from typing import List, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
@@ -23,20 +27,32 @@ class InputFileConnection(BaseModel):
|
|
|
23
27
|
pipeline: Optional[str] = None
|
|
24
28
|
|
|
25
29
|
|
|
26
|
-
class InputFilePqMode(str, Enum):
|
|
30
|
+
class InputFilePqMode(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
27
31
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
28
32
|
|
|
33
|
+
# Smart
|
|
29
34
|
SMART = "smart"
|
|
35
|
+
# Always On
|
|
30
36
|
ALWAYS = "always"
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class InputFileCompression(str, Enum):
|
|
39
|
+
class InputFileCompression(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
34
40
|
r"""Codec to use to compress the persisted data"""
|
|
35
41
|
|
|
42
|
+
# None
|
|
36
43
|
NONE = "none"
|
|
44
|
+
# Gzip
|
|
37
45
|
GZIP = "gzip"
|
|
38
46
|
|
|
39
47
|
|
|
48
|
+
class InputFilePqControlsTypedDict(TypedDict):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InputFilePqControls(BaseModel):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
40
56
|
class InputFilePqTypedDict(TypedDict):
|
|
41
57
|
mode: NotRequired[InputFilePqMode]
|
|
42
58
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
@@ -52,10 +68,13 @@ class InputFilePqTypedDict(TypedDict):
|
|
|
52
68
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
53
69
|
compress: NotRequired[InputFileCompression]
|
|
54
70
|
r"""Codec to use to compress the persisted data"""
|
|
71
|
+
pq_controls: NotRequired[InputFilePqControlsTypedDict]
|
|
55
72
|
|
|
56
73
|
|
|
57
74
|
class InputFilePq(BaseModel):
|
|
58
|
-
mode:
|
|
75
|
+
mode: Annotated[
|
|
76
|
+
Optional[InputFilePqMode], PlainValidator(validate_open_enum(False))
|
|
77
|
+
] = InputFilePqMode.ALWAYS
|
|
59
78
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
60
79
|
|
|
61
80
|
max_buffer_size: Annotated[
|
|
@@ -79,15 +98,41 @@ class InputFilePq(BaseModel):
|
|
|
79
98
|
path: Optional[str] = "$CRIBL_HOME/state/queues"
|
|
80
99
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
81
100
|
|
|
82
|
-
compress:
|
|
101
|
+
compress: Annotated[
|
|
102
|
+
Optional[InputFileCompression], PlainValidator(validate_open_enum(False))
|
|
103
|
+
] = InputFileCompression.NONE
|
|
83
104
|
r"""Codec to use to compress the persisted data"""
|
|
84
105
|
|
|
106
|
+
pq_controls: Annotated[
|
|
107
|
+
Optional[InputFilePqControls], pydantic.Field(alias="pqControls")
|
|
108
|
+
] = None
|
|
85
109
|
|
|
86
|
-
|
|
110
|
+
@field_serializer("mode")
|
|
111
|
+
def serialize_mode(self, value):
|
|
112
|
+
if isinstance(value, str):
|
|
113
|
+
try:
|
|
114
|
+
return models.InputFilePqMode(value)
|
|
115
|
+
except ValueError:
|
|
116
|
+
return value
|
|
117
|
+
return value
|
|
118
|
+
|
|
119
|
+
@field_serializer("compress")
|
|
120
|
+
def serialize_compress(self, value):
|
|
121
|
+
if isinstance(value, str):
|
|
122
|
+
try:
|
|
123
|
+
return models.InputFileCompression(value)
|
|
124
|
+
except ValueError:
|
|
125
|
+
return value
|
|
126
|
+
return value
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class InputFileMode(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
87
130
|
r"""Choose how to discover files to monitor"""
|
|
88
131
|
|
|
89
|
-
|
|
132
|
+
# Manual
|
|
90
133
|
MANUAL = "manual"
|
|
134
|
+
# Auto
|
|
135
|
+
AUTO = "auto"
|
|
91
136
|
|
|
92
137
|
|
|
93
138
|
class InputFileMetadatumTypedDict(TypedDict):
|
|
@@ -127,12 +172,16 @@ class InputFileTypedDict(TypedDict):
|
|
|
127
172
|
r"""Time, in seconds, between scanning for files"""
|
|
128
173
|
filenames: NotRequired[List[str]]
|
|
129
174
|
r"""The full path of discovered files are matched against this wildcard list"""
|
|
175
|
+
filter_archived_files: NotRequired[bool]
|
|
176
|
+
r"""Apply filename allowlist to file entries in archive file types, like tar or zip."""
|
|
130
177
|
tail_only: NotRequired[bool]
|
|
131
178
|
r"""Read only new entries at the end of all files discovered at next startup. @{product} will then read newly discovered files from the head. Disable this to resume reading all files from head."""
|
|
132
179
|
idle_timeout: NotRequired[float]
|
|
133
180
|
r"""Time, in seconds, before an idle file is closed"""
|
|
181
|
+
min_age_dur: NotRequired[str]
|
|
182
|
+
r"""The minimum age of files to monitor. Format examples: 30s, 15m, 1h. Age is relative to file modification time. Leave empty to apply no age filters."""
|
|
134
183
|
max_age_dur: NotRequired[str]
|
|
135
|
-
r"""The maximum age of
|
|
184
|
+
r"""The maximum age of event timestamps to collect. Format examples: 60s, 4h, 3d, 1w. Can be used in conjuction with \"Check file modification times\". Leave empty to apply no age filters."""
|
|
136
185
|
check_file_mod_time: NotRequired[bool]
|
|
137
186
|
r"""Skip files with modification times earlier than the maximum age duration"""
|
|
138
187
|
force_text: NotRequired[bool]
|
|
@@ -187,7 +236,9 @@ class InputFile(BaseModel):
|
|
|
187
236
|
|
|
188
237
|
pq: Optional[InputFilePq] = None
|
|
189
238
|
|
|
190
|
-
mode:
|
|
239
|
+
mode: Annotated[
|
|
240
|
+
Optional[InputFileMode], PlainValidator(validate_open_enum(False))
|
|
241
|
+
] = InputFileMode.MANUAL
|
|
191
242
|
r"""Choose how to discover files to monitor"""
|
|
192
243
|
|
|
193
244
|
interval: Optional[float] = 10
|
|
@@ -196,14 +247,22 @@ class InputFile(BaseModel):
|
|
|
196
247
|
filenames: Optional[List[str]] = None
|
|
197
248
|
r"""The full path of discovered files are matched against this wildcard list"""
|
|
198
249
|
|
|
199
|
-
|
|
250
|
+
filter_archived_files: Annotated[
|
|
251
|
+
Optional[bool], pydantic.Field(alias="filterArchivedFiles")
|
|
252
|
+
] = False
|
|
253
|
+
r"""Apply filename allowlist to file entries in archive file types, like tar or zip."""
|
|
254
|
+
|
|
255
|
+
tail_only: Annotated[Optional[bool], pydantic.Field(alias="tailOnly")] = True
|
|
200
256
|
r"""Read only new entries at the end of all files discovered at next startup. @{product} will then read newly discovered files from the head. Disable this to resume reading all files from head."""
|
|
201
257
|
|
|
202
258
|
idle_timeout: Annotated[Optional[float], pydantic.Field(alias="idleTimeout")] = 300
|
|
203
259
|
r"""Time, in seconds, before an idle file is closed"""
|
|
204
260
|
|
|
261
|
+
min_age_dur: Annotated[Optional[str], pydantic.Field(alias="minAgeDur")] = None
|
|
262
|
+
r"""The minimum age of files to monitor. Format examples: 30s, 15m, 1h. Age is relative to file modification time. Leave empty to apply no age filters."""
|
|
263
|
+
|
|
205
264
|
max_age_dur: Annotated[Optional[str], pydantic.Field(alias="maxAgeDur")] = None
|
|
206
|
-
r"""The maximum age of
|
|
265
|
+
r"""The maximum age of event timestamps to collect. Format examples: 60s, 4h, 3d, 1w. Can be used in conjuction with \"Check file modification times\". Leave empty to apply no age filters."""
|
|
207
266
|
|
|
208
267
|
check_file_mod_time: Annotated[
|
|
209
268
|
Optional[bool], pydantic.Field(alias="checkFileModTime")
|
|
@@ -248,3 +307,12 @@ class InputFile(BaseModel):
|
|
|
248
307
|
Optional[bool], pydantic.Field(alias="includeUnidentifiableBinary")
|
|
249
308
|
] = False
|
|
250
309
|
r"""Stream binary files as Base64-encoded chunks."""
|
|
310
|
+
|
|
311
|
+
@field_serializer("mode")
|
|
312
|
+
def serialize_mode(self, value):
|
|
313
|
+
if isinstance(value, str):
|
|
314
|
+
try:
|
|
315
|
+
return models.InputFileMode(value)
|
|
316
|
+
except ValueError:
|
|
317
|
+
return value
|
|
318
|
+
return value
|
|
@@ -1,10 +1,14 @@
|
|
|
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 models, utils
|
|
4
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
5
7
|
from enum import Enum
|
|
6
8
|
import pydantic
|
|
7
|
-
from
|
|
9
|
+
from pydantic import field_serializer
|
|
10
|
+
from pydantic.functional_validators import PlainValidator
|
|
11
|
+
from typing import List, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
10
14
|
|
|
@@ -23,20 +27,32 @@ class InputFirehoseConnection(BaseModel):
|
|
|
23
27
|
pipeline: Optional[str] = None
|
|
24
28
|
|
|
25
29
|
|
|
26
|
-
class InputFirehoseMode(str, Enum):
|
|
30
|
+
class InputFirehoseMode(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
27
31
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
28
32
|
|
|
33
|
+
# Smart
|
|
29
34
|
SMART = "smart"
|
|
35
|
+
# Always On
|
|
30
36
|
ALWAYS = "always"
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class InputFirehoseCompression(str, Enum):
|
|
39
|
+
class InputFirehoseCompression(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
34
40
|
r"""Codec to use to compress the persisted data"""
|
|
35
41
|
|
|
42
|
+
# None
|
|
36
43
|
NONE = "none"
|
|
44
|
+
# Gzip
|
|
37
45
|
GZIP = "gzip"
|
|
38
46
|
|
|
39
47
|
|
|
48
|
+
class InputFirehosePqControlsTypedDict(TypedDict):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InputFirehosePqControls(BaseModel):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
40
56
|
class InputFirehosePqTypedDict(TypedDict):
|
|
41
57
|
mode: NotRequired[InputFirehoseMode]
|
|
42
58
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
@@ -52,10 +68,13 @@ class InputFirehosePqTypedDict(TypedDict):
|
|
|
52
68
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
53
69
|
compress: NotRequired[InputFirehoseCompression]
|
|
54
70
|
r"""Codec to use to compress the persisted data"""
|
|
71
|
+
pq_controls: NotRequired[InputFirehosePqControlsTypedDict]
|
|
55
72
|
|
|
56
73
|
|
|
57
74
|
class InputFirehosePq(BaseModel):
|
|
58
|
-
mode:
|
|
75
|
+
mode: Annotated[
|
|
76
|
+
Optional[InputFirehoseMode], PlainValidator(validate_open_enum(False))
|
|
77
|
+
] = InputFirehoseMode.ALWAYS
|
|
59
78
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
60
79
|
|
|
61
80
|
max_buffer_size: Annotated[
|
|
@@ -79,18 +98,42 @@ class InputFirehosePq(BaseModel):
|
|
|
79
98
|
path: Optional[str] = "$CRIBL_HOME/state/queues"
|
|
80
99
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
81
100
|
|
|
82
|
-
compress:
|
|
101
|
+
compress: Annotated[
|
|
102
|
+
Optional[InputFirehoseCompression], PlainValidator(validate_open_enum(False))
|
|
103
|
+
] = InputFirehoseCompression.NONE
|
|
83
104
|
r"""Codec to use to compress the persisted data"""
|
|
84
105
|
|
|
106
|
+
pq_controls: Annotated[
|
|
107
|
+
Optional[InputFirehosePqControls], pydantic.Field(alias="pqControls")
|
|
108
|
+
] = None
|
|
85
109
|
|
|
86
|
-
|
|
110
|
+
@field_serializer("mode")
|
|
111
|
+
def serialize_mode(self, value):
|
|
112
|
+
if isinstance(value, str):
|
|
113
|
+
try:
|
|
114
|
+
return models.InputFirehoseMode(value)
|
|
115
|
+
except ValueError:
|
|
116
|
+
return value
|
|
117
|
+
return value
|
|
118
|
+
|
|
119
|
+
@field_serializer("compress")
|
|
120
|
+
def serialize_compress(self, value):
|
|
121
|
+
if isinstance(value, str):
|
|
122
|
+
try:
|
|
123
|
+
return models.InputFirehoseCompression(value)
|
|
124
|
+
except ValueError:
|
|
125
|
+
return value
|
|
126
|
+
return value
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class InputFirehoseMinimumTLSVersion(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
87
130
|
TL_SV1 = "TLSv1"
|
|
88
131
|
TL_SV1_1 = "TLSv1.1"
|
|
89
132
|
TL_SV1_2 = "TLSv1.2"
|
|
90
133
|
TL_SV1_3 = "TLSv1.3"
|
|
91
134
|
|
|
92
135
|
|
|
93
|
-
class InputFirehoseMaximumTLSVersion(str, Enum):
|
|
136
|
+
class InputFirehoseMaximumTLSVersion(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
94
137
|
TL_SV1 = "TLSv1"
|
|
95
138
|
TL_SV1_1 = "TLSv1.1"
|
|
96
139
|
TL_SV1_2 = "TLSv1.2"
|
|
@@ -99,6 +142,12 @@ class InputFirehoseMaximumTLSVersion(str, Enum):
|
|
|
99
142
|
|
|
100
143
|
class InputFirehoseTLSSettingsServerSideTypedDict(TypedDict):
|
|
101
144
|
disabled: NotRequired[bool]
|
|
145
|
+
request_cert: NotRequired[bool]
|
|
146
|
+
r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
|
|
147
|
+
reject_unauthorized: NotRequired[bool]
|
|
148
|
+
r"""Reject certificates not authorized by a CA in the CA certificate path or by another trusted CA (such as the system's)"""
|
|
149
|
+
common_name_regex: NotRequired[str]
|
|
150
|
+
r"""Regex matching allowable common names in peer certificates' subject attribute"""
|
|
102
151
|
certificate_name: NotRequired[str]
|
|
103
152
|
r"""The name of the predefined certificate"""
|
|
104
153
|
priv_key_path: NotRequired[str]
|
|
@@ -109,10 +158,6 @@ class InputFirehoseTLSSettingsServerSideTypedDict(TypedDict):
|
|
|
109
158
|
r"""Path on server containing certificates to use. PEM format. Can reference $ENV_VARS."""
|
|
110
159
|
ca_path: NotRequired[str]
|
|
111
160
|
r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
|
|
112
|
-
request_cert: NotRequired[bool]
|
|
113
|
-
r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
|
|
114
|
-
reject_unauthorized: NotRequired[Any]
|
|
115
|
-
common_name_regex: NotRequired[Any]
|
|
116
161
|
min_version: NotRequired[InputFirehoseMinimumTLSVersion]
|
|
117
162
|
max_version: NotRequired[InputFirehoseMaximumTLSVersion]
|
|
118
163
|
|
|
@@ -120,6 +165,19 @@ class InputFirehoseTLSSettingsServerSideTypedDict(TypedDict):
|
|
|
120
165
|
class InputFirehoseTLSSettingsServerSide(BaseModel):
|
|
121
166
|
disabled: Optional[bool] = True
|
|
122
167
|
|
|
168
|
+
request_cert: Annotated[Optional[bool], pydantic.Field(alias="requestCert")] = False
|
|
169
|
+
r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
|
|
170
|
+
|
|
171
|
+
reject_unauthorized: Annotated[
|
|
172
|
+
Optional[bool], pydantic.Field(alias="rejectUnauthorized")
|
|
173
|
+
] = True
|
|
174
|
+
r"""Reject certificates not authorized by a CA in the CA certificate path or by another trusted CA (such as the system's)"""
|
|
175
|
+
|
|
176
|
+
common_name_regex: Annotated[
|
|
177
|
+
Optional[str], pydantic.Field(alias="commonNameRegex")
|
|
178
|
+
] = "/.*/"
|
|
179
|
+
r"""Regex matching allowable common names in peer certificates' subject attribute"""
|
|
180
|
+
|
|
123
181
|
certificate_name: Annotated[
|
|
124
182
|
Optional[str], pydantic.Field(alias="certificateName")
|
|
125
183
|
] = None
|
|
@@ -137,25 +195,40 @@ class InputFirehoseTLSSettingsServerSide(BaseModel):
|
|
|
137
195
|
ca_path: Annotated[Optional[str], pydantic.Field(alias="caPath")] = None
|
|
138
196
|
r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
|
|
139
197
|
|
|
140
|
-
request_cert: Annotated[Optional[bool], pydantic.Field(alias="requestCert")] = False
|
|
141
|
-
r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
|
|
142
|
-
|
|
143
|
-
reject_unauthorized: Annotated[
|
|
144
|
-
Optional[Any], pydantic.Field(alias="rejectUnauthorized")
|
|
145
|
-
] = None
|
|
146
|
-
|
|
147
|
-
common_name_regex: Annotated[
|
|
148
|
-
Optional[Any], pydantic.Field(alias="commonNameRegex")
|
|
149
|
-
] = None
|
|
150
|
-
|
|
151
198
|
min_version: Annotated[
|
|
152
|
-
|
|
199
|
+
Annotated[
|
|
200
|
+
Optional[InputFirehoseMinimumTLSVersion],
|
|
201
|
+
PlainValidator(validate_open_enum(False)),
|
|
202
|
+
],
|
|
203
|
+
pydantic.Field(alias="minVersion"),
|
|
153
204
|
] = None
|
|
154
205
|
|
|
155
206
|
max_version: Annotated[
|
|
156
|
-
|
|
207
|
+
Annotated[
|
|
208
|
+
Optional[InputFirehoseMaximumTLSVersion],
|
|
209
|
+
PlainValidator(validate_open_enum(False)),
|
|
210
|
+
],
|
|
211
|
+
pydantic.Field(alias="maxVersion"),
|
|
157
212
|
] = None
|
|
158
213
|
|
|
214
|
+
@field_serializer("min_version")
|
|
215
|
+
def serialize_min_version(self, value):
|
|
216
|
+
if isinstance(value, str):
|
|
217
|
+
try:
|
|
218
|
+
return models.InputFirehoseMinimumTLSVersion(value)
|
|
219
|
+
except ValueError:
|
|
220
|
+
return value
|
|
221
|
+
return value
|
|
222
|
+
|
|
223
|
+
@field_serializer("max_version")
|
|
224
|
+
def serialize_max_version(self, value):
|
|
225
|
+
if isinstance(value, str):
|
|
226
|
+
try:
|
|
227
|
+
return models.InputFirehoseMaximumTLSVersion(value)
|
|
228
|
+
except ValueError:
|
|
229
|
+
return value
|
|
230
|
+
return value
|
|
231
|
+
|
|
159
232
|
|
|
160
233
|
class InputFirehoseMetadatumTypedDict(TypedDict):
|
|
161
234
|
name: str
|
|
@@ -1,9 +1,13 @@
|
|
|
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 models, utils
|
|
4
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
5
7
|
from enum import Enum
|
|
6
8
|
import pydantic
|
|
9
|
+
from pydantic import field_serializer
|
|
10
|
+
from pydantic.functional_validators import PlainValidator
|
|
7
11
|
from typing import List, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
@@ -23,20 +27,32 @@ class InputGooglePubsubConnection(BaseModel):
|
|
|
23
27
|
pipeline: Optional[str] = None
|
|
24
28
|
|
|
25
29
|
|
|
26
|
-
class InputGooglePubsubMode(str, Enum):
|
|
30
|
+
class InputGooglePubsubMode(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
27
31
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
28
32
|
|
|
33
|
+
# Smart
|
|
29
34
|
SMART = "smart"
|
|
35
|
+
# Always On
|
|
30
36
|
ALWAYS = "always"
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class InputGooglePubsubCompression(str, Enum):
|
|
39
|
+
class InputGooglePubsubCompression(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
34
40
|
r"""Codec to use to compress the persisted data"""
|
|
35
41
|
|
|
42
|
+
# None
|
|
36
43
|
NONE = "none"
|
|
44
|
+
# Gzip
|
|
37
45
|
GZIP = "gzip"
|
|
38
46
|
|
|
39
47
|
|
|
48
|
+
class InputGooglePubsubPqControlsTypedDict(TypedDict):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InputGooglePubsubPqControls(BaseModel):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
40
56
|
class InputGooglePubsubPqTypedDict(TypedDict):
|
|
41
57
|
mode: NotRequired[InputGooglePubsubMode]
|
|
42
58
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
@@ -52,10 +68,13 @@ class InputGooglePubsubPqTypedDict(TypedDict):
|
|
|
52
68
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
53
69
|
compress: NotRequired[InputGooglePubsubCompression]
|
|
54
70
|
r"""Codec to use to compress the persisted data"""
|
|
71
|
+
pq_controls: NotRequired[InputGooglePubsubPqControlsTypedDict]
|
|
55
72
|
|
|
56
73
|
|
|
57
74
|
class InputGooglePubsubPq(BaseModel):
|
|
58
|
-
mode:
|
|
75
|
+
mode: Annotated[
|
|
76
|
+
Optional[InputGooglePubsubMode], PlainValidator(validate_open_enum(False))
|
|
77
|
+
] = InputGooglePubsubMode.ALWAYS
|
|
59
78
|
r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
|
|
60
79
|
|
|
61
80
|
max_buffer_size: Annotated[
|
|
@@ -79,15 +98,45 @@ class InputGooglePubsubPq(BaseModel):
|
|
|
79
98
|
path: Optional[str] = "$CRIBL_HOME/state/queues"
|
|
80
99
|
r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
|
|
81
100
|
|
|
82
|
-
compress:
|
|
101
|
+
compress: Annotated[
|
|
102
|
+
Optional[InputGooglePubsubCompression],
|
|
103
|
+
PlainValidator(validate_open_enum(False)),
|
|
104
|
+
] = InputGooglePubsubCompression.NONE
|
|
83
105
|
r"""Codec to use to compress the persisted data"""
|
|
84
106
|
|
|
107
|
+
pq_controls: Annotated[
|
|
108
|
+
Optional[InputGooglePubsubPqControls], pydantic.Field(alias="pqControls")
|
|
109
|
+
] = None
|
|
85
110
|
|
|
86
|
-
|
|
111
|
+
@field_serializer("mode")
|
|
112
|
+
def serialize_mode(self, value):
|
|
113
|
+
if isinstance(value, str):
|
|
114
|
+
try:
|
|
115
|
+
return models.InputGooglePubsubMode(value)
|
|
116
|
+
except ValueError:
|
|
117
|
+
return value
|
|
118
|
+
return value
|
|
119
|
+
|
|
120
|
+
@field_serializer("compress")
|
|
121
|
+
def serialize_compress(self, value):
|
|
122
|
+
if isinstance(value, str):
|
|
123
|
+
try:
|
|
124
|
+
return models.InputGooglePubsubCompression(value)
|
|
125
|
+
except ValueError:
|
|
126
|
+
return value
|
|
127
|
+
return value
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class InputGooglePubsubGoogleAuthenticationMethod(
|
|
131
|
+
str, Enum, metaclass=utils.OpenEnumMeta
|
|
132
|
+
):
|
|
87
133
|
r"""Choose Auto to use Google Application Default Credentials (ADC), Manual to enter Google service account credentials directly, or Secret to select or create a stored secret that references Google service account credentials."""
|
|
88
134
|
|
|
135
|
+
# Auto
|
|
89
136
|
AUTO = "auto"
|
|
137
|
+
# Manual
|
|
90
138
|
MANUAL = "manual"
|
|
139
|
+
# Secret
|
|
91
140
|
SECRET = "secret"
|
|
92
141
|
|
|
93
142
|
|
|
@@ -206,7 +255,10 @@ class InputGooglePubsub(BaseModel):
|
|
|
206
255
|
r"""Region to retrieve messages from. Select 'default' to allow Google to auto-select the nearest region. When using ordered delivery, the selected region must be allowed by message storage policy."""
|
|
207
256
|
|
|
208
257
|
google_auth_method: Annotated[
|
|
209
|
-
|
|
258
|
+
Annotated[
|
|
259
|
+
Optional[InputGooglePubsubGoogleAuthenticationMethod],
|
|
260
|
+
PlainValidator(validate_open_enum(False)),
|
|
261
|
+
],
|
|
210
262
|
pydantic.Field(alias="googleAuthMethod"),
|
|
211
263
|
] = InputGooglePubsubGoogleAuthenticationMethod.MANUAL
|
|
212
264
|
r"""Choose Auto to use Google Application Default Credentials (ADC), Manual to enter Google service account credentials directly, or Secret to select or create a stored secret that references Google service account credentials."""
|
|
@@ -239,3 +291,12 @@ class InputGooglePubsub(BaseModel):
|
|
|
239
291
|
Optional[bool], pydantic.Field(alias="orderedDelivery")
|
|
240
292
|
] = False
|
|
241
293
|
r"""Receive events in the order they were added to the queue. The process sending events must have ordering enabled."""
|
|
294
|
+
|
|
295
|
+
@field_serializer("google_auth_method")
|
|
296
|
+
def serialize_google_auth_method(self, value):
|
|
297
|
+
if isinstance(value, str):
|
|
298
|
+
try:
|
|
299
|
+
return models.InputGooglePubsubGoogleAuthenticationMethod(value)
|
|
300
|
+
except ValueError:
|
|
301
|
+
return value
|
|
302
|
+
return value
|