"""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 Pathparam(BaseSDK):
    r"""Servizio con valori di input come parametro path in URI"""

    def esiste_odonimo_get_path_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.EsisteOdonimoGetPathParamResponse:
        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.EsisteOdonimoGetPathParamRequest(
            codcom=codcom,
            denom=denom,
        )

        req = self._build_request(
            method="GET",
            path="/esisteodonimo/{codcom}/{denom}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="esisteOdonimoGetPathParam",
                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.EsisteOdonimoGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamBadRequestErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamInternalServerErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamInternalServerError(
                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_path_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.EsisteOdonimoGetPathParamResponse:
        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.EsisteOdonimoGetPathParamRequest(
            codcom=codcom,
            denom=denom,
        )

        req = self._build_request_async(
            method="GET",
            path="/esisteodonimo/{codcom}/{denom}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="esisteOdonimoGetPathParam",
                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.EsisteOdonimoGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamBadRequestErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteOdonimoGetPathParamInternalServerErrorData, http_res
            )
            raise errors.EsisteOdonimoGetPathParamInternalServerError(
                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_path_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.EsisteAccessoGetPathParamResponse:
        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.EsisteAccessoGetPathParamRequest(
            codcom=codcom,
            denom=denom,
            accesso=accesso,
        )

        req = self._build_request(
            method="GET",
            path="/esisteaccesso/{codcom}/{denom}/{accesso}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="esisteAccessoGetPathParam",
                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.EsisteAccessoGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamBadRequestErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamInternalServerErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamInternalServerError(
                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_path_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.EsisteAccessoGetPathParamResponse:
        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.EsisteAccessoGetPathParamRequest(
            codcom=codcom,
            denom=denom,
            accesso=accesso,
        )

        req = self._build_request_async(
            method="GET",
            path="/esisteaccesso/{codcom}/{denom}/{accesso}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="esisteAccessoGetPathParam",
                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.EsisteAccessoGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamBadRequestErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.EsisteAccessoGetPathParamInternalServerErrorData, http_res
            )
            raise errors.EsisteAccessoGetPathParamInternalServerError(
                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_path_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.ElencoOdonimiGetPathParamResponse:
        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.ElencoOdonimiGetPathParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoodonimi/{codcom}/{denomparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoOdonimiGetPathParam",
                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.ElencoOdonimiGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamInternalServerError(
                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_path_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.ElencoOdonimiGetPathParamResponse:
        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.ElencoOdonimiGetPathParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoodonimi/{codcom}/{denomparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoOdonimiGetPathParam",
                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.ElencoOdonimiGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoOdonimiGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoOdonimiGetPathParamInternalServerError(
                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_path_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.ElencoAccessiGetPathParamResponse:
        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.ElencoAccessiGetPathParamRequest(
            codcom=codcom,
            denom=denom,
            accparz=accparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoaccessi/{codcom}/{denom}/{accparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoAccessiGetPathParam",
                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.ElencoAccessiGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamInternalServerError(
                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_path_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.ElencoAccessiGetPathParamResponse:
        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.ElencoAccessiGetPathParamRequest(
            codcom=codcom,
            denom=denom,
            accparz=accparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoaccessi/{codcom}/{denom}/{accparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoAccessiGetPathParam",
                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.ElencoAccessiGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoAccessiGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoAccessiGetPathParamInternalServerError(
                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_path_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.ElencoodonimiprogGetPathParamResponse:
        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.ElencoodonimiprogGetPathParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoodonimiprog/{codcom}/{denomparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoodonimiprogGetPathParam",
                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.ElencoodonimiprogGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoodonimiprogGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamInternalServerError(
                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_path_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.ElencoodonimiprogGetPathParamResponse:
        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.ElencoodonimiprogGetPathParamRequest(
            codcom=codcom,
            denomparz=denomparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoodonimiprog/{codcom}/{denomparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoodonimiprogGetPathParam",
                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.ElencoodonimiprogGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoodonimiprogGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoodonimiprogGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoodonimiprogGetPathParamInternalServerError(
                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_path_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.ElencoaccessiprogGetPathParamResponse:
        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.ElencoaccessiprogGetPathParamRequest(
            prognaz=prognaz,
            accparz=accparz,
        )

        req = self._build_request(
            method="GET",
            path="/elencoaccessiprog/{prognaz}/{accparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoaccessiprogGetPathParam",
                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.ElencoaccessiprogGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoaccessiprogGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamInternalServerError(
                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_path_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.ElencoaccessiprogGetPathParamResponse:
        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.ElencoaccessiprogGetPathParamRequest(
            prognaz=prognaz,
            accparz=accparz,
        )

        req = self._build_request_async(
            method="GET",
            path="/elencoaccessiprog/{prognaz}/{accparz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="elencoaccessiprogGetPathParam",
                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.ElencoaccessiprogGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamBadRequestErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamBadRequestError(
                response_data, http_res
            )
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamNotFoundErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamNotFoundError(
                response_data, http_res
            )
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamUnprocessableEntityErrorData,
                http_res,
            )
            raise errors.ElencoaccessiprogGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.ElencoaccessiprogGetPathParamInternalServerErrorData, http_res
            )
            raise errors.ElencoaccessiprogGetPathParamInternalServerError(
                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_path_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.PrognazareaGetPathParamResponse:
        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.PrognazareaGetPathParamRequest(
            prognaz=prognaz,
        )

        req = self._build_request(
            method="GET",
            path="/prognazarea/{prognaz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="prognazareaGetPathParam",
                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.PrognazareaGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamBadRequestErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamNotFoundErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamInternalServerErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamInternalServerError(
                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_path_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.PrognazareaGetPathParamResponse:
        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.PrognazareaGetPathParamRequest(
            prognaz=prognaz,
        )

        req = self._build_request_async(
            method="GET",
            path="/prognazarea/{prognaz}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="prognazareaGetPathParam",
                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.PrognazareaGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamBadRequestErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamNotFoundErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazareaGetPathParamInternalServerErrorData, http_res
            )
            raise errors.PrognazareaGetPathParamInternalServerError(
                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_path_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.PrognazaccGetPathParamResponse:
        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.PrognazaccGetPathParamRequest(
            prognazacc=prognazacc,
        )

        req = self._build_request(
            method="GET",
            path="/prognazacc/{prognazacc}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="prognazaccGetPathParam",
                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.PrognazaccGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamBadRequestErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamNotFoundErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamInternalServerErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamInternalServerError(
                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_path_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.PrognazaccGetPathParamResponse:
        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.PrognazaccGetPathParamRequest(
            prognazacc=prognazacc,
        )

        req = self._build_request_async(
            method="GET",
            path="/prognazacc/{prognazacc}",
            base_url=base_url,
            url_variables=url_variables,
            request=request,
            request_body_required=False,
            request_has_path_params=True,
            request_has_query_params=False,
            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="prognazaccGetPathParam",
                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.PrognazaccGetPathParamResponse, http_res
            )
        if utils.match_response(http_res, "400", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamBadRequestErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamBadRequestError(response_data, http_res)
        if utils.match_response(http_res, "404", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamNotFoundErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamNotFoundError(response_data, http_res)
        if utils.match_response(http_res, "405", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamMethodNotAllowedErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamMethodNotAllowedError(
                response_data, http_res
            )
        if utils.match_response(http_res, "422", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamUnprocessableEntityErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamUnprocessableEntityError(
                response_data, http_res
            )
        if utils.match_response(http_res, "500", "application/problem+json"):
            response_data = unmarshal_json_response(
                errors.PrognazaccGetPathParamInternalServerErrorData, http_res
            )
            raise errors.PrognazaccGetPathParamInternalServerError(
                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)
