hydra-ext 0.17.4__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.
Files changed (86) hide show
  1. hydra/atlas.py +469 -0
  2. hydra/avro/coder.py +919 -0
  3. hydra/avro/encoder.py +831 -0
  4. hydra/avro/environment.py +173 -0
  5. hydra/avro/language.py +70 -0
  6. hydra/avro/schema.py +372 -0
  7. hydra/avro/schema_json.py +579 -0
  8. hydra/avro/testing.py +579 -0
  9. hydra/azure/dtld.py +1343 -0
  10. hydra/cpp/coder.py +821 -0
  11. hydra/cpp/environment.py +42 -0
  12. hydra/cpp/language.py +215 -0
  13. hydra/cpp/names.py +144 -0
  14. hydra/cpp/serde.py +1524 -0
  15. hydra/cpp/syntax.py +3721 -0
  16. hydra/cpp/utils.py +383 -0
  17. hydra/csharp/language.py +198 -0
  18. hydra/csharp/syntax.py +9166 -0
  19. hydra/datalog/syntax.py +302 -0
  20. hydra/delta/parquet.py +238 -0
  21. hydra/dsl/atlas.py +2844 -0
  22. hydra/dsl/avro/environment.py +311 -0
  23. hydra/dsl/avro/schema.py +891 -0
  24. hydra/dsl/avro/testing.py +1568 -0
  25. hydra/dsl/azure/dtld.py +6022 -0
  26. hydra/dsl/cpp/environment.py +65 -0
  27. hydra/dsl/cpp/syntax.py +6534 -0
  28. hydra/dsl/csharp/syntax.py +19393 -0
  29. hydra/dsl/datalog/syntax.py +459 -0
  30. hydra/dsl/delta/parquet.py +411 -0
  31. hydra/dsl/geojson/model.py +816 -0
  32. hydra/dsl/graphql/syntax.py +5405 -0
  33. hydra/dsl/iana/linkrelations.py +618 -0
  34. hydra/dsl/json/schema/model.py +525 -0
  35. hydra/dsl/kusto/kql.py +2122 -0
  36. hydra/dsl/osv/schema.py +1668 -0
  37. hydra/dsl/parquet/format.py +5682 -0
  38. hydra/dsl/pegasus/pdl.py +1025 -0
  39. hydra/dsl/protobuf/any.py +61 -0
  40. hydra/dsl/protobuf/environment.py +78 -0
  41. hydra/dsl/protobuf/proto3.py +966 -0
  42. hydra/dsl/protobuf/source_context.py +36 -0
  43. hydra/dsl/rust/syntax.py +9021 -0
  44. hydra/dsl/sql/syntax.py +3676 -0
  45. hydra/dsl/stac/items.py +738 -0
  46. hydra/dsl/workflow.py +220 -0
  47. hydra/geojson/model.py +448 -0
  48. hydra/graphql/coder.py +422 -0
  49. hydra/graphql/language.py +83 -0
  50. hydra/graphql/serde.py +187 -0
  51. hydra/graphql/syntax.py +2462 -0
  52. hydra/iana/linkrelations.py +378 -0
  53. hydra/json/schema/coder.py +344 -0
  54. hydra/json/schema/language.py +62 -0
  55. hydra/json/schema/model.py +380 -0
  56. hydra/json/schema/serde.py +472 -0
  57. hydra/kusto/kql.py +1155 -0
  58. hydra/osv/schema.py +423 -0
  59. hydra/parquet/format.py +1626 -0
  60. hydra/pegasus/coder.py +387 -0
  61. hydra/pegasus/language.py +69 -0
  62. hydra/pegasus/pdl.py +479 -0
  63. hydra/pegasus/serde.py +177 -0
  64. hydra/protobuf/any.py +40 -0
  65. hydra/protobuf/coder.py +771 -0
  66. hydra/protobuf/environment.py +60 -0
  67. hydra/protobuf/language.py +119 -0
  68. hydra/protobuf/proto3.py +424 -0
  69. hydra/protobuf/serde.py +313 -0
  70. hydra/protobuf/source_context.py +33 -0
  71. hydra/rust/coder.py +627 -0
  72. hydra/rust/language.py +196 -0
  73. hydra/rust/operators.py +275 -0
  74. hydra/rust/serde.py +1405 -0
  75. hydra/rust/syntax.py +3643 -0
  76. hydra/sql/syntax.py +1940 -0
  77. hydra/stac/items.py +289 -0
  78. hydra/workflow.py +115 -0
  79. hydra/yaml/coder.py +307 -0
  80. hydra/yaml/language.py +70 -0
  81. hydra/yaml/serde.py +279 -0
  82. hydra_ext-0.17.4.dist-info/METADATA +106 -0
  83. hydra_ext-0.17.4.dist-info/RECORD +86 -0
  84. hydra_ext-0.17.4.dist-info/WHEEL +4 -0
  85. hydra_ext-0.17.4.dist-info/licenses/LICENSE +201 -0
  86. hydra_ext-0.17.4.dist-info/licenses/NOTICE +3 -0
hydra/atlas.py ADDED
@@ -0,0 +1,469 @@
1
+ # Note: this is an automatically generated file. Do not edit.
2
+
3
+ r"""The Apache Atlas meta-model
4
+ Based on the the org.apache.atlas.model package in the master branch as of 2022-06-01
5
+ https://github.com/apache/atlas/tree/master/intg/src/main/java/org/apache/atlas/model."""
6
+
7
+ from __future__ import annotations
8
+ from collections.abc import Mapping, Sequence, Set
9
+ from dataclasses import dataclass, replace
10
+ from enum import Enum
11
+ from functools import lru_cache
12
+ from hydra.overlay.python.dsl.python import Optional
13
+ from hydra.overlay.python.util import ConsList, Lazy, PersistentMap, PersistentSet
14
+ from typing import Annotated, TypeAlias, cast
15
+ import hydra.core
16
+ import hydra.xml.schema
17
+
18
+ @dataclass(frozen=True)
19
+ class AtlasAttributeDef:
20
+ r"""class that captures details of a struct-attribute."""
21
+
22
+ name: Optional[str]
23
+ type_name: Optional[str]
24
+ is_optional: bool
25
+ cardinality: Optional[AtlasAttributeDefCardinality]
26
+ values_min_count: int
27
+ values_max_count: int
28
+ is_unique: bool
29
+ is_indexable: bool
30
+ include_in_notification: bool
31
+ default_value: Optional[str]
32
+ description: Optional[str]
33
+ search_weight: int
34
+ index_type: Optional[AtlasAttributeDefIndexType]
35
+ constraints: Sequence[AtlasConstraintDef]
36
+ options: Mapping[str, str]
37
+ display_name: Optional[str]
38
+
39
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasAttributeDef")
40
+ NAME = hydra.core.Name("name")
41
+ TYPE_NAME = hydra.core.Name("typeName")
42
+ IS_OPTIONAL = hydra.core.Name("isOptional")
43
+ CARDINALITY = hydra.core.Name("cardinality")
44
+ VALUES_MIN_COUNT = hydra.core.Name("valuesMinCount")
45
+ VALUES_MAX_COUNT = hydra.core.Name("valuesMaxCount")
46
+ IS_UNIQUE = hydra.core.Name("isUnique")
47
+ IS_INDEXABLE = hydra.core.Name("isIndexable")
48
+ INCLUDE_IN_NOTIFICATION = hydra.core.Name("includeInNotification")
49
+ DEFAULT_VALUE = hydra.core.Name("defaultValue")
50
+ DESCRIPTION = hydra.core.Name("description")
51
+ SEARCH_WEIGHT = hydra.core.Name("searchWeight")
52
+ INDEX_TYPE = hydra.core.Name("indexType")
53
+ CONSTRAINTS = hydra.core.Name("constraints")
54
+ OPTIONS = hydra.core.Name("options")
55
+ DISPLAY_NAME = hydra.core.Name("displayName")
56
+
57
+ def with_name(self, name):
58
+ return replace(self, name=name)
59
+ def with_type_name(self, type_name):
60
+ return replace(self, type_name=type_name)
61
+ def with_is_optional(self, is_optional):
62
+ return replace(self, is_optional=is_optional)
63
+ def with_cardinality(self, cardinality):
64
+ return replace(self, cardinality=cardinality)
65
+ def with_values_min_count(self, values_min_count):
66
+ return replace(self, values_min_count=values_min_count)
67
+ def with_values_max_count(self, values_max_count):
68
+ return replace(self, values_max_count=values_max_count)
69
+ def with_is_unique(self, is_unique):
70
+ return replace(self, is_unique=is_unique)
71
+ def with_is_indexable(self, is_indexable):
72
+ return replace(self, is_indexable=is_indexable)
73
+ def with_include_in_notification(self, include_in_notification):
74
+ return replace(self, include_in_notification=include_in_notification)
75
+ def with_default_value(self, default_value):
76
+ return replace(self, default_value=default_value)
77
+ def with_description(self, description):
78
+ return replace(self, description=description)
79
+ def with_search_weight(self, search_weight):
80
+ return replace(self, search_weight=search_weight)
81
+ def with_index_type(self, index_type):
82
+ return replace(self, index_type=index_type)
83
+ def with_constraints(self, constraints):
84
+ return replace(self, constraints=constraints)
85
+ def with_options(self, options):
86
+ return replace(self, options=options)
87
+ def with_display_name(self, display_name):
88
+ return replace(self, display_name=display_name)
89
+
90
+ @staticmethod
91
+ def builder():
92
+ return AtlasAttributeDef.Builder()
93
+ @dataclass(frozen=True)
94
+ class Builder:
95
+ _name: Optional[str] = None
96
+ _type_name: Optional[str] = None
97
+ _is_optional: bool = None
98
+ _cardinality: Optional[AtlasAttributeDefCardinality] = None
99
+ _values_min_count: int = None
100
+ _values_max_count: int = None
101
+ _is_unique: bool = None
102
+ _is_indexable: bool = None
103
+ _include_in_notification: bool = None
104
+ _default_value: Optional[str] = None
105
+ _description: Optional[str] = None
106
+ _search_weight: int = None
107
+ _index_type: Optional[AtlasAttributeDefIndexType] = None
108
+ _constraints: Sequence[AtlasConstraintDef] = None
109
+ _options: Mapping[str, str] = None
110
+ _display_name: Optional[str] = None
111
+ def name(self, name):
112
+ return replace(self, _name=name)
113
+ def type_name(self, type_name):
114
+ return replace(self, _type_name=type_name)
115
+ def is_optional(self, is_optional):
116
+ return replace(self, _is_optional=is_optional)
117
+ def cardinality(self, cardinality):
118
+ return replace(self, _cardinality=cardinality)
119
+ def values_min_count(self, values_min_count):
120
+ return replace(self, _values_min_count=values_min_count)
121
+ def values_max_count(self, values_max_count):
122
+ return replace(self, _values_max_count=values_max_count)
123
+ def is_unique(self, is_unique):
124
+ return replace(self, _is_unique=is_unique)
125
+ def is_indexable(self, is_indexable):
126
+ return replace(self, _is_indexable=is_indexable)
127
+ def include_in_notification(self, include_in_notification):
128
+ return replace(self, _include_in_notification=include_in_notification)
129
+ def default_value(self, default_value):
130
+ return replace(self, _default_value=default_value)
131
+ def description(self, description):
132
+ return replace(self, _description=description)
133
+ def search_weight(self, search_weight):
134
+ return replace(self, _search_weight=search_weight)
135
+ def index_type(self, index_type):
136
+ return replace(self, _index_type=index_type)
137
+ def constraints(self, constraints):
138
+ return replace(self, _constraints=constraints)
139
+ def options(self, options):
140
+ return replace(self, _options=options)
141
+ def display_name(self, display_name):
142
+ return replace(self, _display_name=display_name)
143
+ def build(self):
144
+ return AtlasAttributeDef(name=self._name,
145
+ type_name=self._type_name,
146
+ is_optional=self._is_optional,
147
+ cardinality=self._cardinality,
148
+ values_min_count=self._values_min_count,
149
+ values_max_count=self._values_max_count,
150
+ is_unique=self._is_unique,
151
+ is_indexable=self._is_indexable,
152
+ include_in_notification=self._include_in_notification,
153
+ default_value=self._default_value,
154
+ description=self._description,
155
+ search_weight=self._search_weight,
156
+ index_type=self._index_type,
157
+ constraints=self._constraints,
158
+ options=self._options,
159
+ display_name=self._display_name)
160
+
161
+ class AtlasAttributeDefCardinality(Enum):
162
+ r"""The cardinality of an Atlas attribute: single-valued, a list, or a set."""
163
+
164
+ SINGLE = hydra.core.Name("single")
165
+
166
+ LIST = hydra.core.Name("list")
167
+
168
+ SET = hydra.core.Name("set")
169
+
170
+ AtlasAttributeDefCardinality.TYPE_ = hydra.core.Name("hydra.atlas.AtlasAttributeDefCardinality")
171
+
172
+ class AtlasAttributeDefIndexType(Enum):
173
+ r"""The index type of an Atlas attribute."""
174
+
175
+ DEFAULT = hydra.core.Name("default")
176
+
177
+ STRING = hydra.core.Name("string")
178
+
179
+ AtlasAttributeDefIndexType.TYPE_ = hydra.core.Name("hydra.atlas.AtlasAttributeDefIndexType")
180
+
181
+ @dataclass(frozen=True)
182
+ class AtlasBaseTypeDef:
183
+ r"""Base class that captures common-attributes for all Atlas types."""
184
+
185
+ category: Optional[TypeCategory]
186
+ guid: Optional[str]
187
+ created_by: Optional[str]
188
+ updated_by: Optional[str]
189
+ create_time: Optional[hydra.xml.schema.DateTime]
190
+ update_time: Optional[hydra.xml.schema.DateTime]
191
+ version: Optional[int]
192
+ name: Optional[str]
193
+ description: Optional[str]
194
+ type_version: Optional[str]
195
+ service_type: Optional[str]
196
+ options: Mapping[str, str]
197
+
198
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasBaseTypeDef")
199
+ CATEGORY = hydra.core.Name("category")
200
+ GUID = hydra.core.Name("guid")
201
+ CREATED_BY = hydra.core.Name("createdBy")
202
+ UPDATED_BY = hydra.core.Name("updatedBy")
203
+ CREATE_TIME = hydra.core.Name("createTime")
204
+ UPDATE_TIME = hydra.core.Name("updateTime")
205
+ VERSION = hydra.core.Name("version")
206
+ NAME = hydra.core.Name("name")
207
+ DESCRIPTION = hydra.core.Name("description")
208
+ TYPE_VERSION = hydra.core.Name("typeVersion")
209
+ SERVICE_TYPE = hydra.core.Name("serviceType")
210
+ OPTIONS = hydra.core.Name("options")
211
+
212
+ def with_category(self, category):
213
+ return replace(self, category=category)
214
+ def with_guid(self, guid):
215
+ return replace(self, guid=guid)
216
+ def with_created_by(self, created_by):
217
+ return replace(self, created_by=created_by)
218
+ def with_updated_by(self, updated_by):
219
+ return replace(self, updated_by=updated_by)
220
+ def with_create_time(self, create_time):
221
+ return replace(self, create_time=create_time)
222
+ def with_update_time(self, update_time):
223
+ return replace(self, update_time=update_time)
224
+ def with_version(self, version):
225
+ return replace(self, version=version)
226
+ def with_name(self, name):
227
+ return replace(self, name=name)
228
+ def with_description(self, description):
229
+ return replace(self, description=description)
230
+ def with_type_version(self, type_version):
231
+ return replace(self, type_version=type_version)
232
+ def with_service_type(self, service_type):
233
+ return replace(self, service_type=service_type)
234
+ def with_options(self, options):
235
+ return replace(self, options=options)
236
+
237
+ @staticmethod
238
+ def builder():
239
+ return AtlasBaseTypeDef.Builder()
240
+ @dataclass(frozen=True)
241
+ class Builder:
242
+ _category: Optional[TypeCategory] = None
243
+ _guid: Optional[str] = None
244
+ _created_by: Optional[str] = None
245
+ _updated_by: Optional[str] = None
246
+ _create_time: Optional[hydra.xml.schema.DateTime] = None
247
+ _update_time: Optional[hydra.xml.schema.DateTime] = None
248
+ _version: Optional[int] = None
249
+ _name: Optional[str] = None
250
+ _description: Optional[str] = None
251
+ _type_version: Optional[str] = None
252
+ _service_type: Optional[str] = None
253
+ _options: Mapping[str, str] = None
254
+ def category(self, category):
255
+ return replace(self, _category=category)
256
+ def guid(self, guid):
257
+ return replace(self, _guid=guid)
258
+ def created_by(self, created_by):
259
+ return replace(self, _created_by=created_by)
260
+ def updated_by(self, updated_by):
261
+ return replace(self, _updated_by=updated_by)
262
+ def create_time(self, create_time):
263
+ return replace(self, _create_time=create_time)
264
+ def update_time(self, update_time):
265
+ return replace(self, _update_time=update_time)
266
+ def version(self, version):
267
+ return replace(self, _version=version)
268
+ def name(self, name):
269
+ return replace(self, _name=name)
270
+ def description(self, description):
271
+ return replace(self, _description=description)
272
+ def type_version(self, type_version):
273
+ return replace(self, _type_version=type_version)
274
+ def service_type(self, service_type):
275
+ return replace(self, _service_type=service_type)
276
+ def options(self, options):
277
+ return replace(self, _options=options)
278
+ def build(self):
279
+ return AtlasBaseTypeDef(category=self._category,
280
+ guid=self._guid,
281
+ created_by=self._created_by,
282
+ updated_by=self._updated_by,
283
+ create_time=self._create_time,
284
+ update_time=self._update_time,
285
+ version=self._version,
286
+ name=self._name,
287
+ description=self._description,
288
+ type_version=self._type_version,
289
+ service_type=self._service_type,
290
+ options=self._options)
291
+
292
+ @dataclass(frozen=True)
293
+ class AtlasConstraintDef:
294
+ r"""class that captures details of a constraint."""
295
+
296
+ type: Optional[str]
297
+ params: Mapping[str, str]
298
+
299
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasConstraintDef")
300
+ TYPE = hydra.core.Name("type")
301
+ PARAMS = hydra.core.Name("params")
302
+
303
+ def with_type(self, type):
304
+ return replace(self, type=type)
305
+ def with_params(self, params):
306
+ return replace(self, params=params)
307
+
308
+ @staticmethod
309
+ def builder():
310
+ return AtlasConstraintDef.Builder()
311
+ @dataclass(frozen=True)
312
+ class Builder:
313
+ _type: Optional[str] = None
314
+ _params: Mapping[str, str] = None
315
+ def type(self, type):
316
+ return replace(self, _type=type)
317
+ def params(self, params):
318
+ return replace(self, _params=params)
319
+ def build(self):
320
+ return AtlasConstraintDef(type=self._type, params=self._params)
321
+
322
+ @dataclass(frozen=True)
323
+ class AtlasEntityDef:
324
+ r"""class that captures details of a entity-type."""
325
+
326
+ as_atlas_struct: AtlasStructDef
327
+ super_types: Set[str]
328
+ sub_types: Annotated[Set[str], "the value of this field is derived from 'superTypes' specified in all AtlasEntityDef"]
329
+ relationship_attribute_defs: Annotated[Sequence[AtlasRelationshipAttributeDef], "the value of this field is derived from all the relationshipDefs this entityType is referenced in"]
330
+ business_attribute_defs: Annotated[Mapping[str, Sequence[AtlasAttributeDef]], "the value of this field is derived from all the businessMetadataDefs this entityType is referenced in"]
331
+
332
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasEntityDef")
333
+ AS_ATLAS_STRUCT = hydra.core.Name("asAtlasStruct")
334
+ SUPER_TYPES = hydra.core.Name("superTypes")
335
+ SUB_TYPES = hydra.core.Name("subTypes")
336
+ RELATIONSHIP_ATTRIBUTE_DEFS = hydra.core.Name("relationshipAttributeDefs")
337
+ BUSINESS_ATTRIBUTE_DEFS = hydra.core.Name("businessAttributeDefs")
338
+
339
+ def with_as_atlas_struct(self, as_atlas_struct):
340
+ return replace(self, as_atlas_struct=as_atlas_struct)
341
+ def with_super_types(self, super_types):
342
+ return replace(self, super_types=super_types)
343
+ def with_sub_types(self, sub_types):
344
+ return replace(self, sub_types=sub_types)
345
+ def with_relationship_attribute_defs(self, relationship_attribute_defs):
346
+ return replace(self, relationship_attribute_defs=relationship_attribute_defs)
347
+ def with_business_attribute_defs(self, business_attribute_defs):
348
+ return replace(self, business_attribute_defs=business_attribute_defs)
349
+
350
+ @staticmethod
351
+ def builder():
352
+ return AtlasEntityDef.Builder()
353
+ @dataclass(frozen=True)
354
+ class Builder:
355
+ _as_atlas_struct: AtlasStructDef = None
356
+ _super_types: Set[str] = None
357
+ _sub_types: Set[str] = None
358
+ _relationship_attribute_defs: Sequence[AtlasRelationshipAttributeDef] = None
359
+ _business_attribute_defs: Mapping[str, Sequence[AtlasAttributeDef]] = None
360
+ def as_atlas_struct(self, as_atlas_struct):
361
+ return replace(self, _as_atlas_struct=as_atlas_struct)
362
+ def super_types(self, super_types):
363
+ return replace(self, _super_types=super_types)
364
+ def sub_types(self, sub_types):
365
+ return replace(self, _sub_types=sub_types)
366
+ def relationship_attribute_defs(self, relationship_attribute_defs):
367
+ return replace(self, _relationship_attribute_defs=relationship_attribute_defs)
368
+ def business_attribute_defs(self, business_attribute_defs):
369
+ return replace(self, _business_attribute_defs=business_attribute_defs)
370
+ def build(self):
371
+ return AtlasEntityDef(as_atlas_struct=self._as_atlas_struct,
372
+ super_types=self._super_types,
373
+ sub_types=self._sub_types,
374
+ relationship_attribute_defs=self._relationship_attribute_defs,
375
+ business_attribute_defs=self._business_attribute_defs)
376
+
377
+ @dataclass(frozen=True)
378
+ class AtlasRelationshipAttributeDef:
379
+ r"""class that captures details of a struct-attribute."""
380
+
381
+ as_atlas_attribute: AtlasAttributeDef
382
+ relationship_type_name: Optional[str]
383
+ is_legacy_attribute: bool
384
+
385
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasRelationshipAttributeDef")
386
+ AS_ATLAS_ATTRIBUTE = hydra.core.Name("asAtlasAttribute")
387
+ RELATIONSHIP_TYPE_NAME = hydra.core.Name("relationshipTypeName")
388
+ IS_LEGACY_ATTRIBUTE = hydra.core.Name("isLegacyAttribute")
389
+
390
+ def with_as_atlas_attribute(self, as_atlas_attribute):
391
+ return replace(self, as_atlas_attribute=as_atlas_attribute)
392
+ def with_relationship_type_name(self, relationship_type_name):
393
+ return replace(self, relationship_type_name=relationship_type_name)
394
+ def with_is_legacy_attribute(self, is_legacy_attribute):
395
+ return replace(self, is_legacy_attribute=is_legacy_attribute)
396
+
397
+ @staticmethod
398
+ def builder():
399
+ return AtlasRelationshipAttributeDef.Builder()
400
+ @dataclass(frozen=True)
401
+ class Builder:
402
+ _as_atlas_attribute: AtlasAttributeDef = None
403
+ _relationship_type_name: Optional[str] = None
404
+ _is_legacy_attribute: bool = None
405
+ def as_atlas_attribute(self, as_atlas_attribute):
406
+ return replace(self, _as_atlas_attribute=as_atlas_attribute)
407
+ def relationship_type_name(self, relationship_type_name):
408
+ return replace(self, _relationship_type_name=relationship_type_name)
409
+ def is_legacy_attribute(self, is_legacy_attribute):
410
+ return replace(self, _is_legacy_attribute=is_legacy_attribute)
411
+ def build(self):
412
+ return AtlasRelationshipAttributeDef(as_atlas_attribute=self._as_atlas_attribute,
413
+ relationship_type_name=self._relationship_type_name,
414
+ is_legacy_attribute=self._is_legacy_attribute)
415
+
416
+ @dataclass(frozen=True)
417
+ class AtlasStructDef:
418
+ r"""class that captures details of a struct-type."""
419
+
420
+ as_atlas_base_type: AtlasBaseTypeDef
421
+ attribute_defs: Sequence[AtlasAttributeDef]
422
+
423
+ TYPE_ = hydra.core.Name("hydra.atlas.AtlasStructDef")
424
+ AS_ATLAS_BASE_TYPE = hydra.core.Name("asAtlasBaseType")
425
+ ATTRIBUTE_DEFS = hydra.core.Name("attributeDefs")
426
+
427
+ def with_as_atlas_base_type(self, as_atlas_base_type):
428
+ return replace(self, as_atlas_base_type=as_atlas_base_type)
429
+ def with_attribute_defs(self, attribute_defs):
430
+ return replace(self, attribute_defs=attribute_defs)
431
+
432
+ @staticmethod
433
+ def builder():
434
+ return AtlasStructDef.Builder()
435
+ @dataclass(frozen=True)
436
+ class Builder:
437
+ _as_atlas_base_type: AtlasBaseTypeDef = None
438
+ _attribute_defs: Sequence[AtlasAttributeDef] = None
439
+ def as_atlas_base_type(self, as_atlas_base_type):
440
+ return replace(self, _as_atlas_base_type=as_atlas_base_type)
441
+ def attribute_defs(self, attribute_defs):
442
+ return replace(self, _attribute_defs=attribute_defs)
443
+ def build(self):
444
+ return AtlasStructDef(as_atlas_base_type=self._as_atlas_base_type, attribute_defs=self._attribute_defs)
445
+
446
+ class TypeCategory(Enum):
447
+ r"""The category of an Atlas type definition."""
448
+
449
+ PRIMITIVE = hydra.core.Name("primitive")
450
+
451
+ OBJECT_ID_TYPE = hydra.core.Name("objectIdType")
452
+
453
+ ENUM = hydra.core.Name("enum")
454
+
455
+ STRUCT = hydra.core.Name("struct")
456
+
457
+ CLASSIFICATION = hydra.core.Name("classification")
458
+
459
+ ENTITY = hydra.core.Name("entity")
460
+
461
+ ARRAY = hydra.core.Name("array")
462
+
463
+ MAP = hydra.core.Name("map")
464
+
465
+ RELATIONSHIP = hydra.core.Name("relationship")
466
+
467
+ BUSINESS_METADATA = hydra.core.Name("businessMetadata")
468
+
469
+ TypeCategory.TYPE_ = hydra.core.Name("hydra.atlas.TypeCategory")