"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from .basesdk import BaseSDK
from anncsu.pa import errors, models
from anncsu.common import utils
from anncsu.common.hooks import HookContext
from anncsu.common.types import OptionalNullable, UNSET
from anncsu.common.utils.unmarshal_json_response import unmarshal_json_response
from typing import Any, Mapping, Optional


class Queryparam(BaseSDK):
    r"""Servizio con valori di input come parametro query in URI"""

    def esiste_odonimo_get_query_param(
        self,
        *,
        codcom: str,
        denom: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.EsisteOdonimoGetQueryParamResponse:
        r"""Ritorna un valore boolean dell'esistenza dell'odonimo in ANNCSU

        Ritorna un valore boolean dell'esistenza dell'odonimo in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.EsisteOdonimoGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
        )

        req = self._build_request(
            method="GET",
            path="/esisteodonimo",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="esisteOdonimoGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.EsisteOdonimoGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def esiste_odonimo_get_query_param_async(
        self,
        *,
        codcom: str,
        denom: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.EsisteOdonimoGetQueryParamResponse:
        r"""Ritorna un valore boolean dell'esistenza dell'odonimo in ANNCSU

        Ritorna un valore boolean dell'esistenza dell'odonimo in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.EsisteOdonimoGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
        )

        req = self._build_request_async(
            method="GET",
            path="/esisteodonimo",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="esisteOdonimoGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.EsisteOdonimoGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.EsisteOdonimoGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def esiste_accesso_get_query_param(
        self,
        *,
        codcom: str,
        denom: str,
        accesso: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.EsisteAccessoGetQueryParamResponse:
        r"""Ritorna un valore boolean dell'esistenza dell'accesso in ANNCSU

        Ritorna un valore boolean dell'esistenza dell'accesso in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param accesso: valore civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.EsisteAccessoGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
            accesso=accesso,
        )

        req = self._build_request(
            method="GET",
            path="/esisteaccesso",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="esisteAccessoGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.EsisteAccessoGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def esiste_accesso_get_query_param_async(
        self,
        *,
        codcom: str,
        denom: str,
        accesso: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.EsisteAccessoGetQueryParamResponse:
        r"""Ritorna un valore boolean dell'esistenza dell'accesso in ANNCSU

        Ritorna un valore boolean dell'esistenza dell'accesso in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param accesso: valore civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.EsisteAccessoGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
            accesso=accesso,
        )

        req = self._build_request_async(
            method="GET",
            path="/esisteaccesso",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="esisteAccessoGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.EsisteAccessoGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.EsisteAccessoGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def elenco_odonimi_get_query_param(
        self,
        *,
        codcom: str,
        denomparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoOdonimiGetQueryParamResponse:
        r"""Ritorna un elenco di odonimi presenti in ANNCSU

        Ritorna un elenco di odonimi presenti in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denomparz: Denominazione anche parziale dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoOdonimiGetQueryParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoodonimi",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoOdonimiGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoOdonimiGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def elenco_odonimi_get_query_param_async(
        self,
        *,
        codcom: str,
        denomparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoOdonimiGetQueryParamResponse:
        r"""Ritorna un elenco di odonimi presenti in ANNCSU

        Ritorna un elenco di odonimi presenti in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denomparz: Denominazione anche parziale dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoOdonimiGetQueryParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoodonimi",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoOdonimiGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoOdonimiGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoOdonimiGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def elenco_accessi_get_query_param(
        self,
        *,
        codcom: str,
        denom: str,
        accparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoAccessiGetQueryParamResponse:
        r"""Ritorna un elenco di accessi presenti in ANNCSU

        Ritorna un elenco di accessi presenti in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param accparz: valore anche parziale del civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoAccessiGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
            accparz=accparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoaccessi",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoAccessiGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoAccessiGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def elenco_accessi_get_query_param_async(
        self,
        *,
        codcom: str,
        denom: str,
        accparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoAccessiGetQueryParamResponse:
        r"""Ritorna un elenco di accessi presenti in ANNCSU

        Ritorna un elenco di accessi presenti in ANNCSU

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denom: Denominazione esatta dell'odonimo - base64 encoded
        :param accparz: valore anche parziale del civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoAccessiGetQueryParamRequest(
            codcom=codcom,
            denom=denom,
            accparz=accparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoaccessi",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoAccessiGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoAccessiGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoAccessiGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def elencoodonimiprog_get_query_param(
        self,
        *,
        codcom: str,
        denomparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoodonimiprogGetQueryParamResponse:
        r"""Ritorna un elenco di odonimi presenti in ANNCSU incluso il progressivo nazionale

        Ritorna un elenco di odonimi presenti in ANNCSU incluso il progressivo nazionale

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denomparz: Denominazione anche parziale dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoodonimiprogGetQueryParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoodonimiprog",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoodonimiprogGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoodonimiprogGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoodonimiprogGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def elencoodonimiprog_get_query_param_async(
        self,
        *,
        codcom: str,
        denomparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoodonimiprogGetQueryParamResponse:
        r"""Ritorna un elenco di odonimi presenti in ANNCSU incluso il progressivo nazionale

        Ritorna un elenco di odonimi presenti in ANNCSU incluso il progressivo nazionale

        :param codcom: Codice Belfiore del comune dell'odonimo
        :param denomparz: Denominazione anche parziale dell'odonimo - base64 encoded
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoodonimiprogGetQueryParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoodonimiprog",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoodonimiprogGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoodonimiprogGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoodonimiprogGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def elencoaccessiprog_get_query_param(
        self,
        *,
        prognaz: str,
        accparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoaccessiprogGetQueryParamResponse:
        r"""Ritorna un elenco di accessi presenti in ANNCSU incluso il progressivo nazionale

        Ritorna un elenco di accessi presenti in ANNCSU incluso il progressivo nazionale

        :param prognaz: Progressivo nazionale dell'odonimo
        :param accparz: valore anche parziale del civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoaccessiprogGetQueryParamRequest(
            prognaz=prognaz,
            accparz=accparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoaccessiprog",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoaccessiprogGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoaccessiprogGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoaccessiprogGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def elencoaccessiprog_get_query_param_async(
        self,
        *,
        prognaz: str,
        accparz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.ElencoaccessiprogGetQueryParamResponse:
        r"""Ritorna un elenco di accessi presenti in ANNCSU incluso il progressivo nazionale

        Ritorna un elenco di accessi presenti in ANNCSU incluso il progressivo nazionale

        :param prognaz: Progressivo nazionale dell'odonimo
        :param accparz: valore anche parziale del civico(+eventuale esponente e/o specificit�) oppure metrico
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.ElencoaccessiprogGetQueryParamRequest(
            prognaz=prognaz,
            accparz=accparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoaccessiprog",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="elencoaccessiprogGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.ElencoaccessiprogGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoaccessiprogGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def prognazarea_get_query_param(
        self,
        *,
        prognaz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.PrognazareaGetQueryParamResponse:
        r"""Cerca in ANNCSU un odonimo per progressivo nazionale e ne ritorna i dati

        Cerca in ANNCSU un odonimo per progressivo nazionale e ne ritorna i dati

        :param prognaz: Progressivo nazionale dell'odonimo
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.PrognazareaGetQueryParamRequest(
            prognaz=prognaz,
        )

        req = self._build_request(
            method="GET",
            path="/prognazarea",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="prognazareaGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.PrognazareaGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def prognazarea_get_query_param_async(
        self,
        *,
        prognaz: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.PrognazareaGetQueryParamResponse:
        r"""Cerca in ANNCSU un odonimo per progressivo nazionale e ne ritorna i dati

        Cerca in ANNCSU un odonimo per progressivo nazionale e ne ritorna i dati

        :param prognaz: Progressivo nazionale dell'odonimo
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.PrognazareaGetQueryParamRequest(
            prognaz=prognaz,
        )

        req = self._build_request_async(
            method="GET",
            path="/prognazarea",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="prognazareaGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.PrognazareaGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.PrognazareaGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    def prognazacc_get_query_param(
        self,
        *,
        prognazacc: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.PrognazaccGetQueryParamResponse:
        r"""Cerca in ANNCSU un accesso per progressivo nazionale accesso e ne ritorna i dati comprensivi dell'odonimo

        Cerca in ANNCSU un accesso per progressivo nazionale accesso e ne ritorna i dati comprensivi dell'odonimo

        :param prognazacc: Progressivo nazionale dell'accesso
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.PrognazaccGetQueryParamRequest(
            prognazacc=prognazacc,
        )

        req = self._build_request(
            method="GET",
            path="/prognazacc",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
            security=self.sdk_configuration.security,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = self.do_request(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="prognazaccGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.PrognazaccGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = utils.stream_to_text(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)

    async def prognazacc_get_query_param_async(
        self,
        *,
        prognazacc: str,
        retries: OptionalNullable[utils.RetryConfig] = UNSET,
        server_url: Optional[str] = None,
        timeout_ms: Optional[int] = None,
        http_headers: Optional[Mapping[str, str]] = None,
    ) -> models.PrognazaccGetQueryParamResponse:
        r"""Cerca in ANNCSU un accesso per progressivo nazionale accesso e ne ritorna i dati comprensivi dell'odonimo

        Cerca in ANNCSU un accesso per progressivo nazionale accesso e ne ritorna i dati comprensivi dell'odonimo

        :param prognazacc: Progressivo nazionale dell'accesso
        :param retries: Override the default retry configuration for this method
        :param server_url: Override the default server URL for this method
        :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
        :param http_headers: Additional headers to set or replace on requests.
        """
        base_url = None
        url_variables = None
        if timeout_ms is None:
            timeout_ms = self.sdk_configuration.timeout_ms

        if server_url is not None:
            base_url = server_url
        else:
            base_url = self._get_url(base_url, url_variables)

        request = models.PrognazaccGetQueryParamRequest(
            prognazacc=prognazacc,
        )

        req = self._build_request_async(
            method="GET",
            path="/prognazacc",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=False,
            request_has_query_params=True,
            user_agent_header="user-agent",
            accept_header_value="application/json",
            http_headers=http_headers,
            timeout_ms=timeout_ms,
        )

        if retries == UNSET:
            if self.sdk_configuration.retry_config is not UNSET:
                retries = self.sdk_configuration.retry_config

        retry_config = None
        if isinstance(retries, utils.RetryConfig):
            retry_config = (retries, ["429", "500", "502", "503", "504"])

        http_res = await self.do_request_async(
            hook_ctx=HookContext(
                config=self.sdk_configuration,
                base_url=base_url or "",
                operation_id="prognazaccGetQueryParam",
                oauth2_scopes=[],
                security_source=None,
            ),
            request=req,
            error_status_codes=["400", "404", "405", "422", "4XX", "500", "5XX"],
            retry_config=retry_config,
        )

        response_data: Any = None
        if utils.match_response(http_res, "200", "application/json"):
            return unmarshal_json_response(
                models.PrognazaccGetQueryParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamBadRequestErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamNotFoundErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetQueryParamInternalServerErrorData, http_res
            )
            raise errors.PrognazaccGetQueryParamInternalServerError(
                response_data, http_res
            )
        if utils.match_response(http_res, "4XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)
        if utils.match_response(http_res, "5XX", "*"):
            http_res_text = await utils.stream_to_text_async(http_res)
            raise errors.APIError("API error occurred", http_res, http_res_text)

        raise errors.APIError("Unexpected response received", http_res)
