[python-experimental] improves type hints of optional object properties (#13314)

* Adds Unset type hint for use cases containing additional properties

* Simplifies no addProps type hint template

* Unset type hints added when additionalProperties are off

* Adds __getitem__ unset fix

* Adds unset test

* Fixes non overload method when addprops are present

* Sample regenrated, tests added, readme updated

* Unit test sample updated

* Reverts version files
This commit is contained in:
Justin Black 2022-08-30 16:44:30 -07:00 committed by GitHub
parent a294456695
commit d63caf2539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
329 changed files with 4607 additions and 1672 deletions

View File

@ -50,6 +50,14 @@ object schema properties as classes
keyword in one schema, and include a format constraint in another schema keyword in one schema, and include a format constraint in another schema
- So if you need to access a string format based type, use as_date/as_datetime/as_decimal/as_uuid/ - So if you need to access a string format based type, use as_date/as_datetime/as_decimal/as_uuid/
- So if you need to access a number format based type, use as_int/as_float - So if you need to access a number format based type, use as_int/as_float
7. If object(dict) properties are accessed and they do not exist, then two things could happen
- When accessed with model_instance.someProp or model_instance["someProp"] and someProp is not in the payload,
then two possible results can be returned. If someProp is defined in any of the validated schemas
where it will have to be optional, then the value schemas.unset will be returned.
If someProp was not defined as an explicit property in any of those schemas, then a KeyError will be raised.
- This was done so type hints for optional properties could show that schemas.Unset is a valid value.
- So you will need to update code to handle thrown KeyErrors or schema.unset values
### Object property spec case ### Object property spec case
This was done because when payloads are ingested, they can be validated against N number of schemas. This was done because when payloads are ingested, they can be validated against N number of schemas.

View File

@ -25,18 +25,28 @@ def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.proper
@typing.overload @typing.overload
{{#if complexType}} {{#if complexType}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union['{{complexType}}', schemas.Unset]: ...
{{else}} {{else}}
{{#if nameInSnakeCase}} {{#if nameInSnakeCase}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{name}}, schemas.Unset]: ...
{{else}} {{else}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> typing.Union[MetaOapg.properties.{{baseName}}, schemas.Unset]: ...
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/unless}} {{/unless}}
{{/each}} {{/each}}
{{/if}} {{/if}}
{{#or vars getRequiredVarsMap}}
def __getitem__(self, name: str) -> {{#with additionalProperties}}{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/with}}: @typing.overload
def __getitem__(self, name: str) -> {{#with additionalProperties}}{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/with}}: ...
{{/or}}
def __getitem__(self, name: typing.Union[str, {{#each getRequiredVarsMap}}{{#with this}}typing.Literal["{{{baseName}}}"], {{/with}}{{/each}}{{#each vars}}{{#unless required}}typing.Literal["{{{baseName}}}"], {{/unless}}{{/each}}]){{#not vars}}{{#not getRequiredVarsMap}} -> {{#with additionalProperties}}{{#if complexType}}'{{complexType}}'{{else}}MetaOapg.{{baseName}}{{/if}}{{/with}}{{/not}}{{/not}}:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset

View File

@ -1,30 +1,25 @@
{{#if vars}} {{#if vars}}
{{#each vars}} {{#each vars}}
{{#unless @last}}
@typing.overload @typing.overload
{{#if complexType}} {{#if complexType}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}': ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}'{{complexType}}'{{#unless required}}, schemas.Unset]{{/unless}}: ...
{{else}} {{else}}
{{#if nameInSnakeCase}} {{#if nameInSnakeCase}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}: ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{name}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
{{else}} {{else}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}: ... def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> {{#unless required}}typing.Union[{{/unless}}MetaOapg.properties.{{baseName}}{{#unless required}}, schemas.Unset]{{/unless}}: ...
{{/if}} {{/if}}
{{/if}} {{/if}}
{{else}}
{{#if complexType}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> '{{complexType}}':
{{else}}
{{#if nameInSnakeCase}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{name}}:
{{else}}
def __getitem__(self, name: typing.Literal["{{{baseName}}}"]) -> MetaOapg.properties.{{baseName}}:
{{/if}}
{{/if}}
# dict_instance[name] accessor
return super().__getitem__(name)
{{/unless}}
{{/each}} {{/each}}
def __getitem__(self, name: typing.Literal[{{#each vars}}"{{{baseName}}}", {{/each}}]):
# dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
{{/if}} {{/if}}

View File

@ -23,9 +23,9 @@
{{#unless required}} {{#unless required}}
{{#unless nameInSnakeCase}} {{#unless nameInSnakeCase}}
{{#if complexType}} {{#if complexType}}
{{baseName}}: '{{complexType}}' {{baseName}}: typing.Union['{{complexType}}', schemas.Unset]
{{else}} {{else}}
{{baseName}}: MetaOapg.properties.{{baseName}} {{baseName}}: typing.Union[MetaOapg.properties.{{baseName}}, schemas.Unset]
{{/if}} {{/if}}
{{/unless}} {{/unless}}
{{/unless}} {{/unless}}

View File

@ -42,6 +42,14 @@ object schema properties as classes
keyword in one schema, and include a format constraint in another schema keyword in one schema, and include a format constraint in another schema
- So if you need to access a string format based type, use as_date/as_datetime/as_decimal/as_uuid/ - So if you need to access a string format based type, use as_date/as_datetime/as_decimal/as_uuid/
- So if you need to access a number format based type, use as_int/as_float - So if you need to access a number format based type, use as_int/as_float
7. If object(dict) properties are accessed and they do not exist, then two things could happen
- When accessed with model_instance.someProp or model_instance["someProp"] and someProp is not in the payload,
then two possible results can be returned. If someProp is defined in any of the validated schemas
where it will have to be optional, then the value schemas.unset will be returned.
If someProp was not defined as an explicit property in any of those schemas, then a KeyError will be raised.
- This was done so type hints for optional properties could show that schemas.Unset is a valid value.
- So you will need to update code to handle thrown KeyErrors or schema.unset values
### Object property spec case ### Object property spec case
This was done because when payloads are ingested, they can be validated against N number of schemas. This was done because when payloads are ingested, they can be validated against N number of schemas.

View File

@ -42,18 +42,26 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
} }
additional_properties = schemas.BoolSchema additional_properties = schemas.BoolSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -42,18 +42,26 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate(
} }
additional_properties = schemas.BoolSchema additional_properties = schemas.BoolSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -43,18 +43,26 @@ class AdditionalpropertiesAreAllowedByDefault(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -43,18 +43,26 @@ class AdditionalpropertiesAreAllowedByDefault(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -35,9 +35,14 @@ class AdditionalpropertiesCanExistByItself(
class MetaOapg: class MetaOapg:
additional_properties = schemas.BoolSchema additional_properties = schemas.BoolSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -35,9 +35,14 @@ class AdditionalpropertiesCanExistByItself(
class MetaOapg: class MetaOapg:
additional_properties = schemas.BoolSchema additional_properties = schemas.BoolSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -50,14 +50,22 @@ class AdditionalpropertiesShouldNotLookInApplicators(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -90,9 +98,14 @@ class AdditionalpropertiesShouldNotLookInApplicators(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -50,14 +50,22 @@ class AdditionalpropertiesShouldNotLookInApplicators(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -90,9 +98,14 @@ class AdditionalpropertiesShouldNotLookInApplicators(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class Allof(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class Allof(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class Allof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class Allof(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class Allof(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class Allof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class AllofCombinedWithAnyofOneof(
multiple_of = 2 multiple_of = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +79,14 @@ class AllofCombinedWithAnyofOneof(
multiple_of = 5 multiple_of = 5
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -102,9 +112,14 @@ class AllofCombinedWithAnyofOneof(
multiple_of = 3 multiple_of = 3
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -165,9 +180,14 @@ class AllofCombinedWithAnyofOneof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -45,9 +45,14 @@ class AllofCombinedWithAnyofOneof(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -72,9 +77,14 @@ class AllofCombinedWithAnyofOneof(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -99,9 +109,14 @@ class AllofCombinedWithAnyofOneof(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -162,9 +177,14 @@ class AllofCombinedWithAnyofOneof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class AllofSimpleTypes(
inclusive_maximum = 30 inclusive_maximum = 30
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +79,14 @@ class AllofSimpleTypes(
inclusive_minimum = 20 inclusive_minimum = 20
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -108,9 +118,14 @@ class AllofSimpleTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -45,9 +45,14 @@ class AllofSimpleTypes(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -72,9 +77,14 @@ class AllofSimpleTypes(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -106,9 +116,14 @@ class AllofSimpleTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -66,9 +66,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -108,9 +116,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ... def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["baz"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -149,9 +165,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -66,9 +66,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -108,9 +116,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ... def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.properties.baz: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["baz"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -149,9 +165,17 @@ class AllofWithBaseSchema(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -52,9 +52,14 @@ class AllofWithOneEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -52,9 +52,14 @@ class AllofWithOneEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTheFirstEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTheFirstEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTheLastEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTheLastEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTwoEmptySchemas(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AllofWithTwoEmptySchemas(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -47,9 +47,14 @@ class Anyof(
inclusive_minimum = 2 inclusive_minimum = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -81,9 +86,14 @@ class Anyof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class Anyof(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -80,9 +85,14 @@ class Anyof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class AnyofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class AnyofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class AnyofComplexTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class AnyofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class AnyofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class AnyofComplexTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class AnyofWithBaseSchema(
max_length = 2 max_length = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +79,14 @@ class AnyofWithBaseSchema(
min_length = 4 min_length = 4
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -45,9 +45,14 @@ class AnyofWithBaseSchema(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -72,9 +77,14 @@ class AnyofWithBaseSchema(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AnyofWithOneEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class AnyofWithOneEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class ByInt(
multiple_of = 2 multiple_of = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class ByInt(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class ByNumber(
multiple_of = 1.5 multiple_of = 1.5
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class ByNumber(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class BySmallNumber(
multiple_of = 0.00010 multiple_of = 0.00010
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class BySmallNumber(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -74,17 +74,25 @@ class EnumsInProperties(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
bar: MetaOapg.properties.bar bar: MetaOapg.properties.bar
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -74,17 +74,25 @@ class EnumsInProperties(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
bar: MetaOapg.properties.bar bar: MetaOapg.properties.bar
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class ForbiddenProperty(
not_schema = schemas.AnyTypeSchema not_schema = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -68,14 +73,22 @@ class ForbiddenProperty(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class ForbiddenProperty(
not_schema = schemas.AnyTypeSchema not_schema = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -68,14 +73,22 @@ class ForbiddenProperty(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -49,14 +49,22 @@ class InvalidStringValueForDefault(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,14 +46,22 @@ class InvalidStringValueForDefault(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MaximumValidation(
inclusive_maximum = 3.0 inclusive_maximum = 3.0
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MaximumValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MaximumValidationWithUnsignedInteger(
inclusive_maximum = 300 inclusive_maximum = 300
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MaximumValidationWithUnsignedInteger(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MaxitemsValidation(
max_items = 2 max_items = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MaxitemsValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MaxlengthValidation(
max_length = 2 max_length = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MaxlengthValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class Maxproperties0MeansTheObjectIsEmpty(
max_properties = 0 max_properties = 0
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class Maxproperties0MeansTheObjectIsEmpty(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MaxpropertiesValidation(
max_properties = 2 max_properties = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MaxpropertiesValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MinimumValidation(
inclusive_minimum = 1.1 inclusive_minimum = 1.1
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MinimumValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MinimumValidationWithSignedInteger(
inclusive_minimum = -2 inclusive_minimum = -2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MinimumValidationWithSignedInteger(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MinitemsValidation(
min_items = 1 min_items = 1
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MinitemsValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MinlengthValidation(
min_length = 2 min_length = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MinlengthValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class MinpropertiesValidation(
min_properties = 1 min_properties = 1
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class MinpropertiesValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class ModelNot(
not_schema = schemas.IntSchema not_schema = schemas.IntSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -37,9 +37,14 @@ class ModelNot(
not_schema = schemas.IntSchema not_schema = schemas.IntSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedAllofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedAllofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedAllofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedAllofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedAnyofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedAnyofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedAnyofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedAnyofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedOneofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedOneofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -61,9 +61,14 @@ class NestedOneofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -94,9 +99,14 @@ class NestedOneofToCheckValidationSemantics(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -49,14 +49,22 @@ class NotMoreComplexSchema(
} }
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +82,14 @@ class NotMoreComplexSchema(
) )
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -49,14 +49,22 @@ class NotMoreComplexSchema(
} }
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +82,14 @@ class NotMoreComplexSchema(
) )
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -43,18 +43,26 @@ class ObjectPropertiesValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -43,18 +43,26 @@ class ObjectPropertiesValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
foo: MetaOapg.properties.foo foo: typing.Union[MetaOapg.properties.foo, schemas.Unset]
bar: MetaOapg.properties.bar bar: typing.Union[MetaOapg.properties.bar, schemas.Unset]
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -47,9 +47,14 @@ class Oneof(
inclusive_minimum = 2 inclusive_minimum = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -81,9 +86,14 @@ class Oneof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class Oneof(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -80,9 +85,14 @@ class Oneof(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class OneofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class OneofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class OneofComplexTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -58,9 +58,17 @@ class OneofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ... def __getitem__(self, name: typing.Literal["bar"]) -> MetaOapg.properties.bar: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -100,9 +108,17 @@ class OneofComplexTypes(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.properties.foo: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -136,9 +152,14 @@ class OneofComplexTypes(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -46,9 +46,14 @@ class OneofWithBaseSchema(
min_length = 2 min_length = 2
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -74,9 +79,14 @@ class OneofWithBaseSchema(
max_length = 4 max_length = 4
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -45,9 +45,14 @@ class OneofWithBaseSchema(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -72,9 +77,14 @@ class OneofWithBaseSchema(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class OneofWithEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -54,9 +54,14 @@ class OneofWithEmptySchema(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -59,9 +59,17 @@ class OneofWithRequired(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.additional_properties: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -99,9 +107,17 @@ class OneofWithRequired(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.additional_properties: ... def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["baz"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -133,9 +149,14 @@ class OneofWithRequired(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -59,9 +59,17 @@ class OneofWithRequired(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.additional_properties: ... def __getitem__(self, name: typing.Literal["foo"]) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["bar"], typing.Literal["foo"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -99,9 +107,17 @@ class OneofWithRequired(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.additional_properties: ... def __getitem__(self, name: typing.Literal["baz"]) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo"], typing.Literal["baz"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,
@ -133,9 +149,14 @@ class OneofWithRequired(
] ]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -39,9 +39,14 @@ class PatternIsNotAnchored(
}] }]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class PatternIsNotAnchored(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -39,9 +39,14 @@ class PatternValidation(
}] }]
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -36,9 +36,14 @@ class PatternValidation(
additional_properties = schemas.AnyTypeSchema additional_properties = schemas.AnyTypeSchema
def __getitem__(self, name: str) -> MetaOapg.additional_properties: def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -53,26 +53,34 @@ class PropertiesWithEscapedCharacters(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\nbar"]) -> MetaOapg.properties.foo_nbar: ... def __getitem__(self, name: typing.Literal["foo\nbar"]) -> typing.Union[MetaOapg.properties.foo_nbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\"bar"]) -> MetaOapg.properties.foo_bar: ... def __getitem__(self, name: typing.Literal["foo\"bar"]) -> typing.Union[MetaOapg.properties.foo_bar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\\bar"]) -> MetaOapg.properties.foo__bar: ... def __getitem__(self, name: typing.Literal["foo\\bar"]) -> typing.Union[MetaOapg.properties.foo__bar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\rbar"]) -> MetaOapg.properties.foo_rbar: ... def __getitem__(self, name: typing.Literal["foo\rbar"]) -> typing.Union[MetaOapg.properties.foo_rbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\tbar"]) -> MetaOapg.properties.foo_tbar: ... def __getitem__(self, name: typing.Literal["foo\tbar"]) -> typing.Union[MetaOapg.properties.foo_tbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ... def __getitem__(self, name: typing.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo\nbar"], typing.Literal["foo\"bar"], typing.Literal["foo\\bar"], typing.Literal["foo\rbar"], typing.Literal["foo\tbar"], typing.Literal["foo\fbar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -53,26 +53,34 @@ class PropertiesWithEscapedCharacters(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\nbar"]) -> MetaOapg.properties.foo_nbar: ... def __getitem__(self, name: typing.Literal["foo\nbar"]) -> typing.Union[MetaOapg.properties.foo_nbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\"bar"]) -> MetaOapg.properties.foo_bar: ... def __getitem__(self, name: typing.Literal["foo\"bar"]) -> typing.Union[MetaOapg.properties.foo_bar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\\bar"]) -> MetaOapg.properties.foo__bar: ... def __getitem__(self, name: typing.Literal["foo\\bar"]) -> typing.Union[MetaOapg.properties.foo__bar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\rbar"]) -> MetaOapg.properties.foo_rbar: ... def __getitem__(self, name: typing.Literal["foo\rbar"]) -> typing.Union[MetaOapg.properties.foo_rbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\tbar"]) -> MetaOapg.properties.foo_tbar: ... def __getitem__(self, name: typing.Literal["foo\tbar"]) -> typing.Union[MetaOapg.properties.foo_tbar, schemas.Unset]: ...
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ... def __getitem__(self, name: typing.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["foo\nbar"], typing.Literal["foo\"bar"], typing.Literal["foo\\bar"], typing.Literal["foo\rbar"], typing.Literal["foo\tbar"], typing.Literal["foo\fbar"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

View File

@ -43,11 +43,19 @@ class PropertyNamedRefThatIsNotAReference(
@typing.overload @typing.overload
def __getitem__(self, name: typing.Literal["$ref"]) -> MetaOapg.properties.ref: ... def __getitem__(self, name: typing.Literal["$ref"]) -> typing.Union[MetaOapg.properties.ref, schemas.Unset]: ...
def __getitem__(self, name: str) -> MetaOapg.additional_properties: @typing.overload
def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
def __getitem__(self, name: typing.Union[str, typing.Literal["$ref"], ]):
# dict_instance[name] accessor # dict_instance[name] accessor
if not hasattr(self.MetaOapg, 'properties') or name not in self.MetaOapg.properties.__annotations__:
return super().__getitem__(name) return super().__getitem__(name)
try:
return super().__getitem__(name)
except KeyError:
return schemas.unset
def __new__( def __new__(
cls, cls,

Some files were not shown because too many files have changed in this diff Show More