11# generated by datamodel-codegen:
22# filename: schema.json
3- # timestamp: 2025-11-12T19:13:24 +00:00
3+ # timestamp: 2025-12-13T22:00:27 +00:00
44# using the command:
55# datamodel-codegen --input tests\usethis\_integrations\ci\bitbucket\schema.json --input-file-type jsonschema --output src\usethis\_integrations\ci\bitbucket\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --extra-fields=allow --output-model-type pydantic_v2.BaseModel --target-python-version 3.10
66# ruff: noqa: ERA001
@@ -106,6 +106,11 @@ class Cloud(BaseModel):
106106 alias = "atlassian-ip-ranges" ,
107107 description = "Whether it uses Atlassian ip ranges." ,
108108 )
109+ instance_type : str | None = Field (
110+ default = None ,
111+ alias = "instance-type" ,
112+ description = "Instance type for the cloud runtime." ,
113+ )
109114 version : str | None = Field (default = None , description = "Cloud Runtime version." )
110115
111116
@@ -160,6 +165,12 @@ class ImportPipeline(BaseModel):
160165 )
161166
162167
168+ class RunsOnItem (RootModel [str ]):
169+ root : str = Field (
170+ ..., description = "Label of a runner." , max_length = 50 , title = "Step Runner Label"
171+ )
172+
173+
163174class TriggerConfiguration (BaseModel ):
164175 model_config = ConfigDict (
165176 extra = "allow" ,
@@ -191,6 +202,56 @@ class ImageBase(BaseModel):
191202 )
192203
193204
205+ class StorageAwsAuth1 (BaseModel ):
206+ model_config = ConfigDict (
207+ extra = "allow" ,
208+ )
209+ access_key : str = Field (..., alias = "access-key" , description = "The AWS access key" )
210+ bucket : str = Field (..., description = "The name of the S3 bucket" )
211+ oidc_role : str | None = Field (
212+ default = None , alias = "oidc-role" , description = "The OIDC role to assume"
213+ )
214+ region : str = Field (..., description = "The AWS region" )
215+ secret_key : str = Field (..., alias = "secret-key" , description = "The AWS secret key" )
216+
217+
218+ class StorageAwsAuth2 (BaseModel ):
219+ model_config = ConfigDict (
220+ extra = "allow" ,
221+ )
222+ access_key : str | None = Field (
223+ default = None , alias = "access-key" , description = "The AWS access key"
224+ )
225+ bucket : str = Field (..., description = "The name of the S3 bucket" )
226+ oidc_role : str = Field (
227+ ..., alias = "oidc-role" , description = "The OIDC role to assume"
228+ )
229+ region : str = Field (..., description = "The AWS region" )
230+ secret_key : str | None = Field (
231+ default = None , alias = "secret-key" , description = "The AWS secret key"
232+ )
233+
234+
235+ class StorageAwsAuth (RootModel [StorageAwsAuth1 | StorageAwsAuth2 ]):
236+ root : StorageAwsAuth1 | StorageAwsAuth2 = Field (
237+ ...,
238+ description = "Amazon web services self hosted storage" ,
239+ title = "Custom aws self hosted storage" ,
240+ )
241+
242+
243+ class StorageGcpAuth (BaseModel ):
244+ model_config = ConfigDict (
245+ extra = "allow" ,
246+ )
247+ bucket : str = Field (..., description = "The name of the GCP bucket" )
248+ key_file : str = Field (
249+ ...,
250+ alias = "key-file" ,
251+ description = "The GCP key file contents encoded in Base64 format" ,
252+ )
253+
254+
194255class Variable (BaseModel ):
195256 model_config = ConfigDict (
196257 extra = "allow" ,
@@ -282,12 +343,6 @@ class Pipe(BaseModel):
282343 )
283344
284345
285- class RunsOnItem (RootModel [str ]):
286- root : str = Field (
287- ..., description = "Label of a runner." , max_length = 50 , title = "Step Runner Label"
288- )
289-
290-
291346class ArtifactsUpload (BaseModel ):
292347 model_config = ConfigDict (
293348 extra = "allow" ,
@@ -319,13 +374,6 @@ class ArtifactsUpload(BaseModel):
319374 )
320375
321376
322- class Runtime (BaseModel ):
323- model_config = ConfigDict (
324- extra = "allow" ,
325- )
326- cloud : Cloud | None = None
327-
328-
329377class TriggerConfigurationList (RootModel [list [TriggerConfiguration ]]):
330378 root : list [TriggerConfiguration ] = Field (
331379 ...,
@@ -375,19 +423,6 @@ class ImageNoAuth(ImageBase):
375423 username : Any | None = None
376424
377425
378- class Script (RootModel [list [str | Pipe | ScriptItemAnchor ]]):
379- root : list [str | Pipe | ScriptItemAnchor ] = Field (..., min_length = 1 )
380-
381-
382- class ArtifactsExpanded (BaseModel ):
383- model_config = ConfigDict (
384- extra = "allow" ,
385- )
386- download : bool | Download | None = None
387- paths : ArtifactsPaths | None = None
388- upload : list [ArtifactsUpload ] | None = Field (default = None , min_length = 1 )
389-
390-
391426class RunsOnExpanded (RootModel [list [RunsOnItem ]]):
392427 root : list [RunsOnItem ] = Field (
393428 ...,
@@ -399,16 +434,47 @@ class RunsOnExpanded(RootModel[list[RunsOnItem]]):
399434 )
400435
401436
402- class Options (BaseModel ):
437+ class Storage (BaseModel ):
403438 model_config = ConfigDict (
404439 extra = "allow" ,
405440 )
406- docker : bool | None = Field (
407- default = False , description = "Enables Docker service for every step."
441+ gcp : StorageGcpAuth
442+
443+
444+ class Storage1 (BaseModel ):
445+ model_config = ConfigDict (
446+ extra = "allow" ,
408447 )
409- max_time : MaxTime | None = Field (default = None , alias = "max-time" )
410- runtime : Runtime | None = None
411- size : Size | None = None
448+ aws : StorageAwsAuth
449+
450+
451+ class SelfHosted (BaseModel ):
452+ model_config = ConfigDict (
453+ extra = "allow" ,
454+ )
455+ cpu : int | None = Field (
456+ default = None , description = "Cpu available to runner." , title = "Cpu"
457+ )
458+ memory : int | None = Field (
459+ default = None , description = "Memory (mb) available to runner." , title = "Memory"
460+ )
461+ storage : Storage | Storage1 | None = None
462+ volumes : list [str ] | None = Field (
463+ default = [], description = "Volumes to be mounted into the build container."
464+ )
465+
466+
467+ class Script (RootModel [list [str | Pipe | ScriptItemAnchor ]]):
468+ root : list [str | Pipe | ScriptItemAnchor ] = Field (..., min_length = 1 )
469+
470+
471+ class ArtifactsExpanded (BaseModel ):
472+ model_config = ConfigDict (
473+ extra = "allow" ,
474+ )
475+ download : bool | Download | None = None
476+ paths : ArtifactsPaths | None = None
477+ upload : list [ArtifactsUpload ] | None = Field (default = None , min_length = 1 )
412478
413479
414480class Cache (RootModel [CachePath | CacheExpanded ]):
@@ -419,6 +485,18 @@ class Image(RootModel[ImageNoAuth | ImageBasicAuth | ImageAwsAuth | ImageName]):
419485 root : ImageNoAuth | ImageBasicAuth | ImageAwsAuth | ImageName
420486
421487
488+ class RunsOn (RootModel [RunsOnItem | RunsOnExpanded ]):
489+ root : RunsOnItem | RunsOnExpanded
490+
491+
492+ class Runtime (BaseModel ):
493+ model_config = ConfigDict (
494+ extra = "allow" ,
495+ )
496+ cloud : Cloud | None = None
497+ self_hosted : SelfHosted | None = Field (default = None , alias = "self-hosted" )
498+
499+
422500class Service (BaseModel ):
423501 model_config = ConfigDict (
424502 extra = "allow" ,
@@ -445,8 +523,17 @@ class Artifacts(RootModel[ArtifactsPaths | ArtifactsExpanded]):
445523 root : ArtifactsPaths | ArtifactsExpanded
446524
447525
448- class RunsOn (RootModel [RunsOnItem | RunsOnExpanded ]):
449- root : RunsOnItem | RunsOnExpanded
526+ class Options (BaseModel ):
527+ model_config = ConfigDict (
528+ extra = "allow" ,
529+ )
530+ docker : bool | None = Field (
531+ default = False , description = "Enables Docker service for every step."
532+ )
533+ max_time : MaxTime | None = Field (default = None , alias = "max-time" )
534+ runs_on : RunsOn | None = Field (default = None , alias = "runs-on" )
535+ runtime : Runtime | None = None
536+ size : Size | None = None
450537
451538
452539class StepBase (BaseModel ):
0 commit comments