from typing import List, Literal from pydantic import BaseModel import update_waf_ipsets.config as Config ScopeLiteral = Literal["CLOUDFRONT", "REGIONAL"] class IpSets(BaseModel): """Represents ip set meta information.""" name: str = Config.DEFAULT_IP_SET_NAME region: str = Config.DEFAULT_REGION scope: ScopeLiteral class LambdaPayload(BaseModel): """Represents payload lambda expects.""" account_id: str role_name: str = Config.DEFAULT_ROLE_NAME external_id: str = Config.DEFAULT_EXTERNAL_ID s3_bucket: str = Config.DEFAULT_S3_BUCKET s3_key: str = Config.DEFAULT_S3_KEY ip_sets: List[IpSets]