in elasticsearch_serverless/_sync/client/utils.py [0:0]
def wrapper(api: F) -> F:
@wraps(api)
def wrapped(*args: Any, **kwargs: Any) -> Any:
if stability == Stability.BETA:
warnings.warn(
"This API is in beta and is subject to change. "
"The design and code is less mature than official GA features and is being provided as-is with no warranties. "
"Beta features are not subject to the support SLA of official GA features.",
category=GeneralAvailabilityWarning,
stacklevel=warn_stacklevel(),
)
elif stability == Stability.EXPERIMENTAL:
warnings.warn(
"This API is in technical preview and may be changed or removed in a future release. "
"Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.",
category=GeneralAvailabilityWarning,
stacklevel=warn_stacklevel(),
)
return api(*args, **kwargs)
return wrapped # type: ignore[return-value]