Skip to content

Commit 3cd5819

Browse files
susilnemtnagorra
authored andcommitted
feat(street): Add schema for project type street
1 parent dec49b7 commit 3cd5819

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

functions/definition/project/common.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ FbEnumProjectType:
3636
value: 3
3737
- label: 'COMPLETENESS'
3838
value: 4
39+
- label: 'STREET'
40+
value: 7
3941

4042
FbProjectReadonlyType:
4143
model: alias
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json
2+
3+
FbProjectStreetCreateOnlyInput:
4+
model: alias
5+
docs: Represents STREET project fields that are valid while creating a project
6+
type:
7+
type: object
8+
fields:
9+
customOptions:
10+
optional: true
11+
type:
12+
type: list
13+
elementType: FbObjCustomOption
14+
numberOfGroups:
15+
type: int
16+
17+
FbMappingGroupStreetCreateOnlyInput:
18+
model: alias
19+
docs: Represents STREET mapping group fields that are valid while creating a mapping group
20+
type:
21+
type: object
22+
fields:
23+
groupId:
24+
type: string
25+
26+
FbMappingTaskStreetCreateOnlyInput:
27+
model: alias
28+
docs: Represents STREET mapping task fields that are valid while creating a task
29+
type:
30+
type: object
31+
fields:
32+
taskId:
33+
type: string
34+
groupId:
35+
type: string

functions/generated/pyfirebase/pyfirebase_mapswipe/models.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class FbEnumProjectType(enum.Enum):
120120
VALIDATE_IMAGE = 10
121121
COMPARE = 3
122122
COMPLETENESS = 4
123+
STREET = 7
123124

124125

125126
class FbProjectReadonlyType(TypesyncModel):
@@ -339,6 +340,52 @@ class FbEnumOverlayTileServerType(enum.Enum):
339340
VECTOR = "vector"
340341

341342

343+
class FbProjectStreetCreateOnlyInput(TypesyncModel):
344+
"""Represents STREET project fields that are valid while creating a project"""
345+
346+
customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
347+
numberOfGroups: int
348+
349+
class Config:
350+
use_enum_values = False
351+
extra = "forbid"
352+
353+
@typing.override
354+
def __setattr__(self, name: str, value: typing.Any) -> None:
355+
if name == "customOptions" and value is None:
356+
raise ValueError("'customOptions' field cannot be set to None")
357+
super().__setattr__(name, value)
358+
359+
360+
class FbMappingGroupStreetCreateOnlyInput(TypesyncModel):
361+
"""Represents STREET mapping group fields that are valid while creating a mapping group"""
362+
363+
groupId: str
364+
365+
class Config:
366+
use_enum_values = False
367+
extra = "forbid"
368+
369+
@typing.override
370+
def __setattr__(self, name: str, value: typing.Any) -> None:
371+
super().__setattr__(name, value)
372+
373+
374+
class FbMappingTaskStreetCreateOnlyInput(TypesyncModel):
375+
"""Represents STREET mapping task fields that are valid while creating a task"""
376+
377+
taskId: str
378+
groupId: str
379+
380+
class Config:
381+
use_enum_values = False
382+
extra = "forbid"
383+
384+
@typing.override
385+
def __setattr__(self, name: str, value: typing.Any) -> None:
386+
super().__setattr__(name, value)
387+
388+
342389
class FbMappingGroupTileMapServiceCreateOnlyInput(TypesyncModel):
343390
"""Represents TILE_MAP_SERVICE mapping group fields that are valid while creating a mapping group"""
344391

0 commit comments

Comments
 (0)