File size: 636 Bytes
b40c49c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Dict
@dataclass
class SchemaPatch:
included_resource_types: list[str]
excluded_resource_types: list[str]
patches: dict[str, list[Dict]]
@staticmethod
def from_dict(value: Dict):
return SchemaPatch(
included_resource_types=value.get("IncludeResourceTypes", []),
excluded_resource_types=value.get("ExcludeResourceTypes", []),
patches=value.get("Patches", {}),
)
|