def METHOD_NAME(
    cls,
    kind: str,
    name: str,
    namespace: Optional[str] = None,
    generation: Optional[int] = None,
    version: str = "v3alpha1",
    api_group="getambassador.io",
    labels: Optional[Dict[str, Any]] = None,
    spec: Dict[str, Any] | None = None,
    errors: Optional[str] = None,
    rkey: Optional[str] = None,
) -> NormalizedResource:
    if rkey is None:
        rkey = f"{name}.{namespace}"
    ir_obj = {}
    if spec:
        ir_obj.update(spec)
    ir_obj["apiVersion"] = f"{api_group}/{version}"
    ir_obj["kind"] = kind
    ir_obj["name"] = name
    if namespace is not None:
        ir_obj["namespace"] = namespace
    if generation is not None:
        ir_obj["generation"] = generation
    ir_obj["metadata_labels"] = labels or {}
    if errors:
        ir_obj["errors"] = errors
    return cls(ir_obj, rkey)