diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..56d57c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +venv +usage-example.py +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md index f4ef6e8..96038e3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # accelapy -Access Accela via REST API + +## How to use: + +You may need to get your payload from Accela for your environment. + +```python +from accelapy.accelapy.client import AccelaClient +from accelapy.accelapy.records_client.types import Response +from accelapy.accelapy.records_client.models import RecordModel +import json +from typing import List +from accelapy.accelapy.payload import Payload + +payload = Payload(payload_str='totally-real-payload') +api_client = AccelaClient(payload=payload) +response: Response = api_client.v4_get_records.sync_detailed(client=api_client.authentication_client, custom_id='E24-00103') +json_load = json.loads(response.content) +record_models : List[RecordModel] = [RecordModel.from_dict(x) for x in json_load['result']] +print(record_models) +``` \ No newline at end of file diff --git a/accelapy/accelapy/__init__.py b/accelapy/accelapy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/authentication_client/__init__.py b/accelapy/accelapy/authentication_client/__init__.py new file mode 100644 index 0000000..e5c6064 --- /dev/null +++ b/accelapy/accelapy/authentication_client/__init__.py @@ -0,0 +1,7 @@ +""" A client library for accessing Authentication """ +from .client import AuthenticatedClient, Client + +__all__ = ( + "AuthenticatedClient", + "Client", +) diff --git a/accelapy/accelapy/authentication_client/api/__init__.py b/accelapy/accelapy/authentication_client/api/__init__.py new file mode 100644 index 0000000..dc035f4 --- /dev/null +++ b/accelapy/accelapy/authentication_client/api/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the API """ diff --git a/accelapy/accelapy/authentication_client/api/default/__init__.py b/accelapy/accelapy/authentication_client/api/default/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/authentication_client/api/default/oauth2_authorize.py b/accelapy/accelapy/authentication_client/api/default/oauth2_authorize.py new file mode 100644 index 0000000..13b5e27 --- /dev/null +++ b/accelapy/accelapy/authentication_client/api/default/oauth2_authorize.py @@ -0,0 +1,115 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs() -> Dict[str, Any]: + pass + + return { + "method": "post", + "url": "/oauth2/authorize", + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get Authorization Code + + Gets an authorization code (for authorization code flow) or access token (for implicit flow) from + the authentication server. + + This API is used for the following: + + - [Authorization Code Flow](../construct-authCodeFlow.html) - set the request parameter + response_type=code. If successful, the authorization code will be returned in the response body. Use + the authorization code to get the access token from [Get Access Token](#operation/oauth2.token). + + - [Implicit Flow](../construct-implicitFlow.html) - set the request parameter response_type=token. + If successful, the access token will be returned in the access_token parameter in the redirect URL. + + **Note**: You can invoke this API using the HTTP GET method. In which case, specify the described + request body fields as request query parameters. + + + + **API Endpoint**: POST /oauth2/authorize + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get Authorization Code + + Gets an authorization code (for authorization code flow) or access token (for implicit flow) from + the authentication server. + + This API is used for the following: + + - [Authorization Code Flow](../construct-authCodeFlow.html) - set the request parameter + response_type=code. If successful, the authorization code will be returned in the response body. Use + the authorization code to get the access token from [Get Access Token](#operation/oauth2.token). + + - [Implicit Flow](../construct-implicitFlow.html) - set the request parameter response_type=token. + If successful, the access token will be returned in the access_token parameter in the redirect URL. + + **Note**: You can invoke this API using the HTTP GET method. In which case, specify the described + request body fields as request query parameters. + + + + **API Endpoint**: POST /oauth2/authorize + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/authentication_client/api/default/oauth2_token.py b/accelapy/accelapy/authentication_client/api/default/oauth2_token.py new file mode 100644 index 0000000..297c5db --- /dev/null +++ b/accelapy/accelapy/authentication_client/api/default/oauth2_token.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + *, + content_type: str, + x_accela_appid: str, +) -> Dict[str, Any]: + headers = {} + headers["Content-Type"] = content_type + + headers["x-accela-appid"] = x_accela_appid + + return { + "method": "post", + "url": "/oauth2/token", + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + content_type: str, + x_accela_appid: str, +) -> Response[Any]: + """Get Access Token + + Gets an access token from the authentication server. + + + + This API is used for the following: + + - [Authorization Code Flow](../construct-authCodeFlow.html) - set the request parameter + grant_type=authorization_code. + + - [Password Credential Login](../construct-passwordCredentialLogin.html) - set the request parameter + grant_type=password. + + - Refreshing the token - set the request parameter grant_type=refresh_token. Access tokens have a + limited lifetime and, in some cases, an application needs access to an API beyond the lifetime of a + single access token. When this is the case, your application can obtain a new access token using the + refresh token. Your app can refresh the token before it expires or when it expires, according your + app requirements or workflow. + + + + **API Endpoint**: POST /oauth2/token + + Args: + content_type (str): + x_accela_appid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + content_type=content_type, + x_accela_appid=x_accela_appid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + content_type: str, + x_accela_appid: str, +) -> Response[Any]: + """Get Access Token + + Gets an access token from the authentication server. + + + + This API is used for the following: + + - [Authorization Code Flow](../construct-authCodeFlow.html) - set the request parameter + grant_type=authorization_code. + + - [Password Credential Login](../construct-passwordCredentialLogin.html) - set the request parameter + grant_type=password. + + - Refreshing the token - set the request parameter grant_type=refresh_token. Access tokens have a + limited lifetime and, in some cases, an application needs access to an API beyond the lifetime of a + single access token. When this is the case, your application can obtain a new access token using the + refresh token. Your app can refresh the token before it expires or when it expires, according your + app requirements or workflow. + + + + **API Endpoint**: POST /oauth2/token + + Args: + content_type (str): + x_accela_appid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + content_type=content_type, + x_accela_appid=x_accela_appid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/authentication_client/api/default/oauth2_tokeninfo.py b/accelapy/accelapy/authentication_client/api/default/oauth2_tokeninfo.py new file mode 100644 index 0000000..a62e830 --- /dev/null +++ b/accelapy/accelapy/authentication_client/api/default/oauth2_tokeninfo.py @@ -0,0 +1,110 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + *, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + return { + "method": "get", + "url": "/oauth2/tokeninfo", + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + authorization: str, +) -> Response[Any]: + """Get Token Info + + Validates a given access token in the *Authorization* http header, and returns the token + information. Use the token information to match it with the information used to request the access + token. + + + + **API Endpoint**: GET /oauth2/tokeninfo + + Args: + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + authorization: str, +) -> Response[Any]: + """Get Token Info + + Validates a given access token in the *Authorization* http header, and returns the token + information. Use the token information to match it with the information used to request the access + token. + + + + **API Endpoint**: GET /oauth2/tokeninfo + + Args: + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/authentication_client/client.py b/accelapy/accelapy/authentication_client/client.py new file mode 100644 index 0000000..74b476c --- /dev/null +++ b/accelapy/accelapy/authentication_client/client.py @@ -0,0 +1,268 @@ +import ssl +from typing import Any, Dict, Optional, Union + +import httpx +from attrs import define, evolve, field + + +@define +class Client: + """A class for keeping track of data related to the API + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + def with_headers(self, headers: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "Client": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "Client": + """Manually the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "Client": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "Client": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) + + +@define +class AuthenticatedClient: + """A Client which has been authenticated for use on secured endpoints + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + token: The token to use for authentication + prefix: The prefix to use for the Authorization header + auth_header_name: The name of the Authorization header + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + token: str + prefix: str = "Bearer" + auth_header_name: str = "Authorization" + + def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": + """Manually the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "AuthenticatedClient": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "AuthenticatedClient": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/accelapy/accelapy/authentication_client/errors.py b/accelapy/accelapy/authentication_client/errors.py new file mode 100644 index 0000000..426f8a2 --- /dev/null +++ b/accelapy/accelapy/authentication_client/errors.py @@ -0,0 +1,14 @@ +""" Contains shared errors types that can be raised from API functions """ + + +class UnexpectedStatus(Exception): + """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + + def __init__(self, status_code: int, content: bytes): + self.status_code = status_code + self.content = content + + super().__init__(f"Unexpected status code: {status_code}") + + +__all__ = ["UnexpectedStatus"] diff --git a/accelapy/accelapy/authentication_client/models/__init__.py b/accelapy/accelapy/authentication_client/models/__init__.py new file mode 100644 index 0000000..bf10426 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/__init__.py @@ -0,0 +1,23 @@ +""" Contains all the data models used in inputs/outputs """ + +from .request_authorize import RequestAuthorize +from .request_authorize_response_type import RequestAuthorizeResponseType +from .request_token import RequestToken +from .request_token_grant_type import RequestTokenGrantType +from .response_authorize import ResponseAuthorize +from .response_error import ResponseError +from .response_status import ResponseStatus +from .response_token import ResponseToken +from .response_tokeninfo import ResponseTokeninfo + +__all__ = ( + "RequestAuthorize", + "RequestAuthorizeResponseType", + "RequestToken", + "RequestTokenGrantType", + "ResponseAuthorize", + "ResponseError", + "ResponseStatus", + "ResponseToken", + "ResponseTokeninfo", +) diff --git a/accelapy/accelapy/authentication_client/models/request_authorize.py b/accelapy/accelapy/authentication_client/models/request_authorize.py new file mode 100644 index 0000000..a275ac5 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/request_authorize.py @@ -0,0 +1,145 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.request_authorize_response_type import RequestAuthorizeResponseType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestAuthorize") + + +@_attrs_define +class RequestAuthorize: + """ + Attributes: + response_type (RequestAuthorizeResponseType): Specifies whether the request is for an authorization code or + access token. + + Valid values: + + *code* - Request for an authorization code. See [Authorization Code Flow](../construct-authCodeFlow.html). + + *token* - Request for an access token. See [Implicit Flow](../construct-implicitFlow.html). + client_id (str): The app ID value from [Construct Developer Portal](https://developer.accela.com). + redirect_uri (str): The URI that is used to redirect to the client with an authorization code. This must be a + valid URL. + + **Note**: Special characters in the URL should be encoded. + environment (str): The Construct environment name, such as "PROD" and "TEST". The [Get All Agency + Environments](./api-agencies.html#operation/v4.get.agencies.name.environments) API returns a list of configured + environments available for a specific agency. The [Get Environment Status](./api- + agencies.html#operation/v4.get.agencies.name.environments.env.status) checks connectivity with the + Agency/Environment. + agency_name (str): The agency name defined in [Construct Administrator Portal](https://admin.accela.com). APIs + such as [Get All Agencies](./api-agencies.html#operation/v4.get.agencies), [Get Agency](./api- + agencies.html#operation/v4.get.agencies.name), and [Search Agencies](./api- + search.html#operation/v4.post.search.agencies) return valid agency names. + + **Note**: For an **agency app**, agency is required. + For a **citizen app** that use dynamic agency routing functionality, agency_name is optional. + forcelogin (Union[Unset, bool]): Indicates whether or not Accela Auth server forces end-user login each time + client requests access token. + + Valid values: + + *true*: Always force end-user login. + + *false*: Do not force end-user login. The sever determines if the current request needs login. This is the + default behavior. + scope (Union[Unset, str]): The scope of the resources that the client requests. Enter a list of APIs scope names + separated by spaces. Get the scope names from the [Accela API Reference](./api-index.html). + state (Union[Unset, str]): An opaque value that the client uses for maintaining the state between the request + and callback. Enter a unique value. This can be used for [Cross-Site Request + Forgery](http://en.wikipedia.org/wiki/Cross-site_request_forgery) (CSRF) protection. + """ + + response_type: RequestAuthorizeResponseType + client_id: str + redirect_uri: str + environment: str + agency_name: str + forcelogin: Union[Unset, bool] = UNSET + scope: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + response_type = self.response_type.value + + client_id = self.client_id + redirect_uri = self.redirect_uri + environment = self.environment + agency_name = self.agency_name + forcelogin = self.forcelogin + scope = self.scope + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "response_type": response_type, + "client_id": client_id, + "redirect_uri": redirect_uri, + "environment": environment, + "agency_name": agency_name, + } + ) + if forcelogin is not UNSET: + field_dict["forcelogin"] = forcelogin + if scope is not UNSET: + field_dict["scope"] = scope + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + response_type = RequestAuthorizeResponseType(d.pop("response_type")) + + client_id = d.pop("client_id") + + redirect_uri = d.pop("redirect_uri") + + environment = d.pop("environment") + + agency_name = d.pop("agency_name") + + forcelogin = d.pop("forcelogin", UNSET) + + scope = d.pop("scope", UNSET) + + state = d.pop("state", UNSET) + + request_authorize = cls( + response_type=response_type, + client_id=client_id, + redirect_uri=redirect_uri, + environment=environment, + agency_name=agency_name, + forcelogin=forcelogin, + scope=scope, + state=state, + ) + + request_authorize.additional_properties = d + return request_authorize + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/request_authorize_response_type.py b/accelapy/accelapy/authentication_client/models/request_authorize_response_type.py new file mode 100644 index 0000000..aae3876 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/request_authorize_response_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RequestAuthorizeResponseType(str, Enum): + CODE = "code" + TOKEN = "token" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/authentication_client/models/request_token.py b/accelapy/accelapy/authentication_client/models/request_token.py new file mode 100644 index 0000000..836e67b --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/request_token.py @@ -0,0 +1,208 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.request_token_grant_type import RequestTokenGrantType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestToken") + + +@_attrs_define +class RequestToken: + """ + Attributes: + client_id (str): The app ID value from [Construct Developer Portal](https://developer.accela.com). + client_secret (str): The app secret value from [Construct Developer Portal](https://developer.accela.com). + grant_type (RequestTokenGrantType): Specifies whether the request is for an authorization code, password + credential access token, or refresh token. Valid values: + + Values: + + authorization_code - Request to exchange the given authorization code with an access token. Used with + [Authorization Code Flow](../construct-authCodeFlow.html). + + password - Request authentication via userid and password credential. See [Password Credential + Login](../construct-passwordCredentialLogin.html). + + refresh_token - Request to refresh the token. + + **Note**: Make sure the grant_type value does not contain any space character. + code (str): The authorization code obtained from the preceding [/oauth2/authorize](#operation/oauth2.authorize) + request. + + **Note**: code is required only when calling this API with grant_type=authorization_code for [Authorization Code + Flow](../construct-authCodeFlow.html). + + **Note**: The code should be URL-encoded, if you are using tools or libraries which will auto-encode the code, + you need to pass the code under decoded. + + **Note**: The code can be used no more than one time, the client should apply the rule during exchange access + token. + redirect_uri (str): The URI that is used to redirect to the client with an access token. + + **Note**: redirect_uri is required only when calling this API with grant_type=authorization_code for + [Authorization Code Flow](../construct-authCodeFlow.html). + + **Note**: The value of redirect_uri must match the redirect_uri used in the preceding + [/oauth2/authorize](#operation/oauth2.authorize) request. + username (str): For a **citizen app**, the user name is the Civic ID. + For an **agency app**, the user name is the Civic Platform account. + + **Note**: username is required only when calling this API with grant_type=password for [Password Credential + Login](../construct-passwordCredentialLogin.html). + password (str): For a **citizen app**, the user name is the Civic ID password. + For an **agency app**, the user name is the Civic Platform password. + + **Note**: username is required only when calling this API with grant_type=password for [Password Credential + Login](../construct-passwordCredentialLogin.html). + agency_name (str): The agency name defined in [Construct Administrator Portal](https://admin.accela.com). APIs + such as [Get All Agencies](./api-agencies.html#operation/v4.get.agencies), [Get Agency](./api- + agencies.html#operation/v4.get.agencies.name), and [Search Agencies](./api- + search.html#operation/v4.post.search.agencies) return valid agency names. + + **Note**: agency_name is used only when calling this API with grant_type=password for [Password Credential + Login](../construct-passwordCredentialLogin.html). For an **agency app**, agency_name is required. + For a **citizen app**, agency_name is optional. + environment (str): The Construct environment name, such as "PROD" and "TEST". The [Get All Agency + Environments](./api-agencies.html#operation/v4.get.agencies.name.environments) API returns a list of configured + environments available for a specific agency. The [Get Environment Status](./api- + agencies.html#operation/v4.get.agencies.name.environments.env.status) checks connectivity with the + Agency/Environment.. + + **Note**: scope is required only when calling this API with grant_type=password for [Password Credential + Login](../construct-passwordCredentialLogin.html). + scope (Union[Unset, str]): The scope of the resources that the client requests. Enter a list of APIs scope names + separated by spaces. Get the scope names from the [Accela API Reference](./api-index.html). + + **Note**: scope is required only when calling this API with grant_type=password for [Password Credential + Login](../construct-passwordCredentialLogin.html). + refresh_token (Union[Unset, str]): The refresh token value obtained in the prior access token API request. + + **Note**: refresh_token is required only when calling this API to refresh the token for both [Authorization Code + Flow](../construct-authCodeFlow.html) and [Password Credential Login](../construct- + passwordCredentialLogin.html). + state (Union[Unset, str]): An opaque value that the client uses for maintaining the state between the request + and callback. Enter a unique value. This can be used for [Cross-Site Request + Forgery](http://en.wikipedia.org/wiki/Cross-site_request_forgery) (CSRF) protection. + + This parameter is not used when refreshing a token. + + **Note**: state is used and optional only when calling this API with grant_type=authorization_code for + [Authorization Code Flow](../construct-authCodeFlow.html). + """ + + client_id: str + client_secret: str + grant_type: RequestTokenGrantType + code: str + redirect_uri: str + username: str + password: str + agency_name: str + environment: str + scope: Union[Unset, str] = UNSET + refresh_token: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id + client_secret = self.client_secret + grant_type = self.grant_type.value + + code = self.code + redirect_uri = self.redirect_uri + username = self.username + password = self.password + agency_name = self.agency_name + environment = self.environment + scope = self.scope + refresh_token = self.refresh_token + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "client_id": client_id, + "client_secret": client_secret, + "grant_type": grant_type, + "code": code, + "redirect_uri": redirect_uri, + "username": username, + "password": password, + "agency_name": agency_name, + "environment": environment, + } + ) + if scope is not UNSET: + field_dict["scope"] = scope + if refresh_token is not UNSET: + field_dict["refresh_token"] = refresh_token + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + client_id = d.pop("client_id") + + client_secret = d.pop("client_secret") + + grant_type = RequestTokenGrantType(d.pop("grant_type")) + + code = d.pop("code") + + redirect_uri = d.pop("redirect_uri") + + username = d.pop("username") + + password = d.pop("password") + + agency_name = d.pop("agency_name") + + environment = d.pop("environment") + + scope = d.pop("scope", UNSET) + + refresh_token = d.pop("refresh_token", UNSET) + + state = d.pop("state", UNSET) + + request_token = cls( + client_id=client_id, + client_secret=client_secret, + grant_type=grant_type, + code=code, + redirect_uri=redirect_uri, + username=username, + password=password, + agency_name=agency_name, + environment=environment, + scope=scope, + refresh_token=refresh_token, + state=state, + ) + + request_token.additional_properties = d + return request_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/request_token_grant_type.py b/accelapy/accelapy/authentication_client/models/request_token_grant_type.py new file mode 100644 index 0000000..1dbd635 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/request_token_grant_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RequestTokenGrantType(str, Enum): + AUTHORIZATION_CODE = "authorization_code" + PASSWORD = "password" + REFRESH_TOKEN = "refresh_token" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/authentication_client/models/response_authorize.py b/accelapy/accelapy/authentication_client/models/response_authorize.py new file mode 100644 index 0000000..0703e10 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/response_authorize.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResponseAuthorize") + + +@_attrs_define +class ResponseAuthorize: + """ + Attributes: + code (Union[Unset, str]): The authorization code (for an authorization code flow request where + response_type=code). The client app uses the authorization code to exchange for an access token. + environment (Union[Unset, str]): The environment name that the user selected when signing into the app (for an + authorization code flow request where response_type=code). + + For an implicit flow request where response_type=token, environment is returned as a parameter in the + redirection URI using the "application/x-www-form-urlencoded" format. + agency_name (Union[Unset, str]): The agency name that the user entered when signing into the app (for an + authorization code flow request where response_type=code). + + For an implicit flow request where response_type=token, agency_name is returned as a parameter in the + redirection URI using the "application/x-www-form-urlencoded" format. + state (Union[Unset, str]): The exact value received from the client (for an authorization code flow request + where response_type=code). Check this value against original state value sent in the request to verify and + protect against CSRF. + + For an implicit flow request where response_type=token, state is returned as a parameter in the redirection URI + using the "application/x-www-form-urlencoded" format. + access_token (Union[Unset, str]): The issued user access token (for an implicit flow request where + response_type=token). access_token is returned as a parameter in the redirection URI using the + "application/x-www-form-urlencoded" format. + token_type (Union[Unset, str]): The type of the token issued (for an implicit flow request where + response_type=token). token_type is returned as a parameter in the redirection URI using the "application/x-www- + form-urlencoded" format. + expires_in (Union[Unset, str]): The lifetime in seconds of the access token (for an implicit flow request where + response_type=token). For example, the value "3600" denotes that the access token will expire in one hour from + the time the response was generated. expires_in is returned as a parameter in the redirection URI using the + "application/x-www-form-urlencoded" format. + scope (Union[Unset, str]): The scope of the resources authenticated by the authorization server (for an implicit + flow request where response_type=token). scope is returned as a parameter in the redirection URI using the + "application/x-www-form-urlencoded" format. + """ + + code: Union[Unset, str] = UNSET + environment: Union[Unset, str] = UNSET + agency_name: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + access_token: Union[Unset, str] = UNSET + token_type: Union[Unset, str] = UNSET + expires_in: Union[Unset, str] = UNSET + scope: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code = self.code + environment = self.environment + agency_name = self.agency_name + state = self.state + access_token = self.access_token + token_type = self.token_type + expires_in = self.expires_in + scope = self.scope + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if environment is not UNSET: + field_dict["environment"] = environment + if agency_name is not UNSET: + field_dict["agency_name"] = agency_name + if state is not UNSET: + field_dict["state"] = state + if access_token is not UNSET: + field_dict["access_token"] = access_token + if token_type is not UNSET: + field_dict["token_type"] = token_type + if expires_in is not UNSET: + field_dict["expires_in"] = expires_in + if scope is not UNSET: + field_dict["scope"] = scope + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + code = d.pop("code", UNSET) + + environment = d.pop("environment", UNSET) + + agency_name = d.pop("agency_name", UNSET) + + state = d.pop("state", UNSET) + + access_token = d.pop("access_token", UNSET) + + token_type = d.pop("token_type", UNSET) + + expires_in = d.pop("expires_in", UNSET) + + scope = d.pop("scope", UNSET) + + response_authorize = cls( + code=code, + environment=environment, + agency_name=agency_name, + state=state, + access_token=access_token, + token_type=token_type, + expires_in=expires_in, + scope=scope, + ) + + response_authorize.additional_properties = d + return response_authorize + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/response_error.py b/accelapy/accelapy/authentication_client/models/response_error.py new file mode 100644 index 0000000..ed15570 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/response_error.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResponseError") + + +@_attrs_define +class ResponseError: + """ + Attributes: + error (Union[Unset, str]): The error code. Refer [here](https://tools.ietf.org/html/rfc6749#section-4.1.2) for + details. + error_description (Union[Unset, str]): The error description text. + error_uri (Union[Unset, str]): The URI of web page with more information about the error. + state (Union[Unset, str]): The exact value received from the client. + """ + + error: Union[Unset, str] = UNSET + error_description: Union[Unset, str] = UNSET + error_uri: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + error = self.error + error_description = self.error_description + error_uri = self.error_uri + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error is not UNSET: + field_dict["error"] = error + if error_description is not UNSET: + field_dict["error_description"] = error_description + if error_uri is not UNSET: + field_dict["error_uri"] = error_uri + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + error = d.pop("error", UNSET) + + error_description = d.pop("error_description", UNSET) + + error_uri = d.pop("error_uri", UNSET) + + state = d.pop("state", UNSET) + + response_error = cls( + error=error, + error_description=error_description, + error_uri=error_uri, + state=state, + ) + + response_error.additional_properties = d + return response_error + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/response_status.py b/accelapy/accelapy/authentication_client/models/response_status.py new file mode 100644 index 0000000..b8c10dd --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/response_status.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResponseStatus") + + +@_attrs_define +class ResponseStatus: + """ + Attributes: + status (Union[Unset, str]): The HTTP error code. + code (Union[Unset, str]): The error code. + message (Union[Unset, str]): The error message. + trace_id (Union[Unset, str]): The traceid for debugging purposes. + """ + + status: Union[Unset, str] = UNSET + code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + trace_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + status = self.status + code = self.code + message = self.message + trace_id = self.trace_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if code is not UNSET: + field_dict["code"] = code + if message is not UNSET: + field_dict["message"] = message + if trace_id is not UNSET: + field_dict["traceId"] = trace_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + status = d.pop("status", UNSET) + + code = d.pop("code", UNSET) + + message = d.pop("message", UNSET) + + trace_id = d.pop("traceId", UNSET) + + response_status = cls( + status=status, + code=code, + message=message, + trace_id=trace_id, + ) + + response_status.additional_properties = d + return response_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/response_token.py b/accelapy/accelapy/authentication_client/models/response_token.py new file mode 100644 index 0000000..9e5b168 --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/response_token.py @@ -0,0 +1,100 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResponseToken") + + +@_attrs_define +class ResponseToken: + """ + Attributes: + access_token (Union[Unset, str]): The issued user access token. + token_type (Union[Unset, str]): The type of the token issued. It contains the fixed value "bearer" for + authorization_code grant type. + expires_in (Union[Unset, str]): The lifetime in seconds of the access token. For example, the value "3600" + denotes that the access token will expire in one hour from the time the response was generated. + refresh_token (Union[Unset, str]): The refresh token that can be used to obtain a new access token. + scope (Union[Unset, str]): The scope of the resources authenticated by the authorization server. + state (Union[Unset, str]): The exact value received from the client. + """ + + access_token: Union[Unset, str] = UNSET + token_type: Union[Unset, str] = UNSET + expires_in: Union[Unset, str] = UNSET + refresh_token: Union[Unset, str] = UNSET + scope: Union[Unset, str] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + access_token = self.access_token + token_type = self.token_type + expires_in = self.expires_in + refresh_token = self.refresh_token + scope = self.scope + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if access_token is not UNSET: + field_dict["access_token"] = access_token + if token_type is not UNSET: + field_dict["token_type"] = token_type + if expires_in is not UNSET: + field_dict["expires_in"] = expires_in + if refresh_token is not UNSET: + field_dict["refresh_token"] = refresh_token + if scope is not UNSET: + field_dict["scope"] = scope + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + access_token = d.pop("access_token", UNSET) + + token_type = d.pop("token_type", UNSET) + + expires_in = d.pop("expires_in", UNSET) + + refresh_token = d.pop("refresh_token", UNSET) + + scope = d.pop("scope", UNSET) + + state = d.pop("state", UNSET) + + response_token = cls( + access_token=access_token, + token_type=token_type, + expires_in=expires_in, + refresh_token=refresh_token, + scope=scope, + state=state, + ) + + response_token.additional_properties = d + return response_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/models/response_tokeninfo.py b/accelapy/accelapy/authentication_client/models/response_tokeninfo.py new file mode 100644 index 0000000..56e1afa --- /dev/null +++ b/accelapy/accelapy/authentication_client/models/response_tokeninfo.py @@ -0,0 +1,103 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResponseTokeninfo") + + +@_attrs_define +class ResponseTokeninfo: + """ + Attributes: + app_id (Union[Unset, str]): The app ID value from [Construct Developer Portal](https://developer.accela.com). + This value is passed in your access token request. + user_id (Union[Unset, str]): The logged in user's unique id. + agency_name (Union[Unset, str]): The agency name defined in the Accela Administrator Portal. The agency name is + passed by client request or chosen by the end-user during access token request flow. + scopes (Union[Unset, List[str]]): + expires_in (Union[Unset, int]): The lifetime in seconds of the access token. + state (Union[Unset, str]): The exact value received from the client. + """ + + app_id: Union[Unset, str] = UNSET + user_id: Union[Unset, str] = UNSET + agency_name: Union[Unset, str] = UNSET + scopes: Union[Unset, List[str]] = UNSET + expires_in: Union[Unset, int] = UNSET + state: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + app_id = self.app_id + user_id = self.user_id + agency_name = self.agency_name + scopes: Union[Unset, List[str]] = UNSET + if not isinstance(self.scopes, Unset): + scopes = self.scopes + + expires_in = self.expires_in + state = self.state + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_id is not UNSET: + field_dict["appId"] = app_id + if user_id is not UNSET: + field_dict["userId"] = user_id + if agency_name is not UNSET: + field_dict["agencyName"] = agency_name + if scopes is not UNSET: + field_dict["scopes"] = scopes + if expires_in is not UNSET: + field_dict["expiresIn"] = expires_in + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + app_id = d.pop("appId", UNSET) + + user_id = d.pop("userId", UNSET) + + agency_name = d.pop("agencyName", UNSET) + + scopes = cast(List[str], d.pop("scopes", UNSET)) + + expires_in = d.pop("expiresIn", UNSET) + + state = d.pop("state", UNSET) + + response_tokeninfo = cls( + app_id=app_id, + user_id=user_id, + agency_name=agency_name, + scopes=scopes, + expires_in=expires_in, + state=state, + ) + + response_tokeninfo.additional_properties = d + return response_tokeninfo + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/authentication_client/py.typed b/accelapy/accelapy/authentication_client/py.typed new file mode 100644 index 0000000..1aad327 --- /dev/null +++ b/accelapy/accelapy/authentication_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/accelapy/accelapy/authentication_client/types.py b/accelapy/accelapy/authentication_client/types.py new file mode 100644 index 0000000..15700b8 --- /dev/null +++ b/accelapy/accelapy/authentication_client/types.py @@ -0,0 +1,44 @@ +""" Contains some shared types for properties """ +from http import HTTPStatus +from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar + +from attrs import define + + +class Unset: + def __bool__(self) -> Literal[False]: + return False + + +UNSET: Unset = Unset() + +FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] + + +@define +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: Optional[str] = None + mime_type: Optional[str] = None + + def to_tuple(self) -> FileJsonType: + """Return a tuple representation that httpx will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@define +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: HTTPStatus + content: bytes + headers: MutableMapping[str, str] + parsed: Optional[T] + + +__all__ = ["File", "Response", "FileJsonType"] diff --git a/accelapy/accelapy/client.py b/accelapy/accelapy/client.py new file mode 100644 index 0000000..69c1b35 --- /dev/null +++ b/accelapy/accelapy/client.py @@ -0,0 +1,24 @@ +from .authentication_client import Client as AuthenticationClient +from .records_client import Client as RecordsClient +from .records_client.api.records import v4_get_records +from .create_get_headers import CreateGetHeaders +from .payload import Payload + +class AccelaClient: + def __init__(self, + payload: Payload, + url='https://apis.accela.com/'): + self.url = url + self.payload = payload + self.create_get_headers = CreateGetHeaders(payload.to_payload_str()) + self._authentication_client = AuthenticationClient(base_url = url) + self._records_client = RecordsClient(base_url=url) + self.v4_get_records = v4_get_records + + @property + def authentication_client(self): + return self._authentication_client.with_headers(self.create_get_headers.get_header()) + + @property + def records_client(self): + return self._records_client.with_headers(self.create_get_headers.get_header()) \ No newline at end of file diff --git a/accelapy/accelapy/create_get_headers.py b/accelapy/accelapy/create_get_headers.py new file mode 100644 index 0000000..95259d1 --- /dev/null +++ b/accelapy/accelapy/create_get_headers.py @@ -0,0 +1,57 @@ +import json +from datetime import timedelta, datetime + +import requests + + +class Token(object): + def __init__(self, data): + self.__dict__ = json.loads(data) + +class CreateGetHeadersToken(Exception): + pass + + + +class CreateGetHeaders: + def __init__(self, payload): + self.payload = payload + self.header = { + "Content-Type": "application/x-www-form-urlencoded" + } + self.expires = 0 + self.session_datetime_now = datetime.now() + + def is_time_expired(self): + # Get the current time + now = datetime.now() + + # Create a timedelta object representing the given time duration + time_difference = timedelta(seconds=self.expires) + + # Calculate the future time by adding the time difference to the current time + future_time = self.session_datetime_now + time_difference + return now > future_time + + def get_header(self): + if 'Authorization' not in self.header: + self.header['Authorization'] = self.create_token_by_scope() + + if self.is_time_expired(): + self.header['Authorization'] = self.create_token_by_scope() + + return self.header + + def create_token_by_scope(self): + reqUrl = "https://apis.accela.com/oauth2/token" + # TODO: Break this down into parts instead of throwing all this into one string. + response = requests.request("POST", reqUrl, data=self.payload, headers=self.header) + if response.status_code == 200: + result_dict = response.json() + self.expires = int(result_dict['expires_in']) + token = Token(response.text.encode('utf8')) + + self.session_datetime_now = datetime.now() + return str(token.access_token) + else: + raise CreateGetHeadersToken('Cannot find access token, check your payload.') diff --git a/accelapy/accelapy/payload.py b/accelapy/accelapy/payload.py new file mode 100644 index 0000000..278be21 --- /dev/null +++ b/accelapy/accelapy/payload.py @@ -0,0 +1,62 @@ +import urllib.parse + +class Payload: + def __init__(self, grant_type=None, client_id=None, client_secret=None, username=None, password=None, scope=None, agency_name=None, environment=None, payload_str=None): + if payload_str: + # Parse the payload string and set attributes + self._parse_payload_string(payload_str) + else: + # Set attributes directly from parameters + self.grant_type = grant_type + self.client_id = client_id + self.client_secret = client_secret + self.username = username + self.password = password + self.scope = scope + self.agency_name = agency_name + self.environment = environment + + # Validate all fields to ensure no None values + self._validate_fields() + + def _parse_payload_string(self, payload_str): + # Parse the URL-encoded string into a dictionary + parsed_data = urllib.parse.parse_qs(payload_str) + + # Set each attribute, handling list values from parse_qs + self.grant_type = parsed_data.get('grant_type', [None])[0] + self.client_id = parsed_data.get('client_id', [None])[0] + self.client_secret = parsed_data.get('client_secret', [None])[0] + self.username = parsed_data.get('username', [None])[0] + self.password = parsed_data.get('password', [None])[0] + self.scope = parsed_data.get('scope', [None])[0] + self.agency_name = parsed_data.get('agency_name', [None])[0] + self.environment = parsed_data.get('environment', [None])[0] + + def _validate_fields(self): + # Check if any attribute is None + missing_fields = [field for field, value in self.__dict__.items() if value is None] + if missing_fields: + raise ValueError(f"Missing required fields: {', '.join(missing_fields)}") + + def to_payload_str(self): + # Convert the attributes back into a URL-encoded string + payload_dict = { + 'grant_type': self.grant_type, + 'client_id': self.client_id, + 'client_secret': self.client_secret, + 'username': self.username, + 'password': self.password, + 'scope': self.scope, + 'agency_name': self.agency_name, + 'environment': self.environment + } + # Return the URL-encoded string + return urllib.parse.urlencode(payload_dict) + + def __repr__(self): + # For easy inspection of object attributes + return (f"Payload(grant_type='{self.grant_type}', client_id='{self.client_id}', " + f"client_secret='{self.client_secret}', username='{self.username}', " + f"password='{self.password}', scope='{self.scope}', " + f"agency_name='{self.agency_name}', environment='{self.environment}')") diff --git a/accelapy/accelapy/records_client/.gitignore b/accelapy/accelapy/records_client/.gitignore new file mode 100644 index 0000000..79a2c3d --- /dev/null +++ b/accelapy/accelapy/records_client/.gitignore @@ -0,0 +1,23 @@ +__pycache__/ +build/ +dist/ +*.egg-info/ +.pytest_cache/ + +# pyenv +.python-version + +# Environments +.env +.venv + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# JetBrains +.idea/ + +/coverage.xml +/.coverage diff --git a/accelapy/accelapy/records_client/__init__.py b/accelapy/accelapy/records_client/__init__.py new file mode 100644 index 0000000..7aa914c --- /dev/null +++ b/accelapy/accelapy/records_client/__init__.py @@ -0,0 +1,7 @@ +""" A client library for accessing Records """ +from .client import AuthenticatedClient, Client + +__all__ = ( + "AuthenticatedClient", + "Client", +) diff --git a/accelapy/accelapy/records_client/api/__init__.py b/accelapy/accelapy/records_client/api/__init__.py new file mode 100644 index 0000000..dc035f4 --- /dev/null +++ b/accelapy/accelapy/records_client/api/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the API """ diff --git a/accelapy/accelapy/records_client/api/records/__init__.py b/accelapy/accelapy/records_client/api/records/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records/v4_delete_records_ids.py b/accelapy/accelapy/records_client/api/records/v4_delete_records_ids.py new file mode 100644 index 0000000..d4e03f5 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_delete_records_ids.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{ids}".format( + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Records + + Deletes the specified record. + + + + **API Endpoint**: DELETE /v4/records/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Records + + Deletes the specified record. + + + + **API Endpoint**: DELETE /v4/records/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_get_records.py b/accelapy/accelapy/records_client/api/records/v4_get_records.py new file mode 100644 index 0000000..6654e56 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_get_records.py @@ -0,0 +1,354 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_to_department: Union[Unset, None, str] = UNSET, + assigned_user: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["type"] = type + + params["openedDateFrom"] = opened_date_from + + params["openedDateTo"] = opened_date_to + + params["customId"] = custom_id + + params["module"] = module + + params["status"] = status + + params["assignedToDepartment"] = assigned_to_department + + params["assignedUser"] = assigned_user + + params["assignedDateFrom"] = assigned_date_from + + params["assignedDateTo"] = assigned_date_to + + params["completedDateFrom"] = completed_date_from + + params["completedDateTo"] = completed_date_to + + params["statusDateFrom"] = status_date_from + + params["statusDateTo"] = status_date_to + + params["completedByDepartment"] = completed_by_department + + params["completedByUser"] = completed_by_user + + params["closedDateFrom"] = closed_date_from + + params["closedDateTo"] = closed_date_to + + params["closedByDepartment"] = closed_by_department + + params["closedByUser"] = closed_by_user + + params["recordClass"] = record_class + + params["limit"] = limit + + params["offset"] = offset + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records", + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_to_department: Union[Unset, None, str] = UNSET, + assigned_user: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Records + + Gets record information, based on the specified query parameters. + + + + **API Endpoint**: GET /v4/records + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + type (Union[Unset, None, str]): + opened_date_from (Union[Unset, None, str]): + opened_date_to (Union[Unset, None, str]): + custom_id (Union[Unset, None, str]): + module (Union[Unset, None, str]): + status (Union[Unset, None, str]): + assigned_to_department (Union[Unset, None, str]): + assigned_user (Union[Unset, None, str]): + assigned_date_from (Union[Unset, None, str]): + assigned_date_to (Union[Unset, None, str]): + completed_date_from (Union[Unset, None, str]): + completed_date_to (Union[Unset, None, str]): + status_date_from (Union[Unset, None, str]): + status_date_to (Union[Unset, None, str]): + completed_by_department (Union[Unset, None, str]): + completed_by_user (Union[Unset, None, str]): + closed_date_from (Union[Unset, None, str]): + closed_date_to (Union[Unset, None, str]): + closed_by_department (Union[Unset, None, str]): + closed_by_user (Union[Unset, None, str]): + record_class (Union[Unset, None, str]): + limit (Union[Unset, None, int]): + offset (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + opened_date_from=opened_date_from, + opened_date_to=opened_date_to, + custom_id=custom_id, + module=module, + status=status, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + assigned_date_from=assigned_date_from, + assigned_date_to=assigned_date_to, + completed_date_from=completed_date_from, + completed_date_to=completed_date_to, + status_date_from=status_date_from, + status_date_to=status_date_to, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + closed_date_from=closed_date_from, + closed_date_to=closed_date_to, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + record_class=record_class, + limit=limit, + offset=offset, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_to_department: Union[Unset, None, str] = UNSET, + assigned_user: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Records + + Gets record information, based on the specified query parameters. + + + + **API Endpoint**: GET /v4/records + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + type (Union[Unset, None, str]): + opened_date_from (Union[Unset, None, str]): + opened_date_to (Union[Unset, None, str]): + custom_id (Union[Unset, None, str]): + module (Union[Unset, None, str]): + status (Union[Unset, None, str]): + assigned_to_department (Union[Unset, None, str]): + assigned_user (Union[Unset, None, str]): + assigned_date_from (Union[Unset, None, str]): + assigned_date_to (Union[Unset, None, str]): + completed_date_from (Union[Unset, None, str]): + completed_date_to (Union[Unset, None, str]): + status_date_from (Union[Unset, None, str]): + status_date_to (Union[Unset, None, str]): + completed_by_department (Union[Unset, None, str]): + completed_by_user (Union[Unset, None, str]): + closed_date_from (Union[Unset, None, str]): + closed_date_to (Union[Unset, None, str]): + closed_by_department (Union[Unset, None, str]): + closed_by_user (Union[Unset, None, str]): + record_class (Union[Unset, None, str]): + limit (Union[Unset, None, int]): + offset (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + opened_date_from=opened_date_from, + opened_date_to=opened_date_to, + custom_id=custom_id, + module=module, + status=status, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + assigned_date_from=assigned_date_from, + assigned_date_to=assigned_date_to, + completed_date_from=completed_date_from, + completed_date_to=completed_date_to, + status_date_from=status_date_from, + status_date_to=status_date_to, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + closed_date_from=closed_date_from, + closed_date_to=closed_date_to, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + record_class=record_class, + limit=limit, + offset=offset, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_get_records_describe_create.py b/accelapy/accelapy/records_client/api/records/v4_get_records_describe_create.py new file mode 100644 index 0000000..af96580 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_get_records_describe_create.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + type: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["type"] = type + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/describe/create", + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Describe Required Record Attributes + + Gets the field and element values the system requires in order to create a specific type of record. + + + + **API Endpoint**: GET /v4/records/describe/create + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + type (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Describe Required Record Attributes + + Gets the field and element values the system requires in order to create a specific type of record. + + + + **API Endpoint**: GET /v4/records/describe/create + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + type (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_get_records_ids.py b/accelapy/accelapy/records_client/api/records/v4_get_records_ids.py new file mode 100644 index 0000000..e00e5fe --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_get_records_ids.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_get_records_ids_expand import V4GetRecordsIdsExpand +from ...models.v4_get_records_ids_expand_custom_forms import V4GetRecordsIdsExpandCustomForms +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + ids: str, + *, + expand: Union[Unset, None, V4GetRecordsIdsExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsIdsExpandCustomForms] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + json_expand: Union[Unset, None, str] = UNSET + if not isinstance(expand, Unset): + json_expand = expand.value if expand else None + + params["expand"] = json_expand + + json_expand_custom_forms: Union[Unset, None, str] = UNSET + if not isinstance(expand_custom_forms, Unset): + json_expand_custom_forms = expand_custom_forms.value if expand_custom_forms else None + + params["expandCustomForms"] = json_expand_custom_forms + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{ids}".format( + ids=ids, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + expand: Union[Unset, None, V4GetRecordsIdsExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsIdsExpandCustomForms] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Records + + Gets the requested record(s). + + + + **API Endpoint**: GET /v4/records/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + ids (str): + expand (Union[Unset, None, V4GetRecordsIdsExpand]): + expand_custom_forms (Union[Unset, None, V4GetRecordsIdsExpandCustomForms]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + expand=expand, + expand_custom_forms=expand_custom_forms, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + expand: Union[Unset, None, V4GetRecordsIdsExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsIdsExpandCustomForms] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Records + + Gets the requested record(s). + + + + **API Endpoint**: GET /v4/records/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + ids (str): + expand (Union[Unset, None, V4GetRecordsIdsExpand]): + expand_custom_forms (Union[Unset, None, V4GetRecordsIdsExpandCustomForms]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + expand=expand, + expand_custom_forms=expand_custom_forms, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_get_records_mine.py b/accelapy/accelapy/records_client/api/records/v4_get_records_mine.py new file mode 100644 index 0000000..29c667c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_get_records_mine.py @@ -0,0 +1,409 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_get_records_mine_expand import V4GetRecordsMineExpand +from ...models.v4_get_records_mine_expand_custom_forms import V4GetRecordsMineExpandCustomForms +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + update_date_from: Union[Unset, None, str] = UNSET, + update_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + types: Union[Unset, None, str] = UNSET, + modules: Union[Unset, None, str] = UNSET, + status_types: Union[Unset, None, str] = UNSET, + expand: Union[Unset, None, V4GetRecordsMineExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsMineExpandCustomForms] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["type"] = type + + params["openedDateFrom"] = opened_date_from + + params["openedDateTo"] = opened_date_to + + params["customId"] = custom_id + + params["module"] = module + + params["status"] = status + + params["assignedDateFrom"] = assigned_date_from + + params["assignedDateTo"] = assigned_date_to + + params["completedDateFrom"] = completed_date_from + + params["completedDateTo"] = completed_date_to + + params["statusDateFrom"] = status_date_from + + params["statusDateTo"] = status_date_to + + params["updateDateFrom"] = update_date_from + + params["updateDateTo"] = update_date_to + + params["completedByDepartment"] = completed_by_department + + params["completedByUser"] = completed_by_user + + params["closedDateFrom"] = closed_date_from + + params["closedDateTo"] = closed_date_to + + params["closedByDepartment"] = closed_by_department + + params["closedByUser"] = closed_by_user + + params["recordClass"] = record_class + + params["types"] = types + + params["modules"] = modules + + params["statusTypes"] = status_types + + json_expand: Union[Unset, None, str] = UNSET + if not isinstance(expand, Unset): + json_expand = expand.value if expand else None + + params["expand"] = json_expand + + json_expand_custom_forms: Union[Unset, None, str] = UNSET + if not isinstance(expand_custom_forms, Unset): + json_expand_custom_forms = expand_custom_forms.value if expand_custom_forms else None + + params["expandCustomForms"] = json_expand_custom_forms + + params["limit"] = limit + + params["offset"] = offset + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/mine", + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + update_date_from: Union[Unset, None, str] = UNSET, + update_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + types: Union[Unset, None, str] = UNSET, + modules: Union[Unset, None, str] = UNSET, + status_types: Union[Unset, None, str] = UNSET, + expand: Union[Unset, None, V4GetRecordsMineExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsMineExpandCustomForms] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get My Records + + Gets records for the currently logged-in user. + + + + **API Endpoint**: GET /v4/records/mine + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + type (Union[Unset, None, str]): + opened_date_from (Union[Unset, None, str]): + opened_date_to (Union[Unset, None, str]): + custom_id (Union[Unset, None, str]): + module (Union[Unset, None, str]): + status (Union[Unset, None, str]): + assigned_date_from (Union[Unset, None, str]): + assigned_date_to (Union[Unset, None, str]): + completed_date_from (Union[Unset, None, str]): + completed_date_to (Union[Unset, None, str]): + status_date_from (Union[Unset, None, str]): + status_date_to (Union[Unset, None, str]): + update_date_from (Union[Unset, None, str]): + update_date_to (Union[Unset, None, str]): + completed_by_department (Union[Unset, None, str]): + completed_by_user (Union[Unset, None, str]): + closed_date_from (Union[Unset, None, str]): + closed_date_to (Union[Unset, None, str]): + closed_by_department (Union[Unset, None, str]): + closed_by_user (Union[Unset, None, str]): + record_class (Union[Unset, None, str]): + types (Union[Unset, None, str]): + modules (Union[Unset, None, str]): + status_types (Union[Unset, None, str]): + expand (Union[Unset, None, V4GetRecordsMineExpand]): + expand_custom_forms (Union[Unset, None, V4GetRecordsMineExpandCustomForms]): + limit (Union[Unset, None, int]): + offset (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + opened_date_from=opened_date_from, + opened_date_to=opened_date_to, + custom_id=custom_id, + module=module, + status=status, + assigned_date_from=assigned_date_from, + assigned_date_to=assigned_date_to, + completed_date_from=completed_date_from, + completed_date_to=completed_date_to, + status_date_from=status_date_from, + status_date_to=status_date_to, + update_date_from=update_date_from, + update_date_to=update_date_to, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + closed_date_from=closed_date_from, + closed_date_to=closed_date_to, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + record_class=record_class, + types=types, + modules=modules, + status_types=status_types, + expand=expand, + expand_custom_forms=expand_custom_forms, + limit=limit, + offset=offset, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + type: Union[Unset, None, str] = UNSET, + opened_date_from: Union[Unset, None, str] = UNSET, + opened_date_to: Union[Unset, None, str] = UNSET, + custom_id: Union[Unset, None, str] = UNSET, + module: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, str] = UNSET, + assigned_date_from: Union[Unset, None, str] = UNSET, + assigned_date_to: Union[Unset, None, str] = UNSET, + completed_date_from: Union[Unset, None, str] = UNSET, + completed_date_to: Union[Unset, None, str] = UNSET, + status_date_from: Union[Unset, None, str] = UNSET, + status_date_to: Union[Unset, None, str] = UNSET, + update_date_from: Union[Unset, None, str] = UNSET, + update_date_to: Union[Unset, None, str] = UNSET, + completed_by_department: Union[Unset, None, str] = UNSET, + completed_by_user: Union[Unset, None, str] = UNSET, + closed_date_from: Union[Unset, None, str] = UNSET, + closed_date_to: Union[Unset, None, str] = UNSET, + closed_by_department: Union[Unset, None, str] = UNSET, + closed_by_user: Union[Unset, None, str] = UNSET, + record_class: Union[Unset, None, str] = UNSET, + types: Union[Unset, None, str] = UNSET, + modules: Union[Unset, None, str] = UNSET, + status_types: Union[Unset, None, str] = UNSET, + expand: Union[Unset, None, V4GetRecordsMineExpand] = UNSET, + expand_custom_forms: Union[Unset, None, V4GetRecordsMineExpandCustomForms] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get My Records + + Gets records for the currently logged-in user. + + + + **API Endpoint**: GET /v4/records/mine + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + type (Union[Unset, None, str]): + opened_date_from (Union[Unset, None, str]): + opened_date_to (Union[Unset, None, str]): + custom_id (Union[Unset, None, str]): + module (Union[Unset, None, str]): + status (Union[Unset, None, str]): + assigned_date_from (Union[Unset, None, str]): + assigned_date_to (Union[Unset, None, str]): + completed_date_from (Union[Unset, None, str]): + completed_date_to (Union[Unset, None, str]): + status_date_from (Union[Unset, None, str]): + status_date_to (Union[Unset, None, str]): + update_date_from (Union[Unset, None, str]): + update_date_to (Union[Unset, None, str]): + completed_by_department (Union[Unset, None, str]): + completed_by_user (Union[Unset, None, str]): + closed_date_from (Union[Unset, None, str]): + closed_date_to (Union[Unset, None, str]): + closed_by_department (Union[Unset, None, str]): + closed_by_user (Union[Unset, None, str]): + record_class (Union[Unset, None, str]): + types (Union[Unset, None, str]): + modules (Union[Unset, None, str]): + status_types (Union[Unset, None, str]): + expand (Union[Unset, None, V4GetRecordsMineExpand]): + expand_custom_forms (Union[Unset, None, V4GetRecordsMineExpandCustomForms]): + limit (Union[Unset, None, int]): + offset (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + type=type, + opened_date_from=opened_date_from, + opened_date_to=opened_date_to, + custom_id=custom_id, + module=module, + status=status, + assigned_date_from=assigned_date_from, + assigned_date_to=assigned_date_to, + completed_date_from=completed_date_from, + completed_date_to=completed_date_to, + status_date_from=status_date_from, + status_date_to=status_date_to, + update_date_from=update_date_from, + update_date_to=update_date_to, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + closed_date_from=closed_date_from, + closed_date_to=closed_date_to, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + record_class=record_class, + types=types, + modules=modules, + status_types=status_types, + expand=expand, + expand_custom_forms=expand_custom_forms, + limit=limit, + offset=offset, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_post_records.py b/accelapy/accelapy/records_client/api/records/v4_post_records.py new file mode 100644 index 0000000..d0e3650 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_post_records.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, + record_data: {} +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records", + "params": params, + "headers": headers, + "data": record_data + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record + + Creates a new, full record in Civic Platform. The Create Record API triggers the business rules + engine event ApplicationSubmitAfter. + + Note: The Create Record API does not include custom forms and custom tables in the request body. To + add or update custom forms and custom tables, use the [Update Record Custom Forms](./api- + records.html#operation/v4.put.records.recordId.customForms) and [Update Record Custom Tables](./api- + records.html#operation/v4.put.records.recordId.customForms) after the Create Record request. + + + + **API Endpoint**: POST /v4/records + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record + + Creates a new, full record in Civic Platform. The Create Record API triggers the business rules + engine event ApplicationSubmitAfter. + + Note: The Create Record API does not include custom forms and custom tables in the request body. To + add or update custom forms and custom tables, use the [Update Record Custom Forms](./api- + records.html#operation/v4.put.records.recordId.customForms) and [Update Record Custom Tables](./api- + records.html#operation/v4.put.records.recordId.customForms) after the Create Record request. + + + + **API Endpoint**: POST /v4/records + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v4_put_records_id.py b/accelapy/accelapy/records_client/api/records/v4_put_records_id.py new file mode 100644 index 0000000..63b1fb8 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v4_put_records_id.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + ids: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{ids}".format( + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record + + Updates details for the specified record. + + + + **API Endpoint**: PUT /v4/records/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + ids (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + ids: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record + + Updates details for the specified record. + + + + **API Endpoint**: PUT /v4/records/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + ids (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + ids=ids, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_delete_records_record_id_related_child_record_ids.py b/accelapy/accelapy/records_client/api/records/v_4_delete_records_record_id_related_child_record_ids.py new file mode 100644 index 0000000..8603917 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_delete_records_record_id_related_child_record_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + child_record_ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/related/{childRecordIds}".format( + recordId=record_id, + childRecordIds=child_record_ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + child_record_ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Related Details from Record + + Removes the relationship between the specifed child record(s) and their specified parent record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/related/{childRecordIds} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + child_record_ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + child_record_ids=child_record_ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + child_record_ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Related Details from Record + + Removes the relationship between the specifed child record(s) and their specified parent record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/related/{childRecordIds} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + child_record_ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + child_record_ids=child_record_ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_additional.py b/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_additional.py new file mode 100644 index 0000000..79842aa --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_additional.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/additional".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Additional Details for Record + + Gets additional information for the requested record. + + + + **API Endpoint**: GET /v4/records/{recordId}/additional + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Additional Details for Record + + Gets additional information for the requested record. + + + + **API Endpoint**: GET /v4/records/{recordId}/additional + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_related.py b/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_related.py new file mode 100644 index 0000000..f925b86 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_get_records_record_id_related.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_get_records_record_id_related_relationship import V4GetRecordsRecordIdRelatedRelationship +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + relationship: Union[Unset, None, V4GetRecordsRecordIdRelatedRelationship] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + json_relationship: Union[Unset, None, str] = UNSET + if not isinstance(relationship, Unset): + json_relationship = relationship.value if relationship else None + + params["relationship"] = json_relationship + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/related".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + relationship: Union[Unset, None, V4GetRecordsRecordIdRelatedRelationship] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Related Details for Record + + Gets the records related, by a parent or child relation, to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/related + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + relationship (Union[Unset, None, V4GetRecordsRecordIdRelatedRelationship]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + relationship=relationship, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + relationship: Union[Unset, None, V4GetRecordsRecordIdRelatedRelationship] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Related Details for Record + + Gets the records related, by a parent or child relation, to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/related + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + relationship (Union[Unset, None, V4GetRecordsRecordIdRelatedRelationship]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + relationship=relationship, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_finalize.py b/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_finalize.py new file mode 100644 index 0000000..bef6486 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_finalize.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/finalize".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Finalize Record + + Creates the finalized record in the database. Use this method after calling Create Partial Record to + submit the completed record. See [Creating Records](https://developer.accela.com/docs/construct-api- + records.html#construct-api-records__creatingRecords) for more information about calling Finalize + Record in tandem with Create Partial Record. + + The Create Partial Record API triggers the business rules engine event ApplicationSubmitAfter. + + Note: The Finalize Record API does not include custom forms and custom tables in the request body. + To add or update custom forms and custom tables, use the [Update Record Custom Forms](./api- + records.html#operation/v4.put.records.recordId.customForms) and [Update Record Custom Tables](./api- + records.html#operation/v4.put.records.recordId.customForms) between the Create Partial Record and + Finalize Record requests. + + + + **API Endpoint**: POST /v4/records/{recordId}/finalize + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Finalize Record + + Creates the finalized record in the database. Use this method after calling Create Partial Record to + submit the completed record. See [Creating Records](https://developer.accela.com/docs/construct-api- + records.html#construct-api-records__creatingRecords) for more information about calling Finalize + Record in tandem with Create Partial Record. + + The Create Partial Record API triggers the business rules engine event ApplicationSubmitAfter. + + Note: The Finalize Record API does not include custom forms and custom tables in the request body. + To add or update custom forms and custom tables, use the [Update Record Custom Forms](./api- + records.html#operation/v4.put.records.recordId.customForms) and [Update Record Custom Tables](./api- + records.html#operation/v4.put.records.recordId.customForms) between the Create Partial Record and + Finalize Record requests. + + + + **API Endpoint**: POST /v4/records/{recordId}/finalize + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_related.py b/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_related.py new file mode 100644 index 0000000..83f5169 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_post_records_record_id_related.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/related".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Related Details for Record + + Creates a child relationship to the specified (parent) record. + + + + **API Endpoint**: POST /v4/records/{recordId}/related + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Related Details for Record + + Creates a child relationship to the specified (parent) record. + + + + **API Endpoint**: POST /v4/records/{recordId}/related + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records/v_4_put_records_record_id_additional.py b/accelapy/accelapy/records_client/api/records/v_4_put_records_record_id_additional.py new file mode 100644 index 0000000..e595539 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records/v_4_put_records_record_id_additional.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/additional".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Additional Details for Record + + Updates additional information for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/additional + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Additional Details for Record + + Updates additional information for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/additional + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_activities/__init__.py b/accelapy/accelapy/records_client/api/records_activities/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_activities/v_4_get_records_record_id_activities.py b/accelapy/accelapy/records_client/api/records_activities/v_4_get_records_record_id_activities.py new file mode 100644 index 0000000..dd92ce6 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_activities/v_4_get_records_record_id_activities.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/activities".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Activities + + Gets all activities related to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/activities + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Activities + + Gets all activities related to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/activities + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_activities/v_4_post_records_record_id_activities.py b/accelapy/accelapy/records_client/api/records_activities/v_4_post_records_record_id_activities.py new file mode 100644 index 0000000..7510c3c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_activities/v_4_post_records_record_id_activities.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/activities".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Activities + + Creates activities associated to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/activities + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Activities + + Creates activities associated to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/activities + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_activities/v_4_put_records_record_id_activities_id.py b/accelapy/accelapy/records_client/api/records_activities/v_4_put_records_record_id_activities_id.py new file mode 100644 index 0000000..d2d91f0 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_activities/v_4_put_records_record_id_activities_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/activities/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Activity + + Updates the activity for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/activities/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Activity + + Updates the activity for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/activities/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses/__init__.py b/accelapy/accelapy/records_client/api/records_addresses/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_addresses/v_4_delete_records_record_id_addresses_ids.py b/accelapy/accelapy/records_client/api/records_addresses/v_4_delete_records_record_id_addresses_ids.py new file mode 100644 index 0000000..d158458 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses/v_4_delete_records_record_id_addresses_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/addresses/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Addresses + + Deletes addresses from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/addresses/{idS} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Addresses + + Deletes addresses from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/addresses/{idS} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses/v_4_get_records_record_id_addresses.py b/accelapy/accelapy/records_client/api/records_addresses/v_4_get_records_record_id_addresses.py new file mode 100644 index 0000000..3620ac1 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses/v_4_get_records_record_id_addresses.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/addresses".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Addresses + + Gets the addresses linked to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No auth required + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Addresses + + Gets the addresses linked to the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No auth required + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses/v_4_post_records_record_id_addresses.py b/accelapy/accelapy/records_client/api/records_addresses/v_4_post_records_record_id_addresses.py new file mode 100644 index 0000000..5140aaf --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses/v_4_post_records_record_id_addresses.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/addresses".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Addresses + + Creates new address(es) for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Addresses + + Creates new address(es) for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses/v_4_put_records_record_id_addresses_id.py b/accelapy/accelapy/records_client/api/records_addresses/v_4_put_records_record_id_addresses_id.py new file mode 100644 index 0000000..5a04764 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses/v_4_put_records_record_id_addresses_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/addresses/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Address + + Updates the address for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/addresses/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Address + + Updates the address for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/addresses/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses_custom_forms/__init__.py b/accelapy/accelapy/records_client/api/records_addresses_custom_forms/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms.py new file mode 100644 index 0000000..a8523c3 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + address_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/addresses/{addressId}/customForms".format( + recordId=record_id, + addressId=address_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + address_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Address Custom Forms + + Returns an array of custom form data associated with a given record address. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses/{addressId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + address_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + address_id=address_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + address_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Address Custom Forms + + Returns an array of custom form data associated with a given record address. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses/{addressId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + address_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + address_id=address_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms_meta.py b/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms_meta.py new file mode 100644 index 0000000..ab17c10 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_addresses_custom_forms/v_4_get_records_record_id_addresses_address_id_custom_forms_meta.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + address_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/addresses/{addressId}/customForms/meta".format( + recordId=record_id, + addressId=address_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + address_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Address Custom Forms Metadata + + Returns the field metadata for all custom forms associated with a given record address. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses/{addressId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + address_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + address_id=address_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + address_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Address Custom Forms Metadata + + Returns the field metadata for all custom forms associated with a given record address. + + + + **API Endpoint**: GET /v4/records/{recordId}/addresses/{addressId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + address_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + address_id=address_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_assets/__init__.py b/accelapy/accelapy/records_client/api/records_assets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_assets/v_4_delete_records_record_id_assets_ids.py b/accelapy/accelapy/records_client/api/records_assets/v_4_delete_records_record_id_assets_ids.py new file mode 100644 index 0000000..e33bd08 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_assets/v_4_delete_records_record_id_assets_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/assets/{ids}".format( + recordId=record_id, + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Assets from Record + + Deletes one or more assets from a given record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/assets/{ids} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Assets from Record + + Deletes one or more assets from a given record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/assets/{ids} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_assets/v_4_get_records_record_id_assets.py b/accelapy/accelapy/records_client/api/records_assets/v_4_get_records_record_id_assets.py new file mode 100644 index 0000000..34da03a --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_assets/v_4_get_records_record_id_assets.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["offset"] = offset + + params["limit"] = limit + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/assets".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Assets for Record + + Returns all assets for a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/assets + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Assets for Record + + Returns all assets for a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/assets + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_assets/v_4_post_records_record_id_assets.py b/accelapy/accelapy/records_client/api/records_assets/v_4_post_records_record_id_assets.py new file mode 100644 index 0000000..c58f954 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_assets/v_4_post_records_record_id_assets.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["offset"] = offset + + params["limit"] = limit + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/assets".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Add Assets to Record + + Adds one or more assets to a given record. + + + + **API Endpoint**: POST /v4/records/{recordId}/assets + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Add Assets to Record + + Adds one or more assets to a given record. + + + + **API Endpoint**: POST /v4/records/{recordId}/assets + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_comments/__init__.py b/accelapy/accelapy/records_client/api/records_comments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_comments/v_4_delete_records_record_id_comments_ids.py b/accelapy/accelapy/records_client/api/records_comments/v_4_delete_records_record_id_comments_ids.py new file mode 100644 index 0000000..64471e7 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_comments/v_4_delete_records_record_id_comments_ids.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/comments/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Comments + + Deletes the specified comment(s) for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/comments/{idS} + + **Scope**: + + + + **API Endpoint**: + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Comments + + Deletes the specified comment(s) for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/comments/{idS} + + **Scope**: + + + + **API Endpoint**: + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_comments/v_4_get_records_record_id_comments.py b/accelapy/accelapy/records_client/api/records_comments/v_4_get_records_record_id_comments.py new file mode 100644 index 0000000..21cd86c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_comments/v_4_get_records_record_id_comments.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/comments".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Comments for Record + + Gets comments associated to a record. + + + + **API Endpoint**: GET /v4/records/{recordId}/comments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Comments for Record + + Gets comments associated to a record. + + + + **API Endpoint**: GET /v4/records/{recordId}/comments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_comments/v_4_post_records_record_id_comments.py b/accelapy/accelapy/records_client/api/records_comments/v_4_post_records_record_id_comments.py new file mode 100644 index 0000000..de454d0 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_comments/v_4_post_records_record_id_comments.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/comments".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Add Comments to a Record + + Add comments to a record. + + + + **API Endpoint**: POST /v4/records/{recordId}/comments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Add Comments to a Record + + Add comments to a record. + + + + **API Endpoint**: POST /v4/records/{recordId}/comments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_comments/v_4_put_records_record_id_comments_id.py b/accelapy/accelapy/records_client/api/records_comments/v_4_put_records_record_id_comments_id.py new file mode 100644 index 0000000..67f608d --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_comments/v_4_put_records_record_id_comments_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/comments/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Comment + + Update a record comment. + + + + **API Endpoint**: PUT /v4/records/{recordId}/comments/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Comment + + Update a record comment. + + + + **API Endpoint**: PUT /v4/records/{recordId}/comments/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/__init__.py b/accelapy/accelapy/records_client/api/records_condition_approvals/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_delete_records_record_id_condition_approvals_ids.py b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_delete_records_record_id_condition_approvals_ids.py new file mode 100644 index 0000000..faa72f0 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_delete_records_record_id_condition_approvals_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/conditionApprovals/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Approval Conditions + + Deletes approval conditions for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/conditionApprovals/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Approval Conditions + + Deletes approval conditions for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/conditionApprovals/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals.py b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals.py new file mode 100644 index 0000000..00975bd --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/conditionApprovals".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Approval Conditions for Record + + Gets the conditions of approval for the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordId}/conditionApprovals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Approval Conditions for Record + + Gets the conditions of approval for the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordId}/conditionApprovals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals_id.py b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals_id.py new file mode 100644 index 0000000..0dedeb0 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_get_records_record_id_condition_approvals_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/conditionApprovals/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Approval Condition + + Gets the specified condition of approvals for the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordId}/conditionApprovals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Approval Condition + + Gets the specified condition of approvals for the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordId}/conditionApprovals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_post_records_record_id_condition_approvals.py b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_post_records_record_id_condition_approvals.py new file mode 100644 index 0000000..4c73508 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_post_records_record_id_condition_approvals.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/conditionApprovals".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Approval Conditions + + Adds approval conditions to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/conditionApprovals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Approval Conditions + + Adds approval conditions to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/conditionApprovals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_put_records_record_id_condition_approvals_id.py b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_put_records_record_id_condition_approvals_id.py new file mode 100644 index 0000000..6d1f53f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_condition_approvals/v_4_put_records_record_id_condition_approvals_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/conditionApprovals/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Approval Condition + + Updates the condition of approvals for the specified record(s). + + + + **API Endpoint**: PUT /v4/records/{recordId}/conditionApprovals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Approval Condition + + Updates the condition of approvals for the specified record(s). + + + + **API Endpoint**: PUT /v4/records/{recordId}/conditionApprovals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/__init__.py b/accelapy/accelapy/records_client/api/records_conditions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_delete_records_record_id_conditions_ids.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_delete_records_record_id_conditions_ids.py new file mode 100644 index 0000000..2976b3c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_delete_records_record_id_conditions_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/conditions/{id}/histories".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Conditions + + Deletes conditions for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/conditions/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Conditions + + Deletes conditions for the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/conditions/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions.py new file mode 100644 index 0000000..12fa83d --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/conditions".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Conditions for Record + + Gets all conditions for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Conditions for Record + + Gets all conditions for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id.py new file mode 100644 index 0000000..921d6a5 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/conditions/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Condition + + Gets a record condition. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Condition + + Gets a record condition. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id_histories.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id_histories.py new file mode 100644 index 0000000..9b124a9 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_get_records_record_id_conditions_id_histories.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/conditions/{id}/histories".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get History for Record Condition + + Gets the history for a given record condition. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions/{id}/histories + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get History for Record Condition + + Gets the history for a given record condition. + + + + **API Endpoint**: GET /v4/records/{recordId}/conditions/{id}/histories + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_post_records_record_id_conditions.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_post_records_record_id_conditions.py new file mode 100644 index 0000000..27c6d1e --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_post_records_record_id_conditions.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/conditions".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Conditions + + Adds a condition to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/conditions + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Conditions + + Adds a condition to the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/conditions + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_conditions/v_4_put_records_record_id_conditions_id.py b/accelapy/accelapy/records_client/api/records_conditions/v_4_put_records_record_id_conditions_id.py new file mode 100644 index 0000000..fd6a5a4 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_conditions/v_4_put_records_record_id_conditions_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/conditions/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Condition + + Update a record condition. + + + + **API Endpoint**: PUT /v4/records/{recordId}/conditions/{id} + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Condition + + Update a record condition. + + + + **API Endpoint**: PUT /v4/records/{recordId}/conditions/{id} + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/__init__.py b/accelapy/accelapy/records_client/api/records_contacts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_contact_id_addresses_ids.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_contact_id_addresses_ids.py new file mode 100644 index 0000000..0545300 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_contact_id_addresses_ids.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/contacts/{contactId}/addresses/{id}".format( + recordId=record_id, + contactId=contact_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Contact Addresses + + Deletes the specified addresses from the specified contacts and specified records. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/contacts/{contactId}/addresses/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Contact Addresses + + Deletes the specified addresses from the specified contacts and specified records. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/contacts/{contactId}/addresses/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_ids.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_ids.py new file mode 100644 index 0000000..3e58458 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_delete_records_record_id_contacts_ids.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/contacts/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Contacts + + Removes the association of specified contacts from a specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/contacts/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Contacts + + Removes the association of specified contacts from a specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/contacts/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts.py new file mode 100644 index 0000000..502c3f4 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Contacts for Record + + Gets contacts associated to a record. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Contacts for Record + + Gets contacts associated to a record. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts + + **Scope**: addresses + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts_contact_id_addresses.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts_contact_id_addresses.py new file mode 100644 index 0000000..837e644 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_get_records_record_id_contacts_contact_id_addresses.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/addresses".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Addresses for Contact + + Gets the addresses for the specified contacts and specified records. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Addresses for Contact + + Gets the addresses for the specified contacts and specified records. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts.py new file mode 100644 index 0000000..142d1cd --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/contacts".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Contacts + + Creates new contact(s) for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/contacts + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Contacts + + Creates new contact(s) for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/contacts + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts_contact_id_addresses.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts_contact_id_addresses.py new file mode 100644 index 0000000..6244cbb --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_post_records_record_id_contacts_contact_id_addresses.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/contacts/{contactId}/addresses".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Contact Addresses + + Creates addresses for the specified contact for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/contacts/{contactId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Contact Addresses + + Creates addresses for the specified contact for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/contacts/{contactId}/addresses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_contact_id_addresses_id.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_contact_id_addresses_id.py new file mode 100644 index 0000000..1cc55fa --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_contact_id_addresses_id.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/contacts/{contactId}/addresses/{id}".format( + recordId=record_id, + contactId=contact_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact Address + + Updates the specified address for the specified contact and specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/addresses/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact Address + + Updates the specified address for the specified contact and specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/addresses/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_id.py b/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_id.py new file mode 100644 index 0000000..6d8ee2e --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts/v_4_put_records_record_id_contacts_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/contacts/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact + + Updates information for a specified contact associated with a specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact + + Updates information for a specified contact associated with a specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_forms/__init__.py b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms.py new file mode 100644 index 0000000..83a4e3f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customForms".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contacts Custom Forms + + Returns an array of custom forms associated with the specified record contact. Each custom form + consists of the custom form id and custom field name-and-value pairs. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contacts Custom Forms + + Returns an array of custom forms associated with the specified record contact. Each custom form + consists of the custom form id and custom field name-and-value pairs. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_form_id_meta.py b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_form_id_meta.py new file mode 100644 index 0000000..43272f2 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_form_id_meta.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + form_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customForms/{formId}/meta".format( + recordId=record_id, + contactId=contact_id, + formId=form_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + form_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contact Custom Form Metadata + + Gets the metadata associated with the requested custom form for the record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms/{formId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + contact_id (int): + form_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + form_id=form_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + form_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contact Custom Form Metadata + + Gets the metadata associated with the requested custom form for the record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms/{formId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.2.0 + + + Args: + record_id (str): + contact_id (int): + form_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + form_id=form_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_meta.py b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_meta.py new file mode 100644 index 0000000..70942ff --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_get_records_record_id_contacts_contact_id_custom_forms_meta.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customForms/meta".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contacts Custom Forms Meta + + Gets the custom forms metadata associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Contacts Custom Forms Meta + + Gets the custom forms metadata associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_put_records_record_id_contacts_contact_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_put_records_record_id_contacts_contact_id_custom_forms.py new file mode 100644 index 0000000..a045597 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_forms/v_4_put_records_record_id_contacts_contact_id_custom_forms.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/contacts/{contactId}/customForms".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact Custom Forms + + Updates the custom forms for the specified record contact. The request body is an array of custom + forms, with each item containing the custom form's id and custom field name/value pairs. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/customForms + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Contact Custom Forms + + Updates the custom forms for the specified record contact. The request body is an array of custom + forms, with each item containing the custom form's id and custom field name/value pairs. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/customForms + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + contact_id (int): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_tables/__init__.py b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables.py b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables.py new file mode 100644 index 0000000..0710ffb --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customTables".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Tables for Record Contact + + Gets the custom tables associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Tables for Record Contact + + Gets the custom tables associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_meta.py b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_meta.py new file mode 100644 index 0000000..8caa9da --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_meta.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customTables/meta".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Metadata of All Record Contact Custom Tables + + Gets the metadata of all custom tables associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Metadata of All Record Contact Custom Tables + + Gets the metadata of all custom tables associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_table_id_meta.py b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_table_id_meta.py new file mode 100644 index 0000000..e7030e1 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_get_records_record_id_contacts_contact_id_custom_tables_table_id_meta.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + table_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/contacts/{contactId}/customTables/{tableId}/meta".format( + recordId=record_id, + contactId=contact_id, + tableId=table_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Metadata of a Record Contact Custom Table + + Gets the metadata of a specified custom table associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables/{tableId}/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + table_id=table_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Metadata of a Record Contact Custom Table + + Gets the metadata of a specified custom table associated with the specified record contact. + + + + **API Endpoint**: GET /v4/records/{recordId}/contacts/{contactId}/customTables/{tableId}/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + table_id=table_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_put_records_record_id_contacts_contact_id_custom_tables.py b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_put_records_record_id_contacts_contact_id_custom_tables.py new file mode 100644 index 0000000..ec4168f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_contacts_custom_tables/v_4_put_records_record_id_contacts_contact_id_custom_tables.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + contact_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/contacts/{contactId}/customTables".format( + recordId=record_id, + contactId=contact_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Tables + + Updates the custom tables for the specified record contact. The request body is an array of custom + tables, each with the custom table id and an array of rows. Use this API to add, update and delete + rows from an existing custom table. (Custom tables are defined in Civic Platform.) Note that the + modified custom table data only applies to the transactional record contact, not the reference + contact. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/customTables + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + contact_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Tables + + Updates the custom tables for the specified record contact. The request body is an array of custom + tables, each with the custom table id and an array of rows. Use this API to add, update and delete + rows from an existing custom table. (Custom tables are defined in Civic Platform.) Note that the + modified custom table data only applies to the transactional record contact, not the reference + contact. + + + + **API Endpoint**: PUT /v4/records/{recordId}/contacts/{contactId}/customTables + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + contact_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + contact_id=contact_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_costs/__init__.py b/accelapy/accelapy/records_client/api/records_costs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_costs/v_4_delete_records_record_id_costs_ids.py b/accelapy/accelapy/records_client/api/records_costs/v_4_delete_records_record_id_costs_ids.py new file mode 100644 index 0000000..5f532e4 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_costs/v_4_delete_records_record_id_costs_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/costs/{ids}".format( + recordId=record_id, + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Costs + + Deletes one or more costs from a given record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/costs/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Costs + + Deletes one or more costs from a given record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/costs/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_costs/v_4_get_records_record_id_costs.py b/accelapy/accelapy/records_client/api/records_costs/v_4_get_records_record_id_costs.py new file mode 100644 index 0000000..8c760fc --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_costs/v_4_get_records_record_id_costs.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/costs".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Costs + + Returns the costs associated to a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/costs + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Costs + + Returns the costs associated to a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/costs + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_costs/v_4_put_records_record_id_costs_id.py b/accelapy/accelapy/records_client/api/records_costs/v_4_put_records_record_id_costs_id.py new file mode 100644 index 0000000..9b11b0b --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_costs/v_4_put_records_record_id_costs_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/costs/{ids}".format( + recordId=record_id, + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Costs + + Update the details of the costs for given records. + + + + **API Endpoint**: PUT /v4/records/{recordId}/costs/{id} + + **Scope**: costs + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 20.1.4 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Costs + + Update the details of the costs for given records. + + + + **API Endpoint**: PUT /v4/records/{recordId}/costs/{id} + + **Scope**: costs + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 20.1.4 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_forms/__init__.py b/accelapy/accelapy/records_client/api/records_custom_forms/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms.py new file mode 100644 index 0000000..f8e3bd2 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms.py @@ -0,0 +1,158 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customForms".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Forms for Record + + Returns an array of custom forms associated with the specified record. Each custom form consists of + custom field name-and-value pairs. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Forms for Record + + Returns an array of custom forms associated with the specified record. Each custom form consists of + custom field name-and-value pairs. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_form_id_meta.py b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_form_id_meta.py new file mode 100644 index 0000000..3551400 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_form_id_meta.py @@ -0,0 +1,155 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + form_id: str, + *, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customForms/{formId}/meta".format( + recordId=record_id, + formId=form_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + form_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Custom Form Metadata for Record + + Gets the detailed data associated with the specified custom form for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms/{formId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + form_id (str): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + form_id=form_id, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + form_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Custom Form Metadata for Record + + Gets the detailed data associated with the specified custom form for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms/{formId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + form_id (str): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + form_id=form_id, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_meta.py b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_meta.py new file mode 100644 index 0000000..1c4e2ff --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_get_records_record_id_custom_forms_meta.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customForms/meta".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Forms Metadata for Record + + Gets the detailed data associated with the custom forms for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Forms Metadata for Record + + Gets the detailed data associated with the custom forms for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customForms/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_forms/v_4_put_records_record_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_put_records_record_id_custom_forms.py new file mode 100644 index 0000000..97abade --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_forms/v_4_put_records_record_id_custom_forms.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/customForms".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Forms + + Updates the custom form for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Forms + + Updates the custom form for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/__init__.py b/accelapy/accelapy/records_client/api/records_custom_tables/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables.py b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables.py new file mode 100644 index 0000000..b1d4902 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customTables".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Tables for Record + + Gets all the custom tables associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Tables for Record + + Gets all the custom tables associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_meta.py b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_meta.py new file mode 100644 index 0000000..5bb643b --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_meta.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customTables/meta".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Tables Metadata for Record + + Gets detailed data associated with the custom tables for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Custom Tables Metadata for Record + + Gets detailed data associated with the custom tables for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id.py b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id.py new file mode 100644 index 0000000..4fd3e85 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + table_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customTables/{tableId}".format( + recordId=record_id, + tableId=table_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Record Custom Table + + Gets the requested custom table for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/{tableId} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + table_id=table_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Record Custom Table + + Gets the requested custom table for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/{tableId} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + table_id=table_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id_meta.py b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id_meta.py new file mode 100644 index 0000000..753b7fc --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_get_records_record_id_custom_tables_table_id_meta.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + table_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/customTables/{tableId}/meta".format( + recordId=record_id, + tableId=table_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Custom Table Metadata for Record + + Gets the detailed data associated with the specified custom table for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/{tableId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + table_id=table_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + table_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get Custom Table Metadata for Record + + Gets the detailed data associated with the specified custom table for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/customTables/{tableId}/meta + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + table_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + table_id=table_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_custom_tables/v_4_put_records_record_id_custom_tables.py b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_put_records_record_id_custom_tables.py new file mode 100644 index 0000000..eb5e8b5 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_custom_tables/v_4_put_records_record_id_custom_tables.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/customTables".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Tables + + Updates the custom table for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/customTables + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Custom Tables + + Updates the custom table for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/customTables + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_documents/__init__.py b/accelapy/accelapy/records_client/api/records_documents/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_documents/v_4_delete_records_record_id_documents_document_ids.py b/accelapy/accelapy/records_client/api/records_documents/v_4_delete_records_record_id_documents_document_ids.py new file mode 100644 index 0000000..91fe9a9 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_documents/v_4_delete_records_record_id_documents_document_ids.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + document_ids: str, + *, + user_id: str, + password: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["userId"] = user_id + + params["password"] = password + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/documents/{documentIds}".format( + recordId=record_id, + documentIds=document_ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + document_ids: str, + *, + client: Union[AuthenticatedClient, Client], + user_id: str, + password: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Documents + + Deletes documents attached to a record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/documents/{documentIds} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + document_ids (str): + user_id (str): + password (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + document_ids=document_ids, + user_id=user_id, + password=password, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + document_ids: str, + *, + client: Union[AuthenticatedClient, Client], + user_id: str, + password: str, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Documents + + Deletes documents attached to a record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/documents/{documentIds} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + document_ids (str): + user_id (str): + password (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + document_ids=document_ids, + user_id=user_id, + password=password, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_document_categories.py b/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_document_categories.py new file mode 100644 index 0000000..1f77a8f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_document_categories.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/documentCategories".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Document Categories for Record + + Gets the document types associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/documentCategories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Document Categories for Record + + Gets the document types associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/documentCategories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_documents.py b/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_documents.py new file mode 100644 index 0000000..15ed217 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_documents/v_4_get_records_record_id_documents.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/documents".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Documents for Record + + Gets the documents associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/documents + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Documents for Record + + Gets the documents associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/documents + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_documents/v_4_post_records_record_id_documents.py b/accelapy/accelapy/records_client/api/records_documents/v_4_post_records_record_id_documents.py new file mode 100644 index 0000000..5935636 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_documents/v_4_post_records_record_id_documents.py @@ -0,0 +1,211 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_post_records_record_id_documents_multipart_data import V4PostRecordsRecordIdDocumentsMultipartData +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + multipart_data: V4PostRecordsRecordIdDocumentsMultipartData, + group: Union[Unset, None, str] = UNSET, + category: Union[Unset, None, str] = UNSET, + user_id: Union[Unset, None, str] = UNSET, + password: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["group"] = group + + params["category"] = category + + params["userId"] = user_id + + params["password"] = password + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + multipart_multipart_data = multipart_data.to_multipart() + + return { + "method": "post", + "url": "/v4/records/{recordId}/documents".format( + recordId=record_id, + ), + "files": multipart_multipart_data, + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + multipart_data: V4PostRecordsRecordIdDocumentsMultipartData, + group: Union[Unset, None, str] = UNSET, + category: Union[Unset, None, str] = UNSET, + user_id: Union[Unset, None, str] = UNSET, + password: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + r"""Create Record Documents + + Creates one or more document attachments for the specified record. To specify the documents to be + attached, use the HTTP header \"Content-Type:multipart/form-data\" and form-data for + \"uploadedFile\" and \"fileInfo\". Note that the \"fileInfo\" is a string containing an array of + file attributes. Use \"fileInfo\" to specify one or more documents to be attached. See the example + for details. + + + + **API Endpoint**: POST /v4/records/{recordId}/documents + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + group (Union[Unset, None, str]): + category (Union[Unset, None, str]): + user_id (Union[Unset, None, str]): + password (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + multipart_data (V4PostRecordsRecordIdDocumentsMultipartData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + multipart_data=multipart_data, + group=group, + category=category, + user_id=user_id, + password=password, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + multipart_data: V4PostRecordsRecordIdDocumentsMultipartData, + group: Union[Unset, None, str] = UNSET, + category: Union[Unset, None, str] = UNSET, + user_id: Union[Unset, None, str] = UNSET, + password: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + r"""Create Record Documents + + Creates one or more document attachments for the specified record. To specify the documents to be + attached, use the HTTP header \"Content-Type:multipart/form-data\" and form-data for + \"uploadedFile\" and \"fileInfo\". Note that the \"fileInfo\" is a string containing an array of + file attributes. Use \"fileInfo\" to specify one or more documents to be attached. See the example + for details. + + + + **API Endpoint**: POST /v4/records/{recordId}/documents + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + group (Union[Unset, None, str]): + category (Union[Unset, None, str]): + user_id (Union[Unset, None, str]): + password (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + multipart_data (V4PostRecordsRecordIdDocumentsMultipartData): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + multipart_data=multipart_data, + group=group, + category=category, + user_id=user_id, + password=password, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_fees/__init__.py b/accelapy/accelapy/records_client/api/records_fees/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_fees/v_4_get_records_record_id_fees.py b/accelapy/accelapy/records_client/api/records_fees/v_4_get_records_record_id_fees.py new file mode 100644 index 0000000..5057406 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_fees/v_4_get_records_record_id_fees.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_get_records_record_id_fees_status import V4GetRecordsRecordIdFeesStatus +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, V4GetRecordsRecordIdFeesStatus] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + json_status: Union[Unset, None, str] = UNSET + if not isinstance(status, Unset): + json_status = status.value if status else None + + params["status"] = json_status + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/fees".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, V4GetRecordsRecordIdFeesStatus] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Fees for Record + + Gets the fee schedules associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/fees + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + status (Union[Unset, None, V4GetRecordsRecordIdFeesStatus]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + status=status, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + status: Union[Unset, None, V4GetRecordsRecordIdFeesStatus] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Fees for Record + + Gets the fee schedules associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/fees + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + status (Union[Unset, None, V4GetRecordsRecordIdFeesStatus]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + status=status, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_fees/v_4_post_records_record_id_fees.py b/accelapy/accelapy/records_client/api/records_fees/v_4_post_records_record_id_fees.py new file mode 100644 index 0000000..c32449f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_fees/v_4_post_records_record_id_fees.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/fees".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Fees + + Creates fees for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/fees + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Fees + + Creates fees for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/fees + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_fees/v_4_put_records_record_id_fees_estimate.py b/accelapy/accelapy/records_client/api/records_fees/v_4_put_records_record_id_fees_estimate.py new file mode 100644 index 0000000..7c71cad --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_fees/v_4_put_records_record_id_fees_estimate.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/fees/estimate".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Estimate Record Fees + + Provides fee estimations for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/fees/estimate + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Estimate Record Fees + + Provides fee estimations for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/fees/estimate + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_inspections/__init__.py b/accelapy/accelapy/records_client/api/records_inspections/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_id_inspections.py b/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_id_inspections.py new file mode 100644 index 0000000..29cea8e --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_id_inspections.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["offset"] = offset + + params["limit"] = limit + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/inspections".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Inspections for Record + + Gets the scheduled inspections for the specified record. + + Note: For a citizen token, the Display in ACA setting of the given {recordId} determines whether or + not an inspection is returned. If Display in ACA is enabled for the given {recordId}, the inspection + is included in the response; otherwise, the inspection will not be included. For an agency token, + the Display in ACA setting of the given {recordId} is ignored. + + + + **API Endpoint**: GET /v4/records/{recordId}/inspections + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + offset=offset, + limit=limit, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Inspections for Record + + Gets the scheduled inspections for the specified record. + + Note: For a citizen token, the Display in ACA setting of the given {recordId} determines whether or + not an inspection is returned. If Display in ACA is enabled for the given {recordId}, the inspection + is included in the response; otherwise, the inspection will not be included. For an agency token, + the Display in ACA setting of the given {recordId} is ignored. + + + + **API Endpoint**: GET /v4/records/{recordId}/inspections + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + offset=offset, + limit=limit, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_ids_inspection_types.py b/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_ids_inspection_types.py new file mode 100644 index 0000000..1f72b5c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_inspections/v_4_get_records_record_ids_inspection_types.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_ids: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordIds}/inspectionTypes".format( + recordIds=record_ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_ids: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Inspection Types for Record + + Gets the inspection types associated with the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordIds}/inspectionTypes + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_ids (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_ids=record_ids, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_ids: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Inspection Types for Record + + Gets the inspection types associated with the specified record(s). + + + + **API Endpoint**: GET /v4/records/{recordIds}/inspectionTypes + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_ids (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_ids=record_ids, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_invoices/__init__.py b/accelapy/accelapy/records_client/api/records_invoices/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_invoices/v_4_get_records_record_id_invoices.py b/accelapy/accelapy/records_client/api/records_invoices/v_4_get_records_record_id_invoices.py new file mode 100644 index 0000000..feccdb7 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_invoices/v_4_get_records_record_id_invoices.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/invoices".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Invoices + + Returns all invoices for a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/invoices + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Record Invoices + + Returns all invoices for a given record. + + + + **API Endpoint**: GET /v4/records/{recordId}/invoices + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_invoices/v_4_post_records_record_id_invoices.py b/accelapy/accelapy/records_client/api/records_invoices/v_4_post_records_record_id_invoices.py new file mode 100644 index 0000000..7601af5 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_invoices/v_4_post_records_record_id_invoices.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/invoices".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Invoices + + Adds or links invoices to a given record. + + + + **API Endpoint**: POST /v4/records/{recordId}/invoices + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Invoices + + Adds or links invoices to a given record. + + + + **API Endpoint**: POST /v4/records/{recordId}/invoices + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_owners/__init__.py b/accelapy/accelapy/records_client/api/records_owners/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_owners/v_4_delete_records_record_id_owners_ids.py b/accelapy/accelapy/records_client/api/records_owners/v_4_delete_records_record_id_owners_ids.py new file mode 100644 index 0000000..71d7843 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_owners/v_4_delete_records_record_id_owners_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/owners/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Owners + + Removes the specified owner(s) from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/owners/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Owners + + Removes the specified owner(s) from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/owners/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_owners/v_4_get_records_record_id_owners.py b/accelapy/accelapy/records_client/api/records_owners/v_4_get_records_record_id_owners.py new file mode 100644 index 0000000..2feace6 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_owners/v_4_get_records_record_id_owners.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/owners".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Owners for Record + + Gets owners associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/owners + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Owners for Record + + Gets owners associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/owners + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_owners/v_4_post_records_record_id_owners.py b/accelapy/accelapy/records_client/api/records_owners/v_4_post_records_record_id_owners.py new file mode 100644 index 0000000..189d717 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_owners/v_4_post_records_record_id_owners.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/owners".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Owners + + Creates a new owner association for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/owners + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Owners + + Creates a new owner association for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/owners + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_owners/v_4_put_records_record_id_owners_id.py b/accelapy/accelapy/records_client/api/records_owners/v_4_put_records_record_id_owners_id.py new file mode 100644 index 0000000..c9e238d --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_owners/v_4_put_records_record_id_owners_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/owners/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Owner + + Updates information about the specified owner for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/owners/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Owner + + Updates information about the specified owner for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/owners/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_parcels/__init__.py b/accelapy/accelapy/records_client/api/records_parcels/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_parcels/v_4_delete_records_record_id_parcels_ids.py b/accelapy/accelapy/records_client/api/records_parcels/v_4_delete_records_record_id_parcels_ids.py new file mode 100644 index 0000000..19f55b8 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_parcels/v_4_delete_records_record_id_parcels_ids.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/parcels/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Parcels + + Removes the association of the specified parcel(s) from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/parcels/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Parcels + + Removes the association of the specified parcel(s) from the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/parcels/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_parcels/v_4_get_records_record_id_parcels.py b/accelapy/accelapy/records_client/api/records_parcels/v_4_get_records_record_id_parcels.py new file mode 100644 index 0000000..a98ed06 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_parcels/v_4_get_records_record_id_parcels.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/parcels".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Parcels for Record + + Gets the parcels associated with the specified parcel. + + + + **API Endpoint**: GET /v4/records/{recordId}/parcels + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Get All Parcels for Record + + Gets the parcels associated with the specified parcel. + + + + **API Endpoint**: GET /v4/records/{recordId}/parcels + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_parcels/v_4_post_records_record_id_parcels.py b/accelapy/accelapy/records_client/api/records_parcels/v_4_post_records_record_id_parcels.py new file mode 100644 index 0000000..9b79222 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_parcels/v_4_post_records_record_id_parcels.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + pass + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/parcels".format( + recordId=record_id, + ), + "params": params, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Create Record Parcels + + Creates a new parcel for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/parcels + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, +) -> Response[Any]: + """Create Record Parcels + + Creates a new parcel for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/parcels + + **Scope**: records + + **App Type**: All + + **Authorization Type**: No authorization required + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_parcels/v_4_put_records_record_id_parcels_id.py b/accelapy/accelapy/records_client/api/records_parcels/v_4_put_records_record_id_parcels_id.py new file mode 100644 index 0000000..9f2cd0c --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_parcels/v_4_put_records_record_id_parcels_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/parcels/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Parcel + + Updates parcel information associated with the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/parcels/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Parcel + + Updates parcel information associated with the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/parcels/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_part_transactions/__init__.py b/accelapy/accelapy/records_client/api/records_part_transactions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_part_transactions/v_4_delete_records_record_id_part_transaction_ids.py b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_delete_records_record_id_part_transaction_ids.py new file mode 100644 index 0000000..54dab5a --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_delete_records_record_id_part_transaction_ids.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + ids: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/partTransaction/{ids}".format( + recordId=record_id, + ids=ids, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Void Record Part Transactions + + Voids one or more part transactions for the specified record. The part transaction is voided, not + deleted. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/partTransaction/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + ids: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Void Record Part Transactions + + Voids one or more part transactions for the specified record. The part transaction is voided, not + deleted. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/partTransaction/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + ids (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + ids=ids, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_part_transactions/v_4_get_records_record_id_part_transaction.py b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_get_records_record_id_part_transaction.py new file mode 100644 index 0000000..99c0595 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_get_records_record_id_part_transaction.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["offset"] = offset + + params["limit"] = limit + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/partTransaction".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Part Transaction + + Gets information about the part transaction associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/partTransaction + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Part Transaction + + Gets information about the part transaction associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/partTransaction + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_part_transactions/v_4_post_records_record_id_part_transaction.py b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_post_records_record_id_part_transaction.py new file mode 100644 index 0000000..c6f0021 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_part_transactions/v_4_post_records_record_id_part_transaction.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/partTransaction".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Part Transaction + + Creates a part transaction for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/partTransaction + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Part Transaction + + Creates a part transaction for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/partTransaction + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_payments/__init__.py b/accelapy/accelapy/records_client/api/records_payments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments.py b/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments.py new file mode 100644 index 0000000..0d4a999 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.v4_get_records_record_id_payments_payment_status import V4GetRecordsRecordIdPaymentsPaymentStatus +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + payment_status: Union[Unset, None, V4GetRecordsRecordIdPaymentsPaymentStatus] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + json_payment_status: Union[Unset, None, str] = UNSET + if not isinstance(payment_status, Unset): + json_payment_status = payment_status.value if payment_status else None + + params["paymentStatus"] = json_payment_status + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/payments".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + payment_status: Union[Unset, None, V4GetRecordsRecordIdPaymentsPaymentStatus] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Payments for Record + + Gets information about the payments for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/payments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + payment_status (Union[Unset, None, V4GetRecordsRecordIdPaymentsPaymentStatus]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + payment_status=payment_status, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + payment_status: Union[Unset, None, V4GetRecordsRecordIdPaymentsPaymentStatus] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Payments for Record + + Gets information about the payments for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/payments + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 9.0.0 + + + Args: + record_id (str): + payment_status (Union[Unset, None, V4GetRecordsRecordIdPaymentsPaymentStatus]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + payment_status=payment_status, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments_payment_id.py b/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments_payment_id.py new file mode 100644 index 0000000..faf6e91 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_payments/v_4_get_records_record_id_payments_payment_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + payment_id: int, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/payments/{paymentId}".format( + recordId=record_id, + paymentId=payment_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + payment_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Payment + + Gets information about the specified payment for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/payments/{paymentId} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + payment_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + payment_id=payment_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + payment_id: int, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Payment + + Gets information about the specified payment for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/payments/{paymentId} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + payment_id (int): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + payment_id=payment_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_professionals/__init__.py b/accelapy/accelapy/records_client/api/records_professionals/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_professionals/v_4_delete_records_record_id_professionals_ids.py b/accelapy/accelapy/records_client/api/records_professionals/v_4_delete_records_record_id_professionals_ids.py new file mode 100644 index 0000000..e3f673f --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_professionals/v_4_delete_records_record_id_professionals_ids.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "delete", + "url": "/v4/records/{recordId}/professionals/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Professionals + + Removes the association between the specified professional(s) and the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/professionals/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Delete Record Professionals + + Removes the association between the specified professional(s) and the specified record. + + + + **API Endpoint**: DELETE /v4/records/{recordId}/professionals/{ids} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_professionals/v_4_get_records_record_id_professionals.py b/accelapy/accelapy/records_client/api/records_professionals/v_4_get_records_record_id_professionals.py new file mode 100644 index 0000000..43050fb --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_professionals/v_4_get_records_record_id_professionals.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/professionals".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Professionals for Record + + Gets the professionals for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/professionals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Professionals for Record + + Gets the professionals for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/professionals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_professionals/v_4_post_records_record_id_professionals.py b/accelapy/accelapy/records_client/api/records_professionals/v_4_post_records_record_id_professionals.py new file mode 100644 index 0000000..921a19e --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_professionals/v_4_post_records_record_id_professionals.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/professionals".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Professionals + + Creates a new professional and associates the professional with the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/professionals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Professionals + + Creates a new professional and associates the professional with the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/professionals + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_professionals/v_4_put_records_record_id_professionals_id.py b/accelapy/accelapy/records_client/api/records_professionals/v_4_put_records_record_id_professionals_id.py new file mode 100644 index 0000000..8258c2a --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_professionals/v_4_put_records_record_id_professionals_id.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/professionals/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Professional + + Updates information for the specified professional associated with the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/professionals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Professional + + Updates information for the specified professional associated with the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/professionals/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_trust_accounts/__init__.py b/accelapy/accelapy/records_client/api/records_trust_accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_trust_accounts/v_4_get_records_record_id_trust_accounts.py b/accelapy/accelapy/records_client/api/records_trust_accounts/v_4_get_records_record_id_trust_accounts.py new file mode 100644 index 0000000..4d3e5f2 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_trust_accounts/v_4_get_records_record_id_trust_accounts.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["offset"] = offset + + params["limit"] = limit + + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/trustAccounts".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Trust Accounts for Record + + Gets all trust accounts for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/trustAccounts + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.4 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + offset: Union[Unset, None, int] = UNSET, + limit: Union[Unset, None, int] = UNSET, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Trust Accounts for Record + + Gets all trust accounts for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/trustAccounts + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.3.4 + + + Args: + record_id (str): + offset (Union[Unset, None, int]): + limit (Union[Unset, None, int]): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + offset=offset, + limit=limit, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_votes/__init__.py b/accelapy/accelapy/records_client/api/records_votes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes.py b/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes.py new file mode 100644 index 0000000..093c8cf --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/votes".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Votes for Record + + Gets the votes for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/votes + + **Scope**: records + + **App Type**: Citizen + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Votes for Record + + Gets the votes for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/votes + + **Scope**: records + + **App Type**: Citizen + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes_summary.py b/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes_summary.py new file mode 100644 index 0000000..d7d2368 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_votes/v_4_get_records_record_id_votes_summary.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/votes/summary".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Votes Summary + + Gets the voting summary for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/votes/summary + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Votes Summary + + Gets the voting summary for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/votes/summary + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_votes/v_4_post_records_record_id_votes.py b/accelapy/accelapy/records_client/api/records_votes/v_4_post_records_record_id_votes.py new file mode 100644 index 0000000..0e8868d --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_votes/v_4_post_records_record_id_votes.py @@ -0,0 +1,156 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "post", + "url": "/v4/records/{recordId}/votes".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Votes + + Creates a vote for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/votes + + **Scope**: records + + **App Type**: Citizen + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Create Record Votes + + Creates a vote for the specified record. + + + + **API Endpoint**: POST /v4/records/{recordId}/votes + + **Scope**: records + + **App Type**: Citizen + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/__init__.py b/accelapy/accelapy/records_client/api/records_workflows/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks.py new file mode 100644 index 0000000..55dd640 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Workflow Tasks for Record + + Gets all the workflow tasks associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Workflow Tasks for Record + + Gets all the workflow tasks associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_comments_histories.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_comments_histories.py new file mode 100644 index 0000000..16da85b --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_comments_histories.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/comments/histories".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Workflow Task Comment Histories + + Gets the workflow task comment history for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/comments/histories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Workflow Task Comment Histories + + Gets the workflow task comment history for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/comments/histories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_histories.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_histories.py new file mode 100644 index 0000000..e37d8a1 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_histories.py @@ -0,0 +1,165 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/histories".format( + recordId=record_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Workflow Task History for Record + + Gets all the workflow task history associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/histories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Workflow Task History for Record + + Gets all the workflow task history associated with the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/histories + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id.py new file mode 100644 index 0000000..bd4dd75 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Workflow Task + + Gets the requested workflow task for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get Record Workflow Task + + Gets the requested workflow task for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{id} + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id_statuses.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id_statuses.py new file mode 100644 index 0000000..ce73a2a --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_id_statuses.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/{id}/statuses".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Statuses for Workflow Task + + Gets the status of the specified workflow task for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{id}/statuses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Statuses for Workflow Task + + Gets the status of the specified workflow task for the specified record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{id}/statuses + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms.py new file mode 100644 index 0000000..1ee06c2 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + task_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/{taskId}/customForms".format( + recordId=record_id, + taskId=task_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Forms for Record Workflow Task + + Returns the custom forms containing task-specific information for a given workflow task for a + specific record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{taskId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + task_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Forms for Record Workflow Task + + Returns the custom forms containing task-specific information for a given workflow task for a + specific record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{taskId}/customForms + + **Scope**: records + + **App Type**: All + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + task_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms_meta.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms_meta.py new file mode 100644 index 0000000..7201bc8 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_get_records_record_id_workflow_tasks_task_id_custom_forms_meta.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + task_id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "get", + "url": "/v4/records/{recordId}/workflowTasks/{taskId}/customForms/meta".format( + recordId=record_id, + taskId=task_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Forms Metadata for Record Workflow Task + + Returns the metadata associated with all custom forms for a given workflow task for a specific + record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{taskId}/customForms/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + task_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Get All Custom Forms Metadata for Record Workflow Task + + Returns the metadata associated with all custom forms for a given workflow task for a specific + record. + + + + **API Endpoint**: GET /v4/records/{recordId}/workflowTasks/{taskId}/customForms/meta + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + task_id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_id.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_id.py new file mode 100644 index 0000000..cfbc463 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_id.py @@ -0,0 +1,173 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + id: str, + *, + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["fields"] = fields + + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/workflowTasks/{id}".format( + recordId=record_id, + id=id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Workflow Task + + Updates the requested workflow task for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/workflowTasks/{id} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + id: str, + *, + client: Union[AuthenticatedClient, Client], + fields: Union[Unset, None, str] = UNSET, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Record Workflow Task + + Updates the requested workflow task for the specified record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/workflowTasks/{id} + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 7.3.2 + + + Args: + record_id (str): + id (str): + fields (Union[Unset, None, str]): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + id=id, + fields=fields, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_task_id_custom_forms.py b/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_task_id_custom_forms.py new file mode 100644 index 0000000..47a0bd5 --- /dev/null +++ b/accelapy/accelapy/records_client/api/records_workflows/v_4_put_records_record_id_workflow_tasks_task_id_custom_forms.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, Dict, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + record_id: str, + task_id: str, + *, + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Dict[str, Any]: + headers = {} + headers["Authorization"] = authorization + + params: Dict[str, Any] = {} + params["lang"] = lang + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "method": "put", + "url": "/v4/records/{recordId}/workflowTasks/{taskId}/customForms".format( + recordId=record_id, + taskId=task_id, + ), + "params": params, + "headers": headers, + } + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == HTTPStatus.BAD_REQUEST: + return None + if response.status_code == HTTPStatus.UNAUTHORIZED: + return None + if response.status_code == HTTPStatus.FORBIDDEN: + return None + if response.status_code == HTTPStatus.NOT_FOUND: + return None + if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Custom Form for Record Workflow Task + + Updates custom forms containing task-specific information for a given workflow task for a specific + record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/workflowTasks/{taskId}/customForms + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + task_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + lang=lang, + authorization=authorization, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + record_id: str, + task_id: str, + *, + client: Union[AuthenticatedClient, Client], + lang: Union[Unset, None, str] = UNSET, + authorization: str, +) -> Response[Any]: + """Update Custom Form for Record Workflow Task + + Updates custom forms containing task-specific information for a given workflow task for a specific + record. + + + + **API Endpoint**: PUT /v4/records/{recordId}/workflowTasks/{taskId}/customForms + + **Scope**: records + + **App Type**: Agency + + **Authorization Type**: Access token + + **Civic Platform version**: 8.0.3 + + + Args: + record_id (str): + task_id (str): + lang (Union[Unset, None, str]): + authorization (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + record_id=record_id, + task_id=task_id, + lang=lang, + authorization=authorization, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/accelapy/accelapy/records_client/client.py b/accelapy/accelapy/records_client/client.py new file mode 100644 index 0000000..74b476c --- /dev/null +++ b/accelapy/accelapy/records_client/client.py @@ -0,0 +1,268 @@ +import ssl +from typing import Any, Dict, Optional, Union + +import httpx +from attrs import define, evolve, field + + +@define +class Client: + """A class for keeping track of data related to the API + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + def with_headers(self, headers: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: Dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "Client": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "Client": + """Manually the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "Client": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "Client": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) + + +@define +class AuthenticatedClient: + """A Client which has been authenticated for use on secured endpoints + + The following are accepted as keyword arguments and will be used to construct httpx Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + token: The token to use for authentication + prefix: The prefix to use for the Authorization header + auth_header_name: The name of the Authorization header + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + + token: str + prefix: str = "Bearer" + auth_header_name: str = "Authorization" + + def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": + """Get a new client matching this one with a new timeout (in seconds)""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient": + """Manually the underlying httpx.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx.Client: + """Get the underlying httpx.Client, constructing a new one if not previously set""" + if self._client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._client = httpx.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> "AuthenticatedClient": + """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx.Client (see httpx docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": + """Manually the underlying httpx.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx.AsyncClient: + """Get the underlying httpx.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._async_client = httpx.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> "AuthenticatedClient": + """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/accelapy/accelapy/records_client/errors.py b/accelapy/accelapy/records_client/errors.py new file mode 100644 index 0000000..426f8a2 --- /dev/null +++ b/accelapy/accelapy/records_client/errors.py @@ -0,0 +1,14 @@ +""" Contains shared errors types that can be raised from API functions """ + + +class UnexpectedStatus(Exception): + """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + + def __init__(self, status_code: int, content: bytes): + self.status_code = status_code + self.content = content + + super().__init__(f"Unexpected status code: {status_code}") + + +__all__ = ["UnexpectedStatus"] diff --git a/accelapy/accelapy/records_client/models/__init__.py b/accelapy/accelapy/records_client/models/__init__.py new file mode 100644 index 0000000..52d065b --- /dev/null +++ b/accelapy/accelapy/records_client/models/__init__.py @@ -0,0 +1,875 @@ +""" Contains all the data models used in inputs/outputs """ + +from .activity_model import ActivityModel +from .activity_model_activity_status import ActivityModelActivityStatus +from .activity_model_assigned_department import ActivityModelAssignedDepartment +from .activity_model_assigned_user import ActivityModelAssignedUser +from .activity_model_priority import ActivityModelPriority +from .activity_model_status import ActivityModelStatus +from .activity_model_type import ActivityModelType +from .address_model import AddressModel +from .apo_custom_form import ApoCustomForm +from .apo_custom_forms_metadata import ApoCustomFormsMetadata +from .apo_custom_forms_metadata_custom_form_type import ApoCustomFormsMetadataCustomFormType +from .apo_custom_forms_metadata_fields import ApoCustomFormsMetadataFields +from .apo_custom_forms_metadata_fields_data_type import ApoCustomFormsMetadataFieldsDataType +from .apo_custom_forms_metadata_fields_is_public_visible import ApoCustomFormsMetadataFieldsIsPublicVisible +from .apo_custom_forms_metadata_fields_is_record_searchable import ApoCustomFormsMetadataFieldsIsRecordSearchable +from .apo_custom_forms_metadata_fields_is_required import ApoCustomFormsMetadataFieldsIsRequired +from .apo_custom_forms_metadata_fields_label import ApoCustomFormsMetadataFieldsLabel +from .apo_custom_forms_metadata_fields_options_item import ApoCustomFormsMetadataFieldsOptionsItem +from .asi_table_drill import ASITableDrill +from .asset_master_model import AssetMasterModel +from .asset_master_model_comments import AssetMasterModelComments +from .asset_master_model_dependent_flag import AssetMasterModelDependentFlag +from .asset_master_model_description import AssetMasterModelDescription +from .asset_master_model_name import AssetMasterModelName +from .asset_master_model_status import AssetMasterModelStatus +from .asset_master_model_type import AssetMasterModelType +from .cap_condition_model_2 import CapConditionModel2 +from .cap_id_model import CapIDModel +from .child_drill import ChildDrill +from .comment_model import CommentModel +from .comment_model_display_on_inspection import CommentModelDisplayOnInspection +from .compact_address_model import CompactAddressModel +from .compact_address_model_country import CompactAddressModelCountry +from .compact_address_model_state import CompactAddressModelState +from .condition_history_model import ConditionHistoryModel +from .condition_history_model_actionby_department import ConditionHistoryModelActionbyDepartment +from .condition_history_model_actionby_user import ConditionHistoryModelActionbyUser +from .condition_history_model_active_status import ConditionHistoryModelActiveStatus +from .condition_history_model_appliedby_department import ConditionHistoryModelAppliedbyDepartment +from .condition_history_model_appliedby_user import ConditionHistoryModelAppliedbyUser +from .condition_history_model_group import ConditionHistoryModelGroup +from .condition_history_model_inheritable import ConditionHistoryModelInheritable +from .condition_history_model_priority import ConditionHistoryModelPriority +from .condition_history_model_severity import ConditionHistoryModelSeverity +from .condition_history_model_status import ConditionHistoryModelStatus +from .condition_history_model_type import ConditionHistoryModelType +from .contact_address import ContactAddress +from .contact_type_model import ContactTypeModel +from .costing_model import CostingModel +from .costing_model_cost_factor import CostingModelCostFactor +from .costing_model_distribute_flag import CostingModelDistributeFlag +from .costing_model_status import CostingModelStatus +from .costing_model_type import CostingModelType +from .costing_model_unit_of_measure import CostingModelUnitOfMeasure +from .costing_quantity_model import CostingQuantityModel +from .custom_attribute_model import CustomAttributeModel +from .custom_form_field import CustomFormField +from .custom_form_field_is_readonly import CustomFormFieldIsReadonly +from .custom_form_field_is_required import CustomFormFieldIsRequired +from .custom_form_field_options_item import CustomFormFieldOptionsItem +from .custom_form_metadata_model import CustomFormMetadataModel +from .custom_form_subgroup_model import CustomFormSubgroupModel +from .department_model import DepartmentModel +from .describe_record_model import DescribeRecordModel +from .document_model import DocumentModel +from .document_model_category import DocumentModelCategory +from .document_model_group import DocumentModelGroup +from .document_model_status import DocumentModelStatus +from .document_type_model import DocumentTypeModel +from .document_type_model_group import DocumentTypeModelGroup +from .element_model import ElementModel +from .estimate_fee_model import EstimateFeeModel +from .fee_item_base_model import FeeItemBaseModel +from .fee_item_base_model_1 import FeeItemBaseModel1 +from .fee_item_base_model_1_code import FeeItemBaseModel1Code +from .fee_item_base_model_1_payment_period import FeeItemBaseModel1PaymentPeriod +from .fee_item_base_model_1_schedule import FeeItemBaseModel1Schedule +from .fee_item_base_model_1_version import FeeItemBaseModel1Version +from .fee_item_base_model_code import FeeItemBaseModelCode +from .fee_item_base_model_payment_period import FeeItemBaseModelPaymentPeriod +from .fee_item_base_model_schedule import FeeItemBaseModelSchedule +from .fee_item_base_model_version import FeeItemBaseModelVersion +from .fee_item_model import FeeItemModel +from .fee_item_model_1 import FeeItemModel1 +from .fee_item_model_1_code import FeeItemModel1Code +from .fee_item_model_1_payment_period import FeeItemModel1PaymentPeriod +from .fee_item_model_1_schedule import FeeItemModel1Schedule +from .fee_item_model_1_sub_group import FeeItemModel1SubGroup +from .fee_item_model_1_unit import FeeItemModel1Unit +from .fee_item_model_1_version import FeeItemModel1Version +from .fee_item_model_code import FeeItemModelCode +from .fee_item_model_description import FeeItemModelDescription +from .fee_item_model_payment_period import FeeItemModelPaymentPeriod +from .fee_item_model_schedule import FeeItemModelSchedule +from .fee_item_model_sub_group import FeeItemModelSubGroup +from .fee_item_model_unit import FeeItemModelUnit +from .fee_item_model_version import FeeItemModelVersion +from .field_model import FieldModel +from .gis_object_model import GISObjectModel +from .identifier_model import IdentifierModel +from .inspection_before_scheduled_time import InspectionBeforeScheduledTime +from .inspection_contact_model import InspectionContactModel +from .inspection_contact_model_birth_city import InspectionContactModelBirthCity +from .inspection_contact_model_birth_region import InspectionContactModelBirthRegion +from .inspection_contact_model_birth_state import InspectionContactModelBirthState +from .inspection_contact_model_driver_license_state import InspectionContactModelDriverLicenseState +from .inspection_contact_model_gender import InspectionContactModelGender +from .inspection_contact_model_preferred_channel import InspectionContactModelPreferredChannel +from .inspection_contact_model_race import InspectionContactModelRace +from .inspection_contact_model_relation import InspectionContactModelRelation +from .inspection_contact_model_salutation import InspectionContactModelSalutation +from .inspection_contact_model_status import InspectionContactModelStatus +from .inspection_contact_model_type import InspectionContactModelType +from .inspection_model import InspectionModel +from .inspection_model_billable import InspectionModelBillable +from .inspection_model_schedule_end_ampm import InspectionModelScheduleEndAMPM +from .inspection_model_schedule_start_ampm import InspectionModelScheduleStartAMPM +from .inspection_model_status import InspectionModelStatus +from .inspection_restriction_model import InspectionRestrictionModel +from .inspection_type_associations_model import InspectionTypeAssociationsModel +from .inspection_type_associations_model_standard_comment_group import ( + InspectionTypeAssociationsModelStandardCommentGroup, +) +from .inspection_type_model import InspectionTypeModel +from .inspection_type_model_allow_fail_checklist_items import InspectionTypeModelAllowFailChecklistItems +from .inspection_type_model_allow_multi_inspections import InspectionTypeModelAllowMultiInspections +from .inspection_type_model_carryover_flag import InspectionTypeModelCarryoverFlag +from .inspection_type_model_flow_enabled_flag import InspectionTypeModelFlowEnabledFlag +from .inspection_type_model_group_name import InspectionTypeModelGroupName +from .inspection_type_model_has_cancel_permission import InspectionTypeModelHasCancelPermission +from .inspection_type_model_has_flow_flag import InspectionTypeModelHasFlowFlag +from .inspection_type_model_has_next_inspection_advance import InspectionTypeModelHasNextInspectionAdvance +from .inspection_type_model_has_reschdule_permission import InspectionTypeModelHasReschdulePermission +from .inspection_type_model_has_schdule_permission import InspectionTypeModelHasSchdulePermission +from .inspection_type_model_inspection_editable import InspectionTypeModelInspectionEditable +from .inspection_type_model_is_auto_assign import InspectionTypeModelIsAutoAssign +from .inspection_type_model_is_required import InspectionTypeModelIsRequired +from .inspection_type_model_public_visible import InspectionTypeModelPublicVisible +from .inspection_type_model_total_score_option import InspectionTypeModelTotalScoreOption +from .inspection_type_simple_model import InspectionTypeSimpleModel +from .invoice_model import InvoiceModel +from .invoice_model_printed import InvoiceModelPrinted +from .license_professional_model import LicenseProfessionalModel +from .license_professional_model_country import LicenseProfessionalModelCountry +from .license_professional_model_gender import LicenseProfessionalModelGender +from .license_professional_model_license_type import LicenseProfessionalModelLicenseType +from .license_professional_model_licensing_board import LicenseProfessionalModelLicensingBoard +from .license_professional_model_salutation import LicenseProfessionalModelSalutation +from .license_professional_model_state import LicenseProfessionalModelState +from .notice_condition_model import NoticeConditionModel +from .owner_address_model import OwnerAddressModel +from .parcel_model_1 import ParcelModel1 +from .part_transaction_model import PartTransactionModel +from .part_transaction_model_hard_reservation import PartTransactionModelHardReservation +from .part_transaction_model_status import PartTransactionModelStatus +from .part_transaction_model_taxable import PartTransactionModelTaxable +from .part_transaction_model_transaction_type import PartTransactionModelTransactionType +from .part_transaction_model_type import PartTransactionModelType +from .part_transaction_model_unit_measurement import PartTransactionModelUnitMeasurement +from .payment_model import PaymentModel +from .r_guide_sheet_group_model import RGuideSheetGroupModel +from .record_additional_model import RecordAdditionalModel +from .record_additional_model_construction_type import RecordAdditionalModelConstructionType +from .record_address_custom_forms_model import RecordAddressCustomFormsModel +from .record_address_custom_forms_model_address_type_flag import RecordAddressCustomFormsModelAddressTypeFlag +from .record_address_custom_forms_model_country import RecordAddressCustomFormsModelCountry +from .record_address_custom_forms_model_direction import RecordAddressCustomFormsModelDirection +from .record_address_custom_forms_model_house_fraction_end import RecordAddressCustomFormsModelHouseFractionEnd +from .record_address_custom_forms_model_house_fraction_start import RecordAddressCustomFormsModelHouseFractionStart +from .record_address_custom_forms_model_state import RecordAddressCustomFormsModelState +from .record_address_custom_forms_model_status import RecordAddressCustomFormsModelStatus +from .record_address_custom_forms_model_street_suffix import RecordAddressCustomFormsModelStreetSuffix +from .record_address_custom_forms_model_street_suffix_direction import ( + RecordAddressCustomFormsModelStreetSuffixDirection, +) +from .record_address_custom_forms_model_type import RecordAddressCustomFormsModelType +from .record_address_custom_forms_model_unit_type import RecordAddressCustomFormsModelUnitType +from .record_address_model import RecordAddressModel +from .record_address_model_address_type_flag import RecordAddressModelAddressTypeFlag +from .record_address_model_country import RecordAddressModelCountry +from .record_address_model_direction import RecordAddressModelDirection +from .record_address_model_house_fraction_end import RecordAddressModelHouseFractionEnd +from .record_address_model_house_fraction_start import RecordAddressModelHouseFractionStart +from .record_address_model_state import RecordAddressModelState +from .record_address_model_status import RecordAddressModelStatus +from .record_address_model_street_suffix import RecordAddressModelStreetSuffix +from .record_address_model_street_suffix_direction import RecordAddressModelStreetSuffixDirection +from .record_address_model_type import RecordAddressModelType +from .record_address_model_unit_type import RecordAddressModelUnitType +from .record_apo_custom_forms_model import RecordAPOCustomFormsModel +from .record_apo_custom_forms_model_construction_type import RecordAPOCustomFormsModelConstructionType +from .record_apo_custom_forms_model_created_by_cloning import RecordAPOCustomFormsModelCreatedByCloning +from .record_apo_custom_forms_model_priority import RecordAPOCustomFormsModelPriority +from .record_apo_custom_forms_model_reported_channel import RecordAPOCustomFormsModelReportedChannel +from .record_apo_custom_forms_model_reported_type import RecordAPOCustomFormsModelReportedType +from .record_apo_custom_forms_model_severity import RecordAPOCustomFormsModelSeverity +from .record_apo_custom_forms_model_status import RecordAPOCustomFormsModelStatus +from .record_apo_custom_forms_model_status_reason import RecordAPOCustomFormsModelStatusReason +from .record_comment_model import RecordCommentModel +from .record_comment_model_display_on_inspection import RecordCommentModelDisplayOnInspection +from .record_condition_model import RecordConditionModel +from .record_condition_model_actionby_department import RecordConditionModelActionbyDepartment +from .record_condition_model_actionby_user import RecordConditionModelActionbyUser +from .record_condition_model_active_status import RecordConditionModelActiveStatus +from .record_condition_model_appliedby_department import RecordConditionModelAppliedbyDepartment +from .record_condition_model_appliedby_user import RecordConditionModelAppliedbyUser +from .record_condition_model_group import RecordConditionModelGroup +from .record_condition_model_inheritable import RecordConditionModelInheritable +from .record_condition_model_priority import RecordConditionModelPriority +from .record_condition_model_severity import RecordConditionModelSeverity +from .record_condition_model_status import RecordConditionModelStatus +from .record_condition_model_type import RecordConditionModelType +from .record_contact_model import RecordContactModel +from .record_contact_model_birth_city import RecordContactModelBirthCity +from .record_contact_model_birth_region import RecordContactModelBirthRegion +from .record_contact_model_birth_state import RecordContactModelBirthState +from .record_contact_model_driver_license_state import RecordContactModelDriverLicenseState +from .record_contact_model_gender import RecordContactModelGender +from .record_contact_model_is_primary import RecordContactModelIsPrimary +from .record_contact_model_preferred_channel import RecordContactModelPreferredChannel +from .record_contact_model_race import RecordContactModelRace +from .record_contact_model_relation import RecordContactModelRelation +from .record_contact_model_salutation import RecordContactModelSalutation +from .record_contact_model_status import RecordContactModelStatus +from .record_contact_model_type import RecordContactModelType +from .record_contact_simple_model import RecordContactSimpleModel +from .record_contact_simple_model_birth_city import RecordContactSimpleModelBirthCity +from .record_contact_simple_model_birth_region import RecordContactSimpleModelBirthRegion +from .record_contact_simple_model_birth_state import RecordContactSimpleModelBirthState +from .record_contact_simple_model_driver_license_state import RecordContactSimpleModelDriverLicenseState +from .record_contact_simple_model_gender import RecordContactSimpleModelGender +from .record_contact_simple_model_is_primary import RecordContactSimpleModelIsPrimary +from .record_contact_simple_model_preferred_channel import RecordContactSimpleModelPreferredChannel +from .record_contact_simple_model_race import RecordContactSimpleModelRace +from .record_contact_simple_model_relation import RecordContactSimpleModelRelation +from .record_contact_simple_model_salutation import RecordContactSimpleModelSalutation +from .record_contact_simple_model_status import RecordContactSimpleModelStatus +from .record_contact_simple_model_type import RecordContactSimpleModelType +from .record_expiration_model import RecordExpirationModel +from .record_expiration_model_expiration_status import RecordExpirationModelExpirationStatus +from .record_ext_model_1 import RecordExtModel1 +from .record_ext_model_1_construction_type import RecordExtModel1ConstructionType +from .record_ext_model_1_priority import RecordExtModel1Priority +from .record_ext_model_1_reported_channel import RecordExtModel1ReportedChannel +from .record_ext_model_1_reported_type import RecordExtModel1ReportedType +from .record_ext_model_1_severity import RecordExtModel1Severity +from .record_ext_model_1_status import RecordExtModel1Status +from .record_ext_model_1_status_reason import RecordExtModel1StatusReason +from .record_id_model import RecordIdModel +from .record_id_simple_model import RecordIdSimpleModel +from .record_inspection_type_model import RecordInspectionTypeModel +from .record_model import RecordModel +from .record_model_construction_type import RecordModelConstructionType +from .record_model_created_by_cloning import RecordModelCreatedByCloning +from .record_model_priority import RecordModelPriority +from .record_model_reported_channel import RecordModelReportedChannel +from .record_model_reported_type import RecordModelReportedType +from .record_model_severity import RecordModelSeverity +from .record_model_status import RecordModelStatus +from .record_model_status_reason import RecordModelStatusReason +from .record_parcel_model import RecordParcelModel +from .record_parcel_model_status import RecordParcelModelStatus +from .record_parcel_model_subdivision import RecordParcelModelSubdivision +from .record_related_model import RecordRelatedModel +from .record_related_model_relationship import RecordRelatedModelRelationship +from .record_type_model import RecordTypeModel +from .record_type_no_alias_model import RecordTypeNoAliasModel +from .ref_owner_model import RefOwnerModel +from .ref_owner_model_status import RefOwnerModelStatus +from .request_activity_add_model import RequestActivityAddModel +from .request_activity_add_model_activity_status import RequestActivityAddModelActivityStatus +from .request_activity_add_model_assigned_department import RequestActivityAddModelAssignedDepartment +from .request_activity_add_model_assigned_user import RequestActivityAddModelAssignedUser +from .request_activity_add_model_priority import RequestActivityAddModelPriority +from .request_activity_add_model_type import RequestActivityAddModelType +from .request_activity_update_model import RequestActivityUpdateModel +from .request_activity_update_model_activity_status import RequestActivityUpdateModelActivityStatus +from .request_activity_update_model_assigned_department import RequestActivityUpdateModelAssignedDepartment +from .request_activity_update_model_assigned_user import RequestActivityUpdateModelAssignedUser +from .request_activity_update_model_priority import RequestActivityUpdateModelPriority +from .request_activity_update_model_status import RequestActivityUpdateModelStatus +from .request_activity_update_model_type import RequestActivityUpdateModelType +from .request_costing_model_array import RequestCostingModelArray +from .request_costing_model_array_cost_factor import RequestCostingModelArrayCostFactor +from .request_costing_model_array_distribute_flag import RequestCostingModelArrayDistributeFlag +from .request_costing_model_array_status import RequestCostingModelArrayStatus +from .request_costing_model_array_type import RequestCostingModelArrayType +from .request_costing_model_array_unit_of_measure import RequestCostingModelArrayUnitOfMeasure +from .request_create_record_model import RequestCreateRecordModel +from .request_create_record_model_construction_type import RequestCreateRecordModelConstructionType +from .request_create_record_model_created_by_cloning import RequestCreateRecordModelCreatedByCloning +from .request_create_record_model_priority import RequestCreateRecordModelPriority +from .request_create_record_model_reported_channel import RequestCreateRecordModelReportedChannel +from .request_create_record_model_reported_type import RequestCreateRecordModelReportedType +from .request_create_record_model_severity import RequestCreateRecordModelSeverity +from .request_create_record_model_status import RequestCreateRecordModelStatus +from .request_create_record_model_status_reason import RequestCreateRecordModelStatusReason +from .request_record_address_model import RequestRecordAddressModel +from .request_record_address_model_address_type_flag import RequestRecordAddressModelAddressTypeFlag +from .request_record_address_model_country import RequestRecordAddressModelCountry +from .request_record_address_model_direction import RequestRecordAddressModelDirection +from .request_record_address_model_house_fraction_end import RequestRecordAddressModelHouseFractionEnd +from .request_record_address_model_house_fraction_start import RequestRecordAddressModelHouseFractionStart +from .request_record_address_model_state import RequestRecordAddressModelState +from .request_record_address_model_status import RequestRecordAddressModelStatus +from .request_record_address_model_street_suffix import RequestRecordAddressModelStreetSuffix +from .request_record_address_model_street_suffix_direction import RequestRecordAddressModelStreetSuffixDirection +from .request_record_address_model_type import RequestRecordAddressModelType +from .request_record_address_model_unit_type import RequestRecordAddressModelUnitType +from .request_record_condition_model import RequestRecordConditionModel +from .request_record_condition_model_actionby_department import RequestRecordConditionModelActionbyDepartment +from .request_record_condition_model_actionby_user import RequestRecordConditionModelActionbyUser +from .request_record_condition_model_active_status import RequestRecordConditionModelActiveStatus +from .request_record_condition_model_appliedby_department import RequestRecordConditionModelAppliedbyDepartment +from .request_record_condition_model_appliedby_user import RequestRecordConditionModelAppliedbyUser +from .request_record_condition_model_group import RequestRecordConditionModelGroup +from .request_record_condition_model_inheritable import RequestRecordConditionModelInheritable +from .request_record_condition_model_priority import RequestRecordConditionModelPriority +from .request_record_condition_model_severity import RequestRecordConditionModelSeverity +from .request_record_condition_model_status import RequestRecordConditionModelStatus +from .request_record_condition_model_type import RequestRecordConditionModelType +from .request_record_model import RequestRecordModel +from .request_record_model_construction_type import RequestRecordModelConstructionType +from .request_record_model_created_by_cloning import RequestRecordModelCreatedByCloning +from .request_record_model_priority import RequestRecordModelPriority +from .request_record_model_reported_channel import RequestRecordModelReportedChannel +from .request_record_model_reported_type import RequestRecordModelReportedType +from .request_record_model_severity import RequestRecordModelSeverity +from .request_record_model_status import RequestRecordModelStatus +from .request_record_model_status_reason import RequestRecordModelStatusReason +from .request_simple_record_model import RequestSimpleRecordModel +from .request_simple_record_model_priority import RequestSimpleRecordModelPriority +from .request_simple_record_model_reported_channel import RequestSimpleRecordModelReportedChannel +from .request_simple_record_model_reported_type import RequestSimpleRecordModelReportedType +from .request_simple_record_model_severity import RequestSimpleRecordModelSeverity +from .request_simple_record_model_status import RequestSimpleRecordModelStatus +from .request_simple_record_model_status_reason import RequestSimpleRecordModelStatusReason +from .request_task_item_model import RequestTaskItemModel +from .request_task_item_model_actionby_department import RequestTaskItemModelActionbyDepartment +from .request_task_item_model_actionby_user import RequestTaskItemModelActionbyUser +from .request_task_item_model_billable import RequestTaskItemModelBillable +from .request_task_item_model_status import RequestTaskItemModelStatus +from .response_activity_model_array import ResponseActivityModelArray +from .response_apo_custom_forms import ResponseApoCustomForms +from .response_apo_custom_forms_metadata import ResponseApoCustomFormsMetadata +from .response_asset_master_model_array import ResponseAssetMasterModelArray +from .response_contact_address_array import ResponseContactAddressArray +from .response_costing_model_array import ResponseCostingModelArray +from .response_custom_attribute_model_array import ResponseCustomAttributeModelArray +from .response_custom_form_metadata_model_array import ResponseCustomFormMetadataModelArray +from .response_custom_form_subgroup_model_array import ResponseCustomFormSubgroupModelArray +from .response_describe_record_model import ResponseDescribeRecordModel +from .response_document_model_array import ResponseDocumentModelArray +from .response_document_type_model_array import ResponseDocumentTypeModelArray +from .response_estimate_fee_model import ResponseEstimateFeeModel +from .response_fee_item_model_1_array import ResponseFeeItemModel1Array +from .response_identifier_model_array import ResponseIdentifierModelArray +from .response_inspection_model_array import ResponseInspectionModelArray +from .response_invoice_model_array import ResponseInvoiceModelArray +from .response_license_professional_model import ResponseLicenseProfessionalModel +from .response_license_professional_model_array import ResponseLicenseProfessionalModelArray +from .response_part_transaction_model_array import ResponsePartTransactionModelArray +from .response_payment_model_array import ResponsePaymentModelArray +from .response_record_additional_model_array import ResponseRecordAdditionalModelArray +from .response_record_address_model_array import ResponseRecordAddressModelArray +from .response_record_comment_model import ResponseRecordCommentModel +from .response_record_comment_model_array import ResponseRecordCommentModelArray +from .response_record_condition_model_array import ResponseRecordConditionModelArray +from .response_record_contact_simple_model_array import ResponseRecordContactSimpleModelArray +from .response_record_ext_model_1_array import ResponseRecordExtModel1Array +from .response_record_inspection_type_model_array import ResponseRecordInspectionTypeModelArray +from .response_record_model_array import ResponseRecordModelArray +from .response_record_parcel_model_array import ResponseRecordParcelModelArray +from .response_record_related_model_array import ResponseRecordRelatedModelArray +from .response_ref_owner_model import ResponseRefOwnerModel +from .response_ref_owner_model_array import ResponseRefOwnerModelArray +from .response_result_model import ResponseResultModel +from .response_result_model_array import ResponseResultModelArray +from .response_simple_record_model import ResponseSimpleRecordModel +from .response_simple_record_model_array import ResponseSimpleRecordModelArray +from .response_table_model_array import ResponseTableModelArray +from .response_task_item_action_model_array import ResponseTaskItemActionModelArray +from .response_task_item_model import ResponseTaskItemModel +from .response_task_item_model_array import ResponseTaskItemModelArray +from .response_trust_account_model_array import ResponseTrustAccountModelArray +from .response_vote_result import ResponseVoteResult +from .response_vote_summary import ResponseVoteSummary +from .response_workflow_task_comment_model_array import ResponseWorkflowTaskCommentModelArray +from .result_model import ResultModel +from .row_model import RowModel +from .row_model_action import RowModelAction +from .simple_record_model import SimpleRecordModel +from .simple_record_model_construction_type import SimpleRecordModelConstructionType +from .simple_record_model_created_by_cloning import SimpleRecordModelCreatedByCloning +from .simple_record_model_priority import SimpleRecordModelPriority +from .simple_record_model_reported_channel import SimpleRecordModelReportedChannel +from .simple_record_model_reported_type import SimpleRecordModelReportedType +from .simple_record_model_severity import SimpleRecordModelSeverity +from .simple_record_model_status import SimpleRecordModelStatus +from .simple_record_model_status_reason import SimpleRecordModelStatusReason +from .table_model import TableModel +from .task_item_action_model import TaskItemActionModel +from .task_item_action_model_actionby_department import TaskItemActionModelActionbyDepartment +from .task_item_action_model_actionby_user import TaskItemActionModelActionbyUser +from .task_item_action_model_assigned_to_department import TaskItemActionModelAssignedToDepartment +from .task_item_action_model_assigned_user import TaskItemActionModelAssignedUser +from .task_item_action_model_billable import TaskItemActionModelBillable +from .task_item_action_model_is_active import TaskItemActionModelIsActive +from .task_item_action_model_is_completed import TaskItemActionModelIsCompleted +from .task_item_action_model_status import TaskItemActionModelStatus +from .task_item_model import TaskItemModel +from .task_item_model_actionby_department import TaskItemModelActionbyDepartment +from .task_item_model_actionby_user import TaskItemModelActionbyUser +from .task_item_model_assigned_to_department import TaskItemModelAssignedToDepartment +from .task_item_model_assigned_user import TaskItemModelAssignedUser +from .task_item_model_billable import TaskItemModelBillable +from .task_item_model_is_active import TaskItemModelIsActive +from .task_item_model_is_completed import TaskItemModelIsCompleted +from .task_item_model_status import TaskItemModelStatus +from .trust_account_model import TrustAccountModel +from .trust_account_model_associations import TrustAccountModelAssociations +from .trust_account_model_is_primary import TrustAccountModelIsPrimary +from .trust_account_model_overdraft import TrustAccountModelOverdraft +from .trust_account_model_status import TrustAccountModelStatus +from .user_role_privilege_model import UserRolePrivilegeModel +from .v4_get_records_ids_expand import V4GetRecordsIdsExpand +from .v4_get_records_ids_expand_custom_forms import V4GetRecordsIdsExpandCustomForms +from .v4_get_records_mine_expand import V4GetRecordsMineExpand +from .v4_get_records_mine_expand_custom_forms import V4GetRecordsMineExpandCustomForms +from .v4_get_records_record_id_fees_status import V4GetRecordsRecordIdFeesStatus +from .v4_get_records_record_id_payments_payment_status import V4GetRecordsRecordIdPaymentsPaymentStatus +from .v4_get_records_record_id_related_relationship import V4GetRecordsRecordIdRelatedRelationship +from .v4_post_records_record_id_documents_multipart_data import V4PostRecordsRecordIdDocumentsMultipartData +from .vote_request import VoteRequest +from .vote_result import VoteResult +from .vote_summary import VoteSummary +from .workflow_task_comment_model import WorkflowTaskCommentModel + +__all__ = ( + "ActivityModel", + "ActivityModelActivityStatus", + "ActivityModelAssignedDepartment", + "ActivityModelAssignedUser", + "ActivityModelPriority", + "ActivityModelStatus", + "ActivityModelType", + "AddressModel", + "ApoCustomForm", + "ApoCustomFormsMetadata", + "ApoCustomFormsMetadataCustomFormType", + "ApoCustomFormsMetadataFields", + "ApoCustomFormsMetadataFieldsDataType", + "ApoCustomFormsMetadataFieldsIsPublicVisible", + "ApoCustomFormsMetadataFieldsIsRecordSearchable", + "ApoCustomFormsMetadataFieldsIsRequired", + "ApoCustomFormsMetadataFieldsLabel", + "ApoCustomFormsMetadataFieldsOptionsItem", + "ASITableDrill", + "AssetMasterModel", + "AssetMasterModelComments", + "AssetMasterModelDependentFlag", + "AssetMasterModelDescription", + "AssetMasterModelName", + "AssetMasterModelStatus", + "AssetMasterModelType", + "CapConditionModel2", + "CapIDModel", + "ChildDrill", + "CommentModel", + "CommentModelDisplayOnInspection", + "CompactAddressModel", + "CompactAddressModelCountry", + "CompactAddressModelState", + "ConditionHistoryModel", + "ConditionHistoryModelActionbyDepartment", + "ConditionHistoryModelActionbyUser", + "ConditionHistoryModelActiveStatus", + "ConditionHistoryModelAppliedbyDepartment", + "ConditionHistoryModelAppliedbyUser", + "ConditionHistoryModelGroup", + "ConditionHistoryModelInheritable", + "ConditionHistoryModelPriority", + "ConditionHistoryModelSeverity", + "ConditionHistoryModelStatus", + "ConditionHistoryModelType", + "ContactAddress", + "ContactTypeModel", + "CostingModel", + "CostingModelCostFactor", + "CostingModelDistributeFlag", + "CostingModelStatus", + "CostingModelType", + "CostingModelUnitOfMeasure", + "CostingQuantityModel", + "CustomAttributeModel", + "CustomFormField", + "CustomFormFieldIsReadonly", + "CustomFormFieldIsRequired", + "CustomFormFieldOptionsItem", + "CustomFormMetadataModel", + "CustomFormSubgroupModel", + "DepartmentModel", + "DescribeRecordModel", + "DocumentModel", + "DocumentModelCategory", + "DocumentModelGroup", + "DocumentModelStatus", + "DocumentTypeModel", + "DocumentTypeModelGroup", + "ElementModel", + "EstimateFeeModel", + "FeeItemBaseModel", + "FeeItemBaseModel1", + "FeeItemBaseModel1Code", + "FeeItemBaseModel1PaymentPeriod", + "FeeItemBaseModel1Schedule", + "FeeItemBaseModel1Version", + "FeeItemBaseModelCode", + "FeeItemBaseModelPaymentPeriod", + "FeeItemBaseModelSchedule", + "FeeItemBaseModelVersion", + "FeeItemModel", + "FeeItemModel1", + "FeeItemModel1Code", + "FeeItemModel1PaymentPeriod", + "FeeItemModel1Schedule", + "FeeItemModel1SubGroup", + "FeeItemModel1Unit", + "FeeItemModel1Version", + "FeeItemModelCode", + "FeeItemModelDescription", + "FeeItemModelPaymentPeriod", + "FeeItemModelSchedule", + "FeeItemModelSubGroup", + "FeeItemModelUnit", + "FeeItemModelVersion", + "FieldModel", + "GISObjectModel", + "IdentifierModel", + "InspectionBeforeScheduledTime", + "InspectionContactModel", + "InspectionContactModelBirthCity", + "InspectionContactModelBirthRegion", + "InspectionContactModelBirthState", + "InspectionContactModelDriverLicenseState", + "InspectionContactModelGender", + "InspectionContactModelPreferredChannel", + "InspectionContactModelRace", + "InspectionContactModelRelation", + "InspectionContactModelSalutation", + "InspectionContactModelStatus", + "InspectionContactModelType", + "InspectionModel", + "InspectionModelBillable", + "InspectionModelScheduleEndAMPM", + "InspectionModelScheduleStartAMPM", + "InspectionModelStatus", + "InspectionRestrictionModel", + "InspectionTypeAssociationsModel", + "InspectionTypeAssociationsModelStandardCommentGroup", + "InspectionTypeModel", + "InspectionTypeModelAllowFailChecklistItems", + "InspectionTypeModelAllowMultiInspections", + "InspectionTypeModelCarryoverFlag", + "InspectionTypeModelFlowEnabledFlag", + "InspectionTypeModelGroupName", + "InspectionTypeModelHasCancelPermission", + "InspectionTypeModelHasFlowFlag", + "InspectionTypeModelHasNextInspectionAdvance", + "InspectionTypeModelHasReschdulePermission", + "InspectionTypeModelHasSchdulePermission", + "InspectionTypeModelInspectionEditable", + "InspectionTypeModelIsAutoAssign", + "InspectionTypeModelIsRequired", + "InspectionTypeModelPublicVisible", + "InspectionTypeModelTotalScoreOption", + "InspectionTypeSimpleModel", + "InvoiceModel", + "InvoiceModelPrinted", + "LicenseProfessionalModel", + "LicenseProfessionalModelCountry", + "LicenseProfessionalModelGender", + "LicenseProfessionalModelLicenseType", + "LicenseProfessionalModelLicensingBoard", + "LicenseProfessionalModelSalutation", + "LicenseProfessionalModelState", + "NoticeConditionModel", + "OwnerAddressModel", + "ParcelModel1", + "PartTransactionModel", + "PartTransactionModelHardReservation", + "PartTransactionModelStatus", + "PartTransactionModelTaxable", + "PartTransactionModelTransactionType", + "PartTransactionModelType", + "PartTransactionModelUnitMeasurement", + "PaymentModel", + "RecordAdditionalModel", + "RecordAdditionalModelConstructionType", + "RecordAddressCustomFormsModel", + "RecordAddressCustomFormsModelAddressTypeFlag", + "RecordAddressCustomFormsModelCountry", + "RecordAddressCustomFormsModelDirection", + "RecordAddressCustomFormsModelHouseFractionEnd", + "RecordAddressCustomFormsModelHouseFractionStart", + "RecordAddressCustomFormsModelState", + "RecordAddressCustomFormsModelStatus", + "RecordAddressCustomFormsModelStreetSuffix", + "RecordAddressCustomFormsModelStreetSuffixDirection", + "RecordAddressCustomFormsModelType", + "RecordAddressCustomFormsModelUnitType", + "RecordAddressModel", + "RecordAddressModelAddressTypeFlag", + "RecordAddressModelCountry", + "RecordAddressModelDirection", + "RecordAddressModelHouseFractionEnd", + "RecordAddressModelHouseFractionStart", + "RecordAddressModelState", + "RecordAddressModelStatus", + "RecordAddressModelStreetSuffix", + "RecordAddressModelStreetSuffixDirection", + "RecordAddressModelType", + "RecordAddressModelUnitType", + "RecordAPOCustomFormsModel", + "RecordAPOCustomFormsModelConstructionType", + "RecordAPOCustomFormsModelCreatedByCloning", + "RecordAPOCustomFormsModelPriority", + "RecordAPOCustomFormsModelReportedChannel", + "RecordAPOCustomFormsModelReportedType", + "RecordAPOCustomFormsModelSeverity", + "RecordAPOCustomFormsModelStatus", + "RecordAPOCustomFormsModelStatusReason", + "RecordCommentModel", + "RecordCommentModelDisplayOnInspection", + "RecordConditionModel", + "RecordConditionModelActionbyDepartment", + "RecordConditionModelActionbyUser", + "RecordConditionModelActiveStatus", + "RecordConditionModelAppliedbyDepartment", + "RecordConditionModelAppliedbyUser", + "RecordConditionModelGroup", + "RecordConditionModelInheritable", + "RecordConditionModelPriority", + "RecordConditionModelSeverity", + "RecordConditionModelStatus", + "RecordConditionModelType", + "RecordContactModel", + "RecordContactModelBirthCity", + "RecordContactModelBirthRegion", + "RecordContactModelBirthState", + "RecordContactModelDriverLicenseState", + "RecordContactModelGender", + "RecordContactModelIsPrimary", + "RecordContactModelPreferredChannel", + "RecordContactModelRace", + "RecordContactModelRelation", + "RecordContactModelSalutation", + "RecordContactModelStatus", + "RecordContactModelType", + "RecordContactSimpleModel", + "RecordContactSimpleModelBirthCity", + "RecordContactSimpleModelBirthRegion", + "RecordContactSimpleModelBirthState", + "RecordContactSimpleModelDriverLicenseState", + "RecordContactSimpleModelGender", + "RecordContactSimpleModelIsPrimary", + "RecordContactSimpleModelPreferredChannel", + "RecordContactSimpleModelRace", + "RecordContactSimpleModelRelation", + "RecordContactSimpleModelSalutation", + "RecordContactSimpleModelStatus", + "RecordContactSimpleModelType", + "RecordExpirationModel", + "RecordExpirationModelExpirationStatus", + "RecordExtModel1", + "RecordExtModel1ConstructionType", + "RecordExtModel1Priority", + "RecordExtModel1ReportedChannel", + "RecordExtModel1ReportedType", + "RecordExtModel1Severity", + "RecordExtModel1Status", + "RecordExtModel1StatusReason", + "RecordIdModel", + "RecordIdSimpleModel", + "RecordInspectionTypeModel", + "RecordModel", + "RecordModelConstructionType", + "RecordModelCreatedByCloning", + "RecordModelPriority", + "RecordModelReportedChannel", + "RecordModelReportedType", + "RecordModelSeverity", + "RecordModelStatus", + "RecordModelStatusReason", + "RecordParcelModel", + "RecordParcelModelStatus", + "RecordParcelModelSubdivision", + "RecordRelatedModel", + "RecordRelatedModelRelationship", + "RecordTypeModel", + "RecordTypeNoAliasModel", + "RefOwnerModel", + "RefOwnerModelStatus", + "RequestActivityAddModel", + "RequestActivityAddModelActivityStatus", + "RequestActivityAddModelAssignedDepartment", + "RequestActivityAddModelAssignedUser", + "RequestActivityAddModelPriority", + "RequestActivityAddModelType", + "RequestActivityUpdateModel", + "RequestActivityUpdateModelActivityStatus", + "RequestActivityUpdateModelAssignedDepartment", + "RequestActivityUpdateModelAssignedUser", + "RequestActivityUpdateModelPriority", + "RequestActivityUpdateModelStatus", + "RequestActivityUpdateModelType", + "RequestCostingModelArray", + "RequestCostingModelArrayCostFactor", + "RequestCostingModelArrayDistributeFlag", + "RequestCostingModelArrayStatus", + "RequestCostingModelArrayType", + "RequestCostingModelArrayUnitOfMeasure", + "RequestCreateRecordModel", + "RequestCreateRecordModelConstructionType", + "RequestCreateRecordModelCreatedByCloning", + "RequestCreateRecordModelPriority", + "RequestCreateRecordModelReportedChannel", + "RequestCreateRecordModelReportedType", + "RequestCreateRecordModelSeverity", + "RequestCreateRecordModelStatus", + "RequestCreateRecordModelStatusReason", + "RequestRecordAddressModel", + "RequestRecordAddressModelAddressTypeFlag", + "RequestRecordAddressModelCountry", + "RequestRecordAddressModelDirection", + "RequestRecordAddressModelHouseFractionEnd", + "RequestRecordAddressModelHouseFractionStart", + "RequestRecordAddressModelState", + "RequestRecordAddressModelStatus", + "RequestRecordAddressModelStreetSuffix", + "RequestRecordAddressModelStreetSuffixDirection", + "RequestRecordAddressModelType", + "RequestRecordAddressModelUnitType", + "RequestRecordConditionModel", + "RequestRecordConditionModelActionbyDepartment", + "RequestRecordConditionModelActionbyUser", + "RequestRecordConditionModelActiveStatus", + "RequestRecordConditionModelAppliedbyDepartment", + "RequestRecordConditionModelAppliedbyUser", + "RequestRecordConditionModelGroup", + "RequestRecordConditionModelInheritable", + "RequestRecordConditionModelPriority", + "RequestRecordConditionModelSeverity", + "RequestRecordConditionModelStatus", + "RequestRecordConditionModelType", + "RequestRecordModel", + "RequestRecordModelConstructionType", + "RequestRecordModelCreatedByCloning", + "RequestRecordModelPriority", + "RequestRecordModelReportedChannel", + "RequestRecordModelReportedType", + "RequestRecordModelSeverity", + "RequestRecordModelStatus", + "RequestRecordModelStatusReason", + "RequestSimpleRecordModel", + "RequestSimpleRecordModelPriority", + "RequestSimpleRecordModelReportedChannel", + "RequestSimpleRecordModelReportedType", + "RequestSimpleRecordModelSeverity", + "RequestSimpleRecordModelStatus", + "RequestSimpleRecordModelStatusReason", + "RequestTaskItemModel", + "RequestTaskItemModelActionbyDepartment", + "RequestTaskItemModelActionbyUser", + "RequestTaskItemModelBillable", + "RequestTaskItemModelStatus", + "ResponseActivityModelArray", + "ResponseApoCustomForms", + "ResponseApoCustomFormsMetadata", + "ResponseAssetMasterModelArray", + "ResponseContactAddressArray", + "ResponseCostingModelArray", + "ResponseCustomAttributeModelArray", + "ResponseCustomFormMetadataModelArray", + "ResponseCustomFormSubgroupModelArray", + "ResponseDescribeRecordModel", + "ResponseDocumentModelArray", + "ResponseDocumentTypeModelArray", + "ResponseEstimateFeeModel", + "ResponseFeeItemModel1Array", + "ResponseIdentifierModelArray", + "ResponseInspectionModelArray", + "ResponseInvoiceModelArray", + "ResponseLicenseProfessionalModel", + "ResponseLicenseProfessionalModelArray", + "ResponsePartTransactionModelArray", + "ResponsePaymentModelArray", + "ResponseRecordAdditionalModelArray", + "ResponseRecordAddressModelArray", + "ResponseRecordCommentModel", + "ResponseRecordCommentModelArray", + "ResponseRecordConditionModelArray", + "ResponseRecordContactSimpleModelArray", + "ResponseRecordExtModel1Array", + "ResponseRecordInspectionTypeModelArray", + "ResponseRecordModelArray", + "ResponseRecordParcelModelArray", + "ResponseRecordRelatedModelArray", + "ResponseRefOwnerModel", + "ResponseRefOwnerModelArray", + "ResponseResultModel", + "ResponseResultModelArray", + "ResponseSimpleRecordModel", + "ResponseSimpleRecordModelArray", + "ResponseTableModelArray", + "ResponseTaskItemActionModelArray", + "ResponseTaskItemModel", + "ResponseTaskItemModelArray", + "ResponseTrustAccountModelArray", + "ResponseVoteResult", + "ResponseVoteSummary", + "ResponseWorkflowTaskCommentModelArray", + "ResultModel", + "RGuideSheetGroupModel", + "RowModel", + "RowModelAction", + "SimpleRecordModel", + "SimpleRecordModelConstructionType", + "SimpleRecordModelCreatedByCloning", + "SimpleRecordModelPriority", + "SimpleRecordModelReportedChannel", + "SimpleRecordModelReportedType", + "SimpleRecordModelSeverity", + "SimpleRecordModelStatus", + "SimpleRecordModelStatusReason", + "TableModel", + "TaskItemActionModel", + "TaskItemActionModelActionbyDepartment", + "TaskItemActionModelActionbyUser", + "TaskItemActionModelAssignedToDepartment", + "TaskItemActionModelAssignedUser", + "TaskItemActionModelBillable", + "TaskItemActionModelIsActive", + "TaskItemActionModelIsCompleted", + "TaskItemActionModelStatus", + "TaskItemModel", + "TaskItemModelActionbyDepartment", + "TaskItemModelActionbyUser", + "TaskItemModelAssignedToDepartment", + "TaskItemModelAssignedUser", + "TaskItemModelBillable", + "TaskItemModelIsActive", + "TaskItemModelIsCompleted", + "TaskItemModelStatus", + "TrustAccountModel", + "TrustAccountModelAssociations", + "TrustAccountModelIsPrimary", + "TrustAccountModelOverdraft", + "TrustAccountModelStatus", + "UserRolePrivilegeModel", + "V4GetRecordsIdsExpand", + "V4GetRecordsIdsExpandCustomForms", + "V4GetRecordsMineExpand", + "V4GetRecordsMineExpandCustomForms", + "V4GetRecordsRecordIdFeesStatus", + "V4GetRecordsRecordIdPaymentsPaymentStatus", + "V4GetRecordsRecordIdRelatedRelationship", + "V4PostRecordsRecordIdDocumentsMultipartData", + "VoteRequest", + "VoteResult", + "VoteSummary", + "WorkflowTaskCommentModel", +) diff --git a/accelapy/accelapy/records_client/models/activity_model.py b/accelapy/accelapy/records_client/models/activity_model.py new file mode 100644 index 0000000..3e6dfc7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model.py @@ -0,0 +1,220 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.activity_model_activity_status import ActivityModelActivityStatus + from ..models.activity_model_assigned_department import ActivityModelAssignedDepartment + from ..models.activity_model_assigned_user import ActivityModelAssignedUser + from ..models.activity_model_priority import ActivityModelPriority + from ..models.activity_model_status import ActivityModelStatus + from ..models.activity_model_type import ActivityModelType + + +T = TypeVar("T", bound="ActivityModel") + + +@_attrs_define +class ActivityModel: + """ + Attributes: + activity_status (Union[Unset, ActivityModelActivityStatus]): The status of the record activity. + assigned_department (Union[Unset, ActivityModelAssignedDepartment]): The department responsible for the + activity. + assigned_user (Union[Unset, ActivityModelAssignedUser]): The staff member responsible for the activity. + description (Union[Unset, str]): The activity description + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + id (Union[Unset, int]): The activity system id assigned by the Civic Platform server. + name (Union[Unset, str]): The activity name. + priority (Union[Unset, ActivityModelPriority]): The priority level assigned to the activity. + start_date (Union[Unset, datetime.datetime]): The activity start date. + status (Union[Unset, ActivityModelStatus]): The activity status. + type (Union[Unset, ActivityModelType]): The activity type. + """ + + activity_status: Union[Unset, "ActivityModelActivityStatus"] = UNSET + assigned_department: Union[Unset, "ActivityModelAssignedDepartment"] = UNSET + assigned_user: Union[Unset, "ActivityModelAssignedUser"] = UNSET + description: Union[Unset, str] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "ActivityModelPriority"] = UNSET + start_date: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "ActivityModelStatus"] = UNSET + type: Union[Unset, "ActivityModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + activity_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.activity_status, Unset): + activity_status = self.activity_status.to_dict() + + assigned_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_department, Unset): + assigned_department = self.assigned_department.to_dict() + + assigned_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_user, Unset): + assigned_user = self.assigned_user.to_dict() + + description = self.description + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + id = self.id + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if activity_status is not UNSET: + field_dict["activityStatus"] = activity_status + if assigned_department is not UNSET: + field_dict["assignedDepartment"] = assigned_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if start_date is not UNSET: + field_dict["startDate"] = start_date + if status is not UNSET: + field_dict["status"] = status + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.activity_model_activity_status import ActivityModelActivityStatus + from ..models.activity_model_assigned_department import ActivityModelAssignedDepartment + from ..models.activity_model_assigned_user import ActivityModelAssignedUser + from ..models.activity_model_priority import ActivityModelPriority + from ..models.activity_model_status import ActivityModelStatus + from ..models.activity_model_type import ActivityModelType + + d = src_dict.copy() + _activity_status = d.pop("activityStatus", UNSET) + activity_status: Union[Unset, ActivityModelActivityStatus] + if isinstance(_activity_status, Unset): + activity_status = UNSET + else: + activity_status = ActivityModelActivityStatus.from_dict(_activity_status) + + _assigned_department = d.pop("assignedDepartment", UNSET) + assigned_department: Union[Unset, ActivityModelAssignedDepartment] + if isinstance(_assigned_department, Unset): + assigned_department = UNSET + else: + assigned_department = ActivityModelAssignedDepartment.from_dict(_assigned_department) + + _assigned_user = d.pop("assignedUser", UNSET) + assigned_user: Union[Unset, ActivityModelAssignedUser] + if isinstance(_assigned_user, Unset): + assigned_user = UNSET + else: + assigned_user = ActivityModelAssignedUser.from_dict(_assigned_user) + + description = d.pop("description", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, ActivityModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = ActivityModelPriority.from_dict(_priority) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.datetime] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date) + + _status = d.pop("status", UNSET) + status: Union[Unset, ActivityModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = ActivityModelStatus.from_dict(_status) + + _type = d.pop("type", UNSET) + type: Union[Unset, ActivityModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ActivityModelType.from_dict(_type) + + activity_model = cls( + activity_status=activity_status, + assigned_department=assigned_department, + assigned_user=assigned_user, + description=description, + due_date=due_date, + id=id, + name=name, + priority=priority, + start_date=start_date, + status=status, + type=type, + ) + + activity_model.additional_properties = d + return activity_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_activity_status.py b/accelapy/accelapy/records_client/models/activity_model_activity_status.py new file mode 100644 index 0000000..41d22f9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_activity_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelActivityStatus") + + +@_attrs_define +class ActivityModelActivityStatus: + """The status of the record activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_activity_status = cls( + text=text, + value=value, + ) + + activity_model_activity_status.additional_properties = d + return activity_model_activity_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_assigned_department.py b/accelapy/accelapy/records_client/models/activity_model_assigned_department.py new file mode 100644 index 0000000..c627642 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_assigned_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelAssignedDepartment") + + +@_attrs_define +class ActivityModelAssignedDepartment: + """The department responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_assigned_department = cls( + text=text, + value=value, + ) + + activity_model_assigned_department.additional_properties = d + return activity_model_assigned_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_assigned_user.py b/accelapy/accelapy/records_client/models/activity_model_assigned_user.py new file mode 100644 index 0000000..fb623f1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_assigned_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelAssignedUser") + + +@_attrs_define +class ActivityModelAssignedUser: + """The staff member responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_assigned_user = cls( + text=text, + value=value, + ) + + activity_model_assigned_user.additional_properties = d + return activity_model_assigned_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_priority.py b/accelapy/accelapy/records_client/models/activity_model_priority.py new file mode 100644 index 0000000..9186f13 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelPriority") + + +@_attrs_define +class ActivityModelPriority: + """The priority level assigned to the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_priority = cls( + text=text, + value=value, + ) + + activity_model_priority.additional_properties = d + return activity_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_status.py b/accelapy/accelapy/records_client/models/activity_model_status.py new file mode 100644 index 0000000..8b8a6fc --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelStatus") + + +@_attrs_define +class ActivityModelStatus: + """The activity status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_status = cls( + text=text, + value=value, + ) + + activity_model_status.additional_properties = d + return activity_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/activity_model_type.py b/accelapy/accelapy/records_client/models/activity_model_type.py new file mode 100644 index 0000000..0d0f7e9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/activity_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ActivityModelType") + + +@_attrs_define +class ActivityModelType: + """The activity type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + activity_model_type = cls( + text=text, + value=value, + ) + + activity_model_type.additional_properties = d + return activity_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/address_model.py b/accelapy/accelapy/records_client/models/address_model.py new file mode 100644 index 0000000..500fbd7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/address_model.py @@ -0,0 +1,530 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="AddressModel") + + +@_attrs_define +class AddressModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): + address_line_2 (Union[Unset, str]): + address_type_flag (Union[Unset, IdentifierModel]): + city (Union[Unset, str]): + country (Union[Unset, IdentifierModel]): + county (Union[Unset, str]): + description (Union[Unset, str]): + direction (Union[Unset, IdentifierModel]): + distance (Union[Unset, float]): + house_alpha_end (Union[Unset, str]): + house_alpha_start (Union[Unset, str]): + house_fraction_end (Union[Unset, IdentifierModel]): + house_fraction_start (Union[Unset, IdentifierModel]): + id (Union[Unset, int]): + inspection_district (Union[Unset, str]): + inspection_district_prefix (Union[Unset, str]): + is_primary (Union[Unset, str]): + level_end (Union[Unset, str]): + level_prefix (Union[Unset, str]): + level_start (Union[Unset, str]): + neighborhood (Union[Unset, str]): + neighborhood_prefix (Union[Unset, str]): + postal_code (Union[Unset, str]): + record_id (Union[Unset, CapIDModel]): + ref_address_id (Union[Unset, int]): + secondary_street (Union[Unset, str]): + secondary_street_number (Union[Unset, int]): + service_provider_code (Union[Unset, str]): + state (Union[Unset, IdentifierModel]): + status (Union[Unset, IdentifierModel]): + street_address (Union[Unset, str]): + street_end (Union[Unset, int]): + street_end_from (Union[Unset, int]): + street_end_to (Union[Unset, int]): + street_name (Union[Unset, str]): + street_prefix (Union[Unset, str]): + street_start (Union[Unset, int]): + street_start_from (Union[Unset, int]): + street_start_to (Union[Unset, int]): + street_suffix (Union[Unset, IdentifierModel]): + street_suffix_direction (Union[Unset, IdentifierModel]): + type (Union[Unset, IdentifierModel]): + unit_end (Union[Unset, str]): + unit_start (Union[Unset, str]): + unit_type (Union[Unset, IdentifierModel]): + x_coordinate (Union[Unset, float]): + y_coordinate (Union[Unset, float]): + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_type_flag: Union[Unset, "IdentifierModel"] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "IdentifierModel"] = UNSET + county: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + direction: Union[Unset, "IdentifierModel"] = UNSET + distance: Union[Unset, float] = UNSET + house_alpha_end: Union[Unset, str] = UNSET + house_alpha_start: Union[Unset, str] = UNSET + house_fraction_end: Union[Unset, "IdentifierModel"] = UNSET + house_fraction_start: Union[Unset, "IdentifierModel"] = UNSET + id: Union[Unset, int] = UNSET + inspection_district: Union[Unset, str] = UNSET + inspection_district_prefix: Union[Unset, str] = UNSET + is_primary: Union[Unset, str] = UNSET + level_end: Union[Unset, str] = UNSET + level_prefix: Union[Unset, str] = UNSET + level_start: Union[Unset, str] = UNSET + neighborhood: Union[Unset, str] = UNSET + neighborhood_prefix: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "CapIDModel"] = UNSET + ref_address_id: Union[Unset, int] = UNSET + secondary_street: Union[Unset, str] = UNSET + secondary_street_number: Union[Unset, int] = UNSET + service_provider_code: Union[Unset, str] = UNSET + state: Union[Unset, "IdentifierModel"] = UNSET + status: Union[Unset, "IdentifierModel"] = UNSET + street_address: Union[Unset, str] = UNSET + street_end: Union[Unset, int] = UNSET + street_end_from: Union[Unset, int] = UNSET + street_end_to: Union[Unset, int] = UNSET + street_name: Union[Unset, str] = UNSET + street_prefix: Union[Unset, str] = UNSET + street_start: Union[Unset, int] = UNSET + street_start_from: Union[Unset, int] = UNSET + street_start_to: Union[Unset, int] = UNSET + street_suffix: Union[Unset, "IdentifierModel"] = UNSET + street_suffix_direction: Union[Unset, "IdentifierModel"] = UNSET + type: Union[Unset, "IdentifierModel"] = UNSET + unit_end: Union[Unset, str] = UNSET + unit_start: Union[Unset, str] = UNSET + unit_type: Union[Unset, "IdentifierModel"] = UNSET + x_coordinate: Union[Unset, float] = UNSET + y_coordinate: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_type_flag: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address_type_flag, Unset): + address_type_flag = self.address_type_flag.to_dict() + + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + county = self.county + description = self.description + direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.direction, Unset): + direction = self.direction.to_dict() + + distance = self.distance + house_alpha_end = self.house_alpha_end + house_alpha_start = self.house_alpha_start + house_fraction_end: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_end, Unset): + house_fraction_end = self.house_fraction_end.to_dict() + + house_fraction_start: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_start, Unset): + house_fraction_start = self.house_fraction_start.to_dict() + + id = self.id + inspection_district = self.inspection_district + inspection_district_prefix = self.inspection_district_prefix + is_primary = self.is_primary + level_end = self.level_end + level_prefix = self.level_prefix + level_start = self.level_start + neighborhood = self.neighborhood + neighborhood_prefix = self.neighborhood_prefix + postal_code = self.postal_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + ref_address_id = self.ref_address_id + secondary_street = self.secondary_street + secondary_street_number = self.secondary_street_number + service_provider_code = self.service_provider_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + street_address = self.street_address + street_end = self.street_end + street_end_from = self.street_end_from + street_end_to = self.street_end_to + street_name = self.street_name + street_prefix = self.street_prefix + street_start = self.street_start + street_start_from = self.street_start_from + street_start_to = self.street_start_to + street_suffix: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix, Unset): + street_suffix = self.street_suffix.to_dict() + + street_suffix_direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix_direction, Unset): + street_suffix_direction = self.street_suffix_direction.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_end = self.unit_end + unit_start = self.unit_start + unit_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_type, Unset): + unit_type = self.unit_type.to_dict() + + x_coordinate = self.x_coordinate + y_coordinate = self.y_coordinate + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_type_flag is not UNSET: + field_dict["addressTypeFlag"] = address_type_flag + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if county is not UNSET: + field_dict["county"] = county + if description is not UNSET: + field_dict["description"] = description + if direction is not UNSET: + field_dict["direction"] = direction + if distance is not UNSET: + field_dict["distance"] = distance + if house_alpha_end is not UNSET: + field_dict["houseAlphaEnd"] = house_alpha_end + if house_alpha_start is not UNSET: + field_dict["houseAlphaStart"] = house_alpha_start + if house_fraction_end is not UNSET: + field_dict["houseFractionEnd"] = house_fraction_end + if house_fraction_start is not UNSET: + field_dict["houseFractionStart"] = house_fraction_start + if id is not UNSET: + field_dict["id"] = id + if inspection_district is not UNSET: + field_dict["inspectionDistrict"] = inspection_district + if inspection_district_prefix is not UNSET: + field_dict["inspectionDistrictPrefix"] = inspection_district_prefix + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if level_end is not UNSET: + field_dict["levelEnd"] = level_end + if level_prefix is not UNSET: + field_dict["levelPrefix"] = level_prefix + if level_start is not UNSET: + field_dict["levelStart"] = level_start + if neighborhood is not UNSET: + field_dict["neighborhood"] = neighborhood + if neighborhood_prefix is not UNSET: + field_dict["neighborhoodPrefix"] = neighborhood_prefix + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if ref_address_id is not UNSET: + field_dict["refAddressId"] = ref_address_id + if secondary_street is not UNSET: + field_dict["secondaryStreet"] = secondary_street + if secondary_street_number is not UNSET: + field_dict["secondaryStreetNumber"] = secondary_street_number + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if street_address is not UNSET: + field_dict["streetAddress"] = street_address + if street_end is not UNSET: + field_dict["streetEnd"] = street_end + if street_end_from is not UNSET: + field_dict["streetEndFrom"] = street_end_from + if street_end_to is not UNSET: + field_dict["streetEndTo"] = street_end_to + if street_name is not UNSET: + field_dict["streetName"] = street_name + if street_prefix is not UNSET: + field_dict["streetPrefix"] = street_prefix + if street_start is not UNSET: + field_dict["streetStart"] = street_start + if street_start_from is not UNSET: + field_dict["streetStartFrom"] = street_start_from + if street_start_to is not UNSET: + field_dict["streetStartTo"] = street_start_to + if street_suffix is not UNSET: + field_dict["streetSuffix"] = street_suffix + if street_suffix_direction is not UNSET: + field_dict["streetSuffixDirection"] = street_suffix_direction + if type is not UNSET: + field_dict["type"] = type + if unit_end is not UNSET: + field_dict["unitEnd"] = unit_end + if unit_start is not UNSET: + field_dict["unitStart"] = unit_start + if unit_type is not UNSET: + field_dict["unitType"] = unit_type + if x_coordinate is not UNSET: + field_dict["xCoordinate"] = x_coordinate + if y_coordinate is not UNSET: + field_dict["yCoordinate"] = y_coordinate + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + _address_type_flag = d.pop("addressTypeFlag", UNSET) + address_type_flag: Union[Unset, IdentifierModel] + if isinstance(_address_type_flag, Unset): + address_type_flag = UNSET + else: + address_type_flag = IdentifierModel.from_dict(_address_type_flag) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, IdentifierModel] + if isinstance(_country, Unset): + country = UNSET + else: + country = IdentifierModel.from_dict(_country) + + county = d.pop("county", UNSET) + + description = d.pop("description", UNSET) + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, IdentifierModel] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = IdentifierModel.from_dict(_direction) + + distance = d.pop("distance", UNSET) + + house_alpha_end = d.pop("houseAlphaEnd", UNSET) + + house_alpha_start = d.pop("houseAlphaStart", UNSET) + + _house_fraction_end = d.pop("houseFractionEnd", UNSET) + house_fraction_end: Union[Unset, IdentifierModel] + if isinstance(_house_fraction_end, Unset): + house_fraction_end = UNSET + else: + house_fraction_end = IdentifierModel.from_dict(_house_fraction_end) + + _house_fraction_start = d.pop("houseFractionStart", UNSET) + house_fraction_start: Union[Unset, IdentifierModel] + if isinstance(_house_fraction_start, Unset): + house_fraction_start = UNSET + else: + house_fraction_start = IdentifierModel.from_dict(_house_fraction_start) + + id = d.pop("id", UNSET) + + inspection_district = d.pop("inspectionDistrict", UNSET) + + inspection_district_prefix = d.pop("inspectionDistrictPrefix", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + level_end = d.pop("levelEnd", UNSET) + + level_prefix = d.pop("levelPrefix", UNSET) + + level_start = d.pop("levelStart", UNSET) + + neighborhood = d.pop("neighborhood", UNSET) + + neighborhood_prefix = d.pop("neighborhoodPrefix", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, CapIDModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = CapIDModel.from_dict(_record_id) + + ref_address_id = d.pop("refAddressId", UNSET) + + secondary_street = d.pop("secondaryStreet", UNSET) + + secondary_street_number = d.pop("secondaryStreetNumber", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, IdentifierModel] + if isinstance(_state, Unset): + state = UNSET + else: + state = IdentifierModel.from_dict(_state) + + _status = d.pop("status", UNSET) + status: Union[Unset, IdentifierModel] + if isinstance(_status, Unset): + status = UNSET + else: + status = IdentifierModel.from_dict(_status) + + street_address = d.pop("streetAddress", UNSET) + + street_end = d.pop("streetEnd", UNSET) + + street_end_from = d.pop("streetEndFrom", UNSET) + + street_end_to = d.pop("streetEndTo", UNSET) + + street_name = d.pop("streetName", UNSET) + + street_prefix = d.pop("streetPrefix", UNSET) + + street_start = d.pop("streetStart", UNSET) + + street_start_from = d.pop("streetStartFrom", UNSET) + + street_start_to = d.pop("streetStartTo", UNSET) + + _street_suffix = d.pop("streetSuffix", UNSET) + street_suffix: Union[Unset, IdentifierModel] + if isinstance(_street_suffix, Unset): + street_suffix = UNSET + else: + street_suffix = IdentifierModel.from_dict(_street_suffix) + + _street_suffix_direction = d.pop("streetSuffixDirection", UNSET) + street_suffix_direction: Union[Unset, IdentifierModel] + if isinstance(_street_suffix_direction, Unset): + street_suffix_direction = UNSET + else: + street_suffix_direction = IdentifierModel.from_dict(_street_suffix_direction) + + _type = d.pop("type", UNSET) + type: Union[Unset, IdentifierModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = IdentifierModel.from_dict(_type) + + unit_end = d.pop("unitEnd", UNSET) + + unit_start = d.pop("unitStart", UNSET) + + _unit_type = d.pop("unitType", UNSET) + unit_type: Union[Unset, IdentifierModel] + if isinstance(_unit_type, Unset): + unit_type = UNSET + else: + unit_type = IdentifierModel.from_dict(_unit_type) + + x_coordinate = d.pop("xCoordinate", UNSET) + + y_coordinate = d.pop("yCoordinate", UNSET) + + address_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_type_flag=address_type_flag, + city=city, + country=country, + county=county, + description=description, + direction=direction, + distance=distance, + house_alpha_end=house_alpha_end, + house_alpha_start=house_alpha_start, + house_fraction_end=house_fraction_end, + house_fraction_start=house_fraction_start, + id=id, + inspection_district=inspection_district, + inspection_district_prefix=inspection_district_prefix, + is_primary=is_primary, + level_end=level_end, + level_prefix=level_prefix, + level_start=level_start, + neighborhood=neighborhood, + neighborhood_prefix=neighborhood_prefix, + postal_code=postal_code, + record_id=record_id, + ref_address_id=ref_address_id, + secondary_street=secondary_street, + secondary_street_number=secondary_street_number, + service_provider_code=service_provider_code, + state=state, + status=status, + street_address=street_address, + street_end=street_end, + street_end_from=street_end_from, + street_end_to=street_end_to, + street_name=street_name, + street_prefix=street_prefix, + street_start=street_start, + street_start_from=street_start_from, + street_start_to=street_start_to, + street_suffix=street_suffix, + street_suffix_direction=street_suffix_direction, + type=type, + unit_end=unit_end, + unit_start=unit_start, + unit_type=unit_type, + x_coordinate=x_coordinate, + y_coordinate=y_coordinate, + ) + + address_model.additional_properties = d + return address_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/apo_custom_form.py b/accelapy/accelapy/records_client/models/apo_custom_form.py new file mode 100644 index 0000000..ee5c9bf --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_form.py @@ -0,0 +1,79 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApoCustomForm") + + +@_attrs_define +class ApoCustomForm: + """A set of custom field name-value pairs on a custom form. + + Added in Civic Platform version: 9.2.0 + + Attributes: + id (Union[Unset, str]): The unique string id of the custom form template for the custom data. + a_custom_field_name (Union[Unset, str]): A custom field name. Note that this is the custom attribute name (not + the attribute label). To get the attribute display label, use [Get Record Address Custom Forms + Metadata](#operation/v4.get.records.recordId.addresses.addressId.customForms.meta). + a_custom_field_value (Union[Unset, str]): A custom field value + """ + + id: Union[Unset, str] = UNSET + a_custom_field_name: Union[Unset, str] = UNSET + a_custom_field_value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + a_custom_field_name = self.a_custom_field_name + a_custom_field_value = self.a_custom_field_value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if a_custom_field_name is not UNSET: + field_dict["aCustomFieldName"] = a_custom_field_name + if a_custom_field_value is not UNSET: + field_dict["aCustomFieldValue"] = a_custom_field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + a_custom_field_name = d.pop("aCustomFieldName", UNSET) + + a_custom_field_value = d.pop("aCustomFieldValue", UNSET) + + apo_custom_form = cls( + id=id, + a_custom_field_name=a_custom_field_name, + a_custom_field_value=a_custom_field_value, + ) + + apo_custom_form.additional_properties = d + return apo_custom_form + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata.py new file mode 100644 index 0000000..4eb80eb --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata.py @@ -0,0 +1,120 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.apo_custom_forms_metadata_custom_form_type import ApoCustomFormsMetadataCustomFormType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.apo_custom_forms_metadata_fields import ApoCustomFormsMetadataFields + + +T = TypeVar("T", bound="ApoCustomFormsMetadata") + + +@_attrs_define +class ApoCustomFormsMetadata: + """Contains metadata description of a custom form, including the custom fields metadata. + + Added in Civic Platform version: 9.2.0 + + Attributes: + name (Union[Unset, str]): The name of the custom form + description (Union[Unset, str]): Describes the usage or puporse of the custom form. + fields (Union[Unset, List['ApoCustomFormsMetadataFields']]): Contains the field metadata. + id (Union[Unset, str]): The unique string identifier of the custom form. + custom_form_type (Union[Unset, ApoCustomFormsMetadataCustomFormType]): Indicates whether the custom form is for + an address, parcel, or owner. + """ + + name: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + fields: Union[Unset, List["ApoCustomFormsMetadataFields"]] = UNSET + id: Union[Unset, str] = UNSET + custom_form_type: Union[Unset, ApoCustomFormsMetadataCustomFormType] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + description = self.description + fields: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + + fields.append(fields_item) + + id = self.id + custom_form_type: Union[Unset, str] = UNSET + if not isinstance(self.custom_form_type, Unset): + custom_form_type = self.custom_form_type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if fields is not UNSET: + field_dict["fields"] = fields + if id is not UNSET: + field_dict["id"] = id + if custom_form_type is not UNSET: + field_dict["customFormType"] = custom_form_type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.apo_custom_forms_metadata_fields import ApoCustomFormsMetadataFields + + d = src_dict.copy() + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + fields = [] + _fields = d.pop("fields", UNSET) + for fields_item_data in _fields or []: + fields_item = ApoCustomFormsMetadataFields.from_dict(fields_item_data) + + fields.append(fields_item) + + id = d.pop("id", UNSET) + + _custom_form_type = d.pop("customFormType", UNSET) + custom_form_type: Union[Unset, ApoCustomFormsMetadataCustomFormType] + if isinstance(_custom_form_type, Unset): + custom_form_type = UNSET + else: + custom_form_type = ApoCustomFormsMetadataCustomFormType(_custom_form_type) + + apo_custom_forms_metadata = cls( + name=name, + description=description, + fields=fields, + id=id, + custom_form_type=custom_form_type, + ) + + apo_custom_forms_metadata.additional_properties = d + return apo_custom_forms_metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_custom_form_type.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_custom_form_type.py new file mode 100644 index 0000000..64121a6 --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_custom_form_type.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ApoCustomFormsMetadataCustomFormType(str, Enum): + ADDRESS = "address" + OWNER = "owner" + PARCEL = "parcel" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields.py new file mode 100644 index 0000000..82fbd09 --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields.py @@ -0,0 +1,238 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.apo_custom_forms_metadata_fields_data_type import ApoCustomFormsMetadataFieldsDataType +from ..models.apo_custom_forms_metadata_fields_is_public_visible import ApoCustomFormsMetadataFieldsIsPublicVisible +from ..models.apo_custom_forms_metadata_fields_is_record_searchable import ( + ApoCustomFormsMetadataFieldsIsRecordSearchable, +) +from ..models.apo_custom_forms_metadata_fields_is_required import ApoCustomFormsMetadataFieldsIsRequired +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.apo_custom_forms_metadata_fields_label import ApoCustomFormsMetadataFieldsLabel + from ..models.apo_custom_forms_metadata_fields_options_item import ApoCustomFormsMetadataFieldsOptionsItem + + +T = TypeVar("T", bound="ApoCustomFormsMetadataFields") + + +@_attrs_define +class ApoCustomFormsMetadataFields: + """Describes the metadata of a custom field. + + Added in Civic Platform version: 9.2.0 + + Attributes: + id (Union[Unset, int]): The unique custom field id. + name (Union[Unset, str]): The field name. + description (Union[Unset, str]): Describes the usage or purpose of the custom field. + label (Union[Unset, ApoCustomFormsMetadataFieldsLabel]): The field label. + data_type (Union[Unset, ApoCustomFormsMetadataFieldsDataType]): The field data type. If the custom field is a + DropdownList, the options[] array contains the list of possible values, or the sharedDropdownListName specifies + the name of a shared dropdown list containing the possible values. + default_value (Union[Unset, str]): Any default value for the custom field. + display_order (Union[Unset, int]): The display order of the field on the custom form. + unit (Union[Unset, str]): The unit of measure of a numeric custom field. + is_required (Union[Unset, ApoCustomFormsMetadataFieldsIsRequired]): Indicates whether or not the field is + required. + is_public_visible (Union[Unset, ApoCustomFormsMetadataFieldsIsPublicVisible]): Indicates whether or not a + citizen user can see this field. + is_record_searchable (Union[Unset, ApoCustomFormsMetadataFieldsIsRecordSearchable]): Indicates whether or not + the field is searchable. + max_length (Union[Unset, int]): The field maximum length. + options (Union[Unset, List['ApoCustomFormsMetadataFieldsOptionsItem']]): Contains possible field values, if the + field is a dropdown field type. + shared_dropdown_list_name (Union[Unset, str]): The name of the shared dropdown list, if the field is a dropdown + field type. + """ + + id: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + label: Union[Unset, "ApoCustomFormsMetadataFieldsLabel"] = UNSET + data_type: Union[Unset, ApoCustomFormsMetadataFieldsDataType] = UNSET + default_value: Union[Unset, str] = UNSET + display_order: Union[Unset, int] = UNSET + unit: Union[Unset, str] = UNSET + is_required: Union[Unset, ApoCustomFormsMetadataFieldsIsRequired] = UNSET + is_public_visible: Union[Unset, ApoCustomFormsMetadataFieldsIsPublicVisible] = UNSET + is_record_searchable: Union[Unset, ApoCustomFormsMetadataFieldsIsRecordSearchable] = UNSET + max_length: Union[Unset, int] = UNSET + options: Union[Unset, List["ApoCustomFormsMetadataFieldsOptionsItem"]] = UNSET + shared_dropdown_list_name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + name = self.name + description = self.description + label: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.label, Unset): + label = self.label.to_dict() + + data_type: Union[Unset, str] = UNSET + if not isinstance(self.data_type, Unset): + data_type = self.data_type.value + + default_value = self.default_value + display_order = self.display_order + unit = self.unit + is_required: Union[Unset, str] = UNSET + if not isinstance(self.is_required, Unset): + is_required = self.is_required.value + + is_public_visible: Union[Unset, str] = UNSET + if not isinstance(self.is_public_visible, Unset): + is_public_visible = self.is_public_visible.value + + is_record_searchable: Union[Unset, str] = UNSET + if not isinstance(self.is_record_searchable, Unset): + is_record_searchable = self.is_record_searchable.value + + max_length = self.max_length + options: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.options, Unset): + options = [] + for options_item_data in self.options: + options_item = options_item_data.to_dict() + + options.append(options_item) + + shared_dropdown_list_name = self.shared_dropdown_list_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if label is not UNSET: + field_dict["label"] = label + if data_type is not UNSET: + field_dict["dataType"] = data_type + if default_value is not UNSET: + field_dict["defaultValue"] = default_value + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if unit is not UNSET: + field_dict["unit"] = unit + if is_required is not UNSET: + field_dict["isRequired"] = is_required + if is_public_visible is not UNSET: + field_dict["isPublicVisible"] = is_public_visible + if is_record_searchable is not UNSET: + field_dict["isRecordSearchable"] = is_record_searchable + if max_length is not UNSET: + field_dict["maxLength"] = max_length + if options is not UNSET: + field_dict["options"] = options + if shared_dropdown_list_name is not UNSET: + field_dict["sharedDropdownListName"] = shared_dropdown_list_name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.apo_custom_forms_metadata_fields_label import ApoCustomFormsMetadataFieldsLabel + from ..models.apo_custom_forms_metadata_fields_options_item import ApoCustomFormsMetadataFieldsOptionsItem + + d = src_dict.copy() + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + description = d.pop("description", UNSET) + + _label = d.pop("label", UNSET) + label: Union[Unset, ApoCustomFormsMetadataFieldsLabel] + if isinstance(_label, Unset): + label = UNSET + else: + label = ApoCustomFormsMetadataFieldsLabel.from_dict(_label) + + _data_type = d.pop("dataType", UNSET) + data_type: Union[Unset, ApoCustomFormsMetadataFieldsDataType] + if isinstance(_data_type, Unset): + data_type = UNSET + else: + data_type = ApoCustomFormsMetadataFieldsDataType(_data_type) + + default_value = d.pop("defaultValue", UNSET) + + display_order = d.pop("displayOrder", UNSET) + + unit = d.pop("unit", UNSET) + + _is_required = d.pop("isRequired", UNSET) + is_required: Union[Unset, ApoCustomFormsMetadataFieldsIsRequired] + if isinstance(_is_required, Unset): + is_required = UNSET + else: + is_required = ApoCustomFormsMetadataFieldsIsRequired(_is_required) + + _is_public_visible = d.pop("isPublicVisible", UNSET) + is_public_visible: Union[Unset, ApoCustomFormsMetadataFieldsIsPublicVisible] + if isinstance(_is_public_visible, Unset): + is_public_visible = UNSET + else: + is_public_visible = ApoCustomFormsMetadataFieldsIsPublicVisible(_is_public_visible) + + _is_record_searchable = d.pop("isRecordSearchable", UNSET) + is_record_searchable: Union[Unset, ApoCustomFormsMetadataFieldsIsRecordSearchable] + if isinstance(_is_record_searchable, Unset): + is_record_searchable = UNSET + else: + is_record_searchable = ApoCustomFormsMetadataFieldsIsRecordSearchable(_is_record_searchable) + + max_length = d.pop("maxLength", UNSET) + + options = [] + _options = d.pop("options", UNSET) + for options_item_data in _options or []: + options_item = ApoCustomFormsMetadataFieldsOptionsItem.from_dict(options_item_data) + + options.append(options_item) + + shared_dropdown_list_name = d.pop("sharedDropdownListName", UNSET) + + apo_custom_forms_metadata_fields = cls( + id=id, + name=name, + description=description, + label=label, + data_type=data_type, + default_value=default_value, + display_order=display_order, + unit=unit, + is_required=is_required, + is_public_visible=is_public_visible, + is_record_searchable=is_record_searchable, + max_length=max_length, + options=options, + shared_dropdown_list_name=shared_dropdown_list_name, + ) + + apo_custom_forms_metadata_fields.additional_properties = d + return apo_custom_forms_metadata_fields + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_data_type.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_data_type.py new file mode 100644 index 0000000..3cc8518 --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_data_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ApoCustomFormsMetadataFieldsDataType(str, Enum): + DATE = "Date" + DROPDOWNLIST = "DropdownList" + NUMBER = "Number" + RADIO = "Radio" + TEXT = "Text" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_public_visible.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_public_visible.py new file mode 100644 index 0000000..6da365a --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_public_visible.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ApoCustomFormsMetadataFieldsIsPublicVisible(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_record_searchable.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_record_searchable.py new file mode 100644 index 0000000..122482e --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_record_searchable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ApoCustomFormsMetadataFieldsIsRecordSearchable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_required.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_required.py new file mode 100644 index 0000000..11dffbc --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_is_required.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ApoCustomFormsMetadataFieldsIsRequired(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_label.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_label.py new file mode 100644 index 0000000..295b473 --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_label.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApoCustomFormsMetadataFieldsLabel") + + +@_attrs_define +class ApoCustomFormsMetadataFieldsLabel: + """The field label. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + apo_custom_forms_metadata_fields_label = cls( + text=text, + value=value, + ) + + apo_custom_forms_metadata_fields_label.additional_properties = d + return apo_custom_forms_metadata_fields_label + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_options_item.py b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_options_item.py new file mode 100644 index 0000000..7f566b9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/apo_custom_forms_metadata_fields_options_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApoCustomFormsMetadataFieldsOptionsItem") + + +@_attrs_define +class ApoCustomFormsMetadataFieldsOptionsItem: + """A dropdown field value. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + apo_custom_forms_metadata_fields_options_item = cls( + text=text, + value=value, + ) + + apo_custom_forms_metadata_fields_options_item.additional_properties = d + return apo_custom_forms_metadata_fields_options_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asi_table_drill.py b/accelapy/accelapy/records_client/models/asi_table_drill.py new file mode 100644 index 0000000..aceb337 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asi_table_drill.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.child_drill import ChildDrill + + +T = TypeVar("T", bound="ASITableDrill") + + +@_attrs_define +class ASITableDrill: + """ + Attributes: + children (Union[Unset, List['ChildDrill']]): + is_root (Union[Unset, bool]): + """ + + children: Union[Unset, List["ChildDrill"]] = UNSET + is_root: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + children: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + + children.append(children_item) + + is_root = self.is_root + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if children is not UNSET: + field_dict["children"] = children + if is_root is not UNSET: + field_dict["isRoot"] = is_root + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.child_drill import ChildDrill + + d = src_dict.copy() + children = [] + _children = d.pop("children", UNSET) + for children_item_data in _children or []: + children_item = ChildDrill.from_dict(children_item_data) + + children.append(children_item) + + is_root = d.pop("isRoot", UNSET) + + asi_table_drill = cls( + children=children, + is_root=is_root, + ) + + asi_table_drill.additional_properties = d + return asi_table_drill + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model.py b/accelapy/accelapy/records_client/models/asset_master_model.py new file mode 100644 index 0000000..c887980 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model.py @@ -0,0 +1,369 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.asset_master_model_dependent_flag import AssetMasterModelDependentFlag +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.asset_master_model_comments import AssetMasterModelComments + from ..models.asset_master_model_description import AssetMasterModelDescription + from ..models.asset_master_model_name import AssetMasterModelName + from ..models.asset_master_model_status import AssetMasterModelStatus + from ..models.asset_master_model_type import AssetMasterModelType + from ..models.gis_object_model import GISObjectModel + + +T = TypeVar("T", bound="AssetMasterModel") + + +@_attrs_define +class AssetMasterModel: + """ + Attributes: + asset_id (Union[Unset, str]): The unique alpha-numeric asset ID in an asset group. + + **Added in Civic Platform version**: 9.2.0 + + class_type (Union[Unset, str]): A Class Type is how Civic Platform groups objects that an agency owns or + maintains. The five class types are component, linear, node-link linear, point, and polygon. Asset class types + provide the ability to assign or group multiple asset types together. + comments (Union[Unset, AssetMasterModelComments]): General comments about the asset. + current_value (Union[Unset, float]): The current value of the asset. + date_of_service (Union[Unset, datetime.datetime]): The date the asset was initially placed into service. + dependent_flag (Union[Unset, AssetMasterModelDependentFlag]): Indicates whether or not the parent asset is + dependent on this asset. + depreciation_amount (Union[Unset, float]): The decline in the asset value by the asset depreciation calculation. + depreciation_end_date (Union[Unset, datetime.datetime]): The end date for the asset depreciation calculation. + This field is used in the asset depreciation calculation. + depreciation_start_date (Union[Unset, datetime.datetime]): The start date for the asset depreciation + calculation. This field is used in the asset depreciation calculation. + depreciation_value (Union[Unset, float]): The asset value after the asset depreciation calculation, which is + based on the start value, depreciation start and end dates, useful life, and salvage value. + description (Union[Unset, AssetMasterModelDescription]): The description of the asset. + end_id (Union[Unset, str]): The ending point asset ID. + gis_objects (Union[Unset, List['GISObjectModel']]): + id (Union[Unset, int]): The asset system id assigned by the Civic Platform server. + name (Union[Unset, AssetMasterModelName]): The descriptive name of the asset. + number (Union[Unset, str]): The unique, alpha-numeric asset ID. + salvage_value (Union[Unset, float]): The residual value of the asset at the end of it’s useful life. + service_provider_code (Union[Unset, str]): The unique agency identifier. + size (Union[Unset, float]): A positive numeric value for the asset size. + size_unit (Union[Unset, str]): The unit of measure corresponding to the asset size. + start_id (Union[Unset, str]): The starting point asset ID. + start_value (Union[Unset, float]): The beginning value or purchase price of the asset. + status (Union[Unset, AssetMasterModelStatus]): The status of the asset. + status_date (Union[Unset, datetime.datetime]): The date the asset status changed. + type (Union[Unset, AssetMasterModelType]): The type of asset. + """ + + asset_id: Union[Unset, str] = UNSET + class_type: Union[Unset, str] = UNSET + comments: Union[Unset, "AssetMasterModelComments"] = UNSET + current_value: Union[Unset, float] = UNSET + date_of_service: Union[Unset, datetime.datetime] = UNSET + dependent_flag: Union[Unset, AssetMasterModelDependentFlag] = UNSET + depreciation_amount: Union[Unset, float] = UNSET + depreciation_end_date: Union[Unset, datetime.datetime] = UNSET + depreciation_start_date: Union[Unset, datetime.datetime] = UNSET + depreciation_value: Union[Unset, float] = UNSET + description: Union[Unset, "AssetMasterModelDescription"] = UNSET + end_id: Union[Unset, str] = UNSET + gis_objects: Union[Unset, List["GISObjectModel"]] = UNSET + id: Union[Unset, int] = UNSET + name: Union[Unset, "AssetMasterModelName"] = UNSET + number: Union[Unset, str] = UNSET + salvage_value: Union[Unset, float] = UNSET + service_provider_code: Union[Unset, str] = UNSET + size: Union[Unset, float] = UNSET + size_unit: Union[Unset, str] = UNSET + start_id: Union[Unset, str] = UNSET + start_value: Union[Unset, float] = UNSET + status: Union[Unset, "AssetMasterModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + type: Union[Unset, "AssetMasterModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + asset_id = self.asset_id + class_type = self.class_type + comments: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.comments, Unset): + comments = self.comments.to_dict() + + current_value = self.current_value + date_of_service: Union[Unset, str] = UNSET + if not isinstance(self.date_of_service, Unset): + date_of_service = self.date_of_service.isoformat() + + dependent_flag: Union[Unset, str] = UNSET + if not isinstance(self.dependent_flag, Unset): + dependent_flag = self.dependent_flag.value + + depreciation_amount = self.depreciation_amount + depreciation_end_date: Union[Unset, str] = UNSET + if not isinstance(self.depreciation_end_date, Unset): + depreciation_end_date = self.depreciation_end_date.isoformat() + + depreciation_start_date: Union[Unset, str] = UNSET + if not isinstance(self.depreciation_start_date, Unset): + depreciation_start_date = self.depreciation_start_date.isoformat() + + depreciation_value = self.depreciation_value + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + end_id = self.end_id + gis_objects: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.gis_objects, Unset): + gis_objects = [] + for gis_objects_item_data in self.gis_objects: + gis_objects_item = gis_objects_item_data.to_dict() + + gis_objects.append(gis_objects_item) + + id = self.id + name: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.name, Unset): + name = self.name.to_dict() + + number = self.number + salvage_value = self.salvage_value + service_provider_code = self.service_provider_code + size = self.size + size_unit = self.size_unit + start_id = self.start_id + start_value = self.start_value + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if asset_id is not UNSET: + field_dict["assetId"] = asset_id + if class_type is not UNSET: + field_dict["classType"] = class_type + if comments is not UNSET: + field_dict["comments"] = comments + if current_value is not UNSET: + field_dict["currentValue"] = current_value + if date_of_service is not UNSET: + field_dict["dateOfService"] = date_of_service + if dependent_flag is not UNSET: + field_dict["dependentFlag"] = dependent_flag + if depreciation_amount is not UNSET: + field_dict["depreciationAmount"] = depreciation_amount + if depreciation_end_date is not UNSET: + field_dict["depreciationEndDate"] = depreciation_end_date + if depreciation_start_date is not UNSET: + field_dict["depreciationStartDate"] = depreciation_start_date + if depreciation_value is not UNSET: + field_dict["depreciationValue"] = depreciation_value + if description is not UNSET: + field_dict["description"] = description + if end_id is not UNSET: + field_dict["endID"] = end_id + if gis_objects is not UNSET: + field_dict["gisObjects"] = gis_objects + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + if number is not UNSET: + field_dict["number"] = number + if salvage_value is not UNSET: + field_dict["salvageValue"] = salvage_value + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if size is not UNSET: + field_dict["size"] = size + if size_unit is not UNSET: + field_dict["sizeUnit"] = size_unit + if start_id is not UNSET: + field_dict["startID"] = start_id + if start_value is not UNSET: + field_dict["startValue"] = start_value + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.asset_master_model_comments import AssetMasterModelComments + from ..models.asset_master_model_description import AssetMasterModelDescription + from ..models.asset_master_model_name import AssetMasterModelName + from ..models.asset_master_model_status import AssetMasterModelStatus + from ..models.asset_master_model_type import AssetMasterModelType + from ..models.gis_object_model import GISObjectModel + + d = src_dict.copy() + asset_id = d.pop("assetId", UNSET) + + class_type = d.pop("classType", UNSET) + + _comments = d.pop("comments", UNSET) + comments: Union[Unset, AssetMasterModelComments] + if isinstance(_comments, Unset): + comments = UNSET + else: + comments = AssetMasterModelComments.from_dict(_comments) + + current_value = d.pop("currentValue", UNSET) + + _date_of_service = d.pop("dateOfService", UNSET) + date_of_service: Union[Unset, datetime.datetime] + if isinstance(_date_of_service, Unset): + date_of_service = UNSET + else: + date_of_service = isoparse(_date_of_service) + + _dependent_flag = d.pop("dependentFlag", UNSET) + dependent_flag: Union[Unset, AssetMasterModelDependentFlag] + if isinstance(_dependent_flag, Unset): + dependent_flag = UNSET + else: + dependent_flag = AssetMasterModelDependentFlag(_dependent_flag) + + depreciation_amount = d.pop("depreciationAmount", UNSET) + + _depreciation_end_date = d.pop("depreciationEndDate", UNSET) + depreciation_end_date: Union[Unset, datetime.datetime] + if isinstance(_depreciation_end_date, Unset): + depreciation_end_date = UNSET + else: + depreciation_end_date = isoparse(_depreciation_end_date) + + _depreciation_start_date = d.pop("depreciationStartDate", UNSET) + depreciation_start_date: Union[Unset, datetime.datetime] + if isinstance(_depreciation_start_date, Unset): + depreciation_start_date = UNSET + else: + depreciation_start_date = isoparse(_depreciation_start_date) + + depreciation_value = d.pop("depreciationValue", UNSET) + + _description = d.pop("description", UNSET) + description: Union[Unset, AssetMasterModelDescription] + if isinstance(_description, Unset): + description = UNSET + else: + description = AssetMasterModelDescription.from_dict(_description) + + end_id = d.pop("endID", UNSET) + + gis_objects = [] + _gis_objects = d.pop("gisObjects", UNSET) + for gis_objects_item_data in _gis_objects or []: + gis_objects_item = GISObjectModel.from_dict(gis_objects_item_data) + + gis_objects.append(gis_objects_item) + + id = d.pop("id", UNSET) + + _name = d.pop("name", UNSET) + name: Union[Unset, AssetMasterModelName] + if isinstance(_name, Unset): + name = UNSET + else: + name = AssetMasterModelName.from_dict(_name) + + number = d.pop("number", UNSET) + + salvage_value = d.pop("salvageValue", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + size = d.pop("size", UNSET) + + size_unit = d.pop("sizeUnit", UNSET) + + start_id = d.pop("startID", UNSET) + + start_value = d.pop("startValue", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, AssetMasterModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = AssetMasterModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _type = d.pop("type", UNSET) + type: Union[Unset, AssetMasterModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = AssetMasterModelType.from_dict(_type) + + asset_master_model = cls( + asset_id=asset_id, + class_type=class_type, + comments=comments, + current_value=current_value, + date_of_service=date_of_service, + dependent_flag=dependent_flag, + depreciation_amount=depreciation_amount, + depreciation_end_date=depreciation_end_date, + depreciation_start_date=depreciation_start_date, + depreciation_value=depreciation_value, + description=description, + end_id=end_id, + gis_objects=gis_objects, + id=id, + name=name, + number=number, + salvage_value=salvage_value, + service_provider_code=service_provider_code, + size=size, + size_unit=size_unit, + start_id=start_id, + start_value=start_value, + status=status, + status_date=status_date, + type=type, + ) + + asset_master_model.additional_properties = d + return asset_master_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model_comments.py b/accelapy/accelapy/records_client/models/asset_master_model_comments.py new file mode 100644 index 0000000..7eb5f28 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_comments.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssetMasterModelComments") + + +@_attrs_define +class AssetMasterModelComments: + """General comments about the asset. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + asset_master_model_comments = cls( + text=text, + value=value, + ) + + asset_master_model_comments.additional_properties = d + return asset_master_model_comments + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model_dependent_flag.py b/accelapy/accelapy/records_client/models/asset_master_model_dependent_flag.py new file mode 100644 index 0000000..55ce625 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_dependent_flag.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AssetMasterModelDependentFlag(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/asset_master_model_description.py b/accelapy/accelapy/records_client/models/asset_master_model_description.py new file mode 100644 index 0000000..282f803 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_description.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssetMasterModelDescription") + + +@_attrs_define +class AssetMasterModelDescription: + """The description of the asset. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + asset_master_model_description = cls( + text=text, + value=value, + ) + + asset_master_model_description.additional_properties = d + return asset_master_model_description + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model_name.py b/accelapy/accelapy/records_client/models/asset_master_model_name.py new file mode 100644 index 0000000..3c7025d --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_name.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssetMasterModelName") + + +@_attrs_define +class AssetMasterModelName: + """The descriptive name of the asset. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + asset_master_model_name = cls( + text=text, + value=value, + ) + + asset_master_model_name.additional_properties = d + return asset_master_model_name + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model_status.py b/accelapy/accelapy/records_client/models/asset_master_model_status.py new file mode 100644 index 0000000..e695d49 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssetMasterModelStatus") + + +@_attrs_define +class AssetMasterModelStatus: + """The status of the asset. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + asset_master_model_status = cls( + text=text, + value=value, + ) + + asset_master_model_status.additional_properties = d + return asset_master_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/asset_master_model_type.py b/accelapy/accelapy/records_client/models/asset_master_model_type.py new file mode 100644 index 0000000..f9b2fa4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/asset_master_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AssetMasterModelType") + + +@_attrs_define +class AssetMasterModelType: + """The type of asset. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + asset_master_model_type = cls( + text=text, + value=value, + ) + + asset_master_model_type.additional_properties = d + return asset_master_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/cap_condition_model_2.py b/accelapy/accelapy/records_client/models/cap_condition_model_2.py new file mode 100644 index 0000000..f04a93e --- /dev/null +++ b/accelapy/accelapy/records_client/models/cap_condition_model_2.py @@ -0,0 +1,475 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="CapConditionModel2") + + +@_attrs_define +class CapConditionModel2: + """ + Attributes: + actionby_department (Union[Unset, IdentifierModel]): + actionby_user (Union[Unset, IdentifierModel]): + active_status (Union[Unset, IdentifierModel]): + additional_information (Union[Unset, str]): + additional_information_plain_text (Union[Unset, str]): + agency_list_sql (Union[Unset, str]): + applied_date (Union[Unset, datetime.datetime]): + appliedby_department (Union[Unset, IdentifierModel]): + appliedby_user (Union[Unset, IdentifierModel]): + disp_additional_information_plain_text (Union[Unset, str]): + display_notice_in_agency (Union[Unset, bool]): + display_notice_in_citizens (Union[Unset, bool]): + display_notice_in_citizens_fee (Union[Unset, bool]): + display_order (Union[Unset, int]): + effective_date (Union[Unset, datetime.datetime]): + expiration_date (Union[Unset, datetime.datetime]): + group (Union[Unset, IdentifierModel]): + id (Union[Unset, int]): + inheritable (Union[Unset, IdentifierModel]): + is_include_name_in_notice (Union[Unset, bool]): + is_include_short_comments_in_notice (Union[Unset, bool]): + long_comments (Union[Unset, str]): + name (Union[Unset, str]): + priority (Union[Unset, IdentifierModel]): + public_display_message (Union[Unset, str]): + record_id (Union[Unset, CapIDModel]): + res_additional_information_plain_text (Union[Unset, str]): + resolution_action (Union[Unset, str]): + service_provider_code (Union[Unset, str]): + service_provider_codes (Union[Unset, str]): + severity (Union[Unset, IdentifierModel]): + short_comments (Union[Unset, str]): + status (Union[Unset, IdentifierModel]): + status_date (Union[Unset, datetime.datetime]): + status_type (Union[Unset, str]): + type (Union[Unset, IdentifierModel]): + """ + + actionby_department: Union[Unset, "IdentifierModel"] = UNSET + actionby_user: Union[Unset, "IdentifierModel"] = UNSET + active_status: Union[Unset, "IdentifierModel"] = UNSET + additional_information: Union[Unset, str] = UNSET + additional_information_plain_text: Union[Unset, str] = UNSET + agency_list_sql: Union[Unset, str] = UNSET + applied_date: Union[Unset, datetime.datetime] = UNSET + appliedby_department: Union[Unset, "IdentifierModel"] = UNSET + appliedby_user: Union[Unset, "IdentifierModel"] = UNSET + disp_additional_information_plain_text: Union[Unset, str] = UNSET + display_notice_in_agency: Union[Unset, bool] = UNSET + display_notice_in_citizens: Union[Unset, bool] = UNSET + display_notice_in_citizens_fee: Union[Unset, bool] = UNSET + display_order: Union[Unset, int] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + group: Union[Unset, "IdentifierModel"] = UNSET + id: Union[Unset, int] = UNSET + inheritable: Union[Unset, "IdentifierModel"] = UNSET + is_include_name_in_notice: Union[Unset, bool] = UNSET + is_include_short_comments_in_notice: Union[Unset, bool] = UNSET + long_comments: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "IdentifierModel"] = UNSET + public_display_message: Union[Unset, str] = UNSET + record_id: Union[Unset, "CapIDModel"] = UNSET + res_additional_information_plain_text: Union[Unset, str] = UNSET + resolution_action: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + service_provider_codes: Union[Unset, str] = UNSET + severity: Union[Unset, "IdentifierModel"] = UNSET + short_comments: Union[Unset, str] = UNSET + status: Union[Unset, "IdentifierModel"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_type: Union[Unset, str] = UNSET + type: Union[Unset, "IdentifierModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + active_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.active_status, Unset): + active_status = self.active_status.to_dict() + + additional_information = self.additional_information + additional_information_plain_text = self.additional_information_plain_text + agency_list_sql = self.agency_list_sql + applied_date: Union[Unset, str] = UNSET + if not isinstance(self.applied_date, Unset): + applied_date = self.applied_date.isoformat() + + appliedby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_department, Unset): + appliedby_department = self.appliedby_department.to_dict() + + appliedby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_user, Unset): + appliedby_user = self.appliedby_user.to_dict() + + disp_additional_information_plain_text = self.disp_additional_information_plain_text + display_notice_in_agency = self.display_notice_in_agency + display_notice_in_citizens = self.display_notice_in_citizens + display_notice_in_citizens_fee = self.display_notice_in_citizens_fee + display_order = self.display_order + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + inheritable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.inheritable, Unset): + inheritable = self.inheritable.to_dict() + + is_include_name_in_notice = self.is_include_name_in_notice + is_include_short_comments_in_notice = self.is_include_short_comments_in_notice + long_comments = self.long_comments + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_display_message = self.public_display_message + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + res_additional_information_plain_text = self.res_additional_information_plain_text + resolution_action = self.resolution_action + service_provider_code = self.service_provider_code + service_provider_codes = self.service_provider_codes + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_comments = self.short_comments + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_type = self.status_type + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if active_status is not UNSET: + field_dict["activeStatus"] = active_status + if additional_information is not UNSET: + field_dict["additionalInformation"] = additional_information + if additional_information_plain_text is not UNSET: + field_dict["additionalInformationPlainText"] = additional_information_plain_text + if agency_list_sql is not UNSET: + field_dict["agencyListSQL"] = agency_list_sql + if applied_date is not UNSET: + field_dict["appliedDate"] = applied_date + if appliedby_department is not UNSET: + field_dict["appliedbyDepartment"] = appliedby_department + if appliedby_user is not UNSET: + field_dict["appliedbyUser"] = appliedby_user + if disp_additional_information_plain_text is not UNSET: + field_dict["dispAdditionalInformationPlainText"] = disp_additional_information_plain_text + if display_notice_in_agency is not UNSET: + field_dict["displayNoticeInAgency"] = display_notice_in_agency + if display_notice_in_citizens is not UNSET: + field_dict["displayNoticeInCitizens"] = display_notice_in_citizens + if display_notice_in_citizens_fee is not UNSET: + field_dict["displayNoticeInCitizensFee"] = display_notice_in_citizens_fee + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if inheritable is not UNSET: + field_dict["inheritable"] = inheritable + if is_include_name_in_notice is not UNSET: + field_dict["isIncludeNameInNotice"] = is_include_name_in_notice + if is_include_short_comments_in_notice is not UNSET: + field_dict["isIncludeShortCommentsInNotice"] = is_include_short_comments_in_notice + if long_comments is not UNSET: + field_dict["longComments"] = long_comments + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if public_display_message is not UNSET: + field_dict["publicDisplayMessage"] = public_display_message + if record_id is not UNSET: + field_dict["recordId"] = record_id + if res_additional_information_plain_text is not UNSET: + field_dict["resAdditionalInformationPlainText"] = res_additional_information_plain_text + if resolution_action is not UNSET: + field_dict["resolutionAction"] = resolution_action + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if service_provider_codes is not UNSET: + field_dict["serviceProviderCodes"] = service_provider_codes + if severity is not UNSET: + field_dict["severity"] = severity + if short_comments is not UNSET: + field_dict["shortComments"] = short_comments + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_type is not UNSET: + field_dict["statusType"] = status_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, IdentifierModel] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = IdentifierModel.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, IdentifierModel] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = IdentifierModel.from_dict(_actionby_user) + + _active_status = d.pop("activeStatus", UNSET) + active_status: Union[Unset, IdentifierModel] + if isinstance(_active_status, Unset): + active_status = UNSET + else: + active_status = IdentifierModel.from_dict(_active_status) + + additional_information = d.pop("additionalInformation", UNSET) + + additional_information_plain_text = d.pop("additionalInformationPlainText", UNSET) + + agency_list_sql = d.pop("agencyListSQL", UNSET) + + _applied_date = d.pop("appliedDate", UNSET) + applied_date: Union[Unset, datetime.datetime] + if isinstance(_applied_date, Unset): + applied_date = UNSET + else: + applied_date = isoparse(_applied_date) + + _appliedby_department = d.pop("appliedbyDepartment", UNSET) + appliedby_department: Union[Unset, IdentifierModel] + if isinstance(_appliedby_department, Unset): + appliedby_department = UNSET + else: + appliedby_department = IdentifierModel.from_dict(_appliedby_department) + + _appliedby_user = d.pop("appliedbyUser", UNSET) + appliedby_user: Union[Unset, IdentifierModel] + if isinstance(_appliedby_user, Unset): + appliedby_user = UNSET + else: + appliedby_user = IdentifierModel.from_dict(_appliedby_user) + + disp_additional_information_plain_text = d.pop("dispAdditionalInformationPlainText", UNSET) + + display_notice_in_agency = d.pop("displayNoticeInAgency", UNSET) + + display_notice_in_citizens = d.pop("displayNoticeInCitizens", UNSET) + + display_notice_in_citizens_fee = d.pop("displayNoticeInCitizensFee", UNSET) + + display_order = d.pop("displayOrder", UNSET) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _group = d.pop("group", UNSET) + group: Union[Unset, IdentifierModel] + if isinstance(_group, Unset): + group = UNSET + else: + group = IdentifierModel.from_dict(_group) + + id = d.pop("id", UNSET) + + _inheritable = d.pop("inheritable", UNSET) + inheritable: Union[Unset, IdentifierModel] + if isinstance(_inheritable, Unset): + inheritable = UNSET + else: + inheritable = IdentifierModel.from_dict(_inheritable) + + is_include_name_in_notice = d.pop("isIncludeNameInNotice", UNSET) + + is_include_short_comments_in_notice = d.pop("isIncludeShortCommentsInNotice", UNSET) + + long_comments = d.pop("longComments", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, IdentifierModel] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = IdentifierModel.from_dict(_priority) + + public_display_message = d.pop("publicDisplayMessage", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, CapIDModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = CapIDModel.from_dict(_record_id) + + res_additional_information_plain_text = d.pop("resAdditionalInformationPlainText", UNSET) + + resolution_action = d.pop("resolutionAction", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + service_provider_codes = d.pop("serviceProviderCodes", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, IdentifierModel] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = IdentifierModel.from_dict(_severity) + + short_comments = d.pop("shortComments", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, IdentifierModel] + if isinstance(_status, Unset): + status = UNSET + else: + status = IdentifierModel.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + status_type = d.pop("statusType", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, IdentifierModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = IdentifierModel.from_dict(_type) + + cap_condition_model_2 = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + active_status=active_status, + additional_information=additional_information, + additional_information_plain_text=additional_information_plain_text, + agency_list_sql=agency_list_sql, + applied_date=applied_date, + appliedby_department=appliedby_department, + appliedby_user=appliedby_user, + disp_additional_information_plain_text=disp_additional_information_plain_text, + display_notice_in_agency=display_notice_in_agency, + display_notice_in_citizens=display_notice_in_citizens, + display_notice_in_citizens_fee=display_notice_in_citizens_fee, + display_order=display_order, + effective_date=effective_date, + expiration_date=expiration_date, + group=group, + id=id, + inheritable=inheritable, + is_include_name_in_notice=is_include_name_in_notice, + is_include_short_comments_in_notice=is_include_short_comments_in_notice, + long_comments=long_comments, + name=name, + priority=priority, + public_display_message=public_display_message, + record_id=record_id, + res_additional_information_plain_text=res_additional_information_plain_text, + resolution_action=resolution_action, + service_provider_code=service_provider_code, + service_provider_codes=service_provider_codes, + severity=severity, + short_comments=short_comments, + status=status, + status_date=status_date, + status_type=status_type, + type=type, + ) + + cap_condition_model_2.additional_properties = d + return cap_condition_model_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/cap_id_model.py b/accelapy/accelapy/records_client/models/cap_id_model.py new file mode 100644 index 0000000..31a4916 --- /dev/null +++ b/accelapy/accelapy/records_client/models/cap_id_model.py @@ -0,0 +1,90 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CapIDModel") + + +@_attrs_define +class CapIDModel: + """ + Attributes: + custom_id (Union[Unset, str]): + id (Union[Unset, str]): + service_provider_code (Union[Unset, str]): + tracking_id (Union[Unset, int]): + value (Union[Unset, str]): + """ + + custom_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + tracking_id: Union[Unset, int] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + custom_id = self.custom_id + id = self.id + service_provider_code = self.service_provider_code + tracking_id = self.tracking_id + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if id is not UNSET: + field_dict["id"] = id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + custom_id = d.pop("customId", UNSET) + + id = d.pop("id", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + value = d.pop("value", UNSET) + + cap_id_model = cls( + custom_id=custom_id, + id=id, + service_provider_code=service_provider_code, + tracking_id=tracking_id, + value=value, + ) + + cap_id_model.additional_properties = d + return cap_id_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/child_drill.py b/accelapy/accelapy/records_client/models/child_drill.py new file mode 100644 index 0000000..e570a19 --- /dev/null +++ b/accelapy/accelapy/records_client/models/child_drill.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ChildDrill") + + +@_attrs_define +class ChildDrill: + """ + Attributes: + drill_id (Union[Unset, int]): + id (Union[Unset, str]): + """ + + drill_id: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + drill_id = self.drill_id + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if drill_id is not UNSET: + field_dict["drillId"] = drill_id + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + drill_id = d.pop("drillId", UNSET) + + id = d.pop("id", UNSET) + + child_drill = cls( + drill_id=drill_id, + id=id, + ) + + child_drill.additional_properties = d + return child_drill + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/comment_model.py b/accelapy/accelapy/records_client/models/comment_model.py new file mode 100644 index 0000000..fffc09e --- /dev/null +++ b/accelapy/accelapy/records_client/models/comment_model.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.comment_model_display_on_inspection import CommentModelDisplayOnInspection +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CommentModel") + + +@_attrs_define +class CommentModel: + """ + Attributes: + display_on_inspection (Union[Unset, CommentModelDisplayOnInspection]): Indicates whether or not the comment is + displayed on inspection. + text (Union[Unset, str]): The comment text. + """ + + display_on_inspection: Union[Unset, CommentModelDisplayOnInspection] = UNSET + text: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + display_on_inspection: Union[Unset, str] = UNSET + if not isinstance(self.display_on_inspection, Unset): + display_on_inspection = self.display_on_inspection.value + + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if display_on_inspection is not UNSET: + field_dict["displayOnInspection"] = display_on_inspection + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _display_on_inspection = d.pop("displayOnInspection", UNSET) + display_on_inspection: Union[Unset, CommentModelDisplayOnInspection] + if isinstance(_display_on_inspection, Unset): + display_on_inspection = UNSET + else: + display_on_inspection = CommentModelDisplayOnInspection(_display_on_inspection) + + text = d.pop("text", UNSET) + + comment_model = cls( + display_on_inspection=display_on_inspection, + text=text, + ) + + comment_model.additional_properties = d + return comment_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/comment_model_display_on_inspection.py b/accelapy/accelapy/records_client/models/comment_model_display_on_inspection.py new file mode 100644 index 0000000..fa900ea --- /dev/null +++ b/accelapy/accelapy/records_client/models/comment_model_display_on_inspection.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CommentModelDisplayOnInspection(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/compact_address_model.py b/accelapy/accelapy/records_client/models/compact_address_model.py new file mode 100644 index 0000000..fc2571f --- /dev/null +++ b/accelapy/accelapy/records_client/models/compact_address_model.py @@ -0,0 +1,129 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compact_address_model_country import CompactAddressModelCountry + from ..models.compact_address_model_state import CompactAddressModelState + + +T = TypeVar("T", bound="CompactAddressModel") + + +@_attrs_define +class CompactAddressModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): The first line of the address. + address_line_2 (Union[Unset, str]): The second line of the address. + address_line_3 (Union[Unset, str]): The third line of the address. + city (Union[Unset, str]): The name of the city. + country (Union[Unset, CompactAddressModelCountry]): The name of the country. + postal_code (Union[Unset, str]): The postal ZIP code for the address. + state (Union[Unset, CompactAddressModelState]): The address state. + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_line_3: Union[Unset, str] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "CompactAddressModelCountry"] = UNSET + postal_code: Union[Unset, str] = UNSET + state: Union[Unset, "CompactAddressModelState"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_line_3 = self.address_line_3 + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + postal_code = self.postal_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_line_3 is not UNSET: + field_dict["addressLine3"] = address_line_3 + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.compact_address_model_country import CompactAddressModelCountry + from ..models.compact_address_model_state import CompactAddressModelState + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + address_line_3 = d.pop("addressLine3", UNSET) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, CompactAddressModelCountry] + if isinstance(_country, Unset): + country = UNSET + else: + country = CompactAddressModelCountry.from_dict(_country) + + postal_code = d.pop("postalCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, CompactAddressModelState] + if isinstance(_state, Unset): + state = UNSET + else: + state = CompactAddressModelState.from_dict(_state) + + compact_address_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_line_3=address_line_3, + city=city, + country=country, + postal_code=postal_code, + state=state, + ) + + compact_address_model.additional_properties = d + return compact_address_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/compact_address_model_country.py b/accelapy/accelapy/records_client/models/compact_address_model_country.py new file mode 100644 index 0000000..855ad32 --- /dev/null +++ b/accelapy/accelapy/records_client/models/compact_address_model_country.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompactAddressModelCountry") + + +@_attrs_define +class CompactAddressModelCountry: + """The name of the country. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + compact_address_model_country = cls( + text=text, + value=value, + ) + + compact_address_model_country.additional_properties = d + return compact_address_model_country + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/compact_address_model_state.py b/accelapy/accelapy/records_client/models/compact_address_model_state.py new file mode 100644 index 0000000..ce9763b --- /dev/null +++ b/accelapy/accelapy/records_client/models/compact_address_model_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CompactAddressModelState") + + +@_attrs_define +class CompactAddressModelState: + """The address state. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + compact_address_model_state = cls( + text=text, + value=value, + ) + + compact_address_model_state.additional_properties = d + return compact_address_model_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model.py b/accelapy/accelapy/records_client/models/condition_history_model.py new file mode 100644 index 0000000..293140f --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model.py @@ -0,0 +1,473 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.condition_history_model_actionby_department import ConditionHistoryModelActionbyDepartment + from ..models.condition_history_model_actionby_user import ConditionHistoryModelActionbyUser + from ..models.condition_history_model_active_status import ConditionHistoryModelActiveStatus + from ..models.condition_history_model_appliedby_department import ConditionHistoryModelAppliedbyDepartment + from ..models.condition_history_model_appliedby_user import ConditionHistoryModelAppliedbyUser + from ..models.condition_history_model_group import ConditionHistoryModelGroup + from ..models.condition_history_model_inheritable import ConditionHistoryModelInheritable + from ..models.condition_history_model_priority import ConditionHistoryModelPriority + from ..models.condition_history_model_severity import ConditionHistoryModelSeverity + from ..models.condition_history_model_status import ConditionHistoryModelStatus + from ..models.condition_history_model_type import ConditionHistoryModelType + + +T = TypeVar("T", bound="ConditionHistoryModel") + + +@_attrs_define +class ConditionHistoryModel: + """ + Attributes: + actionby_department (Union[Unset, ConditionHistoryModelActionbyDepartment]): The department responsible for the + action. + actionby_user (Union[Unset, ConditionHistoryModelActionbyUser]): The individual responsible for the action. + active_status (Union[Unset, ConditionHistoryModelActiveStatus]): Indicates whether or not the condition is + active. + additional_information (Union[Unset, str]): An unlimited text field to use if other fields are filled. + additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + applied_date (Union[Unset, datetime.datetime]): The date the standard condition was applied. + appliedby_department (Union[Unset, ConditionHistoryModelAppliedbyDepartment]): The department responsible for + applying a condition. + appliedby_user (Union[Unset, ConditionHistoryModelAppliedbyUser]): The staff member responsible for applying a + condition. + disp_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + display_notice_in_agency (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Automation when a condition to a record or parcel is applied. + display_notice_in_citizens (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access when a condition to a record or parcel is applied. + display_notice_in_citizens_fee (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access Fee Estimate page when a condition to a record or parcel is applied. + effective_date (Union[Unset, datetime.datetime]): The date when you want the condition to become effective. + expiration_date (Union[Unset, datetime.datetime]): The date when the condition expires. + group (Union[Unset, ConditionHistoryModelGroup]): The condition group is an attribute of a condition that + organizes condition types. Your agency defines these groups. + id (Union[Unset, int]): The condition system id assigned by the Civic Platform server. + inheritable (Union[Unset, ConditionHistoryModelInheritable]): This defines whether or not Accela Automation + checks for inheritable conditions when a user associates a child record with a parent record. + is_include_name_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition name in the + notice. + is_include_short_comments_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition + comments in the notice. + long_comments (Union[Unset, str]): Narrative comments to help identify the purpose or uses of the standard + condition. + name (Union[Unset, str]): The name of the standard condition. + priority (Union[Unset, ConditionHistoryModelPriority]): The priority level assigned to the condition. + public_display_message (Union[Unset, str]): Text entered into this field displays in the condition notice or + condition status bar for the Condition Name for the public user in Accela IVR (AIVR) and Accela Citizen Access + (ACA). + res_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + resolution_action (Union[Unset, str]): he action performed in response to a condition. + service_provider_code (Union[Unset, str]): The unique agency identifier. + severity (Union[Unset, ConditionHistoryModelSeverity]): The severity of the condition. + short_comments (Union[Unset, str]): A brief description of the condition name. For example, the text may + describe the situation that requires the system to apply the condition. You can set these short comments to + display when a user accesses an application with this condition applied to it + status (Union[Unset, ConditionHistoryModelStatus]): The condition status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_type (Union[Unset, str]): The status type for a standard condition or an approval condition, applied or + not applied for example. + type (Union[Unset, ConditionHistoryModelType]): The condition type. + """ + + actionby_department: Union[Unset, "ConditionHistoryModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "ConditionHistoryModelActionbyUser"] = UNSET + active_status: Union[Unset, "ConditionHistoryModelActiveStatus"] = UNSET + additional_information: Union[Unset, str] = UNSET + additional_information_plain_text: Union[Unset, str] = UNSET + applied_date: Union[Unset, datetime.datetime] = UNSET + appliedby_department: Union[Unset, "ConditionHistoryModelAppliedbyDepartment"] = UNSET + appliedby_user: Union[Unset, "ConditionHistoryModelAppliedbyUser"] = UNSET + disp_additional_information_plain_text: Union[Unset, str] = UNSET + display_notice_in_agency: Union[Unset, bool] = UNSET + display_notice_in_citizens: Union[Unset, bool] = UNSET + display_notice_in_citizens_fee: Union[Unset, bool] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + group: Union[Unset, "ConditionHistoryModelGroup"] = UNSET + id: Union[Unset, int] = UNSET + inheritable: Union[Unset, "ConditionHistoryModelInheritable"] = UNSET + is_include_name_in_notice: Union[Unset, bool] = UNSET + is_include_short_comments_in_notice: Union[Unset, bool] = UNSET + long_comments: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "ConditionHistoryModelPriority"] = UNSET + public_display_message: Union[Unset, str] = UNSET + res_additional_information_plain_text: Union[Unset, str] = UNSET + resolution_action: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + severity: Union[Unset, "ConditionHistoryModelSeverity"] = UNSET + short_comments: Union[Unset, str] = UNSET + status: Union[Unset, "ConditionHistoryModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_type: Union[Unset, str] = UNSET + type: Union[Unset, "ConditionHistoryModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + active_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.active_status, Unset): + active_status = self.active_status.to_dict() + + additional_information = self.additional_information + additional_information_plain_text = self.additional_information_plain_text + applied_date: Union[Unset, str] = UNSET + if not isinstance(self.applied_date, Unset): + applied_date = self.applied_date.isoformat() + + appliedby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_department, Unset): + appliedby_department = self.appliedby_department.to_dict() + + appliedby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_user, Unset): + appliedby_user = self.appliedby_user.to_dict() + + disp_additional_information_plain_text = self.disp_additional_information_plain_text + display_notice_in_agency = self.display_notice_in_agency + display_notice_in_citizens = self.display_notice_in_citizens + display_notice_in_citizens_fee = self.display_notice_in_citizens_fee + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + inheritable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.inheritable, Unset): + inheritable = self.inheritable.to_dict() + + is_include_name_in_notice = self.is_include_name_in_notice + is_include_short_comments_in_notice = self.is_include_short_comments_in_notice + long_comments = self.long_comments + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_display_message = self.public_display_message + res_additional_information_plain_text = self.res_additional_information_plain_text + resolution_action = self.resolution_action + service_provider_code = self.service_provider_code + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_comments = self.short_comments + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_type = self.status_type + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if active_status is not UNSET: + field_dict["activeStatus"] = active_status + if additional_information is not UNSET: + field_dict["additionalInformation"] = additional_information + if additional_information_plain_text is not UNSET: + field_dict["additionalInformationPlainText"] = additional_information_plain_text + if applied_date is not UNSET: + field_dict["appliedDate"] = applied_date + if appliedby_department is not UNSET: + field_dict["appliedbyDepartment"] = appliedby_department + if appliedby_user is not UNSET: + field_dict["appliedbyUser"] = appliedby_user + if disp_additional_information_plain_text is not UNSET: + field_dict["dispAdditionalInformationPlainText"] = disp_additional_information_plain_text + if display_notice_in_agency is not UNSET: + field_dict["displayNoticeInAgency"] = display_notice_in_agency + if display_notice_in_citizens is not UNSET: + field_dict["displayNoticeInCitizens"] = display_notice_in_citizens + if display_notice_in_citizens_fee is not UNSET: + field_dict["displayNoticeInCitizensFee"] = display_notice_in_citizens_fee + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if inheritable is not UNSET: + field_dict["inheritable"] = inheritable + if is_include_name_in_notice is not UNSET: + field_dict["isIncludeNameInNotice"] = is_include_name_in_notice + if is_include_short_comments_in_notice is not UNSET: + field_dict["isIncludeShortCommentsInNotice"] = is_include_short_comments_in_notice + if long_comments is not UNSET: + field_dict["longComments"] = long_comments + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if public_display_message is not UNSET: + field_dict["publicDisplayMessage"] = public_display_message + if res_additional_information_plain_text is not UNSET: + field_dict["resAdditionalInformationPlainText"] = res_additional_information_plain_text + if resolution_action is not UNSET: + field_dict["resolutionAction"] = resolution_action + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if severity is not UNSET: + field_dict["severity"] = severity + if short_comments is not UNSET: + field_dict["shortComments"] = short_comments + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_type is not UNSET: + field_dict["statusType"] = status_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.condition_history_model_actionby_department import ConditionHistoryModelActionbyDepartment + from ..models.condition_history_model_actionby_user import ConditionHistoryModelActionbyUser + from ..models.condition_history_model_active_status import ConditionHistoryModelActiveStatus + from ..models.condition_history_model_appliedby_department import ConditionHistoryModelAppliedbyDepartment + from ..models.condition_history_model_appliedby_user import ConditionHistoryModelAppliedbyUser + from ..models.condition_history_model_group import ConditionHistoryModelGroup + from ..models.condition_history_model_inheritable import ConditionHistoryModelInheritable + from ..models.condition_history_model_priority import ConditionHistoryModelPriority + from ..models.condition_history_model_severity import ConditionHistoryModelSeverity + from ..models.condition_history_model_status import ConditionHistoryModelStatus + from ..models.condition_history_model_type import ConditionHistoryModelType + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, ConditionHistoryModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = ConditionHistoryModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, ConditionHistoryModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = ConditionHistoryModelActionbyUser.from_dict(_actionby_user) + + _active_status = d.pop("activeStatus", UNSET) + active_status: Union[Unset, ConditionHistoryModelActiveStatus] + if isinstance(_active_status, Unset): + active_status = UNSET + else: + active_status = ConditionHistoryModelActiveStatus.from_dict(_active_status) + + additional_information = d.pop("additionalInformation", UNSET) + + additional_information_plain_text = d.pop("additionalInformationPlainText", UNSET) + + _applied_date = d.pop("appliedDate", UNSET) + applied_date: Union[Unset, datetime.datetime] + if isinstance(_applied_date, Unset): + applied_date = UNSET + else: + applied_date = isoparse(_applied_date) + + _appliedby_department = d.pop("appliedbyDepartment", UNSET) + appliedby_department: Union[Unset, ConditionHistoryModelAppliedbyDepartment] + if isinstance(_appliedby_department, Unset): + appliedby_department = UNSET + else: + appliedby_department = ConditionHistoryModelAppliedbyDepartment.from_dict(_appliedby_department) + + _appliedby_user = d.pop("appliedbyUser", UNSET) + appliedby_user: Union[Unset, ConditionHistoryModelAppliedbyUser] + if isinstance(_appliedby_user, Unset): + appliedby_user = UNSET + else: + appliedby_user = ConditionHistoryModelAppliedbyUser.from_dict(_appliedby_user) + + disp_additional_information_plain_text = d.pop("dispAdditionalInformationPlainText", UNSET) + + display_notice_in_agency = d.pop("displayNoticeInAgency", UNSET) + + display_notice_in_citizens = d.pop("displayNoticeInCitizens", UNSET) + + display_notice_in_citizens_fee = d.pop("displayNoticeInCitizensFee", UNSET) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _group = d.pop("group", UNSET) + group: Union[Unset, ConditionHistoryModelGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = ConditionHistoryModelGroup.from_dict(_group) + + id = d.pop("id", UNSET) + + _inheritable = d.pop("inheritable", UNSET) + inheritable: Union[Unset, ConditionHistoryModelInheritable] + if isinstance(_inheritable, Unset): + inheritable = UNSET + else: + inheritable = ConditionHistoryModelInheritable.from_dict(_inheritable) + + is_include_name_in_notice = d.pop("isIncludeNameInNotice", UNSET) + + is_include_short_comments_in_notice = d.pop("isIncludeShortCommentsInNotice", UNSET) + + long_comments = d.pop("longComments", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, ConditionHistoryModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = ConditionHistoryModelPriority.from_dict(_priority) + + public_display_message = d.pop("publicDisplayMessage", UNSET) + + res_additional_information_plain_text = d.pop("resAdditionalInformationPlainText", UNSET) + + resolution_action = d.pop("resolutionAction", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, ConditionHistoryModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = ConditionHistoryModelSeverity.from_dict(_severity) + + short_comments = d.pop("shortComments", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, ConditionHistoryModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = ConditionHistoryModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + status_type = d.pop("statusType", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, ConditionHistoryModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ConditionHistoryModelType.from_dict(_type) + + condition_history_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + active_status=active_status, + additional_information=additional_information, + additional_information_plain_text=additional_information_plain_text, + applied_date=applied_date, + appliedby_department=appliedby_department, + appliedby_user=appliedby_user, + disp_additional_information_plain_text=disp_additional_information_plain_text, + display_notice_in_agency=display_notice_in_agency, + display_notice_in_citizens=display_notice_in_citizens, + display_notice_in_citizens_fee=display_notice_in_citizens_fee, + effective_date=effective_date, + expiration_date=expiration_date, + group=group, + id=id, + inheritable=inheritable, + is_include_name_in_notice=is_include_name_in_notice, + is_include_short_comments_in_notice=is_include_short_comments_in_notice, + long_comments=long_comments, + name=name, + priority=priority, + public_display_message=public_display_message, + res_additional_information_plain_text=res_additional_information_plain_text, + resolution_action=resolution_action, + service_provider_code=service_provider_code, + severity=severity, + short_comments=short_comments, + status=status, + status_date=status_date, + status_type=status_type, + type=type, + ) + + condition_history_model.additional_properties = d + return condition_history_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_actionby_department.py b/accelapy/accelapy/records_client/models/condition_history_model_actionby_department.py new file mode 100644 index 0000000..d5f9d51 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelActionbyDepartment") + + +@_attrs_define +class ConditionHistoryModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_actionby_department = cls( + text=text, + value=value, + ) + + condition_history_model_actionby_department.additional_properties = d + return condition_history_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_actionby_user.py b/accelapy/accelapy/records_client/models/condition_history_model_actionby_user.py new file mode 100644 index 0000000..b991a23 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelActionbyUser") + + +@_attrs_define +class ConditionHistoryModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_actionby_user = cls( + text=text, + value=value, + ) + + condition_history_model_actionby_user.additional_properties = d + return condition_history_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_active_status.py b/accelapy/accelapy/records_client/models/condition_history_model_active_status.py new file mode 100644 index 0000000..3b01575 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_active_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelActiveStatus") + + +@_attrs_define +class ConditionHistoryModelActiveStatus: + """Indicates whether or not the condition is active. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_active_status = cls( + text=text, + value=value, + ) + + condition_history_model_active_status.additional_properties = d + return condition_history_model_active_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_appliedby_department.py b/accelapy/accelapy/records_client/models/condition_history_model_appliedby_department.py new file mode 100644 index 0000000..3968d31 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_appliedby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelAppliedbyDepartment") + + +@_attrs_define +class ConditionHistoryModelAppliedbyDepartment: + """The department responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_appliedby_department = cls( + text=text, + value=value, + ) + + condition_history_model_appliedby_department.additional_properties = d + return condition_history_model_appliedby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_appliedby_user.py b/accelapy/accelapy/records_client/models/condition_history_model_appliedby_user.py new file mode 100644 index 0000000..019d62e --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_appliedby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelAppliedbyUser") + + +@_attrs_define +class ConditionHistoryModelAppliedbyUser: + """The staff member responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_appliedby_user = cls( + text=text, + value=value, + ) + + condition_history_model_appliedby_user.additional_properties = d + return condition_history_model_appliedby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_group.py b/accelapy/accelapy/records_client/models/condition_history_model_group.py new file mode 100644 index 0000000..1047a13 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelGroup") + + +@_attrs_define +class ConditionHistoryModelGroup: + """The condition group is an attribute of a condition that organizes condition types. Your agency defines these groups. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_group = cls( + text=text, + value=value, + ) + + condition_history_model_group.additional_properties = d + return condition_history_model_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_inheritable.py b/accelapy/accelapy/records_client/models/condition_history_model_inheritable.py new file mode 100644 index 0000000..e35c97f --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_inheritable.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelInheritable") + + +@_attrs_define +class ConditionHistoryModelInheritable: + """This defines whether or not Accela Automation checks for inheritable conditions when a user associates a child + record with a parent record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_inheritable = cls( + text=text, + value=value, + ) + + condition_history_model_inheritable.additional_properties = d + return condition_history_model_inheritable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_priority.py b/accelapy/accelapy/records_client/models/condition_history_model_priority.py new file mode 100644 index 0000000..d46735f --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelPriority") + + +@_attrs_define +class ConditionHistoryModelPriority: + """The priority level assigned to the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_priority = cls( + text=text, + value=value, + ) + + condition_history_model_priority.additional_properties = d + return condition_history_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_severity.py b/accelapy/accelapy/records_client/models/condition_history_model_severity.py new file mode 100644 index 0000000..ad017b8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelSeverity") + + +@_attrs_define +class ConditionHistoryModelSeverity: + """The severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_severity = cls( + text=text, + value=value, + ) + + condition_history_model_severity.additional_properties = d + return condition_history_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_status.py b/accelapy/accelapy/records_client/models/condition_history_model_status.py new file mode 100644 index 0000000..8916985 --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelStatus") + + +@_attrs_define +class ConditionHistoryModelStatus: + """The condition status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_status = cls( + text=text, + value=value, + ) + + condition_history_model_status.additional_properties = d + return condition_history_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/condition_history_model_type.py b/accelapy/accelapy/records_client/models/condition_history_model_type.py new file mode 100644 index 0000000..eba118b --- /dev/null +++ b/accelapy/accelapy/records_client/models/condition_history_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConditionHistoryModelType") + + +@_attrs_define +class ConditionHistoryModelType: + """The condition type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + condition_history_model_type = cls( + text=text, + value=value, + ) + + condition_history_model_type.additional_properties = d + return condition_history_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/contact_address.py b/accelapy/accelapy/records_client/models/contact_address.py new file mode 100644 index 0000000..e04e0f2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/contact_address.py @@ -0,0 +1,409 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="ContactAddress") + + +@_attrs_define +class ContactAddress: + """ + Attributes: + address_line_1 (Union[Unset, str]): + address_line_2 (Union[Unset, str]): + address_line_3 (Union[Unset, str]): + city (Union[Unset, str]): + country (Union[Unset, IdentifierModel]): + direction (Union[Unset, IdentifierModel]): + effective_date (Union[Unset, datetime.datetime]): + expiration_date (Union[Unset, datetime.datetime]): + fax (Union[Unset, str]): + fax_country_code (Union[Unset, str]): + house_alpha_end (Union[Unset, str]): + house_alpha_start (Union[Unset, str]): + id (Union[Unset, int]): + is_primary (Union[Unset, str]): + level_end (Union[Unset, str]): + level_prefix (Union[Unset, str]): + level_start (Union[Unset, str]): + phone (Union[Unset, str]): + phone_country_code (Union[Unset, str]): + postal_code (Union[Unset, str]): + recipient (Union[Unset, str]): + state (Union[Unset, IdentifierModel]): + status (Union[Unset, IdentifierModel]): + street_address (Union[Unset, str]): + street_end (Union[Unset, int]): + street_name (Union[Unset, str]): + street_prefix (Union[Unset, str]): + street_start (Union[Unset, int]): + street_suffix (Union[Unset, IdentifierModel]): + street_suffix_direction (Union[Unset, IdentifierModel]): + type (Union[Unset, IdentifierModel]): + unit_end (Union[Unset, str]): + unit_start (Union[Unset, str]): + unit_type (Union[Unset, IdentifierModel]): + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_line_3: Union[Unset, str] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "IdentifierModel"] = UNSET + direction: Union[Unset, "IdentifierModel"] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + fax: Union[Unset, str] = UNSET + fax_country_code: Union[Unset, str] = UNSET + house_alpha_end: Union[Unset, str] = UNSET + house_alpha_start: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + is_primary: Union[Unset, str] = UNSET + level_end: Union[Unset, str] = UNSET + level_prefix: Union[Unset, str] = UNSET + level_start: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + phone_country_code: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + recipient: Union[Unset, str] = UNSET + state: Union[Unset, "IdentifierModel"] = UNSET + status: Union[Unset, "IdentifierModel"] = UNSET + street_address: Union[Unset, str] = UNSET + street_end: Union[Unset, int] = UNSET + street_name: Union[Unset, str] = UNSET + street_prefix: Union[Unset, str] = UNSET + street_start: Union[Unset, int] = UNSET + street_suffix: Union[Unset, "IdentifierModel"] = UNSET + street_suffix_direction: Union[Unset, "IdentifierModel"] = UNSET + type: Union[Unset, "IdentifierModel"] = UNSET + unit_end: Union[Unset, str] = UNSET + unit_start: Union[Unset, str] = UNSET + unit_type: Union[Unset, "IdentifierModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_line_3 = self.address_line_3 + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.direction, Unset): + direction = self.direction.to_dict() + + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + fax = self.fax + fax_country_code = self.fax_country_code + house_alpha_end = self.house_alpha_end + house_alpha_start = self.house_alpha_start + id = self.id + is_primary = self.is_primary + level_end = self.level_end + level_prefix = self.level_prefix + level_start = self.level_start + phone = self.phone + phone_country_code = self.phone_country_code + postal_code = self.postal_code + recipient = self.recipient + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + street_address = self.street_address + street_end = self.street_end + street_name = self.street_name + street_prefix = self.street_prefix + street_start = self.street_start + street_suffix: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix, Unset): + street_suffix = self.street_suffix.to_dict() + + street_suffix_direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix_direction, Unset): + street_suffix_direction = self.street_suffix_direction.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_end = self.unit_end + unit_start = self.unit_start + unit_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_type, Unset): + unit_type = self.unit_type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_line_3 is not UNSET: + field_dict["addressLine3"] = address_line_3 + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if direction is not UNSET: + field_dict["direction"] = direction + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if fax is not UNSET: + field_dict["fax"] = fax + if fax_country_code is not UNSET: + field_dict["faxCountryCode"] = fax_country_code + if house_alpha_end is not UNSET: + field_dict["houseAlphaEnd"] = house_alpha_end + if house_alpha_start is not UNSET: + field_dict["houseAlphaStart"] = house_alpha_start + if id is not UNSET: + field_dict["id"] = id + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if level_end is not UNSET: + field_dict["levelEnd"] = level_end + if level_prefix is not UNSET: + field_dict["levelPrefix"] = level_prefix + if level_start is not UNSET: + field_dict["levelStart"] = level_start + if phone is not UNSET: + field_dict["phone"] = phone + if phone_country_code is not UNSET: + field_dict["phoneCountryCode"] = phone_country_code + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if recipient is not UNSET: + field_dict["recipient"] = recipient + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if street_address is not UNSET: + field_dict["streetAddress"] = street_address + if street_end is not UNSET: + field_dict["streetEnd"] = street_end + if street_name is not UNSET: + field_dict["streetName"] = street_name + if street_prefix is not UNSET: + field_dict["streetPrefix"] = street_prefix + if street_start is not UNSET: + field_dict["streetStart"] = street_start + if street_suffix is not UNSET: + field_dict["streetSuffix"] = street_suffix + if street_suffix_direction is not UNSET: + field_dict["streetSuffixDirection"] = street_suffix_direction + if type is not UNSET: + field_dict["type"] = type + if unit_end is not UNSET: + field_dict["unitEnd"] = unit_end + if unit_start is not UNSET: + field_dict["unitStart"] = unit_start + if unit_type is not UNSET: + field_dict["unitType"] = unit_type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + address_line_3 = d.pop("addressLine3", UNSET) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, IdentifierModel] + if isinstance(_country, Unset): + country = UNSET + else: + country = IdentifierModel.from_dict(_country) + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, IdentifierModel] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = IdentifierModel.from_dict(_direction) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + fax = d.pop("fax", UNSET) + + fax_country_code = d.pop("faxCountryCode", UNSET) + + house_alpha_end = d.pop("houseAlphaEnd", UNSET) + + house_alpha_start = d.pop("houseAlphaStart", UNSET) + + id = d.pop("id", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + level_end = d.pop("levelEnd", UNSET) + + level_prefix = d.pop("levelPrefix", UNSET) + + level_start = d.pop("levelStart", UNSET) + + phone = d.pop("phone", UNSET) + + phone_country_code = d.pop("phoneCountryCode", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + recipient = d.pop("recipient", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, IdentifierModel] + if isinstance(_state, Unset): + state = UNSET + else: + state = IdentifierModel.from_dict(_state) + + _status = d.pop("status", UNSET) + status: Union[Unset, IdentifierModel] + if isinstance(_status, Unset): + status = UNSET + else: + status = IdentifierModel.from_dict(_status) + + street_address = d.pop("streetAddress", UNSET) + + street_end = d.pop("streetEnd", UNSET) + + street_name = d.pop("streetName", UNSET) + + street_prefix = d.pop("streetPrefix", UNSET) + + street_start = d.pop("streetStart", UNSET) + + _street_suffix = d.pop("streetSuffix", UNSET) + street_suffix: Union[Unset, IdentifierModel] + if isinstance(_street_suffix, Unset): + street_suffix = UNSET + else: + street_suffix = IdentifierModel.from_dict(_street_suffix) + + _street_suffix_direction = d.pop("streetSuffixDirection", UNSET) + street_suffix_direction: Union[Unset, IdentifierModel] + if isinstance(_street_suffix_direction, Unset): + street_suffix_direction = UNSET + else: + street_suffix_direction = IdentifierModel.from_dict(_street_suffix_direction) + + _type = d.pop("type", UNSET) + type: Union[Unset, IdentifierModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = IdentifierModel.from_dict(_type) + + unit_end = d.pop("unitEnd", UNSET) + + unit_start = d.pop("unitStart", UNSET) + + _unit_type = d.pop("unitType", UNSET) + unit_type: Union[Unset, IdentifierModel] + if isinstance(_unit_type, Unset): + unit_type = UNSET + else: + unit_type = IdentifierModel.from_dict(_unit_type) + + contact_address = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_line_3=address_line_3, + city=city, + country=country, + direction=direction, + effective_date=effective_date, + expiration_date=expiration_date, + fax=fax, + fax_country_code=fax_country_code, + house_alpha_end=house_alpha_end, + house_alpha_start=house_alpha_start, + id=id, + is_primary=is_primary, + level_end=level_end, + level_prefix=level_prefix, + level_start=level_start, + phone=phone, + phone_country_code=phone_country_code, + postal_code=postal_code, + recipient=recipient, + state=state, + status=status, + street_address=street_address, + street_end=street_end, + street_name=street_name, + street_prefix=street_prefix, + street_start=street_start, + street_suffix=street_suffix, + street_suffix_direction=street_suffix_direction, + type=type, + unit_end=unit_end, + unit_start=unit_start, + unit_type=unit_type, + ) + + contact_address.additional_properties = d + return contact_address + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/contact_type_model.py b/accelapy/accelapy/records_client/models/contact_type_model.py new file mode 100644 index 0000000..4b79518 --- /dev/null +++ b/accelapy/accelapy/records_client/models/contact_type_model.py @@ -0,0 +1,74 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContactTypeModel") + + +@_attrs_define +class ContactTypeModel: + """ + Attributes: + max_occurance (Union[Unset, int]): The maximum number of times a contact type is used. + min_occurance (Union[Unset, int]): The minimum number of times a contact type is used. + value (Union[Unset, str]): The contact type value. + """ + + max_occurance: Union[Unset, int] = UNSET + min_occurance: Union[Unset, int] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + max_occurance = self.max_occurance + min_occurance = self.min_occurance + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if max_occurance is not UNSET: + field_dict["maxOccurance"] = max_occurance + if min_occurance is not UNSET: + field_dict["minOccurance"] = min_occurance + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + max_occurance = d.pop("maxOccurance", UNSET) + + min_occurance = d.pop("minOccurance", UNSET) + + value = d.pop("value", UNSET) + + contact_type_model = cls( + max_occurance=max_occurance, + min_occurance=min_occurance, + value=value, + ) + + contact_type_model.additional_properties = d + return contact_type_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_model.py b/accelapy/accelapy/records_client/models/costing_model.py new file mode 100644 index 0000000..4604620 --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model.py @@ -0,0 +1,317 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.costing_model_distribute_flag import CostingModelDistributeFlag +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.costing_model_cost_factor import CostingModelCostFactor + from ..models.costing_model_status import CostingModelStatus + from ..models.costing_model_type import CostingModelType + from ..models.costing_model_unit_of_measure import CostingModelUnitOfMeasure + from ..models.costing_quantity_model import CostingQuantityModel + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="CostingModel") + + +@_attrs_define +class CostingModel: + """ + Attributes: + comments (Union[Unset, str]): Comments about the cost. + cost_account (Union[Unset, str]): The cost account name. + cost_date (Union[Unset, datetime.datetime]): The date when the cost applied. + cost_factor (Union[Unset, CostingModelCostFactor]): The cost factor. + cost_item (Union[Unset, str]): The cost item name. + disp_costing_cost_item (Union[Unset, str]): The cost item display name. + distribute_flag (Union[Unset, CostingModelDistributeFlag]): Indicates whether or not costing is distributed. + end_time (Union[Unset, str]): The end time associated to the cost item. + fixed_rate (Union[Unset, float]): The fixed rate associated to the cost item. + id (Union[Unset, int]): The cost item system id assigned by the Civic Platform server. + quantity (Union[Unset, float]): The cost item quantity. + quantity_detail (Union[Unset, str]): Details about the cost item quantity. + quantity_detail_list (Union[Unset, CostingQuantityModel]): + record_id (Union[Unset, RecordIdModel]): + related_asgn_nbr (Union[Unset, int]): Related cost item. + start_time (Union[Unset, str]): The start time associated to the cost item. + status (Union[Unset, CostingModelStatus]): The cost item status. + total_cost (Union[Unset, float]): The total cost. + type (Union[Unset, CostingModelType]): The cost item type. + unit_of_measure (Union[Unset, CostingModelUnitOfMeasure]): The cost item's unit of measure. + unit_rate (Union[Unset, float]): The cost unit rate. + work_order_task_code (Union[Unset, str]): The work order task code associated to the cost item. + work_order_task_code_index (Union[Unset, int]): The order of the work order task. + """ + + comments: Union[Unset, str] = UNSET + cost_account: Union[Unset, str] = UNSET + cost_date: Union[Unset, datetime.datetime] = UNSET + cost_factor: Union[Unset, "CostingModelCostFactor"] = UNSET + cost_item: Union[Unset, str] = UNSET + disp_costing_cost_item: Union[Unset, str] = UNSET + distribute_flag: Union[Unset, CostingModelDistributeFlag] = UNSET + end_time: Union[Unset, str] = UNSET + fixed_rate: Union[Unset, float] = UNSET + id: Union[Unset, int] = UNSET + quantity: Union[Unset, float] = UNSET + quantity_detail: Union[Unset, str] = UNSET + quantity_detail_list: Union[Unset, "CostingQuantityModel"] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + related_asgn_nbr: Union[Unset, int] = UNSET + start_time: Union[Unset, str] = UNSET + status: Union[Unset, "CostingModelStatus"] = UNSET + total_cost: Union[Unset, float] = UNSET + type: Union[Unset, "CostingModelType"] = UNSET + unit_of_measure: Union[Unset, "CostingModelUnitOfMeasure"] = UNSET + unit_rate: Union[Unset, float] = UNSET + work_order_task_code: Union[Unset, str] = UNSET + work_order_task_code_index: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + comments = self.comments + cost_account = self.cost_account + cost_date: Union[Unset, str] = UNSET + if not isinstance(self.cost_date, Unset): + cost_date = self.cost_date.isoformat() + + cost_factor: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.cost_factor, Unset): + cost_factor = self.cost_factor.to_dict() + + cost_item = self.cost_item + disp_costing_cost_item = self.disp_costing_cost_item + distribute_flag: Union[Unset, str] = UNSET + if not isinstance(self.distribute_flag, Unset): + distribute_flag = self.distribute_flag.value + + end_time = self.end_time + fixed_rate = self.fixed_rate + id = self.id + quantity = self.quantity + quantity_detail = self.quantity_detail + quantity_detail_list: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.quantity_detail_list, Unset): + quantity_detail_list = self.quantity_detail_list.to_dict() + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + related_asgn_nbr = self.related_asgn_nbr + start_time = self.start_time + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + total_cost = self.total_cost + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_of_measure: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_of_measure, Unset): + unit_of_measure = self.unit_of_measure.to_dict() + + unit_rate = self.unit_rate + work_order_task_code = self.work_order_task_code + work_order_task_code_index = self.work_order_task_code_index + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comments is not UNSET: + field_dict["comments"] = comments + if cost_account is not UNSET: + field_dict["costAccount"] = cost_account + if cost_date is not UNSET: + field_dict["costDate"] = cost_date + if cost_factor is not UNSET: + field_dict["costFactor"] = cost_factor + if cost_item is not UNSET: + field_dict["costItem"] = cost_item + if disp_costing_cost_item is not UNSET: + field_dict["dispCostingCostItem"] = disp_costing_cost_item + if distribute_flag is not UNSET: + field_dict["distributeFlag"] = distribute_flag + if end_time is not UNSET: + field_dict["endTime"] = end_time + if fixed_rate is not UNSET: + field_dict["fixedRate"] = fixed_rate + if id is not UNSET: + field_dict["id"] = id + if quantity is not UNSET: + field_dict["quantity"] = quantity + if quantity_detail is not UNSET: + field_dict["quantityDetail"] = quantity_detail + if quantity_detail_list is not UNSET: + field_dict["quantityDetailList"] = quantity_detail_list + if record_id is not UNSET: + field_dict["recordId"] = record_id + if related_asgn_nbr is not UNSET: + field_dict["relatedAsgnNbr"] = related_asgn_nbr + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if total_cost is not UNSET: + field_dict["totalCost"] = total_cost + if type is not UNSET: + field_dict["type"] = type + if unit_of_measure is not UNSET: + field_dict["unitOfMeasure"] = unit_of_measure + if unit_rate is not UNSET: + field_dict["unitRate"] = unit_rate + if work_order_task_code is not UNSET: + field_dict["workOrderTaskCode"] = work_order_task_code + if work_order_task_code_index is not UNSET: + field_dict["workOrderTaskCodeIndex"] = work_order_task_code_index + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.costing_model_cost_factor import CostingModelCostFactor + from ..models.costing_model_status import CostingModelStatus + from ..models.costing_model_type import CostingModelType + from ..models.costing_model_unit_of_measure import CostingModelUnitOfMeasure + from ..models.costing_quantity_model import CostingQuantityModel + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + comments = d.pop("comments", UNSET) + + cost_account = d.pop("costAccount", UNSET) + + _cost_date = d.pop("costDate", UNSET) + cost_date: Union[Unset, datetime.datetime] + if isinstance(_cost_date, Unset): + cost_date = UNSET + else: + cost_date = isoparse(_cost_date) + + _cost_factor = d.pop("costFactor", UNSET) + cost_factor: Union[Unset, CostingModelCostFactor] + if isinstance(_cost_factor, Unset): + cost_factor = UNSET + else: + cost_factor = CostingModelCostFactor.from_dict(_cost_factor) + + cost_item = d.pop("costItem", UNSET) + + disp_costing_cost_item = d.pop("dispCostingCostItem", UNSET) + + _distribute_flag = d.pop("distributeFlag", UNSET) + distribute_flag: Union[Unset, CostingModelDistributeFlag] + if isinstance(_distribute_flag, Unset): + distribute_flag = UNSET + else: + distribute_flag = CostingModelDistributeFlag(_distribute_flag) + + end_time = d.pop("endTime", UNSET) + + fixed_rate = d.pop("fixedRate", UNSET) + + id = d.pop("id", UNSET) + + quantity = d.pop("quantity", UNSET) + + quantity_detail = d.pop("quantityDetail", UNSET) + + _quantity_detail_list = d.pop("quantityDetailList", UNSET) + quantity_detail_list: Union[Unset, CostingQuantityModel] + if isinstance(_quantity_detail_list, Unset): + quantity_detail_list = UNSET + else: + quantity_detail_list = CostingQuantityModel.from_dict(_quantity_detail_list) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + related_asgn_nbr = d.pop("relatedAsgnNbr", UNSET) + + start_time = d.pop("startTime", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, CostingModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = CostingModelStatus.from_dict(_status) + + total_cost = d.pop("totalCost", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, CostingModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = CostingModelType.from_dict(_type) + + _unit_of_measure = d.pop("unitOfMeasure", UNSET) + unit_of_measure: Union[Unset, CostingModelUnitOfMeasure] + if isinstance(_unit_of_measure, Unset): + unit_of_measure = UNSET + else: + unit_of_measure = CostingModelUnitOfMeasure.from_dict(_unit_of_measure) + + unit_rate = d.pop("unitRate", UNSET) + + work_order_task_code = d.pop("workOrderTaskCode", UNSET) + + work_order_task_code_index = d.pop("workOrderTaskCodeIndex", UNSET) + + costing_model = cls( + comments=comments, + cost_account=cost_account, + cost_date=cost_date, + cost_factor=cost_factor, + cost_item=cost_item, + disp_costing_cost_item=disp_costing_cost_item, + distribute_flag=distribute_flag, + end_time=end_time, + fixed_rate=fixed_rate, + id=id, + quantity=quantity, + quantity_detail=quantity_detail, + quantity_detail_list=quantity_detail_list, + record_id=record_id, + related_asgn_nbr=related_asgn_nbr, + start_time=start_time, + status=status, + total_cost=total_cost, + type=type, + unit_of_measure=unit_of_measure, + unit_rate=unit_rate, + work_order_task_code=work_order_task_code, + work_order_task_code_index=work_order_task_code_index, + ) + + costing_model.additional_properties = d + return costing_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_model_cost_factor.py b/accelapy/accelapy/records_client/models/costing_model_cost_factor.py new file mode 100644 index 0000000..1cc4786 --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model_cost_factor.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CostingModelCostFactor") + + +@_attrs_define +class CostingModelCostFactor: + """The cost factor. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + costing_model_cost_factor = cls( + text=text, + value=value, + ) + + costing_model_cost_factor.additional_properties = d + return costing_model_cost_factor + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_model_distribute_flag.py b/accelapy/accelapy/records_client/models/costing_model_distribute_flag.py new file mode 100644 index 0000000..e7684f4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model_distribute_flag.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CostingModelDistributeFlag(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/costing_model_status.py b/accelapy/accelapy/records_client/models/costing_model_status.py new file mode 100644 index 0000000..b473579 --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CostingModelStatus") + + +@_attrs_define +class CostingModelStatus: + """The cost item status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + costing_model_status = cls( + text=text, + value=value, + ) + + costing_model_status.additional_properties = d + return costing_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_model_type.py b/accelapy/accelapy/records_client/models/costing_model_type.py new file mode 100644 index 0000000..0ab2e0c --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CostingModelType") + + +@_attrs_define +class CostingModelType: + """The cost item type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + costing_model_type = cls( + text=text, + value=value, + ) + + costing_model_type.additional_properties = d + return costing_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_model_unit_of_measure.py b/accelapy/accelapy/records_client/models/costing_model_unit_of_measure.py new file mode 100644 index 0000000..5c218cd --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_model_unit_of_measure.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CostingModelUnitOfMeasure") + + +@_attrs_define +class CostingModelUnitOfMeasure: + """The cost item's unit of measure. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + costing_model_unit_of_measure = cls( + text=text, + value=value, + ) + + costing_model_unit_of_measure.additional_properties = d + return costing_model_unit_of_measure + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/costing_quantity_model.py b/accelapy/accelapy/records_client/models/costing_quantity_model.py new file mode 100644 index 0000000..301b6f0 --- /dev/null +++ b/accelapy/accelapy/records_client/models/costing_quantity_model.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CostingQuantityModel") + + +@_attrs_define +class CostingQuantityModel: + """ + Attributes: + factor (Union[Unset, float]): The cost factor. + minutes (Union[Unset, float]): The number of minutes associated to the cost. + """ + + factor: Union[Unset, float] = UNSET + minutes: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + factor = self.factor + minutes = self.minutes + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if factor is not UNSET: + field_dict["factor"] = factor + if minutes is not UNSET: + field_dict["minutes"] = minutes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + factor = d.pop("factor", UNSET) + + minutes = d.pop("minutes", UNSET) + + costing_quantity_model = cls( + factor=factor, + minutes=minutes, + ) + + costing_quantity_model.additional_properties = d + return costing_quantity_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/custom_attribute_model.py b/accelapy/accelapy/records_client/models/custom_attribute_model.py new file mode 100644 index 0000000..757b74a --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_attribute_model.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CustomAttributeModel") + + +@_attrs_define +class CustomAttributeModel: + """Contains a custom form consisting of the custom form id and custom field name and value pairs. For example in JSON, + "My Custom Field": "My Custom Value". The custom field name and its data type are defined in Civic Platform custom + forms or custom tables:
**For a Text field**, the maximum length is 256.
**For a Number field**, any + numeric form is allowed, including negative numbers.
**For a Date field**, the format is MM/dd/yyyy. +
**For a Time field**, the format is hh:mm.
**For a TextArea field**, the maximum length is 4000 + characters, and allows line return characters.
**For a DropdownList field**, the dropdown list values are in + the options[] array.
**For a CheckBox field**, the (case-sensitive) valid values are "UNCHECKED" and + "CHECKED".
**For a Radio(Y/N) field**, the (case-sensitive) valid values are "Yes" and "No". + + Attributes: + id (Union[Unset, str]): The custom form id. + a_custom_field_name (Union[Unset, str]): The name of a custom field. + a_custom_field_value (Union[Unset, str]): The value of a custom field. + """ + + id: Union[Unset, str] = UNSET + a_custom_field_name: Union[Unset, str] = UNSET + a_custom_field_value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + a_custom_field_name = self.a_custom_field_name + a_custom_field_value = self.a_custom_field_value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if a_custom_field_name is not UNSET: + field_dict[""] = a_custom_field_name + if a_custom_field_value is not UNSET: + field_dict[""] = a_custom_field_value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + a_custom_field_name = d.pop("", UNSET) + + a_custom_field_value = d.pop("", UNSET) + + custom_attribute_model = cls( + id=id, + a_custom_field_name=a_custom_field_name, + a_custom_field_value=a_custom_field_value, + ) + + custom_attribute_model.additional_properties = d + return custom_attribute_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/custom_form_field.py b/accelapy/accelapy/records_client/models/custom_form_field.py new file mode 100644 index 0000000..36e877d --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_field.py @@ -0,0 +1,176 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.custom_form_field_is_readonly import CustomFormFieldIsReadonly +from ..models.custom_form_field_is_required import CustomFormFieldIsRequired +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.asi_table_drill import ASITableDrill + from ..models.custom_form_field_options_item import CustomFormFieldOptionsItem + + +T = TypeVar("T", bound="CustomFormField") + + +@_attrs_define +class CustomFormField: + """ + Attributes: + display_order (Union[Unset, int]): + drill_down (Union[Unset, ASITableDrill]): + field_type (Union[Unset, str]): The custom field data type. + id (Union[Unset, str]): The custom field system id assigned by the Civic Platform server. + is_readonly (Union[Unset, CustomFormFieldIsReadonly]): Indicates whether or not the custom field is read-only. + is_required (Union[Unset, CustomFormFieldIsRequired]): Indicates whether or not the custom field is required. + max_length (Union[Unset, int]): The custom field length + options (Union[Unset, List['CustomFormFieldOptionsItem']]): + text (Union[Unset, str]): The custom field localized text. + value (Union[Unset, str]): The custom field stored value. + """ + + display_order: Union[Unset, int] = UNSET + drill_down: Union[Unset, "ASITableDrill"] = UNSET + field_type: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + is_readonly: Union[Unset, CustomFormFieldIsReadonly] = UNSET + is_required: Union[Unset, CustomFormFieldIsRequired] = UNSET + max_length: Union[Unset, int] = UNSET + options: Union[Unset, List["CustomFormFieldOptionsItem"]] = UNSET + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + display_order = self.display_order + drill_down: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.drill_down, Unset): + drill_down = self.drill_down.to_dict() + + field_type = self.field_type + id = self.id + is_readonly: Union[Unset, str] = UNSET + if not isinstance(self.is_readonly, Unset): + is_readonly = self.is_readonly.value + + is_required: Union[Unset, str] = UNSET + if not isinstance(self.is_required, Unset): + is_required = self.is_required.value + + max_length = self.max_length + options: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.options, Unset): + options = [] + for options_item_data in self.options: + options_item = options_item_data.to_dict() + + options.append(options_item) + + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if drill_down is not UNSET: + field_dict["drillDown"] = drill_down + if field_type is not UNSET: + field_dict["fieldType"] = field_type + if id is not UNSET: + field_dict["id"] = id + if is_readonly is not UNSET: + field_dict["isReadonly"] = is_readonly + if is_required is not UNSET: + field_dict["isRequired"] = is_required + if max_length is not UNSET: + field_dict["maxLength"] = max_length + if options is not UNSET: + field_dict["options"] = options + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.asi_table_drill import ASITableDrill + from ..models.custom_form_field_options_item import CustomFormFieldOptionsItem + + d = src_dict.copy() + display_order = d.pop("displayOrder", UNSET) + + _drill_down = d.pop("drillDown", UNSET) + drill_down: Union[Unset, ASITableDrill] + if isinstance(_drill_down, Unset): + drill_down = UNSET + else: + drill_down = ASITableDrill.from_dict(_drill_down) + + field_type = d.pop("fieldType", UNSET) + + id = d.pop("id", UNSET) + + _is_readonly = d.pop("isReadonly", UNSET) + is_readonly: Union[Unset, CustomFormFieldIsReadonly] + if isinstance(_is_readonly, Unset): + is_readonly = UNSET + else: + is_readonly = CustomFormFieldIsReadonly(_is_readonly) + + _is_required = d.pop("isRequired", UNSET) + is_required: Union[Unset, CustomFormFieldIsRequired] + if isinstance(_is_required, Unset): + is_required = UNSET + else: + is_required = CustomFormFieldIsRequired(_is_required) + + max_length = d.pop("maxLength", UNSET) + + options = [] + _options = d.pop("options", UNSET) + for options_item_data in _options or []: + options_item = CustomFormFieldOptionsItem.from_dict(options_item_data) + + options.append(options_item) + + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + custom_form_field = cls( + display_order=display_order, + drill_down=drill_down, + field_type=field_type, + id=id, + is_readonly=is_readonly, + is_required=is_required, + max_length=max_length, + options=options, + text=text, + value=value, + ) + + custom_form_field.additional_properties = d + return custom_form_field + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/custom_form_field_is_readonly.py b/accelapy/accelapy/records_client/models/custom_form_field_is_readonly.py new file mode 100644 index 0000000..b919598 --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_field_is_readonly.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CustomFormFieldIsReadonly(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/custom_form_field_is_required.py b/accelapy/accelapy/records_client/models/custom_form_field_is_required.py new file mode 100644 index 0000000..4767686 --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_field_is_required.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class CustomFormFieldIsRequired(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/custom_form_field_options_item.py b/accelapy/accelapy/records_client/models/custom_form_field_options_item.py new file mode 100644 index 0000000..183e819 --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_field_options_item.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CustomFormFieldOptionsItem") + + +@_attrs_define +class CustomFormFieldOptionsItem: + """A dropdown option value. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + custom_form_field_options_item = cls( + text=text, + value=value, + ) + + custom_form_field_options_item.additional_properties = d + return custom_form_field_options_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/custom_form_metadata_model.py b/accelapy/accelapy/records_client/models/custom_form_metadata_model.py new file mode 100644 index 0000000..2b55ce8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_metadata_model.py @@ -0,0 +1,101 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_form_field import CustomFormField + + +T = TypeVar("T", bound="CustomFormMetadataModel") + + +@_attrs_define +class CustomFormMetadataModel: + """Contains the metadata for a custom table. + + Attributes: + display_order (Union[Unset, int]): The custom table's display order. + fields (Union[Unset, List['CustomFormField']]): + id (Union[Unset, str]): The custom table id. + text (Union[Unset, str]): The custom table name. + """ + + display_order: Union[Unset, int] = UNSET + fields: Union[Unset, List["CustomFormField"]] = UNSET + id: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + display_order = self.display_order + fields: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + + fields.append(fields_item) + + id = self.id + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if fields is not UNSET: + field_dict["fields"] = fields + if id is not UNSET: + field_dict["id"] = id + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_form_field import CustomFormField + + d = src_dict.copy() + display_order = d.pop("displayOrder", UNSET) + + fields = [] + _fields = d.pop("fields", UNSET) + for fields_item_data in _fields or []: + fields_item = CustomFormField.from_dict(fields_item_data) + + fields.append(fields_item) + + id = d.pop("id", UNSET) + + text = d.pop("text", UNSET) + + custom_form_metadata_model = cls( + display_order=display_order, + fields=fields, + id=id, + text=text, + ) + + custom_form_metadata_model.additional_properties = d + return custom_form_metadata_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/custom_form_subgroup_model.py b/accelapy/accelapy/records_client/models/custom_form_subgroup_model.py new file mode 100644 index 0000000..d412307 --- /dev/null +++ b/accelapy/accelapy/records_client/models/custom_form_subgroup_model.py @@ -0,0 +1,100 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_form_field import CustomFormField + + +T = TypeVar("T", bound="CustomFormSubgroupModel") + + +@_attrs_define +class CustomFormSubgroupModel: + """ + Attributes: + display_order (Union[Unset, int]): The custom form subgroup display order. + fields (Union[Unset, List['CustomFormField']]): + id (Union[Unset, str]): The custom form subgroup system id assigned by the Civic Platform server. + text (Union[Unset, str]): The custom form subgroup name. + """ + + display_order: Union[Unset, int] = UNSET + fields: Union[Unset, List["CustomFormField"]] = UNSET + id: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + display_order = self.display_order + fields: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + + fields.append(fields_item) + + id = self.id + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if fields is not UNSET: + field_dict["fields"] = fields + if id is not UNSET: + field_dict["id"] = id + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_form_field import CustomFormField + + d = src_dict.copy() + display_order = d.pop("displayOrder", UNSET) + + fields = [] + _fields = d.pop("fields", UNSET) + for fields_item_data in _fields or []: + fields_item = CustomFormField.from_dict(fields_item_data) + + fields.append(fields_item) + + id = d.pop("id", UNSET) + + text = d.pop("text", UNSET) + + custom_form_subgroup_model = cls( + display_order=display_order, + fields=fields, + id=id, + text=text, + ) + + custom_form_subgroup_model.additional_properties = d + return custom_form_subgroup_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/department_model.py b/accelapy/accelapy/records_client/models/department_model.py new file mode 100644 index 0000000..38de132 --- /dev/null +++ b/accelapy/accelapy/records_client/models/department_model.py @@ -0,0 +1,132 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DepartmentModel") + + +@_attrs_define +class DepartmentModel: + """ + Attributes: + agency (Union[Unset, str]): The department agency + bureau (Union[Unset, str]): The name of the bureau, which is an organization level within an agency. + division (Union[Unset, str]): The name of the division, which is an organization level within a bureau. + group (Union[Unset, str]): The department group. + id (Union[Unset, str]): The department system id assigned by the Civic Platform server. + office (Union[Unset, str]): An organization level within a group. An office is the final level within an + organization structure. Agency->Bureau->Division->Section->Group->Office. + section (Union[Unset, str]): A piece of a township measuring 640 acres, one square mile, numbered with reference + to the base line and meridian line. + service_provider_code (Union[Unset, str]): The unique agency identifier. + text (Union[Unset, str]): The localized display text. + value (Union[Unset, str]): The value for the specified parameter. + """ + + agency: Union[Unset, str] = UNSET + bureau: Union[Unset, str] = UNSET + division: Union[Unset, str] = UNSET + group: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + office: Union[Unset, str] = UNSET + section: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + agency = self.agency + bureau = self.bureau + division = self.division + group = self.group + id = self.id + office = self.office + section = self.section + service_provider_code = self.service_provider_code + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if agency is not UNSET: + field_dict["agency"] = agency + if bureau is not UNSET: + field_dict["bureau"] = bureau + if division is not UNSET: + field_dict["division"] = division + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if office is not UNSET: + field_dict["office"] = office + if section is not UNSET: + field_dict["section"] = section + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + agency = d.pop("agency", UNSET) + + bureau = d.pop("bureau", UNSET) + + division = d.pop("division", UNSET) + + group = d.pop("group", UNSET) + + id = d.pop("id", UNSET) + + office = d.pop("office", UNSET) + + section = d.pop("section", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + department_model = cls( + agency=agency, + bureau=bureau, + division=division, + group=group, + id=id, + office=office, + section=section, + service_provider_code=service_provider_code, + text=text, + value=value, + ) + + department_model.additional_properties = d + return department_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/describe_record_model.py b/accelapy/accelapy/records_client/models/describe_record_model.py new file mode 100644 index 0000000..c477edd --- /dev/null +++ b/accelapy/accelapy/records_client/models/describe_record_model.py @@ -0,0 +1,97 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.element_model import ElementModel + from ..models.field_model import FieldModel + + +T = TypeVar("T", bound="DescribeRecordModel") + + +@_attrs_define +class DescribeRecordModel: + """ + Attributes: + elements (Union[Unset, List['ElementModel']]): + fields (Union[Unset, List['FieldModel']]): + """ + + elements: Union[Unset, List["ElementModel"]] = UNSET + fields: Union[Unset, List["FieldModel"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + elements: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.elements, Unset): + elements = [] + for elements_item_data in self.elements: + elements_item = elements_item_data.to_dict() + + elements.append(elements_item) + + fields: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.fields, Unset): + fields = [] + for fields_item_data in self.fields: + fields_item = fields_item_data.to_dict() + + fields.append(fields_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if elements is not UNSET: + field_dict["elements"] = elements + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.element_model import ElementModel + from ..models.field_model import FieldModel + + d = src_dict.copy() + elements = [] + _elements = d.pop("elements", UNSET) + for elements_item_data in _elements or []: + elements_item = ElementModel.from_dict(elements_item_data) + + elements.append(elements_item) + + fields = [] + _fields = d.pop("fields", UNSET) + for fields_item_data in _fields or []: + fields_item = FieldModel.from_dict(fields_item_data) + + fields.append(fields_item) + + describe_record_model = cls( + elements=elements, + fields=fields, + ) + + describe_record_model.additional_properties = d + return describe_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_model.py b/accelapy/accelapy/records_client/models/document_model.py new file mode 100644 index 0000000..09833f5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_model.py @@ -0,0 +1,314 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.document_model_category import DocumentModelCategory + from ..models.document_model_group import DocumentModelGroup + from ..models.document_model_status import DocumentModelStatus + from ..models.user_role_privilege_model import UserRolePrivilegeModel + + +T = TypeVar("T", bound="DocumentModel") + + +@_attrs_define +class DocumentModel: + """ + Attributes: + category (Union[Unset, DocumentModelCategory]): The document category. The list of category options varies + depending on the document group. + deletable (Union[Unset, UserRolePrivilegeModel]): + department (Union[Unset, str]): The name of the department the document belongs to. + description (Union[Unset, str]): The document description. + downloadable (Union[Unset, UserRolePrivilegeModel]): + entity_id (Union[Unset, str]): The unique ID of the entity or record. + entity_type (Union[Unset, str]): The type of entity. + file_name (Union[Unset, str]): The name of the file as it displays in the source location. + group (Union[Unset, DocumentModelGroup]): The document group. + id (Union[Unset, int]): The document id. + modified_by (Union[Unset, str]): The user account that last modified the document. + modified_date (Union[Unset, datetime.datetime]): The date the document was last modified. + service_provider_code (Union[Unset, str]): The unique agency identifier. + size (Union[Unset, float]): The file size of the document. + source (Union[Unset, str]): The name for your agency's electronic document management system. + status (Union[Unset, DocumentModelStatus]): The documet status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + title_viewable (Union[Unset, UserRolePrivilegeModel]): + type (Union[Unset, str]): The document type. + uploaded_by (Union[Unset, str]): The user who uploaded the document to the record. + uploaded_date (Union[Unset, datetime.datetime]): The date when the document was uploaded. + virtual_folders (Union[Unset, str]): This is the virtual folder for storing the attachment. With virtual folders + you can organize uploaded attachments in groups + """ + + category: Union[Unset, "DocumentModelCategory"] = UNSET + deletable: Union[Unset, "UserRolePrivilegeModel"] = UNSET + department: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + downloadable: Union[Unset, "UserRolePrivilegeModel"] = UNSET + entity_id: Union[Unset, str] = UNSET + entity_type: Union[Unset, str] = UNSET + file_name: Union[Unset, str] = UNSET + group: Union[Unset, "DocumentModelGroup"] = UNSET + id: Union[Unset, int] = UNSET + modified_by: Union[Unset, str] = UNSET + modified_date: Union[Unset, datetime.datetime] = UNSET + service_provider_code: Union[Unset, str] = UNSET + size: Union[Unset, float] = UNSET + source: Union[Unset, str] = UNSET + status: Union[Unset, "DocumentModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + title_viewable: Union[Unset, "UserRolePrivilegeModel"] = UNSET + type: Union[Unset, str] = UNSET + uploaded_by: Union[Unset, str] = UNSET + uploaded_date: Union[Unset, datetime.datetime] = UNSET + virtual_folders: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + category: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.category, Unset): + category = self.category.to_dict() + + deletable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.deletable, Unset): + deletable = self.deletable.to_dict() + + department = self.department + description = self.description + downloadable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.downloadable, Unset): + downloadable = self.downloadable.to_dict() + + entity_id = self.entity_id + entity_type = self.entity_type + file_name = self.file_name + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + modified_by = self.modified_by + modified_date: Union[Unset, str] = UNSET + if not isinstance(self.modified_date, Unset): + modified_date = self.modified_date.isoformat() + + service_provider_code = self.service_provider_code + size = self.size + source = self.source + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + title_viewable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.title_viewable, Unset): + title_viewable = self.title_viewable.to_dict() + + type = self.type + uploaded_by = self.uploaded_by + uploaded_date: Union[Unset, str] = UNSET + if not isinstance(self.uploaded_date, Unset): + uploaded_date = self.uploaded_date.isoformat() + + virtual_folders = self.virtual_folders + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if category is not UNSET: + field_dict["category"] = category + if deletable is not UNSET: + field_dict["deletable"] = deletable + if department is not UNSET: + field_dict["department"] = department + if description is not UNSET: + field_dict["description"] = description + if downloadable is not UNSET: + field_dict["downloadable"] = downloadable + if entity_id is not UNSET: + field_dict["entityId"] = entity_id + if entity_type is not UNSET: + field_dict["entityType"] = entity_type + if file_name is not UNSET: + field_dict["fileName"] = file_name + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if modified_by is not UNSET: + field_dict["modifiedBy"] = modified_by + if modified_date is not UNSET: + field_dict["modifiedDate"] = modified_date + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if size is not UNSET: + field_dict["size"] = size + if source is not UNSET: + field_dict["source"] = source + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if title_viewable is not UNSET: + field_dict["titleViewable"] = title_viewable + if type is not UNSET: + field_dict["type"] = type + if uploaded_by is not UNSET: + field_dict["uploadedBy"] = uploaded_by + if uploaded_date is not UNSET: + field_dict["uploadedDate"] = uploaded_date + if virtual_folders is not UNSET: + field_dict["virtualFolders"] = virtual_folders + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_model_category import DocumentModelCategory + from ..models.document_model_group import DocumentModelGroup + from ..models.document_model_status import DocumentModelStatus + from ..models.user_role_privilege_model import UserRolePrivilegeModel + + d = src_dict.copy() + _category = d.pop("category", UNSET) + category: Union[Unset, DocumentModelCategory] + if isinstance(_category, Unset): + category = UNSET + else: + category = DocumentModelCategory.from_dict(_category) + + _deletable = d.pop("deletable", UNSET) + deletable: Union[Unset, UserRolePrivilegeModel] + if isinstance(_deletable, Unset): + deletable = UNSET + else: + deletable = UserRolePrivilegeModel.from_dict(_deletable) + + department = d.pop("department", UNSET) + + description = d.pop("description", UNSET) + + _downloadable = d.pop("downloadable", UNSET) + downloadable: Union[Unset, UserRolePrivilegeModel] + if isinstance(_downloadable, Unset): + downloadable = UNSET + else: + downloadable = UserRolePrivilegeModel.from_dict(_downloadable) + + entity_id = d.pop("entityId", UNSET) + + entity_type = d.pop("entityType", UNSET) + + file_name = d.pop("fileName", UNSET) + + _group = d.pop("group", UNSET) + group: Union[Unset, DocumentModelGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = DocumentModelGroup.from_dict(_group) + + id = d.pop("id", UNSET) + + modified_by = d.pop("modifiedBy", UNSET) + + _modified_date = d.pop("modifiedDate", UNSET) + modified_date: Union[Unset, datetime.datetime] + if isinstance(_modified_date, Unset): + modified_date = UNSET + else: + modified_date = isoparse(_modified_date) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + size = d.pop("size", UNSET) + + source = d.pop("source", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, DocumentModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = DocumentModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _title_viewable = d.pop("titleViewable", UNSET) + title_viewable: Union[Unset, UserRolePrivilegeModel] + if isinstance(_title_viewable, Unset): + title_viewable = UNSET + else: + title_viewable = UserRolePrivilegeModel.from_dict(_title_viewable) + + type = d.pop("type", UNSET) + + uploaded_by = d.pop("uploadedBy", UNSET) + + _uploaded_date = d.pop("uploadedDate", UNSET) + uploaded_date: Union[Unset, datetime.datetime] + if isinstance(_uploaded_date, Unset): + uploaded_date = UNSET + else: + uploaded_date = isoparse(_uploaded_date) + + virtual_folders = d.pop("virtualFolders", UNSET) + + document_model = cls( + category=category, + deletable=deletable, + department=department, + description=description, + downloadable=downloadable, + entity_id=entity_id, + entity_type=entity_type, + file_name=file_name, + group=group, + id=id, + modified_by=modified_by, + modified_date=modified_date, + service_provider_code=service_provider_code, + size=size, + source=source, + status=status, + status_date=status_date, + title_viewable=title_viewable, + type=type, + uploaded_by=uploaded_by, + uploaded_date=uploaded_date, + virtual_folders=virtual_folders, + ) + + document_model.additional_properties = d + return document_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_model_category.py b/accelapy/accelapy/records_client/models/document_model_category.py new file mode 100644 index 0000000..1fb4d45 --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_model_category.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DocumentModelCategory") + + +@_attrs_define +class DocumentModelCategory: + """The document category. The list of category options varies depending on the document group. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + document_model_category = cls( + text=text, + value=value, + ) + + document_model_category.additional_properties = d + return document_model_category + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_model_group.py b/accelapy/accelapy/records_client/models/document_model_group.py new file mode 100644 index 0000000..633762e --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_model_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DocumentModelGroup") + + +@_attrs_define +class DocumentModelGroup: + """The document group. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + document_model_group = cls( + text=text, + value=value, + ) + + document_model_group.additional_properties = d + return document_model_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_model_status.py b/accelapy/accelapy/records_client/models/document_model_status.py new file mode 100644 index 0000000..7595174 --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DocumentModelStatus") + + +@_attrs_define +class DocumentModelStatus: + """The documet status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + document_model_status = cls( + text=text, + value=value, + ) + + document_model_status.additional_properties = d + return document_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_type_model.py b/accelapy/accelapy/records_client/models/document_type_model.py new file mode 100644 index 0000000..343d07f --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_type_model.py @@ -0,0 +1,129 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.document_type_model_group import DocumentTypeModelGroup + + +T = TypeVar("T", bound="DocumentTypeModel") + + +@_attrs_define +class DocumentTypeModel: + """ + Attributes: + deletable (Union[Unset, bool]): Indicates whether or not the record can be deleted. + downloadable (Union[Unset, bool]): Indicates whether or not the document type can be downloaded. + group (Union[Unset, DocumentTypeModelGroup]): The document group for the document category. + id (Union[Unset, str]): The document category system id assigned by the Civic Platform server. + text (Union[Unset, str]): The localized display text. + uploadable (Union[Unset, bool]): Indicates whether or not you can upload documents of the specified category. + value (Union[Unset, str]): The document category value. + viewable (Union[Unset, bool]): Indicates whether or not you can view the document category associated with the + record. + """ + + deletable: Union[Unset, bool] = UNSET + downloadable: Union[Unset, bool] = UNSET + group: Union[Unset, "DocumentTypeModelGroup"] = UNSET + id: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + uploadable: Union[Unset, bool] = UNSET + value: Union[Unset, str] = UNSET + viewable: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + deletable = self.deletable + downloadable = self.downloadable + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + text = self.text + uploadable = self.uploadable + value = self.value + viewable = self.viewable + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deletable is not UNSET: + field_dict["deletable"] = deletable + if downloadable is not UNSET: + field_dict["downloadable"] = downloadable + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if text is not UNSET: + field_dict["text"] = text + if uploadable is not UNSET: + field_dict["uploadable"] = uploadable + if value is not UNSET: + field_dict["value"] = value + if viewable is not UNSET: + field_dict["viewable"] = viewable + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_type_model_group import DocumentTypeModelGroup + + d = src_dict.copy() + deletable = d.pop("deletable", UNSET) + + downloadable = d.pop("downloadable", UNSET) + + _group = d.pop("group", UNSET) + group: Union[Unset, DocumentTypeModelGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = DocumentTypeModelGroup.from_dict(_group) + + id = d.pop("id", UNSET) + + text = d.pop("text", UNSET) + + uploadable = d.pop("uploadable", UNSET) + + value = d.pop("value", UNSET) + + viewable = d.pop("viewable", UNSET) + + document_type_model = cls( + deletable=deletable, + downloadable=downloadable, + group=group, + id=id, + text=text, + uploadable=uploadable, + value=value, + viewable=viewable, + ) + + document_type_model.additional_properties = d + return document_type_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/document_type_model_group.py b/accelapy/accelapy/records_client/models/document_type_model_group.py new file mode 100644 index 0000000..7e5c18a --- /dev/null +++ b/accelapy/accelapy/records_client/models/document_type_model_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DocumentTypeModelGroup") + + +@_attrs_define +class DocumentTypeModelGroup: + """The document group for the document category. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + document_type_model_group = cls( + text=text, + value=value, + ) + + document_type_model_group.additional_properties = d + return document_type_model_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/element_model.py b/accelapy/accelapy/records_client/models/element_model.py new file mode 100644 index 0000000..8879c59 --- /dev/null +++ b/accelapy/accelapy/records_client/models/element_model.py @@ -0,0 +1,99 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.contact_type_model import ContactTypeModel + + +T = TypeVar("T", bound="ElementModel") + + +@_attrs_define +class ElementModel: + """ + Attributes: + is_reference (Union[Unset, bool]): Indicates whether or not the entity is a reference. + is_required (Union[Unset, bool]): Indicates whether or not the entity is required. + name (Union[Unset, str]): The entity name. + types (Union[Unset, List['ContactTypeModel']]): + """ + + is_reference: Union[Unset, bool] = UNSET + is_required: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + types: Union[Unset, List["ContactTypeModel"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_reference = self.is_reference + is_required = self.is_required + name = self.name + types: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.types, Unset): + types = [] + for types_item_data in self.types: + types_item = types_item_data.to_dict() + + types.append(types_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_reference is not UNSET: + field_dict["isReference"] = is_reference + if is_required is not UNSET: + field_dict["isRequired"] = is_required + if name is not UNSET: + field_dict["name"] = name + if types is not UNSET: + field_dict["types"] = types + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.contact_type_model import ContactTypeModel + + d = src_dict.copy() + is_reference = d.pop("isReference", UNSET) + + is_required = d.pop("isRequired", UNSET) + + name = d.pop("name", UNSET) + + types = [] + _types = d.pop("types", UNSET) + for types_item_data in _types or []: + types_item = ContactTypeModel.from_dict(types_item_data) + + types.append(types_item) + + element_model = cls( + is_reference=is_reference, + is_required=is_required, + name=name, + types=types, + ) + + element_model.additional_properties = d + return element_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/estimate_fee_model.py b/accelapy/accelapy/records_client/models/estimate_fee_model.py new file mode 100644 index 0000000..de4feb5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/estimate_fee_model.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EstimateFeeModel") + + +@_attrs_define +class EstimateFeeModel: + """ + Attributes: + currency_code (Union[Unset, str]): The standard ISO 4217 currency code. For example, "USD" for US Dollars + fee_total (Union[Unset, float]): The total fee. + """ + + currency_code: Union[Unset, str] = UNSET + fee_total: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + currency_code = self.currency_code + fee_total = self.fee_total + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if currency_code is not UNSET: + field_dict["currencyCode"] = currency_code + if fee_total is not UNSET: + field_dict["feeTotal"] = fee_total + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + currency_code = d.pop("currencyCode", UNSET) + + fee_total = d.pop("feeTotal", UNSET) + + estimate_fee_model = cls( + currency_code=currency_code, + fee_total=fee_total, + ) + + estimate_fee_model.additional_properties = d + return estimate_fee_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model.py b/accelapy/accelapy/records_client/models/fee_item_base_model.py new file mode 100644 index 0000000..df6a331 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model.py @@ -0,0 +1,149 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_base_model_code import FeeItemBaseModelCode + from ..models.fee_item_base_model_payment_period import FeeItemBaseModelPaymentPeriod + from ..models.fee_item_base_model_schedule import FeeItemBaseModelSchedule + from ..models.fee_item_base_model_version import FeeItemBaseModelVersion + + +T = TypeVar("T", bound="FeeItemBaseModel") + + +@_attrs_define +class FeeItemBaseModel: + """ + Attributes: + code (Union[Unset, FeeItemBaseModelCode]): The fee item code. + fee_notes (Union[Unset, str]): Notes about the fee. + id (Union[Unset, int]): The fee item system id assigned by the Civic Platform server. + payment_period (Union[Unset, FeeItemBaseModelPaymentPeriod]): The time interval for processing invoices. + quantity (Union[Unset, float]): The number of units for which the same fee applies. + schedule (Union[Unset, FeeItemBaseModelSchedule]): Contains parameters that define the fee schedule. + version (Union[Unset, FeeItemBaseModelVersion]): The fee schedule version. + """ + + code: Union[Unset, "FeeItemBaseModelCode"] = UNSET + fee_notes: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + payment_period: Union[Unset, "FeeItemBaseModelPaymentPeriod"] = UNSET + quantity: Union[Unset, float] = UNSET + schedule: Union[Unset, "FeeItemBaseModelSchedule"] = UNSET + version: Union[Unset, "FeeItemBaseModelVersion"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.code, Unset): + code = self.code.to_dict() + + fee_notes = self.fee_notes + id = self.id + payment_period: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.payment_period, Unset): + payment_period = self.payment_period.to_dict() + + quantity = self.quantity + schedule: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + version: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if fee_notes is not UNSET: + field_dict["feeNotes"] = fee_notes + if id is not UNSET: + field_dict["id"] = id + if payment_period is not UNSET: + field_dict["paymentPeriod"] = payment_period + if quantity is not UNSET: + field_dict["quantity"] = quantity + if schedule is not UNSET: + field_dict["schedule"] = schedule + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_base_model_code import FeeItemBaseModelCode + from ..models.fee_item_base_model_payment_period import FeeItemBaseModelPaymentPeriod + from ..models.fee_item_base_model_schedule import FeeItemBaseModelSchedule + from ..models.fee_item_base_model_version import FeeItemBaseModelVersion + + d = src_dict.copy() + _code = d.pop("code", UNSET) + code: Union[Unset, FeeItemBaseModelCode] + if isinstance(_code, Unset): + code = UNSET + else: + code = FeeItemBaseModelCode.from_dict(_code) + + fee_notes = d.pop("feeNotes", UNSET) + + id = d.pop("id", UNSET) + + _payment_period = d.pop("paymentPeriod", UNSET) + payment_period: Union[Unset, FeeItemBaseModelPaymentPeriod] + if isinstance(_payment_period, Unset): + payment_period = UNSET + else: + payment_period = FeeItemBaseModelPaymentPeriod.from_dict(_payment_period) + + quantity = d.pop("quantity", UNSET) + + _schedule = d.pop("schedule", UNSET) + schedule: Union[Unset, FeeItemBaseModelSchedule] + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = FeeItemBaseModelSchedule.from_dict(_schedule) + + _version = d.pop("version", UNSET) + version: Union[Unset, FeeItemBaseModelVersion] + if isinstance(_version, Unset): + version = UNSET + else: + version = FeeItemBaseModelVersion.from_dict(_version) + + fee_item_base_model = cls( + code=code, + fee_notes=fee_notes, + id=id, + payment_period=payment_period, + quantity=quantity, + schedule=schedule, + version=version, + ) + + fee_item_base_model.additional_properties = d + return fee_item_base_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_1.py b/accelapy/accelapy/records_client/models/fee_item_base_model_1.py new file mode 100644 index 0000000..eea57dd --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_1.py @@ -0,0 +1,151 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_base_model_1_code import FeeItemBaseModel1Code + from ..models.fee_item_base_model_1_payment_period import FeeItemBaseModel1PaymentPeriod + from ..models.fee_item_base_model_1_schedule import FeeItemBaseModel1Schedule + from ..models.fee_item_base_model_1_version import FeeItemBaseModel1Version + + +T = TypeVar("T", bound="FeeItemBaseModel1") + + +@_attrs_define +class FeeItemBaseModel1: + """ + Attributes: + code (Union[Unset, FeeItemBaseModel1Code]): The fee item code. + id (Union[Unset, int]): The fee item system id assigned by the Civic Platform server. + notes (Union[Unset, str]): A note entered against a fee item. + payment_period (Union[Unset, FeeItemBaseModel1PaymentPeriod]): The time interval for processing invoices. + quantity (Union[Unset, float]): The number of units for which the fee applies. + schedule (Union[Unset, FeeItemBaseModel1Schedule]): Contains parameters that define the fee schedule. See [Get + All Fee Schedules for Record Type](./api- + settings.html#operation/v4.get.settings.records.types.id.fees.schedules). + version (Union[Unset, FeeItemBaseModel1Version]): The fee item version. + """ + + code: Union[Unset, "FeeItemBaseModel1Code"] = UNSET + id: Union[Unset, int] = UNSET + notes: Union[Unset, str] = UNSET + payment_period: Union[Unset, "FeeItemBaseModel1PaymentPeriod"] = UNSET + quantity: Union[Unset, float] = UNSET + schedule: Union[Unset, "FeeItemBaseModel1Schedule"] = UNSET + version: Union[Unset, "FeeItemBaseModel1Version"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.code, Unset): + code = self.code.to_dict() + + id = self.id + notes = self.notes + payment_period: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.payment_period, Unset): + payment_period = self.payment_period.to_dict() + + quantity = self.quantity + schedule: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + version: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if id is not UNSET: + field_dict["id"] = id + if notes is not UNSET: + field_dict["notes"] = notes + if payment_period is not UNSET: + field_dict["paymentPeriod"] = payment_period + if quantity is not UNSET: + field_dict["quantity"] = quantity + if schedule is not UNSET: + field_dict["schedule"] = schedule + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_base_model_1_code import FeeItemBaseModel1Code + from ..models.fee_item_base_model_1_payment_period import FeeItemBaseModel1PaymentPeriod + from ..models.fee_item_base_model_1_schedule import FeeItemBaseModel1Schedule + from ..models.fee_item_base_model_1_version import FeeItemBaseModel1Version + + d = src_dict.copy() + _code = d.pop("code", UNSET) + code: Union[Unset, FeeItemBaseModel1Code] + if isinstance(_code, Unset): + code = UNSET + else: + code = FeeItemBaseModel1Code.from_dict(_code) + + id = d.pop("id", UNSET) + + notes = d.pop("notes", UNSET) + + _payment_period = d.pop("paymentPeriod", UNSET) + payment_period: Union[Unset, FeeItemBaseModel1PaymentPeriod] + if isinstance(_payment_period, Unset): + payment_period = UNSET + else: + payment_period = FeeItemBaseModel1PaymentPeriod.from_dict(_payment_period) + + quantity = d.pop("quantity", UNSET) + + _schedule = d.pop("schedule", UNSET) + schedule: Union[Unset, FeeItemBaseModel1Schedule] + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = FeeItemBaseModel1Schedule.from_dict(_schedule) + + _version = d.pop("version", UNSET) + version: Union[Unset, FeeItemBaseModel1Version] + if isinstance(_version, Unset): + version = UNSET + else: + version = FeeItemBaseModel1Version.from_dict(_version) + + fee_item_base_model_1 = cls( + code=code, + id=id, + notes=notes, + payment_period=payment_period, + quantity=quantity, + schedule=schedule, + version=version, + ) + + fee_item_base_model_1.additional_properties = d + return fee_item_base_model_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_1_code.py b/accelapy/accelapy/records_client/models/fee_item_base_model_1_code.py new file mode 100644 index 0000000..a7880e1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_1_code.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModel1Code") + + +@_attrs_define +class FeeItemBaseModel1Code: + """The fee item code. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_1_code = cls( + text=text, + value=value, + ) + + fee_item_base_model_1_code.additional_properties = d + return fee_item_base_model_1_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_1_payment_period.py b/accelapy/accelapy/records_client/models/fee_item_base_model_1_payment_period.py new file mode 100644 index 0000000..0efacee --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_1_payment_period.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModel1PaymentPeriod") + + +@_attrs_define +class FeeItemBaseModel1PaymentPeriod: + """The time interval for processing invoices. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_1_payment_period = cls( + text=text, + value=value, + ) + + fee_item_base_model_1_payment_period.additional_properties = d + return fee_item_base_model_1_payment_period + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_1_schedule.py b/accelapy/accelapy/records_client/models/fee_item_base_model_1_schedule.py new file mode 100644 index 0000000..cc9620c --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_1_schedule.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModel1Schedule") + + +@_attrs_define +class FeeItemBaseModel1Schedule: + """Contains parameters that define the fee schedule. See [Get All Fee Schedules for Record Type](./api- + settings.html#operation/v4.get.settings.records.types.id.fees.schedules). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_1_schedule = cls( + text=text, + value=value, + ) + + fee_item_base_model_1_schedule.additional_properties = d + return fee_item_base_model_1_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_1_version.py b/accelapy/accelapy/records_client/models/fee_item_base_model_1_version.py new file mode 100644 index 0000000..31b6ce7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_1_version.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModel1Version") + + +@_attrs_define +class FeeItemBaseModel1Version: + """The fee item version. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_1_version = cls( + text=text, + value=value, + ) + + fee_item_base_model_1_version.additional_properties = d + return fee_item_base_model_1_version + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_code.py b/accelapy/accelapy/records_client/models/fee_item_base_model_code.py new file mode 100644 index 0000000..919bc22 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_code.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModelCode") + + +@_attrs_define +class FeeItemBaseModelCode: + """The fee item code. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_code = cls( + text=text, + value=value, + ) + + fee_item_base_model_code.additional_properties = d + return fee_item_base_model_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_payment_period.py b/accelapy/accelapy/records_client/models/fee_item_base_model_payment_period.py new file mode 100644 index 0000000..7f3b994 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_payment_period.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModelPaymentPeriod") + + +@_attrs_define +class FeeItemBaseModelPaymentPeriod: + """The time interval for processing invoices. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_payment_period = cls( + text=text, + value=value, + ) + + fee_item_base_model_payment_period.additional_properties = d + return fee_item_base_model_payment_period + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_schedule.py b/accelapy/accelapy/records_client/models/fee_item_base_model_schedule.py new file mode 100644 index 0000000..2c7e30e --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_schedule.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModelSchedule") + + +@_attrs_define +class FeeItemBaseModelSchedule: + """Contains parameters that define the fee schedule. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_schedule = cls( + text=text, + value=value, + ) + + fee_item_base_model_schedule.additional_properties = d + return fee_item_base_model_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_base_model_version.py b/accelapy/accelapy/records_client/models/fee_item_base_model_version.py new file mode 100644 index 0000000..c5600fb --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_base_model_version.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemBaseModelVersion") + + +@_attrs_define +class FeeItemBaseModelVersion: + """The fee schedule version. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_base_model_version = cls( + text=text, + value=value, + ) + + fee_item_base_model_version.additional_properties = d + return fee_item_base_model_version + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model.py b/accelapy/accelapy/records_client/models/fee_item_model.py new file mode 100644 index 0000000..26f2203 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model.py @@ -0,0 +1,488 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_model_code import FeeItemModelCode + from ..models.fee_item_model_description import FeeItemModelDescription + from ..models.fee_item_model_payment_period import FeeItemModelPaymentPeriod + from ..models.fee_item_model_schedule import FeeItemModelSchedule + from ..models.fee_item_model_sub_group import FeeItemModelSubGroup + from ..models.fee_item_model_unit import FeeItemModelUnit + from ..models.fee_item_model_version import FeeItemModelVersion + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="FeeItemModel") + + +@_attrs_define +class FeeItemModel: + """ + Attributes: + aca_required_flag (Union[Unset, str]): Indicates whether or not the fee schedule is required in order to make it + accessible to citizens. + account_code_1 (Union[Unset, str]): The code associated with the first fee + account_code_1_allocation (Union[Unset, float]): Allocation proportion or amount of account code 1. + account_code_2 (Union[Unset, str]): The code associated with the second fee + account_code_2_allocation (Union[Unset, float]): Allocation proportion or amount of account code 2. + account_code_3 (Union[Unset, str]): The code associated with the third fee + account_code_3_allocation (Union[Unset, float]): Allocation proportion or amount of account code 3. + allocated_fee_1 (Union[Unset, float]): The allocated fee for account code 1. + allocated_fee_2 (Union[Unset, float]): The allocated fee for account code 2. + allocated_fee_3 (Union[Unset, float]): The allocated fee for account code 3. + amount (Union[Unset, float]): The amount of a payment transaction or account balance. + apply_date (Union[Unset, datetime.datetime]): The date the fee is applied. + auto_assess_flag (Union[Unset, str]): Indicates whether or not the fee item is automatically assessed. + auto_invoice_flag (Union[Unset, str]): Indicates whether or not the fee item is automatically invoiced. + balance_due (Union[Unset, float]): The amount due. + calc_flag (Union[Unset, str]): Indicates whether or not the fee amount is based on fee calculation. + calculated_flag (Union[Unset, str]): Indicates whether or not the fee amount is based on fee calculation. + code (Union[Unset, FeeItemModelCode]): A code identifying an associated item + description (Union[Unset, FeeItemModelDescription]): The fee description. + display_order (Union[Unset, int]): The display order of the fee item. + effect_date (Union[Unset, datetime.datetime]): Fee item effective date. + expire_date (Union[Unset, datetime.datetime]): The date when the item expires + fee_allocation_type (Union[Unset, str]): The fee allocation type to each account code. + fee_notes (Union[Unset, str]): Notes about the fee. + id (Union[Unset, int]): The fee system id. + invoice_id (Union[Unset, int]): The invoice ID for the fee item. + max_fee (Union[Unset, float]): The maximum fee item. + min_fee (Union[Unset, float]): The minimum fee item. + payment_period (Union[Unset, FeeItemModelPaymentPeriod]): The time interval for processing invoices. + priority (Union[Unset, int]): The priority level assigned to the fee item. + quantity (Union[Unset, float]): The number of units for which the same fee applies. + record_id (Union[Unset, RecordIdModel]): + schedule (Union[Unset, FeeItemModelSchedule]): The payment schedule name. + status (Union[Unset, str]): The fee item status. + sub_group (Union[Unset, FeeItemModelSubGroup]): The subgroup the fee is associated with. + udf1 (Union[Unset, str]): User defined field 1 + udf2 (Union[Unset, str]): User defined field 2 + udf3 (Union[Unset, str]): User defined field 3 + unit (Union[Unset, FeeItemModelUnit]): The unit of measure used for the object. + variable (Union[Unset, str]): The variable associated with the fee item. + version (Union[Unset, FeeItemModelVersion]): The payment schedule version + """ + + aca_required_flag: Union[Unset, str] = UNSET + account_code_1: Union[Unset, str] = UNSET + account_code_1_allocation: Union[Unset, float] = UNSET + account_code_2: Union[Unset, str] = UNSET + account_code_2_allocation: Union[Unset, float] = UNSET + account_code_3: Union[Unset, str] = UNSET + account_code_3_allocation: Union[Unset, float] = UNSET + allocated_fee_1: Union[Unset, float] = UNSET + allocated_fee_2: Union[Unset, float] = UNSET + allocated_fee_3: Union[Unset, float] = UNSET + amount: Union[Unset, float] = UNSET + apply_date: Union[Unset, datetime.datetime] = UNSET + auto_assess_flag: Union[Unset, str] = UNSET + auto_invoice_flag: Union[Unset, str] = UNSET + balance_due: Union[Unset, float] = UNSET + calc_flag: Union[Unset, str] = UNSET + calculated_flag: Union[Unset, str] = UNSET + code: Union[Unset, "FeeItemModelCode"] = UNSET + description: Union[Unset, "FeeItemModelDescription"] = UNSET + display_order: Union[Unset, int] = UNSET + effect_date: Union[Unset, datetime.datetime] = UNSET + expire_date: Union[Unset, datetime.datetime] = UNSET + fee_allocation_type: Union[Unset, str] = UNSET + fee_notes: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + invoice_id: Union[Unset, int] = UNSET + max_fee: Union[Unset, float] = UNSET + min_fee: Union[Unset, float] = UNSET + payment_period: Union[Unset, "FeeItemModelPaymentPeriod"] = UNSET + priority: Union[Unset, int] = UNSET + quantity: Union[Unset, float] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + schedule: Union[Unset, "FeeItemModelSchedule"] = UNSET + status: Union[Unset, str] = UNSET + sub_group: Union[Unset, "FeeItemModelSubGroup"] = UNSET + udf1: Union[Unset, str] = UNSET + udf2: Union[Unset, str] = UNSET + udf3: Union[Unset, str] = UNSET + unit: Union[Unset, "FeeItemModelUnit"] = UNSET + variable: Union[Unset, str] = UNSET + version: Union[Unset, "FeeItemModelVersion"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + aca_required_flag = self.aca_required_flag + account_code_1 = self.account_code_1 + account_code_1_allocation = self.account_code_1_allocation + account_code_2 = self.account_code_2 + account_code_2_allocation = self.account_code_2_allocation + account_code_3 = self.account_code_3 + account_code_3_allocation = self.account_code_3_allocation + allocated_fee_1 = self.allocated_fee_1 + allocated_fee_2 = self.allocated_fee_2 + allocated_fee_3 = self.allocated_fee_3 + amount = self.amount + apply_date: Union[Unset, str] = UNSET + if not isinstance(self.apply_date, Unset): + apply_date = self.apply_date.isoformat() + + auto_assess_flag = self.auto_assess_flag + auto_invoice_flag = self.auto_invoice_flag + balance_due = self.balance_due + calc_flag = self.calc_flag + calculated_flag = self.calculated_flag + code: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.code, Unset): + code = self.code.to_dict() + + description: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.description, Unset): + description = self.description.to_dict() + + display_order = self.display_order + effect_date: Union[Unset, str] = UNSET + if not isinstance(self.effect_date, Unset): + effect_date = self.effect_date.isoformat() + + expire_date: Union[Unset, str] = UNSET + if not isinstance(self.expire_date, Unset): + expire_date = self.expire_date.isoformat() + + fee_allocation_type = self.fee_allocation_type + fee_notes = self.fee_notes + id = self.id + invoice_id = self.invoice_id + max_fee = self.max_fee + min_fee = self.min_fee + payment_period: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.payment_period, Unset): + payment_period = self.payment_period.to_dict() + + priority = self.priority + quantity = self.quantity + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + schedule: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + status = self.status + sub_group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.sub_group, Unset): + sub_group = self.sub_group.to_dict() + + udf1 = self.udf1 + udf2 = self.udf2 + udf3 = self.udf3 + unit: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit, Unset): + unit = self.unit.to_dict() + + variable = self.variable + version: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aca_required_flag is not UNSET: + field_dict["acaRequiredFlag"] = aca_required_flag + if account_code_1 is not UNSET: + field_dict["accountCode1"] = account_code_1 + if account_code_1_allocation is not UNSET: + field_dict["accountCode1Allocation"] = account_code_1_allocation + if account_code_2 is not UNSET: + field_dict["accountCode2"] = account_code_2 + if account_code_2_allocation is not UNSET: + field_dict["accountCode2Allocation"] = account_code_2_allocation + if account_code_3 is not UNSET: + field_dict["accountCode3"] = account_code_3 + if account_code_3_allocation is not UNSET: + field_dict["accountCode3Allocation"] = account_code_3_allocation + if allocated_fee_1 is not UNSET: + field_dict["allocatedFee1"] = allocated_fee_1 + if allocated_fee_2 is not UNSET: + field_dict["allocatedFee2"] = allocated_fee_2 + if allocated_fee_3 is not UNSET: + field_dict["allocatedFee3"] = allocated_fee_3 + if amount is not UNSET: + field_dict["amount"] = amount + if apply_date is not UNSET: + field_dict["applyDate"] = apply_date + if auto_assess_flag is not UNSET: + field_dict["autoAssessFlag"] = auto_assess_flag + if auto_invoice_flag is not UNSET: + field_dict["autoInvoiceFlag"] = auto_invoice_flag + if balance_due is not UNSET: + field_dict["balanceDue"] = balance_due + if calc_flag is not UNSET: + field_dict["calcFlag"] = calc_flag + if calculated_flag is not UNSET: + field_dict["calculatedFlag"] = calculated_flag + if code is not UNSET: + field_dict["code"] = code + if description is not UNSET: + field_dict["description"] = description + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if effect_date is not UNSET: + field_dict["effectDate"] = effect_date + if expire_date is not UNSET: + field_dict["expireDate"] = expire_date + if fee_allocation_type is not UNSET: + field_dict["feeAllocationType"] = fee_allocation_type + if fee_notes is not UNSET: + field_dict["feeNotes"] = fee_notes + if id is not UNSET: + field_dict["id"] = id + if invoice_id is not UNSET: + field_dict["invoiceId"] = invoice_id + if max_fee is not UNSET: + field_dict["maxFee"] = max_fee + if min_fee is not UNSET: + field_dict["minFee"] = min_fee + if payment_period is not UNSET: + field_dict["paymentPeriod"] = payment_period + if priority is not UNSET: + field_dict["priority"] = priority + if quantity is not UNSET: + field_dict["quantity"] = quantity + if record_id is not UNSET: + field_dict["recordId"] = record_id + if schedule is not UNSET: + field_dict["schedule"] = schedule + if status is not UNSET: + field_dict["status"] = status + if sub_group is not UNSET: + field_dict["subGroup"] = sub_group + if udf1 is not UNSET: + field_dict["udf1"] = udf1 + if udf2 is not UNSET: + field_dict["udf2"] = udf2 + if udf3 is not UNSET: + field_dict["udf3"] = udf3 + if unit is not UNSET: + field_dict["unit"] = unit + if variable is not UNSET: + field_dict["variable"] = variable + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_model_code import FeeItemModelCode + from ..models.fee_item_model_description import FeeItemModelDescription + from ..models.fee_item_model_payment_period import FeeItemModelPaymentPeriod + from ..models.fee_item_model_schedule import FeeItemModelSchedule + from ..models.fee_item_model_sub_group import FeeItemModelSubGroup + from ..models.fee_item_model_unit import FeeItemModelUnit + from ..models.fee_item_model_version import FeeItemModelVersion + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + aca_required_flag = d.pop("acaRequiredFlag", UNSET) + + account_code_1 = d.pop("accountCode1", UNSET) + + account_code_1_allocation = d.pop("accountCode1Allocation", UNSET) + + account_code_2 = d.pop("accountCode2", UNSET) + + account_code_2_allocation = d.pop("accountCode2Allocation", UNSET) + + account_code_3 = d.pop("accountCode3", UNSET) + + account_code_3_allocation = d.pop("accountCode3Allocation", UNSET) + + allocated_fee_1 = d.pop("allocatedFee1", UNSET) + + allocated_fee_2 = d.pop("allocatedFee2", UNSET) + + allocated_fee_3 = d.pop("allocatedFee3", UNSET) + + amount = d.pop("amount", UNSET) + + _apply_date = d.pop("applyDate", UNSET) + apply_date: Union[Unset, datetime.datetime] + if isinstance(_apply_date, Unset): + apply_date = UNSET + else: + apply_date = isoparse(_apply_date) + + auto_assess_flag = d.pop("autoAssessFlag", UNSET) + + auto_invoice_flag = d.pop("autoInvoiceFlag", UNSET) + + balance_due = d.pop("balanceDue", UNSET) + + calc_flag = d.pop("calcFlag", UNSET) + + calculated_flag = d.pop("calculatedFlag", UNSET) + + _code = d.pop("code", UNSET) + code: Union[Unset, FeeItemModelCode] + if isinstance(_code, Unset): + code = UNSET + else: + code = FeeItemModelCode.from_dict(_code) + + _description = d.pop("description", UNSET) + description: Union[Unset, FeeItemModelDescription] + if isinstance(_description, Unset): + description = UNSET + else: + description = FeeItemModelDescription.from_dict(_description) + + display_order = d.pop("displayOrder", UNSET) + + _effect_date = d.pop("effectDate", UNSET) + effect_date: Union[Unset, datetime.datetime] + if isinstance(_effect_date, Unset): + effect_date = UNSET + else: + effect_date = isoparse(_effect_date) + + _expire_date = d.pop("expireDate", UNSET) + expire_date: Union[Unset, datetime.datetime] + if isinstance(_expire_date, Unset): + expire_date = UNSET + else: + expire_date = isoparse(_expire_date) + + fee_allocation_type = d.pop("feeAllocationType", UNSET) + + fee_notes = d.pop("feeNotes", UNSET) + + id = d.pop("id", UNSET) + + invoice_id = d.pop("invoiceId", UNSET) + + max_fee = d.pop("maxFee", UNSET) + + min_fee = d.pop("minFee", UNSET) + + _payment_period = d.pop("paymentPeriod", UNSET) + payment_period: Union[Unset, FeeItemModelPaymentPeriod] + if isinstance(_payment_period, Unset): + payment_period = UNSET + else: + payment_period = FeeItemModelPaymentPeriod.from_dict(_payment_period) + + priority = d.pop("priority", UNSET) + + quantity = d.pop("quantity", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + _schedule = d.pop("schedule", UNSET) + schedule: Union[Unset, FeeItemModelSchedule] + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = FeeItemModelSchedule.from_dict(_schedule) + + status = d.pop("status", UNSET) + + _sub_group = d.pop("subGroup", UNSET) + sub_group: Union[Unset, FeeItemModelSubGroup] + if isinstance(_sub_group, Unset): + sub_group = UNSET + else: + sub_group = FeeItemModelSubGroup.from_dict(_sub_group) + + udf1 = d.pop("udf1", UNSET) + + udf2 = d.pop("udf2", UNSET) + + udf3 = d.pop("udf3", UNSET) + + _unit = d.pop("unit", UNSET) + unit: Union[Unset, FeeItemModelUnit] + if isinstance(_unit, Unset): + unit = UNSET + else: + unit = FeeItemModelUnit.from_dict(_unit) + + variable = d.pop("variable", UNSET) + + _version = d.pop("version", UNSET) + version: Union[Unset, FeeItemModelVersion] + if isinstance(_version, Unset): + version = UNSET + else: + version = FeeItemModelVersion.from_dict(_version) + + fee_item_model = cls( + aca_required_flag=aca_required_flag, + account_code_1=account_code_1, + account_code_1_allocation=account_code_1_allocation, + account_code_2=account_code_2, + account_code_2_allocation=account_code_2_allocation, + account_code_3=account_code_3, + account_code_3_allocation=account_code_3_allocation, + allocated_fee_1=allocated_fee_1, + allocated_fee_2=allocated_fee_2, + allocated_fee_3=allocated_fee_3, + amount=amount, + apply_date=apply_date, + auto_assess_flag=auto_assess_flag, + auto_invoice_flag=auto_invoice_flag, + balance_due=balance_due, + calc_flag=calc_flag, + calculated_flag=calculated_flag, + code=code, + description=description, + display_order=display_order, + effect_date=effect_date, + expire_date=expire_date, + fee_allocation_type=fee_allocation_type, + fee_notes=fee_notes, + id=id, + invoice_id=invoice_id, + max_fee=max_fee, + min_fee=min_fee, + payment_period=payment_period, + priority=priority, + quantity=quantity, + record_id=record_id, + schedule=schedule, + status=status, + sub_group=sub_group, + udf1=udf1, + udf2=udf2, + udf3=udf3, + unit=unit, + variable=variable, + version=version, + ) + + fee_item_model.additional_properties = d + return fee_item_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1.py b/accelapy/accelapy/records_client/models/fee_item_model_1.py new file mode 100644 index 0000000..8eef9ca --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1.py @@ -0,0 +1,381 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_model_1_code import FeeItemModel1Code + from ..models.fee_item_model_1_payment_period import FeeItemModel1PaymentPeriod + from ..models.fee_item_model_1_schedule import FeeItemModel1Schedule + from ..models.fee_item_model_1_sub_group import FeeItemModel1SubGroup + from ..models.fee_item_model_1_unit import FeeItemModel1Unit + from ..models.fee_item_model_1_version import FeeItemModel1Version + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="FeeItemModel1") + + +@_attrs_define +class FeeItemModel1: + """ + Attributes: + account_code_1 (Union[Unset, str]): The code associated with the first fee + account_code_1_allocation (Union[Unset, float]): Allocation proportion or amount of account code 1. + account_code_2 (Union[Unset, str]): The code associated with the second fee + account_code_2_allocation (Union[Unset, float]): Allocation proportion or amount of account code 2. + account_code_3 (Union[Unset, str]): The code associated with the third fee + account_code_3_allocation (Union[Unset, float]): Allocation proportion or amount of account code 3. + amount (Union[Unset, float]): The amount of a payment transaction or account balance. + audit_date (Union[Unset, datetime.datetime]): The date when the fee item was added or updated. + apply_date (Union[Unset, datetime.datetime]): The date the fee is applied. + balance_due (Union[Unset, float]): The amount due. + code (Union[Unset, FeeItemModel1Code]): A code identifying an associated item + display_order (Union[Unset, int]): The display order of the fee item. + id (Union[Unset, int]): The fee system id. + invoice_id (Union[Unset, int]): The invoice ID for the fee item. + max_fee (Union[Unset, float]): The maximum fee item. + min_fee (Union[Unset, float]): The minimum fee item. + notes (Union[Unset, str]): Notes about the fee item. + payment_period (Union[Unset, FeeItemModel1PaymentPeriod]): The time interval for processing invoices. + priority (Union[Unset, int]): The priority level assigned to the fee item. + quantity (Union[Unset, float]): The number of units for which the same fee applies. + record_id (Union[Unset, RecordIdModel]): + schedule (Union[Unset, FeeItemModel1Schedule]): The payment schedule name. + status (Union[Unset, str]): The fee item status. + sub_group (Union[Unset, FeeItemModel1SubGroup]): The subgroup the fee is associated with. + udf1 (Union[Unset, str]): User defined field 1 + udf2 (Union[Unset, str]): User defined field 2 + udf3 (Union[Unset, str]): User defined field 3 + unit (Union[Unset, FeeItemModel1Unit]): The unit of measure used for the object. + variable (Union[Unset, str]): The variable associated with the fee item. + version (Union[Unset, FeeItemModel1Version]): The payment schedule version + """ + + account_code_1: Union[Unset, str] = UNSET + account_code_1_allocation: Union[Unset, float] = UNSET + account_code_2: Union[Unset, str] = UNSET + account_code_2_allocation: Union[Unset, float] = UNSET + account_code_3: Union[Unset, str] = UNSET + account_code_3_allocation: Union[Unset, float] = UNSET + amount: Union[Unset, float] = UNSET + audit_date: Union[Unset, datetime.datetime] = UNSET + apply_date: Union[Unset, datetime.datetime] = UNSET + balance_due: Union[Unset, float] = UNSET + code: Union[Unset, "FeeItemModel1Code"] = UNSET + display_order: Union[Unset, int] = UNSET + id: Union[Unset, int] = UNSET + invoice_id: Union[Unset, int] = UNSET + max_fee: Union[Unset, float] = UNSET + min_fee: Union[Unset, float] = UNSET + notes: Union[Unset, str] = UNSET + payment_period: Union[Unset, "FeeItemModel1PaymentPeriod"] = UNSET + priority: Union[Unset, int] = UNSET + quantity: Union[Unset, float] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + schedule: Union[Unset, "FeeItemModel1Schedule"] = UNSET + status: Union[Unset, str] = UNSET + sub_group: Union[Unset, "FeeItemModel1SubGroup"] = UNSET + udf1: Union[Unset, str] = UNSET + udf2: Union[Unset, str] = UNSET + udf3: Union[Unset, str] = UNSET + unit: Union[Unset, "FeeItemModel1Unit"] = UNSET + variable: Union[Unset, str] = UNSET + version: Union[Unset, "FeeItemModel1Version"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + account_code_1 = self.account_code_1 + account_code_1_allocation = self.account_code_1_allocation + account_code_2 = self.account_code_2 + account_code_2_allocation = self.account_code_2_allocation + account_code_3 = self.account_code_3 + account_code_3_allocation = self.account_code_3_allocation + amount = self.amount + audit_date: Union[Unset, str] = UNSET + if not isinstance(self.audit_date, Unset): + audit_date = self.audit_date.isoformat() + + apply_date: Union[Unset, str] = UNSET + if not isinstance(self.apply_date, Unset): + apply_date = self.apply_date.isoformat() + + balance_due = self.balance_due + code: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.code, Unset): + code = self.code.to_dict() + + display_order = self.display_order + id = self.id + invoice_id = self.invoice_id + max_fee = self.max_fee + min_fee = self.min_fee + notes = self.notes + payment_period: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.payment_period, Unset): + payment_period = self.payment_period.to_dict() + + priority = self.priority + quantity = self.quantity + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + schedule: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + status = self.status + sub_group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.sub_group, Unset): + sub_group = self.sub_group.to_dict() + + udf1 = self.udf1 + udf2 = self.udf2 + udf3 = self.udf3 + unit: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit, Unset): + unit = self.unit.to_dict() + + variable = self.variable + version: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.version, Unset): + version = self.version.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if account_code_1 is not UNSET: + field_dict["accountCode1"] = account_code_1 + if account_code_1_allocation is not UNSET: + field_dict["accountCode1Allocation"] = account_code_1_allocation + if account_code_2 is not UNSET: + field_dict["accountCode2"] = account_code_2 + if account_code_2_allocation is not UNSET: + field_dict["accountCode2Allocation"] = account_code_2_allocation + if account_code_3 is not UNSET: + field_dict["accountCode3"] = account_code_3 + if account_code_3_allocation is not UNSET: + field_dict["accountCode3Allocation"] = account_code_3_allocation + if amount is not UNSET: + field_dict["amount"] = amount + if audit_date is not UNSET: + field_dict["auditDate"] = audit_date + if apply_date is not UNSET: + field_dict["applyDate"] = apply_date + if balance_due is not UNSET: + field_dict["balanceDue"] = balance_due + if code is not UNSET: + field_dict["code"] = code + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if id is not UNSET: + field_dict["id"] = id + if invoice_id is not UNSET: + field_dict["invoiceId"] = invoice_id + if max_fee is not UNSET: + field_dict["maxFee"] = max_fee + if min_fee is not UNSET: + field_dict["minFee"] = min_fee + if notes is not UNSET: + field_dict["notes"] = notes + if payment_period is not UNSET: + field_dict["paymentPeriod"] = payment_period + if priority is not UNSET: + field_dict["priority"] = priority + if quantity is not UNSET: + field_dict["quantity"] = quantity + if record_id is not UNSET: + field_dict["recordId"] = record_id + if schedule is not UNSET: + field_dict["schedule"] = schedule + if status is not UNSET: + field_dict["status"] = status + if sub_group is not UNSET: + field_dict["subGroup"] = sub_group + if udf1 is not UNSET: + field_dict["udf1"] = udf1 + if udf2 is not UNSET: + field_dict["udf2"] = udf2 + if udf3 is not UNSET: + field_dict["udf3"] = udf3 + if unit is not UNSET: + field_dict["unit"] = unit + if variable is not UNSET: + field_dict["variable"] = variable + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_model_1_code import FeeItemModel1Code + from ..models.fee_item_model_1_payment_period import FeeItemModel1PaymentPeriod + from ..models.fee_item_model_1_schedule import FeeItemModel1Schedule + from ..models.fee_item_model_1_sub_group import FeeItemModel1SubGroup + from ..models.fee_item_model_1_unit import FeeItemModel1Unit + from ..models.fee_item_model_1_version import FeeItemModel1Version + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + account_code_1 = d.pop("accountCode1", UNSET) + + account_code_1_allocation = d.pop("accountCode1Allocation", UNSET) + + account_code_2 = d.pop("accountCode2", UNSET) + + account_code_2_allocation = d.pop("accountCode2Allocation", UNSET) + + account_code_3 = d.pop("accountCode3", UNSET) + + account_code_3_allocation = d.pop("accountCode3Allocation", UNSET) + + amount = d.pop("amount", UNSET) + + _audit_date = d.pop("auditDate", UNSET) + audit_date: Union[Unset, datetime.datetime] + if isinstance(_audit_date, Unset): + audit_date = UNSET + else: + audit_date = isoparse(_audit_date) + + _apply_date = d.pop("applyDate", UNSET) + apply_date: Union[Unset, datetime.datetime] + if isinstance(_apply_date, Unset): + apply_date = UNSET + else: + apply_date = isoparse(_apply_date) + + balance_due = d.pop("balanceDue", UNSET) + + _code = d.pop("code", UNSET) + code: Union[Unset, FeeItemModel1Code] + if isinstance(_code, Unset): + code = UNSET + else: + code = FeeItemModel1Code.from_dict(_code) + + display_order = d.pop("displayOrder", UNSET) + + id = d.pop("id", UNSET) + + invoice_id = d.pop("invoiceId", UNSET) + + max_fee = d.pop("maxFee", UNSET) + + min_fee = d.pop("minFee", UNSET) + + notes = d.pop("notes", UNSET) + + _payment_period = d.pop("paymentPeriod", UNSET) + payment_period: Union[Unset, FeeItemModel1PaymentPeriod] + if isinstance(_payment_period, Unset): + payment_period = UNSET + else: + payment_period = FeeItemModel1PaymentPeriod.from_dict(_payment_period) + + priority = d.pop("priority", UNSET) + + quantity = d.pop("quantity", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + _schedule = d.pop("schedule", UNSET) + schedule: Union[Unset, FeeItemModel1Schedule] + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = FeeItemModel1Schedule.from_dict(_schedule) + + status = d.pop("status", UNSET) + + _sub_group = d.pop("subGroup", UNSET) + sub_group: Union[Unset, FeeItemModel1SubGroup] + if isinstance(_sub_group, Unset): + sub_group = UNSET + else: + sub_group = FeeItemModel1SubGroup.from_dict(_sub_group) + + udf1 = d.pop("udf1", UNSET) + + udf2 = d.pop("udf2", UNSET) + + udf3 = d.pop("udf3", UNSET) + + _unit = d.pop("unit", UNSET) + unit: Union[Unset, FeeItemModel1Unit] + if isinstance(_unit, Unset): + unit = UNSET + else: + unit = FeeItemModel1Unit.from_dict(_unit) + + variable = d.pop("variable", UNSET) + + _version = d.pop("version", UNSET) + version: Union[Unset, FeeItemModel1Version] + if isinstance(_version, Unset): + version = UNSET + else: + version = FeeItemModel1Version.from_dict(_version) + + fee_item_model_1 = cls( + account_code_1=account_code_1, + account_code_1_allocation=account_code_1_allocation, + account_code_2=account_code_2, + account_code_2_allocation=account_code_2_allocation, + account_code_3=account_code_3, + account_code_3_allocation=account_code_3_allocation, + amount=amount, + audit_date=audit_date, + apply_date=apply_date, + balance_due=balance_due, + code=code, + display_order=display_order, + id=id, + invoice_id=invoice_id, + max_fee=max_fee, + min_fee=min_fee, + notes=notes, + payment_period=payment_period, + priority=priority, + quantity=quantity, + record_id=record_id, + schedule=schedule, + status=status, + sub_group=sub_group, + udf1=udf1, + udf2=udf2, + udf3=udf3, + unit=unit, + variable=variable, + version=version, + ) + + fee_item_model_1.additional_properties = d + return fee_item_model_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_code.py b/accelapy/accelapy/records_client/models/fee_item_model_1_code.py new file mode 100644 index 0000000..aa1742b --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_code.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1Code") + + +@_attrs_define +class FeeItemModel1Code: + """A code identifying an associated item + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_code = cls( + text=text, + value=value, + ) + + fee_item_model_1_code.additional_properties = d + return fee_item_model_1_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_payment_period.py b/accelapy/accelapy/records_client/models/fee_item_model_1_payment_period.py new file mode 100644 index 0000000..4a5108f --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_payment_period.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1PaymentPeriod") + + +@_attrs_define +class FeeItemModel1PaymentPeriod: + """The time interval for processing invoices. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_payment_period = cls( + text=text, + value=value, + ) + + fee_item_model_1_payment_period.additional_properties = d + return fee_item_model_1_payment_period + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_schedule.py b/accelapy/accelapy/records_client/models/fee_item_model_1_schedule.py new file mode 100644 index 0000000..6eb8a2e --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_schedule.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1Schedule") + + +@_attrs_define +class FeeItemModel1Schedule: + """The payment schedule name. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_schedule = cls( + text=text, + value=value, + ) + + fee_item_model_1_schedule.additional_properties = d + return fee_item_model_1_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_sub_group.py b/accelapy/accelapy/records_client/models/fee_item_model_1_sub_group.py new file mode 100644 index 0000000..8d9d2ea --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_sub_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1SubGroup") + + +@_attrs_define +class FeeItemModel1SubGroup: + """The subgroup the fee is associated with. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_sub_group = cls( + text=text, + value=value, + ) + + fee_item_model_1_sub_group.additional_properties = d + return fee_item_model_1_sub_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_unit.py b/accelapy/accelapy/records_client/models/fee_item_model_1_unit.py new file mode 100644 index 0000000..0e0e781 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_unit.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1Unit") + + +@_attrs_define +class FeeItemModel1Unit: + """The unit of measure used for the object. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_unit = cls( + text=text, + value=value, + ) + + fee_item_model_1_unit.additional_properties = d + return fee_item_model_1_unit + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_1_version.py b/accelapy/accelapy/records_client/models/fee_item_model_1_version.py new file mode 100644 index 0000000..7536459 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_1_version.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModel1Version") + + +@_attrs_define +class FeeItemModel1Version: + """The payment schedule version + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_1_version = cls( + text=text, + value=value, + ) + + fee_item_model_1_version.additional_properties = d + return fee_item_model_1_version + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_code.py b/accelapy/accelapy/records_client/models/fee_item_model_code.py new file mode 100644 index 0000000..a3a5b20 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_code.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelCode") + + +@_attrs_define +class FeeItemModelCode: + """A code identifying an associated item + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_code = cls( + text=text, + value=value, + ) + + fee_item_model_code.additional_properties = d + return fee_item_model_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_description.py b/accelapy/accelapy/records_client/models/fee_item_model_description.py new file mode 100644 index 0000000..30020cf --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_description.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelDescription") + + +@_attrs_define +class FeeItemModelDescription: + """The fee description. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_description = cls( + text=text, + value=value, + ) + + fee_item_model_description.additional_properties = d + return fee_item_model_description + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_payment_period.py b/accelapy/accelapy/records_client/models/fee_item_model_payment_period.py new file mode 100644 index 0000000..0ec0cf7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_payment_period.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelPaymentPeriod") + + +@_attrs_define +class FeeItemModelPaymentPeriod: + """The time interval for processing invoices. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_payment_period = cls( + text=text, + value=value, + ) + + fee_item_model_payment_period.additional_properties = d + return fee_item_model_payment_period + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_schedule.py b/accelapy/accelapy/records_client/models/fee_item_model_schedule.py new file mode 100644 index 0000000..6c2762c --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_schedule.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelSchedule") + + +@_attrs_define +class FeeItemModelSchedule: + """The payment schedule name. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_schedule = cls( + text=text, + value=value, + ) + + fee_item_model_schedule.additional_properties = d + return fee_item_model_schedule + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_sub_group.py b/accelapy/accelapy/records_client/models/fee_item_model_sub_group.py new file mode 100644 index 0000000..1c53648 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_sub_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelSubGroup") + + +@_attrs_define +class FeeItemModelSubGroup: + """The subgroup the fee is associated with. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_sub_group = cls( + text=text, + value=value, + ) + + fee_item_model_sub_group.additional_properties = d + return fee_item_model_sub_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_unit.py b/accelapy/accelapy/records_client/models/fee_item_model_unit.py new file mode 100644 index 0000000..f5ff2fb --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_unit.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelUnit") + + +@_attrs_define +class FeeItemModelUnit: + """The unit of measure used for the object. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_unit = cls( + text=text, + value=value, + ) + + fee_item_model_unit.additional_properties = d + return fee_item_model_unit + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/fee_item_model_version.py b/accelapy/accelapy/records_client/models/fee_item_model_version.py new file mode 100644 index 0000000..02d2fb8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/fee_item_model_version.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FeeItemModelVersion") + + +@_attrs_define +class FeeItemModelVersion: + """The payment schedule version + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + fee_item_model_version = cls( + text=text, + value=value, + ) + + fee_item_model_version.additional_properties = d + return fee_item_model_version + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/field_model.py b/accelapy/accelapy/records_client/models/field_model.py new file mode 100644 index 0000000..5d4c614 --- /dev/null +++ b/accelapy/accelapy/records_client/models/field_model.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FieldModel") + + +@_attrs_define +class FieldModel: + """ + Attributes: + is_required (Union[Unset, bool]): Indicates whether or not the information is required. + name (Union[Unset, str]): The field name. + """ + + is_required: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_required = self.is_required + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_required is not UNSET: + field_dict["isRequired"] = is_required + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + is_required = d.pop("isRequired", UNSET) + + name = d.pop("name", UNSET) + + field_model = cls( + is_required=is_required, + name=name, + ) + + field_model.additional_properties = d + return field_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/gis_object_model.py b/accelapy/accelapy/records_client/models/gis_object_model.py new file mode 100644 index 0000000..2e3287c --- /dev/null +++ b/accelapy/accelapy/records_client/models/gis_object_model.py @@ -0,0 +1,74 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GISObjectModel") + + +@_attrs_define +class GISObjectModel: + """ + Attributes: + gis_id (Union[Unset, str]): The GIS object id. + layer_id (Union[Unset, str]): The map layer id. + service_id (Union[Unset, str]): The map service id. + """ + + gis_id: Union[Unset, str] = UNSET + layer_id: Union[Unset, str] = UNSET + service_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + gis_id = self.gis_id + layer_id = self.layer_id + service_id = self.service_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if gis_id is not UNSET: + field_dict["gisId"] = gis_id + if layer_id is not UNSET: + field_dict["layerId"] = layer_id + if service_id is not UNSET: + field_dict["serviceId"] = service_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + gis_id = d.pop("gisId", UNSET) + + layer_id = d.pop("layerId", UNSET) + + service_id = d.pop("serviceId", UNSET) + + gis_object_model = cls( + gis_id=gis_id, + layer_id=layer_id, + service_id=service_id, + ) + + gis_object_model.additional_properties = d + return gis_object_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/identifier_model.py b/accelapy/accelapy/records_client/models/identifier_model.py new file mode 100644 index 0000000..96b9b44 --- /dev/null +++ b/accelapy/accelapy/records_client/models/identifier_model.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IdentifierModel") + + +@_attrs_define +class IdentifierModel: + """ + Attributes: + text (Union[Unset, str]): + value (Union[Unset, str]): + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + identifier_model = cls( + text=text, + value=value, + ) + + identifier_model.additional_properties = d + return identifier_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_before_scheduled_time.py b/accelapy/accelapy/records_client/models/inspection_before_scheduled_time.py new file mode 100644 index 0000000..61c2e43 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_before_scheduled_time.py @@ -0,0 +1,78 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionBeforeScheduledTime") + + +@_attrs_define +class InspectionBeforeScheduledTime: + """Specifies the number of days or hours before the scheduled time on the inspection date. + + Attributes: + days (Union[Unset, int]): Inspections can only be cancelled within this number of days before the scheduled time + on the inspection date. + hours (Union[Unset, int]): Inspections can only be cancelled within this number of hours before the scheduled + time on the inspection date. + time (Union[Unset, str]): Inspections can only be cancelled within the number of specified days or hours before + this time ("hh:mm AM|PM") on the inspection date. + """ + + days: Union[Unset, int] = UNSET + hours: Union[Unset, int] = UNSET + time: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + days = self.days + hours = self.hours + time = self.time + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if days is not UNSET: + field_dict["days"] = days + if hours is not UNSET: + field_dict["hours"] = hours + if time is not UNSET: + field_dict["time"] = time + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + days = d.pop("days", UNSET) + + hours = d.pop("hours", UNSET) + + time = d.pop("time", UNSET) + + inspection_before_scheduled_time = cls( + days=days, + hours=hours, + time=time, + ) + + inspection_before_scheduled_time.additional_properties = d + return inspection_before_scheduled_time + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model.py b/accelapy/accelapy/records_client/models/inspection_contact_model.py new file mode 100644 index 0000000..ace20a0 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model.py @@ -0,0 +1,544 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_contact_model_birth_city import InspectionContactModelBirthCity + from ..models.inspection_contact_model_birth_region import InspectionContactModelBirthRegion + from ..models.inspection_contact_model_birth_state import InspectionContactModelBirthState + from ..models.inspection_contact_model_driver_license_state import InspectionContactModelDriverLicenseState + from ..models.inspection_contact_model_gender import InspectionContactModelGender + from ..models.inspection_contact_model_preferred_channel import InspectionContactModelPreferredChannel + from ..models.inspection_contact_model_race import InspectionContactModelRace + from ..models.inspection_contact_model_relation import InspectionContactModelRelation + from ..models.inspection_contact_model_salutation import InspectionContactModelSalutation + from ..models.inspection_contact_model_status import InspectionContactModelStatus + from ..models.inspection_contact_model_type import InspectionContactModelType + from ..models.owner_address_model import OwnerAddressModel + + +T = TypeVar("T", bound="InspectionContactModel") + + +@_attrs_define +class InspectionContactModel: + """ + Attributes: + address (Union[Unset, OwnerAddressModel]): + birth_city (Union[Unset, InspectionContactModelBirthCity]): The city of birth for an individual. + birth_date (Union[Unset, datetime.datetime]): The birth date. + birth_region (Union[Unset, InspectionContactModelBirthRegion]): The country of birth or region of birth for an + individual. + birth_state (Union[Unset, InspectionContactModelBirthState]): The state of birth for an individual. + business_name (Union[Unset, str]): A secondary business name for the applicable individual. + comment (Union[Unset, str]): A comment about the inspection contact. + deceased_date (Union[Unset, datetime.datetime]): The deceased date. + driver_license_number (Union[Unset, str]): The driver's license number of the contact. This field is active only + when the Contact Type selected is Individual. + driver_license_state (Union[Unset, InspectionContactModelDriverLicenseState]): The state that issued the + driver's license. + email (Union[Unset, str]): The contact's email address. + fax (Union[Unset, str]): The fax number for the contact. + fax_country_code (Union[Unset, str]): Fax Number Country Code + federal_employer_id (Union[Unset, str]): The Federal Employer Identification Number. It is used to identify a + business for tax purposes. + first_name (Union[Unset, str]): The contact's first name. + full_name (Union[Unset, str]): The contact's full name. + gender (Union[Unset, InspectionContactModelGender]): The gender (male or female) of the individual. + id (Union[Unset, str]): The contact system id assigned by the Civic Platform server. + individual_or_organization (Union[Unset, str]): The organization to which the contact belongs. This field is + only active when the Contact Type selected is Organization. + last_name (Union[Unset, str]): The last name (surname). + middle_name (Union[Unset, str]): The middle name. + organization_name (Union[Unset, str]): The organization to which the contact belongs. This field is only active + when the Contact Type selected is Organization. + passport_number (Union[Unset, str]): The contact's passport number. This field is only active when the Contact + Type selected is Individual. + phone1 (Union[Unset, str]): The primary telephone number of the contact. + phone_1_country_code (Union[Unset, str]): Phone Number 1 Country Code + phone2 (Union[Unset, str]): The secondary telephone number of the contact. + phone_2_country_code (Union[Unset, str]): Phone Number 2 Country Code + phone3 (Union[Unset, str]): The tertiary telephone number for the contact. + phone_3_country_code (Union[Unset, str]): Phone Number 3 Country Code + post_office_box (Union[Unset, str]): The post office box number. + preferred_channel (Union[Unset, InspectionContactModelPreferredChannel]): The method by which the contact + prefers to be notified, by phone for example. See [Get All Contact Preferred Channels](./api- + settings.html#operation/v4.get.settings.contacts.preferredChannels). + race (Union[Unset, InspectionContactModelRace]): The contact's race or ethnicity. See [Get All Contact + Races](./api-settings.html#operation/v4.get.settings.contacts.races). + relation (Union[Unset, InspectionContactModelRelation]): The contact's relationship to the application or + service request. + salutation (Union[Unset, InspectionContactModelSalutation]): The salutation to be used when addressing the + contact; for example Mr. oar Ms. This field is active only when Contact Type = Individual. See [Get All Contact + Salutations](./api-settings.html#operation/v4.get.settings.contacts.salutations). + service_provider_code (Union[Unset, str]): The unique agency identifier + social_security_number (Union[Unset, str]): The individual's social security number. This field is only active + when the Contact Type selected is Individual. + state_id_number (Union[Unset, str]): The contact's state ID number. This field is only active when the Contact + Type selected is Individual. + status (Union[Unset, InspectionContactModelStatus]): The contact status. + suffix (Union[Unset, str]): The contact name suffix. + title (Union[Unset, str]): The individual's business title. + trade_name (Union[Unset, str]): The contact's preferred business or trade name. This field is active only when + the Contact Type selected is Organization. + type (Union[Unset, InspectionContactModelType]): The contact type. See [Get All Contact Types](./api- + settings.html#operation/v4.get.settings.contacts.types). + """ + + address: Union[Unset, "OwnerAddressModel"] = UNSET + birth_city: Union[Unset, "InspectionContactModelBirthCity"] = UNSET + birth_date: Union[Unset, datetime.datetime] = UNSET + birth_region: Union[Unset, "InspectionContactModelBirthRegion"] = UNSET + birth_state: Union[Unset, "InspectionContactModelBirthState"] = UNSET + business_name: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + deceased_date: Union[Unset, datetime.datetime] = UNSET + driver_license_number: Union[Unset, str] = UNSET + driver_license_state: Union[Unset, "InspectionContactModelDriverLicenseState"] = UNSET + email: Union[Unset, str] = UNSET + fax: Union[Unset, str] = UNSET + fax_country_code: Union[Unset, str] = UNSET + federal_employer_id: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + full_name: Union[Unset, str] = UNSET + gender: Union[Unset, "InspectionContactModelGender"] = UNSET + id: Union[Unset, str] = UNSET + individual_or_organization: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + middle_name: Union[Unset, str] = UNSET + organization_name: Union[Unset, str] = UNSET + passport_number: Union[Unset, str] = UNSET + phone1: Union[Unset, str] = UNSET + phone_1_country_code: Union[Unset, str] = UNSET + phone2: Union[Unset, str] = UNSET + phone_2_country_code: Union[Unset, str] = UNSET + phone3: Union[Unset, str] = UNSET + phone_3_country_code: Union[Unset, str] = UNSET + post_office_box: Union[Unset, str] = UNSET + preferred_channel: Union[Unset, "InspectionContactModelPreferredChannel"] = UNSET + race: Union[Unset, "InspectionContactModelRace"] = UNSET + relation: Union[Unset, "InspectionContactModelRelation"] = UNSET + salutation: Union[Unset, "InspectionContactModelSalutation"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + social_security_number: Union[Unset, str] = UNSET + state_id_number: Union[Unset, str] = UNSET + status: Union[Unset, "InspectionContactModelStatus"] = UNSET + suffix: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + trade_name: Union[Unset, str] = UNSET + type: Union[Unset, "InspectionContactModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address, Unset): + address = self.address.to_dict() + + birth_city: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_city, Unset): + birth_city = self.birth_city.to_dict() + + birth_date: Union[Unset, str] = UNSET + if not isinstance(self.birth_date, Unset): + birth_date = self.birth_date.isoformat() + + birth_region: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_region, Unset): + birth_region = self.birth_region.to_dict() + + birth_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_state, Unset): + birth_state = self.birth_state.to_dict() + + business_name = self.business_name + comment = self.comment + deceased_date: Union[Unset, str] = UNSET + if not isinstance(self.deceased_date, Unset): + deceased_date = self.deceased_date.isoformat() + + driver_license_number = self.driver_license_number + driver_license_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.driver_license_state, Unset): + driver_license_state = self.driver_license_state.to_dict() + + email = self.email + fax = self.fax + fax_country_code = self.fax_country_code + federal_employer_id = self.federal_employer_id + first_name = self.first_name + full_name = self.full_name + gender: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + id = self.id + individual_or_organization = self.individual_or_organization + last_name = self.last_name + middle_name = self.middle_name + organization_name = self.organization_name + passport_number = self.passport_number + phone1 = self.phone1 + phone_1_country_code = self.phone_1_country_code + phone2 = self.phone2 + phone_2_country_code = self.phone_2_country_code + phone3 = self.phone3 + phone_3_country_code = self.phone_3_country_code + post_office_box = self.post_office_box + preferred_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.preferred_channel, Unset): + preferred_channel = self.preferred_channel.to_dict() + + race: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.race, Unset): + race = self.race.to_dict() + + relation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relation, Unset): + relation = self.relation.to_dict() + + salutation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.salutation, Unset): + salutation = self.salutation.to_dict() + + service_provider_code = self.service_provider_code + social_security_number = self.social_security_number + state_id_number = self.state_id_number + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + suffix = self.suffix + title = self.title + trade_name = self.trade_name + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if birth_city is not UNSET: + field_dict["birthCity"] = birth_city + if birth_date is not UNSET: + field_dict["birthDate"] = birth_date + if birth_region is not UNSET: + field_dict["birthRegion"] = birth_region + if birth_state is not UNSET: + field_dict["birthState"] = birth_state + if business_name is not UNSET: + field_dict["businessName"] = business_name + if comment is not UNSET: + field_dict["comment"] = comment + if deceased_date is not UNSET: + field_dict["deceasedDate"] = deceased_date + if driver_license_number is not UNSET: + field_dict["driverLicenseNumber"] = driver_license_number + if driver_license_state is not UNSET: + field_dict["driverLicenseState"] = driver_license_state + if email is not UNSET: + field_dict["email"] = email + if fax is not UNSET: + field_dict["fax"] = fax + if fax_country_code is not UNSET: + field_dict["faxCountryCode"] = fax_country_code + if federal_employer_id is not UNSET: + field_dict["federalEmployerId"] = federal_employer_id + if first_name is not UNSET: + field_dict["firstName"] = first_name + if full_name is not UNSET: + field_dict["fullName"] = full_name + if gender is not UNSET: + field_dict["gender"] = gender + if id is not UNSET: + field_dict["id"] = id + if individual_or_organization is not UNSET: + field_dict["individualOrOrganization"] = individual_or_organization + if last_name is not UNSET: + field_dict["lastName"] = last_name + if middle_name is not UNSET: + field_dict["middleName"] = middle_name + if organization_name is not UNSET: + field_dict["organizationName"] = organization_name + if passport_number is not UNSET: + field_dict["passportNumber"] = passport_number + if phone1 is not UNSET: + field_dict["phone1"] = phone1 + if phone_1_country_code is not UNSET: + field_dict["phone1CountryCode"] = phone_1_country_code + if phone2 is not UNSET: + field_dict["phone2"] = phone2 + if phone_2_country_code is not UNSET: + field_dict["phone2CountryCode"] = phone_2_country_code + if phone3 is not UNSET: + field_dict["phone3"] = phone3 + if phone_3_country_code is not UNSET: + field_dict["phone3CountryCode"] = phone_3_country_code + if post_office_box is not UNSET: + field_dict["postOfficeBox"] = post_office_box + if preferred_channel is not UNSET: + field_dict["preferredChannel"] = preferred_channel + if race is not UNSET: + field_dict["race"] = race + if relation is not UNSET: + field_dict["relation"] = relation + if salutation is not UNSET: + field_dict["salutation"] = salutation + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if social_security_number is not UNSET: + field_dict["socialSecurityNumber"] = social_security_number + if state_id_number is not UNSET: + field_dict["stateIdNumber"] = state_id_number + if status is not UNSET: + field_dict["status"] = status + if suffix is not UNSET: + field_dict["suffix"] = suffix + if title is not UNSET: + field_dict["title"] = title + if trade_name is not UNSET: + field_dict["tradeName"] = trade_name + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_contact_model_birth_city import InspectionContactModelBirthCity + from ..models.inspection_contact_model_birth_region import InspectionContactModelBirthRegion + from ..models.inspection_contact_model_birth_state import InspectionContactModelBirthState + from ..models.inspection_contact_model_driver_license_state import InspectionContactModelDriverLicenseState + from ..models.inspection_contact_model_gender import InspectionContactModelGender + from ..models.inspection_contact_model_preferred_channel import InspectionContactModelPreferredChannel + from ..models.inspection_contact_model_race import InspectionContactModelRace + from ..models.inspection_contact_model_relation import InspectionContactModelRelation + from ..models.inspection_contact_model_salutation import InspectionContactModelSalutation + from ..models.inspection_contact_model_status import InspectionContactModelStatus + from ..models.inspection_contact_model_type import InspectionContactModelType + from ..models.owner_address_model import OwnerAddressModel + + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, OwnerAddressModel] + if isinstance(_address, Unset): + address = UNSET + else: + address = OwnerAddressModel.from_dict(_address) + + _birth_city = d.pop("birthCity", UNSET) + birth_city: Union[Unset, InspectionContactModelBirthCity] + if isinstance(_birth_city, Unset): + birth_city = UNSET + else: + birth_city = InspectionContactModelBirthCity.from_dict(_birth_city) + + _birth_date = d.pop("birthDate", UNSET) + birth_date: Union[Unset, datetime.datetime] + if isinstance(_birth_date, Unset): + birth_date = UNSET + else: + birth_date = isoparse(_birth_date) + + _birth_region = d.pop("birthRegion", UNSET) + birth_region: Union[Unset, InspectionContactModelBirthRegion] + if isinstance(_birth_region, Unset): + birth_region = UNSET + else: + birth_region = InspectionContactModelBirthRegion.from_dict(_birth_region) + + _birth_state = d.pop("birthState", UNSET) + birth_state: Union[Unset, InspectionContactModelBirthState] + if isinstance(_birth_state, Unset): + birth_state = UNSET + else: + birth_state = InspectionContactModelBirthState.from_dict(_birth_state) + + business_name = d.pop("businessName", UNSET) + + comment = d.pop("comment", UNSET) + + _deceased_date = d.pop("deceasedDate", UNSET) + deceased_date: Union[Unset, datetime.datetime] + if isinstance(_deceased_date, Unset): + deceased_date = UNSET + else: + deceased_date = isoparse(_deceased_date) + + driver_license_number = d.pop("driverLicenseNumber", UNSET) + + _driver_license_state = d.pop("driverLicenseState", UNSET) + driver_license_state: Union[Unset, InspectionContactModelDriverLicenseState] + if isinstance(_driver_license_state, Unset): + driver_license_state = UNSET + else: + driver_license_state = InspectionContactModelDriverLicenseState.from_dict(_driver_license_state) + + email = d.pop("email", UNSET) + + fax = d.pop("fax", UNSET) + + fax_country_code = d.pop("faxCountryCode", UNSET) + + federal_employer_id = d.pop("federalEmployerId", UNSET) + + first_name = d.pop("firstName", UNSET) + + full_name = d.pop("fullName", UNSET) + + _gender = d.pop("gender", UNSET) + gender: Union[Unset, InspectionContactModelGender] + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = InspectionContactModelGender.from_dict(_gender) + + id = d.pop("id", UNSET) + + individual_or_organization = d.pop("individualOrOrganization", UNSET) + + last_name = d.pop("lastName", UNSET) + + middle_name = d.pop("middleName", UNSET) + + organization_name = d.pop("organizationName", UNSET) + + passport_number = d.pop("passportNumber", UNSET) + + phone1 = d.pop("phone1", UNSET) + + phone_1_country_code = d.pop("phone1CountryCode", UNSET) + + phone2 = d.pop("phone2", UNSET) + + phone_2_country_code = d.pop("phone2CountryCode", UNSET) + + phone3 = d.pop("phone3", UNSET) + + phone_3_country_code = d.pop("phone3CountryCode", UNSET) + + post_office_box = d.pop("postOfficeBox", UNSET) + + _preferred_channel = d.pop("preferredChannel", UNSET) + preferred_channel: Union[Unset, InspectionContactModelPreferredChannel] + if isinstance(_preferred_channel, Unset): + preferred_channel = UNSET + else: + preferred_channel = InspectionContactModelPreferredChannel.from_dict(_preferred_channel) + + _race = d.pop("race", UNSET) + race: Union[Unset, InspectionContactModelRace] + if isinstance(_race, Unset): + race = UNSET + else: + race = InspectionContactModelRace.from_dict(_race) + + _relation = d.pop("relation", UNSET) + relation: Union[Unset, InspectionContactModelRelation] + if isinstance(_relation, Unset): + relation = UNSET + else: + relation = InspectionContactModelRelation.from_dict(_relation) + + _salutation = d.pop("salutation", UNSET) + salutation: Union[Unset, InspectionContactModelSalutation] + if isinstance(_salutation, Unset): + salutation = UNSET + else: + salutation = InspectionContactModelSalutation.from_dict(_salutation) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + social_security_number = d.pop("socialSecurityNumber", UNSET) + + state_id_number = d.pop("stateIdNumber", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, InspectionContactModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = InspectionContactModelStatus.from_dict(_status) + + suffix = d.pop("suffix", UNSET) + + title = d.pop("title", UNSET) + + trade_name = d.pop("tradeName", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, InspectionContactModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = InspectionContactModelType.from_dict(_type) + + inspection_contact_model = cls( + address=address, + birth_city=birth_city, + birth_date=birth_date, + birth_region=birth_region, + birth_state=birth_state, + business_name=business_name, + comment=comment, + deceased_date=deceased_date, + driver_license_number=driver_license_number, + driver_license_state=driver_license_state, + email=email, + fax=fax, + fax_country_code=fax_country_code, + federal_employer_id=federal_employer_id, + first_name=first_name, + full_name=full_name, + gender=gender, + id=id, + individual_or_organization=individual_or_organization, + last_name=last_name, + middle_name=middle_name, + organization_name=organization_name, + passport_number=passport_number, + phone1=phone1, + phone_1_country_code=phone_1_country_code, + phone2=phone2, + phone_2_country_code=phone_2_country_code, + phone3=phone3, + phone_3_country_code=phone_3_country_code, + post_office_box=post_office_box, + preferred_channel=preferred_channel, + race=race, + relation=relation, + salutation=salutation, + service_provider_code=service_provider_code, + social_security_number=social_security_number, + state_id_number=state_id_number, + status=status, + suffix=suffix, + title=title, + trade_name=trade_name, + type=type, + ) + + inspection_contact_model.additional_properties = d + return inspection_contact_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_birth_city.py b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_city.py new file mode 100644 index 0000000..aca583c --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_city.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelBirthCity") + + +@_attrs_define +class InspectionContactModelBirthCity: + """The city of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_birth_city = cls( + text=text, + value=value, + ) + + inspection_contact_model_birth_city.additional_properties = d + return inspection_contact_model_birth_city + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_birth_region.py b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_region.py new file mode 100644 index 0000000..c57b71f --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_region.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelBirthRegion") + + +@_attrs_define +class InspectionContactModelBirthRegion: + """The country of birth or region of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_birth_region = cls( + text=text, + value=value, + ) + + inspection_contact_model_birth_region.additional_properties = d + return inspection_contact_model_birth_region + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_birth_state.py b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_state.py new file mode 100644 index 0000000..91b5100 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_birth_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelBirthState") + + +@_attrs_define +class InspectionContactModelBirthState: + """The state of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_birth_state = cls( + text=text, + value=value, + ) + + inspection_contact_model_birth_state.additional_properties = d + return inspection_contact_model_birth_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_driver_license_state.py b/accelapy/accelapy/records_client/models/inspection_contact_model_driver_license_state.py new file mode 100644 index 0000000..21155df --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_driver_license_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelDriverLicenseState") + + +@_attrs_define +class InspectionContactModelDriverLicenseState: + """The state that issued the driver's license. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_driver_license_state = cls( + text=text, + value=value, + ) + + inspection_contact_model_driver_license_state.additional_properties = d + return inspection_contact_model_driver_license_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_gender.py b/accelapy/accelapy/records_client/models/inspection_contact_model_gender.py new file mode 100644 index 0000000..8798a61 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_gender.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelGender") + + +@_attrs_define +class InspectionContactModelGender: + """The gender (male or female) of the individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_gender = cls( + text=text, + value=value, + ) + + inspection_contact_model_gender.additional_properties = d + return inspection_contact_model_gender + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_preferred_channel.py b/accelapy/accelapy/records_client/models/inspection_contact_model_preferred_channel.py new file mode 100644 index 0000000..a6e5cec --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_preferred_channel.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelPreferredChannel") + + +@_attrs_define +class InspectionContactModelPreferredChannel: + """The method by which the contact prefers to be notified, by phone for example. See [Get All Contact Preferred + Channels](./api-settings.html#operation/v4.get.settings.contacts.preferredChannels). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_preferred_channel = cls( + text=text, + value=value, + ) + + inspection_contact_model_preferred_channel.additional_properties = d + return inspection_contact_model_preferred_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_race.py b/accelapy/accelapy/records_client/models/inspection_contact_model_race.py new file mode 100644 index 0000000..48a4c51 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_race.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelRace") + + +@_attrs_define +class InspectionContactModelRace: + """The contact's race or ethnicity. See [Get All Contact Races](./api- + settings.html#operation/v4.get.settings.contacts.races). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_race = cls( + text=text, + value=value, + ) + + inspection_contact_model_race.additional_properties = d + return inspection_contact_model_race + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_relation.py b/accelapy/accelapy/records_client/models/inspection_contact_model_relation.py new file mode 100644 index 0000000..3586600 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_relation.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelRelation") + + +@_attrs_define +class InspectionContactModelRelation: + """The contact's relationship to the application or service request. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_relation = cls( + text=text, + value=value, + ) + + inspection_contact_model_relation.additional_properties = d + return inspection_contact_model_relation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_salutation.py b/accelapy/accelapy/records_client/models/inspection_contact_model_salutation.py new file mode 100644 index 0000000..39f058d --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_salutation.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelSalutation") + + +@_attrs_define +class InspectionContactModelSalutation: + """The salutation to be used when addressing the contact; for example Mr. oar Ms. This field is active only when + Contact Type = Individual. See [Get All Contact Salutations](./api- + settings.html#operation/v4.get.settings.contacts.salutations). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_salutation = cls( + text=text, + value=value, + ) + + inspection_contact_model_salutation.additional_properties = d + return inspection_contact_model_salutation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_status.py b/accelapy/accelapy/records_client/models/inspection_contact_model_status.py new file mode 100644 index 0000000..2642e71 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelStatus") + + +@_attrs_define +class InspectionContactModelStatus: + """The contact status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_status = cls( + text=text, + value=value, + ) + + inspection_contact_model_status.additional_properties = d + return inspection_contact_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_contact_model_type.py b/accelapy/accelapy/records_client/models/inspection_contact_model_type.py new file mode 100644 index 0000000..2b46bb9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_contact_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionContactModelType") + + +@_attrs_define +class InspectionContactModelType: + """The contact type. See [Get All Contact Types](./api-settings.html#operation/v4.get.settings.contacts.types). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_contact_model_type = cls( + text=text, + value=value, + ) + + inspection_contact_model_type.additional_properties = d + return inspection_contact_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_model.py b/accelapy/accelapy/records_client/models/inspection_model.py new file mode 100644 index 0000000..1079c8d --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_model.py @@ -0,0 +1,792 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.inspection_model_billable import InspectionModelBillable +from ..models.inspection_model_schedule_end_ampm import InspectionModelScheduleEndAMPM +from ..models.inspection_model_schedule_start_ampm import InspectionModelScheduleStartAMPM +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_contact_model import InspectionContactModel + from ..models.inspection_model_status import InspectionModelStatus + from ..models.inspection_type_simple_model import InspectionTypeSimpleModel + from ..models.record_address_model import RecordAddressModel + from ..models.record_id_model import RecordIdModel + from ..models.record_type_no_alias_model import RecordTypeNoAliasModel + from ..models.simple_record_model import SimpleRecordModel + + +T = TypeVar("T", bound="InspectionModel") + + +@_attrs_define +class InspectionModel: + """ + Attributes: + team_name (Union[Unset, str]): Inspection Team name. + floor (Union[Unset, str]): Inspection Floor. + floor_unit (Union[Unset, str]): Inspection Floor Unit. + address (Union[Unset, RecordAddressModel]): + billable (Union[Unset, InspectionModelBillable]): This defines whether or not the item is billable. + category (Union[Unset, str]): The inspection category, which is used to organize inspection types. An inspection + type is assigned to one or more inspection categories. + comment_display (Union[Unset, str]): Indicates whether or not Accela Citizen Access users can view the + inspection results comments. + comment_public_visible (Union[Unset, List[str]]): Specifies the type of user who can view the inspection result + comments. "All ACA Users" - Both registered and anonymous Accela Citizen Access users can view the comments for + inspection results. "Record Creator Only" - the user who created the record can see the comments for the + inspection results. "Record Creator and Licensed Professional" - The user who created the record and the + licensed professional associated with the record can see the comments for the inspection results. + completed_ampm (Union[Unset, str]): Indicates whether completed time is "AM" or "PM". + completed_date (Union[Unset, datetime.datetime]): The date of completion. + completed_time (Union[Unset, str]): The time of completion. + contact (Union[Unset, InspectionContactModel]): + contact_first_name (Union[Unset, str]): The contact's first name. This field is only active when the Contact + Type selected is Individual. + contact_last_name (Union[Unset, str]): The last name of the contact. + contact_middle_name (Union[Unset, str]): The middle name of the contact. + desired_ampm (Union[Unset, str]): Indicates whether the desired inspection time is AM or PM. + desired_date (Union[Unset, datetime.datetime]): The desired inspection date. + desired_time (Union[Unset, str]): The desired inspection time. + end_mileage (Union[Unset, float]): The ending mileage for the inspection. + end_time (Union[Unset, datetime.datetime]): The time the inspection was completed. + estimated_end_time (Union[Unset, str]): inspection estimated end time. + estimated_start_time (Union[Unset, str]): The scheduled start time for the inspection. + gis_area_name (Union[Unset, str]): The GIS Object ID of the parent application if the application that the + inspection is scheduled for has a parent application that is a project application. + grade (Union[Unset, str]): The name of the inspection grade. + id (Union[Unset, int]): The inspection system id assigned by the Civic Platform server. + inspector_full_name (Union[Unset, str]): The name of the inspector performing the assessment. + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + is_auto_assign (Union[Unset, str]): This defines whether or not you want to automatically reschedule the + inspection when the previous inspection status attains Approved status. + latitude (Union[Unset, float]): The angular distance of a place north or south of the earth's equator, usually + expressed in degrees and minutes. + longitude (Union[Unset, float]): The angular distance of a place east or west of the meridian at Greenwich, + England, usually expressed in degrees and minutes. + major_violation (Union[Unset, int]): The number of major violations. + overtime (Union[Unset, str]): A labor cost factor that indicates time worked beyond a worker's regular working + hours. + priority (Union[Unset, float]): The priority level assigned to the inspection. + public_visible (Union[Unset, str]): This defines whether or not Accela Citizen Access users can view comment + about the inspection results. + record (Union[Unset, SimpleRecordModel]): + record_id (Union[Unset, RecordIdModel]): + record_type (Union[Unset, RecordTypeNoAliasModel]): + request_ampm (Union[Unset, str]): The time segment, AM or PM, for the time specified in the requestTime field. + request_comment (Union[Unset, str]): Comments about the new inspection. For example, you may identify who + requested the inspection. + request_date (Union[Unset, datetime.datetime]): The date when an inspection request is submitted. + request_time (Union[Unset, str]): This time is automatically generated when a new inspection is scheduled and + submitted. + requestor_first_name (Union[Unset, str]): The first name of the person requesting an inspection-related + operation. + requestor_last_name (Union[Unset, str]): The last name of the person requesting an inspection-related operation. + requestor_middle_name (Union[Unset, str]): The middle name of the person requesting an inspection-related + operation. + requestor_phone (Union[Unset, str]): The telephone number for the person who processes the inspection request or + schedules the inspection. + requestor_phone_idd (Union[Unset, str]): The telephone number for the person who processes the inspection + request or schedules the inspection. + requestor_user_id (Union[Unset, str]): The user Id of the person requesting an inspection-related operation. + required_inspection (Union[Unset, str]): This defines whether the inspection is optional or required. + result_comment (Union[Unset, str]): The inspection result comments. + result_type (Union[Unset, str]): The type of result that can be ascibed to an inspection. There are three result + types: Approved: Approves (passes) the checklist item. Denied: Denies (fails) the checklist item. Informational: + Indicates that the checklist items do not need a status of app + schedule_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + schedule_end_ampm (Union[Unset, InspectionModelScheduleEndAMPM]): Indicates whether the scheduleEndTime is in + the AM or PM. + schedule_end_time (Union[Unset, str]): The scheduled end time for the inspection. + schedule_start_ampm (Union[Unset, InspectionModelScheduleStartAMPM]): AM indicates the 12 hour period from + midnight to noon. PM indicates the 12 hour period from noon to midnight. + schedule_start_time (Union[Unset, str]): The scheduled start time for the inspection. + service_provider_code (Union[Unset, str]): The unique agency identifier. + start_mileage (Union[Unset, float]): The starting mileage for the inspection. + start_time (Union[Unset, datetime.datetime]): The time when you started the inspection. + status (Union[Unset, InspectionModelStatus]): The inspection status. See [Get All Inspection Statuses](./api- + settings.html#operation/v4.get.settings.inspections.statuses). + submit_ampm (Union[Unset, str]): The time block for the scheduled inspection. + submit_date (Union[Unset, datetime.datetime]): The date that the inspection was submitted. + submit_time (Union[Unset, str]): The time that a new inspection is submitted. Civic Platform generates this + value. + total_mileage (Union[Unset, float]): The total mileage for the inspection. + total_score (Union[Unset, int]): The overall score of the inspection that includes the inspection result, + inspection grade, checklist total score and checklist major violation option. + total_time (Union[Unset, float]): The total amount of time used to do an inspection. + type (Union[Unset, InspectionTypeSimpleModel]): + unit_number (Union[Unset, str]): The number of time units (see timeUnitDuration) comprising an inspection. + units (Union[Unset, float]): The amount of time comprising the smallest time unit for conducting an inspection. + vehicle_id (Union[Unset, str]): A number, such as the license plate number or VIN, that identifies the vehicle + used to complete an inspection. + """ + + team_name: Union[Unset, str] = UNSET + floor: Union[Unset, str] = UNSET + floor_unit: Union[Unset, str] = UNSET + address: Union[Unset, "RecordAddressModel"] = UNSET + billable: Union[Unset, InspectionModelBillable] = UNSET + category: Union[Unset, str] = UNSET + comment_display: Union[Unset, str] = UNSET + comment_public_visible: Union[Unset, List[str]] = UNSET + completed_ampm: Union[Unset, str] = UNSET + completed_date: Union[Unset, datetime.datetime] = UNSET + completed_time: Union[Unset, str] = UNSET + contact: Union[Unset, "InspectionContactModel"] = UNSET + contact_first_name: Union[Unset, str] = UNSET + contact_last_name: Union[Unset, str] = UNSET + contact_middle_name: Union[Unset, str] = UNSET + desired_ampm: Union[Unset, str] = UNSET + desired_date: Union[Unset, datetime.datetime] = UNSET + desired_time: Union[Unset, str] = UNSET + end_mileage: Union[Unset, float] = UNSET + end_time: Union[Unset, datetime.datetime] = UNSET + estimated_end_time: Union[Unset, str] = UNSET + estimated_start_time: Union[Unset, str] = UNSET + gis_area_name: Union[Unset, str] = UNSET + grade: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + inspector_full_name: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + is_auto_assign: Union[Unset, str] = UNSET + latitude: Union[Unset, float] = UNSET + longitude: Union[Unset, float] = UNSET + major_violation: Union[Unset, int] = UNSET + overtime: Union[Unset, str] = UNSET + priority: Union[Unset, float] = UNSET + public_visible: Union[Unset, str] = UNSET + record: Union[Unset, "SimpleRecordModel"] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + record_type: Union[Unset, "RecordTypeNoAliasModel"] = UNSET + request_ampm: Union[Unset, str] = UNSET + request_comment: Union[Unset, str] = UNSET + request_date: Union[Unset, datetime.datetime] = UNSET + request_time: Union[Unset, str] = UNSET + requestor_first_name: Union[Unset, str] = UNSET + requestor_last_name: Union[Unset, str] = UNSET + requestor_middle_name: Union[Unset, str] = UNSET + requestor_phone: Union[Unset, str] = UNSET + requestor_phone_idd: Union[Unset, str] = UNSET + requestor_user_id: Union[Unset, str] = UNSET + required_inspection: Union[Unset, str] = UNSET + result_comment: Union[Unset, str] = UNSET + result_type: Union[Unset, str] = UNSET + schedule_date: Union[Unset, datetime.datetime] = UNSET + schedule_end_ampm: Union[Unset, InspectionModelScheduleEndAMPM] = UNSET + schedule_end_time: Union[Unset, str] = UNSET + schedule_start_ampm: Union[Unset, InspectionModelScheduleStartAMPM] = UNSET + schedule_start_time: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + start_mileage: Union[Unset, float] = UNSET + start_time: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "InspectionModelStatus"] = UNSET + submit_ampm: Union[Unset, str] = UNSET + submit_date: Union[Unset, datetime.datetime] = UNSET + submit_time: Union[Unset, str] = UNSET + total_mileage: Union[Unset, float] = UNSET + total_score: Union[Unset, int] = UNSET + total_time: Union[Unset, float] = UNSET + type: Union[Unset, "InspectionTypeSimpleModel"] = UNSET + unit_number: Union[Unset, str] = UNSET + units: Union[Unset, float] = UNSET + vehicle_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + team_name = self.team_name + floor = self.floor + floor_unit = self.floor_unit + address: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address, Unset): + address = self.address.to_dict() + + billable: Union[Unset, str] = UNSET + if not isinstance(self.billable, Unset): + billable = self.billable.value + + category = self.category + comment_display = self.comment_display + comment_public_visible: Union[Unset, List[str]] = UNSET + if not isinstance(self.comment_public_visible, Unset): + comment_public_visible = self.comment_public_visible + + completed_ampm = self.completed_ampm + completed_date: Union[Unset, str] = UNSET + if not isinstance(self.completed_date, Unset): + completed_date = self.completed_date.isoformat() + + completed_time = self.completed_time + contact: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.contact, Unset): + contact = self.contact.to_dict() + + contact_first_name = self.contact_first_name + contact_last_name = self.contact_last_name + contact_middle_name = self.contact_middle_name + desired_ampm = self.desired_ampm + desired_date: Union[Unset, str] = UNSET + if not isinstance(self.desired_date, Unset): + desired_date = self.desired_date.isoformat() + + desired_time = self.desired_time + end_mileage = self.end_mileage + end_time: Union[Unset, str] = UNSET + if not isinstance(self.end_time, Unset): + end_time = self.end_time.isoformat() + + estimated_end_time = self.estimated_end_time + estimated_start_time = self.estimated_start_time + gis_area_name = self.gis_area_name + grade = self.grade + id = self.id + inspector_full_name = self.inspector_full_name + inspector_id = self.inspector_id + is_auto_assign = self.is_auto_assign + latitude = self.latitude + longitude = self.longitude + major_violation = self.major_violation + overtime = self.overtime + priority = self.priority + public_visible = self.public_visible + record: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record, Unset): + record = self.record.to_dict() + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + record_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_type, Unset): + record_type = self.record_type.to_dict() + + request_ampm = self.request_ampm + request_comment = self.request_comment + request_date: Union[Unset, str] = UNSET + if not isinstance(self.request_date, Unset): + request_date = self.request_date.isoformat() + + request_time = self.request_time + requestor_first_name = self.requestor_first_name + requestor_last_name = self.requestor_last_name + requestor_middle_name = self.requestor_middle_name + requestor_phone = self.requestor_phone + requestor_phone_idd = self.requestor_phone_idd + requestor_user_id = self.requestor_user_id + required_inspection = self.required_inspection + result_comment = self.result_comment + result_type = self.result_type + schedule_date: Union[Unset, str] = UNSET + if not isinstance(self.schedule_date, Unset): + schedule_date = self.schedule_date.isoformat() + + schedule_end_ampm: Union[Unset, str] = UNSET + if not isinstance(self.schedule_end_ampm, Unset): + schedule_end_ampm = self.schedule_end_ampm.value + + schedule_end_time = self.schedule_end_time + schedule_start_ampm: Union[Unset, str] = UNSET + if not isinstance(self.schedule_start_ampm, Unset): + schedule_start_ampm = self.schedule_start_ampm.value + + schedule_start_time = self.schedule_start_time + service_provider_code = self.service_provider_code + start_mileage = self.start_mileage + start_time: Union[Unset, str] = UNSET + if not isinstance(self.start_time, Unset): + start_time = self.start_time.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + submit_ampm = self.submit_ampm + submit_date: Union[Unset, str] = UNSET + if not isinstance(self.submit_date, Unset): + submit_date = self.submit_date.isoformat() + + submit_time = self.submit_time + total_mileage = self.total_mileage + total_score = self.total_score + total_time = self.total_time + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_number = self.unit_number + units = self.units + vehicle_id = self.vehicle_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if team_name is not UNSET: + field_dict["teamName"] = team_name + if floor is not UNSET: + field_dict["floor"] = floor + if floor_unit is not UNSET: + field_dict["floorUnit"] = floor_unit + if address is not UNSET: + field_dict["address"] = address + if billable is not UNSET: + field_dict["billable"] = billable + if category is not UNSET: + field_dict["category"] = category + if comment_display is not UNSET: + field_dict["commentDisplay"] = comment_display + if comment_public_visible is not UNSET: + field_dict["commentPublicVisible"] = comment_public_visible + if completed_ampm is not UNSET: + field_dict["completedAMPM"] = completed_ampm + if completed_date is not UNSET: + field_dict["completedDate"] = completed_date + if completed_time is not UNSET: + field_dict["completedTime"] = completed_time + if contact is not UNSET: + field_dict["contact"] = contact + if contact_first_name is not UNSET: + field_dict["contactFirstName"] = contact_first_name + if contact_last_name is not UNSET: + field_dict["contactLastName"] = contact_last_name + if contact_middle_name is not UNSET: + field_dict["contactMiddleName"] = contact_middle_name + if desired_ampm is not UNSET: + field_dict["desiredAMPM"] = desired_ampm + if desired_date is not UNSET: + field_dict["desiredDate"] = desired_date + if desired_time is not UNSET: + field_dict["desiredTime"] = desired_time + if end_mileage is not UNSET: + field_dict["endMileage"] = end_mileage + if end_time is not UNSET: + field_dict["endTime"] = end_time + if estimated_end_time is not UNSET: + field_dict["estimatedEndTime"] = estimated_end_time + if estimated_start_time is not UNSET: + field_dict["estimatedStartTime"] = estimated_start_time + if gis_area_name is not UNSET: + field_dict["gisAreaName"] = gis_area_name + if grade is not UNSET: + field_dict["grade"] = grade + if id is not UNSET: + field_dict["id"] = id + if inspector_full_name is not UNSET: + field_dict["inspectorFullName"] = inspector_full_name + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if is_auto_assign is not UNSET: + field_dict["isAutoAssign"] = is_auto_assign + if latitude is not UNSET: + field_dict["latitude"] = latitude + if longitude is not UNSET: + field_dict["longitude"] = longitude + if major_violation is not UNSET: + field_dict["majorViolation"] = major_violation + if overtime is not UNSET: + field_dict["overtime"] = overtime + if priority is not UNSET: + field_dict["priority"] = priority + if public_visible is not UNSET: + field_dict["publicVisible"] = public_visible + if record is not UNSET: + field_dict["record"] = record + if record_id is not UNSET: + field_dict["recordId"] = record_id + if record_type is not UNSET: + field_dict["recordType"] = record_type + if request_ampm is not UNSET: + field_dict["requestAMPM"] = request_ampm + if request_comment is not UNSET: + field_dict["requestComment"] = request_comment + if request_date is not UNSET: + field_dict["requestDate"] = request_date + if request_time is not UNSET: + field_dict["requestTime"] = request_time + if requestor_first_name is not UNSET: + field_dict["requestorFirstName"] = requestor_first_name + if requestor_last_name is not UNSET: + field_dict["requestorLastName"] = requestor_last_name + if requestor_middle_name is not UNSET: + field_dict["requestorMiddleName"] = requestor_middle_name + if requestor_phone is not UNSET: + field_dict["requestorPhone"] = requestor_phone + if requestor_phone_idd is not UNSET: + field_dict["requestorPhoneIDD"] = requestor_phone_idd + if requestor_user_id is not UNSET: + field_dict["requestorUserId"] = requestor_user_id + if required_inspection is not UNSET: + field_dict["requiredInspection"] = required_inspection + if result_comment is not UNSET: + field_dict["resultComment"] = result_comment + if result_type is not UNSET: + field_dict["resultType"] = result_type + if schedule_date is not UNSET: + field_dict["scheduleDate"] = schedule_date + if schedule_end_ampm is not UNSET: + field_dict["scheduleEndAMPM"] = schedule_end_ampm + if schedule_end_time is not UNSET: + field_dict["scheduleEndTime"] = schedule_end_time + if schedule_start_ampm is not UNSET: + field_dict["scheduleStartAMPM"] = schedule_start_ampm + if schedule_start_time is not UNSET: + field_dict["scheduleStartTime"] = schedule_start_time + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if start_mileage is not UNSET: + field_dict["startMileage"] = start_mileage + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if submit_ampm is not UNSET: + field_dict["submitAMPM"] = submit_ampm + if submit_date is not UNSET: + field_dict["submitDate"] = submit_date + if submit_time is not UNSET: + field_dict["submitTime"] = submit_time + if total_mileage is not UNSET: + field_dict["totalMileage"] = total_mileage + if total_score is not UNSET: + field_dict["totalScore"] = total_score + if total_time is not UNSET: + field_dict["totalTime"] = total_time + if type is not UNSET: + field_dict["type"] = type + if unit_number is not UNSET: + field_dict["unitNumber"] = unit_number + if units is not UNSET: + field_dict["units"] = units + if vehicle_id is not UNSET: + field_dict["vehicleId"] = vehicle_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_contact_model import InspectionContactModel + from ..models.inspection_model_status import InspectionModelStatus + from ..models.inspection_type_simple_model import InspectionTypeSimpleModel + from ..models.record_address_model import RecordAddressModel + from ..models.record_id_model import RecordIdModel + from ..models.record_type_no_alias_model import RecordTypeNoAliasModel + from ..models.simple_record_model import SimpleRecordModel + + d = src_dict.copy() + team_name = d.pop("teamName", UNSET) + + floor = d.pop("floor", UNSET) + + floor_unit = d.pop("floorUnit", UNSET) + + _address = d.pop("address", UNSET) + address: Union[Unset, RecordAddressModel] + if isinstance(_address, Unset): + address = UNSET + else: + address = RecordAddressModel.from_dict(_address) + + _billable = d.pop("billable", UNSET) + billable: Union[Unset, InspectionModelBillable] + if isinstance(_billable, Unset): + billable = UNSET + else: + billable = InspectionModelBillable(_billable) + + category = d.pop("category", UNSET) + + comment_display = d.pop("commentDisplay", UNSET) + + comment_public_visible = cast(List[str], d.pop("commentPublicVisible", UNSET)) + + completed_ampm = d.pop("completedAMPM", UNSET) + + _completed_date = d.pop("completedDate", UNSET) + completed_date: Union[Unset, datetime.datetime] + if isinstance(_completed_date, Unset): + completed_date = UNSET + else: + completed_date = isoparse(_completed_date) + + completed_time = d.pop("completedTime", UNSET) + + _contact = d.pop("contact", UNSET) + contact: Union[Unset, InspectionContactModel] + if isinstance(_contact, Unset): + contact = UNSET + else: + contact = InspectionContactModel.from_dict(_contact) + + contact_first_name = d.pop("contactFirstName", UNSET) + + contact_last_name = d.pop("contactLastName", UNSET) + + contact_middle_name = d.pop("contactMiddleName", UNSET) + + desired_ampm = d.pop("desiredAMPM", UNSET) + + _desired_date = d.pop("desiredDate", UNSET) + desired_date: Union[Unset, datetime.datetime] + if isinstance(_desired_date, Unset): + desired_date = UNSET + else: + desired_date = isoparse(_desired_date) + + desired_time = d.pop("desiredTime", UNSET) + + end_mileage = d.pop("endMileage", UNSET) + + _end_time = d.pop("endTime", UNSET) + end_time: Union[Unset, datetime.datetime] + if isinstance(_end_time, Unset): + end_time = UNSET + else: + end_time = isoparse(_end_time) + + estimated_end_time = d.pop("estimatedEndTime", UNSET) + + estimated_start_time = d.pop("estimatedStartTime", UNSET) + + gis_area_name = d.pop("gisAreaName", UNSET) + + grade = d.pop("grade", UNSET) + + id = d.pop("id", UNSET) + + inspector_full_name = d.pop("inspectorFullName", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + is_auto_assign = d.pop("isAutoAssign", UNSET) + + latitude = d.pop("latitude", UNSET) + + longitude = d.pop("longitude", UNSET) + + major_violation = d.pop("majorViolation", UNSET) + + overtime = d.pop("overtime", UNSET) + + priority = d.pop("priority", UNSET) + + public_visible = d.pop("publicVisible", UNSET) + + _record = d.pop("record", UNSET) + record: Union[Unset, SimpleRecordModel] + if isinstance(_record, Unset): + record = UNSET + else: + record = SimpleRecordModel.from_dict(_record) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + _record_type = d.pop("recordType", UNSET) + record_type: Union[Unset, RecordTypeNoAliasModel] + if isinstance(_record_type, Unset): + record_type = UNSET + else: + record_type = RecordTypeNoAliasModel.from_dict(_record_type) + + request_ampm = d.pop("requestAMPM", UNSET) + + request_comment = d.pop("requestComment", UNSET) + + _request_date = d.pop("requestDate", UNSET) + request_date: Union[Unset, datetime.datetime] + if isinstance(_request_date, Unset): + request_date = UNSET + else: + request_date = isoparse(_request_date) + + request_time = d.pop("requestTime", UNSET) + + requestor_first_name = d.pop("requestorFirstName", UNSET) + + requestor_last_name = d.pop("requestorLastName", UNSET) + + requestor_middle_name = d.pop("requestorMiddleName", UNSET) + + requestor_phone = d.pop("requestorPhone", UNSET) + + requestor_phone_idd = d.pop("requestorPhoneIDD", UNSET) + + requestor_user_id = d.pop("requestorUserId", UNSET) + + required_inspection = d.pop("requiredInspection", UNSET) + + result_comment = d.pop("resultComment", UNSET) + + result_type = d.pop("resultType", UNSET) + + _schedule_date = d.pop("scheduleDate", UNSET) + schedule_date: Union[Unset, datetime.datetime] + if isinstance(_schedule_date, Unset): + schedule_date = UNSET + else: + schedule_date = isoparse(_schedule_date) + + _schedule_end_ampm = d.pop("scheduleEndAMPM", UNSET) + schedule_end_ampm: Union[Unset, InspectionModelScheduleEndAMPM] + if isinstance(_schedule_end_ampm, Unset): + schedule_end_ampm = UNSET + else: + schedule_end_ampm = InspectionModelScheduleEndAMPM(_schedule_end_ampm) + + schedule_end_time = d.pop("scheduleEndTime", UNSET) + + _schedule_start_ampm = d.pop("scheduleStartAMPM", UNSET) + schedule_start_ampm: Union[Unset, InspectionModelScheduleStartAMPM] + if isinstance(_schedule_start_ampm, Unset): + schedule_start_ampm = UNSET + else: + schedule_start_ampm = InspectionModelScheduleStartAMPM(_schedule_start_ampm) + + schedule_start_time = d.pop("scheduleStartTime", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + start_mileage = d.pop("startMileage", UNSET) + + _start_time = d.pop("startTime", UNSET) + start_time: Union[Unset, datetime.datetime] + if isinstance(_start_time, Unset): + start_time = UNSET + else: + start_time = isoparse(_start_time) + + _status = d.pop("status", UNSET) + status: Union[Unset, InspectionModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = InspectionModelStatus.from_dict(_status) + + submit_ampm = d.pop("submitAMPM", UNSET) + + _submit_date = d.pop("submitDate", UNSET) + submit_date: Union[Unset, datetime.datetime] + if isinstance(_submit_date, Unset): + submit_date = UNSET + else: + submit_date = isoparse(_submit_date) + + submit_time = d.pop("submitTime", UNSET) + + total_mileage = d.pop("totalMileage", UNSET) + + total_score = d.pop("totalScore", UNSET) + + total_time = d.pop("totalTime", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, InspectionTypeSimpleModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = InspectionTypeSimpleModel.from_dict(_type) + + unit_number = d.pop("unitNumber", UNSET) + + units = d.pop("units", UNSET) + + vehicle_id = d.pop("vehicleId", UNSET) + + inspection_model = cls( + team_name=team_name, + floor=floor, + floor_unit=floor_unit, + address=address, + billable=billable, + category=category, + comment_display=comment_display, + comment_public_visible=comment_public_visible, + completed_ampm=completed_ampm, + completed_date=completed_date, + completed_time=completed_time, + contact=contact, + contact_first_name=contact_first_name, + contact_last_name=contact_last_name, + contact_middle_name=contact_middle_name, + desired_ampm=desired_ampm, + desired_date=desired_date, + desired_time=desired_time, + end_mileage=end_mileage, + end_time=end_time, + estimated_end_time=estimated_end_time, + estimated_start_time=estimated_start_time, + gis_area_name=gis_area_name, + grade=grade, + id=id, + inspector_full_name=inspector_full_name, + inspector_id=inspector_id, + is_auto_assign=is_auto_assign, + latitude=latitude, + longitude=longitude, + major_violation=major_violation, + overtime=overtime, + priority=priority, + public_visible=public_visible, + record=record, + record_id=record_id, + record_type=record_type, + request_ampm=request_ampm, + request_comment=request_comment, + request_date=request_date, + request_time=request_time, + requestor_first_name=requestor_first_name, + requestor_last_name=requestor_last_name, + requestor_middle_name=requestor_middle_name, + requestor_phone=requestor_phone, + requestor_phone_idd=requestor_phone_idd, + requestor_user_id=requestor_user_id, + required_inspection=required_inspection, + result_comment=result_comment, + result_type=result_type, + schedule_date=schedule_date, + schedule_end_ampm=schedule_end_ampm, + schedule_end_time=schedule_end_time, + schedule_start_ampm=schedule_start_ampm, + schedule_start_time=schedule_start_time, + service_provider_code=service_provider_code, + start_mileage=start_mileage, + start_time=start_time, + status=status, + submit_ampm=submit_ampm, + submit_date=submit_date, + submit_time=submit_time, + total_mileage=total_mileage, + total_score=total_score, + total_time=total_time, + type=type, + unit_number=unit_number, + units=units, + vehicle_id=vehicle_id, + ) + + inspection_model.additional_properties = d + return inspection_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_model_billable.py b/accelapy/accelapy/records_client/models/inspection_model_billable.py new file mode 100644 index 0000000..17d85b3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_model_billable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionModelBillable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_model_schedule_end_ampm.py b/accelapy/accelapy/records_client/models/inspection_model_schedule_end_ampm.py new file mode 100644 index 0000000..eb033b5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_model_schedule_end_ampm.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionModelScheduleEndAMPM(str, Enum): + AM = "AM" + PM = "PM" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_model_schedule_start_ampm.py b/accelapy/accelapy/records_client/models/inspection_model_schedule_start_ampm.py new file mode 100644 index 0000000..48d097f --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_model_schedule_start_ampm.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionModelScheduleStartAMPM(str, Enum): + AM = "AM" + PM = "PM" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_model_status.py b/accelapy/accelapy/records_client/models/inspection_model_status.py new file mode 100644 index 0000000..7369bff --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_model_status.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionModelStatus") + + +@_attrs_define +class InspectionModelStatus: + """The inspection status. See [Get All Inspection Statuses](./api- + settings.html#operation/v4.get.settings.inspections.statuses). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_model_status = cls( + text=text, + value=value, + ) + + inspection_model_status.additional_properties = d + return inspection_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_restriction_model.py b/accelapy/accelapy/records_client/models/inspection_restriction_model.py new file mode 100644 index 0000000..834a09b --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_restriction_model.py @@ -0,0 +1,72 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_before_scheduled_time import InspectionBeforeScheduledTime + + +T = TypeVar("T", bound="InspectionRestrictionModel") + + +@_attrs_define +class InspectionRestrictionModel: + """ + Attributes: + before_scheduled_time (Union[Unset, InspectionBeforeScheduledTime]): Specifies the number of days or hours + before the scheduled time on the inspection date. + """ + + before_scheduled_time: Union[Unset, "InspectionBeforeScheduledTime"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + before_scheduled_time: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.before_scheduled_time, Unset): + before_scheduled_time = self.before_scheduled_time.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if before_scheduled_time is not UNSET: + field_dict["beforeScheduledTime"] = before_scheduled_time + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_before_scheduled_time import InspectionBeforeScheduledTime + + d = src_dict.copy() + _before_scheduled_time = d.pop("beforeScheduledTime", UNSET) + before_scheduled_time: Union[Unset, InspectionBeforeScheduledTime] + if isinstance(_before_scheduled_time, Unset): + before_scheduled_time = UNSET + else: + before_scheduled_time = InspectionBeforeScheduledTime.from_dict(_before_scheduled_time) + + inspection_restriction_model = cls( + before_scheduled_time=before_scheduled_time, + ) + + inspection_restriction_model.additional_properties = d + return inspection_restriction_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_type_associations_model.py b/accelapy/accelapy/records_client/models/inspection_type_associations_model.py new file mode 100644 index 0000000..f0dc49a --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_associations_model.py @@ -0,0 +1,78 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_type_associations_model_standard_comment_group import ( + InspectionTypeAssociationsModelStandardCommentGroup, + ) + + +T = TypeVar("T", bound="InspectionTypeAssociationsModel") + + +@_attrs_define +class InspectionTypeAssociationsModel: + """ + Attributes: + standard_comment_group (Union[Unset, InspectionTypeAssociationsModelStandardCommentGroup]): The name of the + standard comment group associated with the inspection type. + """ + + standard_comment_group: Union[Unset, "InspectionTypeAssociationsModelStandardCommentGroup"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + standard_comment_group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.standard_comment_group, Unset): + standard_comment_group = self.standard_comment_group.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if standard_comment_group is not UNSET: + field_dict["standardCommentGroup"] = standard_comment_group + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_type_associations_model_standard_comment_group import ( + InspectionTypeAssociationsModelStandardCommentGroup, + ) + + d = src_dict.copy() + _standard_comment_group = d.pop("standardCommentGroup", UNSET) + standard_comment_group: Union[Unset, InspectionTypeAssociationsModelStandardCommentGroup] + if isinstance(_standard_comment_group, Unset): + standard_comment_group = UNSET + else: + standard_comment_group = InspectionTypeAssociationsModelStandardCommentGroup.from_dict( + _standard_comment_group + ) + + inspection_type_associations_model = cls( + standard_comment_group=standard_comment_group, + ) + + inspection_type_associations_model.additional_properties = d + return inspection_type_associations_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_type_associations_model_standard_comment_group.py b/accelapy/accelapy/records_client/models/inspection_type_associations_model_standard_comment_group.py new file mode 100644 index 0000000..f3c1d2a --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_associations_model_standard_comment_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionTypeAssociationsModelStandardCommentGroup") + + +@_attrs_define +class InspectionTypeAssociationsModelStandardCommentGroup: + """The name of the standard comment group associated with the inspection type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_type_associations_model_standard_comment_group = cls( + text=text, + value=value, + ) + + inspection_type_associations_model_standard_comment_group.additional_properties = d + return inspection_type_associations_model_standard_comment_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_type_model.py b/accelapy/accelapy/records_client/models/inspection_type_model.py new file mode 100644 index 0000000..76eb882 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model.py @@ -0,0 +1,570 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.inspection_type_model_allow_fail_checklist_items import InspectionTypeModelAllowFailChecklistItems +from ..models.inspection_type_model_allow_multi_inspections import InspectionTypeModelAllowMultiInspections +from ..models.inspection_type_model_carryover_flag import InspectionTypeModelCarryoverFlag +from ..models.inspection_type_model_flow_enabled_flag import InspectionTypeModelFlowEnabledFlag +from ..models.inspection_type_model_has_cancel_permission import InspectionTypeModelHasCancelPermission +from ..models.inspection_type_model_has_flow_flag import InspectionTypeModelHasFlowFlag +from ..models.inspection_type_model_has_next_inspection_advance import InspectionTypeModelHasNextInspectionAdvance +from ..models.inspection_type_model_has_reschdule_permission import InspectionTypeModelHasReschdulePermission +from ..models.inspection_type_model_has_schdule_permission import InspectionTypeModelHasSchdulePermission +from ..models.inspection_type_model_inspection_editable import InspectionTypeModelInspectionEditable +from ..models.inspection_type_model_is_auto_assign import InspectionTypeModelIsAutoAssign +from ..models.inspection_type_model_is_required import InspectionTypeModelIsRequired +from ..models.inspection_type_model_public_visible import InspectionTypeModelPublicVisible +from ..models.inspection_type_model_total_score_option import InspectionTypeModelTotalScoreOption +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.department_model import DepartmentModel + from ..models.inspection_restriction_model import InspectionRestrictionModel + from ..models.inspection_type_associations_model import InspectionTypeAssociationsModel + from ..models.inspection_type_model_group_name import InspectionTypeModelGroupName + from ..models.r_guide_sheet_group_model import RGuideSheetGroupModel + + +T = TypeVar("T", bound="InspectionTypeModel") + + +@_attrs_define +class InspectionTypeModel: + """ + Attributes: + allow_fail_checklist_items (Union[Unset, InspectionTypeModelAllowFailChecklistItems]): Indicates whether or not + to allow inspection to pass with failed checklist items for the current inspection type or from previous + inspections. + allow_multi_inspections (Union[Unset, InspectionTypeModelAllowMultiInspections]): Indicates whether or not to + allow the scheduling of multiple inspections for this inspection type. + associations (Union[Unset, InspectionTypeAssociationsModel]): + cancel_restriction (Union[Unset, InspectionRestrictionModel]): + carryover_flag (Union[Unset, InspectionTypeModelCarryoverFlag]): Indicates how failed guidesheet items for an + inspection type are carried over to the next inspection guidesheet. + + NULL or empty string : Guidesheet items are not carried over. + + "A" : Automatic carry-over of failed guidesheet items to the next inspection guidesheet item. + default_department (Union[Unset, DepartmentModel]): + disciplines (Union[Unset, List[str]]): The inspection disciplines assigned to the inspection type. + flow_enabled_flag (Union[Unset, InspectionTypeModelFlowEnabledFlag]): Indicates whether or not to include the + inspection in the inspection flow process. + grade (Union[Unset, str]): The name of the inspection grade. + group (Union[Unset, str]): The name of a group of inspection types. + group_name (Union[Unset, InspectionTypeModelGroupName]): The descriptive name associated to an inspection group + code. + guide_group (Union[Unset, RGuideSheetGroupModel]): + has_cancel_permission (Union[Unset, InspectionTypeModelHasCancelPermission]): Indicates whether or not the user + can reschedule the inspection. + has_flow_flag (Union[Unset, InspectionTypeModelHasFlowFlag]): Indicates whether or not to include the inspection + in the inspection flow process. + has_next_inspection_advance (Union[Unset, InspectionTypeModelHasNextInspectionAdvance]): Indicates whether or + not the next inspection can be scheduled in advance. + has_reschdule_permission (Union[Unset, InspectionTypeModelHasReschdulePermission]): Indicates whether or not the + user can reschedule the inspection. + has_schdule_permission (Union[Unset, InspectionTypeModelHasSchdulePermission]): Indicates whether or not the + user can schedule the inspection. Note that hasSchdulePermission returns "Y" if + result.inspectionTypes.schdulePermission is either "REQUEST_ONLY_PENDING", "REQUEST_SAME_DAY_NEXT_DAY", or + "SCHEDULE_USING_CALENDAR". If result.inspectionTypes.schdulePermission is "NONE" or null, hasSchdulePermission + returns "N". + id (Union[Unset, int]): The inspection type system id assigned by the Civic Platform server. + inspection_editable (Union[Unset, InspectionTypeModelInspectionEditable]): Indicates whether or not inspection + result, grade or checklist can be edited. + is_auto_assign (Union[Unset, InspectionTypeModelIsAutoAssign]): Indicates whether or not you want to + automatically reschedule the inspection when the previous inspection status attains Approved status. + is_required (Union[Unset, InspectionTypeModelIsRequired]): Indicates whether or not the information is required. + ivr_number (Union[Unset, int]): The IVR (Interactive Voice Response) number assigned to the inspection type. + + Added in Civic Platform 9.3.0 + max_points (Union[Unset, float]): The number of points allowed for an inspection, after which the inspection + fails. + priority (Union[Unset, str]): The priority level assigned to the inspection type. + public_visible (Union[Unset, InspectionTypeModelPublicVisible]): Indicates whether or not Accela Citizen Access + users can view comment about the inspection results. + referece_number (Union[Unset, str]): The reference number associated with an inspection. + reschedule_restriction (Union[Unset, InspectionRestrictionModel]): + result_group (Union[Unset, str]): The name of a grouping of Inspection results, usually indicative of a range of + inspection scores. + schdule_permission (Union[Unset, str]): Returns one of the scheduling permissions in Citizen Access: + + NONE - Does not allow public users to schedule this inspection type online. + + REQUEST_ONLY_PENDING - Only allows public users to request for an inspection online. The agency coordinates the + appointment for the inspection date and time. + + REQUEST_SAME_DAY_NEXT_DAY - Allows public users to request an inspection for the same day, next day, or next + available day, based on the inspection type calendar parameters defined on the inspection type. + + SCHEDULE_USING_CALENDAR - Allows public users to schedule inspections based on the availability on the + inspection type calendar. + text (Union[Unset, str]): The localized display text. + total_score (Union[Unset, int]): The overall score of the inspection that includes the inspection result, + inspection grade, checklist total score and checklist major violation option. + total_score_option (Union[Unset, InspectionTypeModelTotalScoreOption]): Indicates the method for calculating + total scores of checklist items. There are four options: + + TOTAL - Gets the total score of all checklists as the inspection score. + + MAX - Gets the max score of all checklists as the inspection score. + + MIN - Gets the min score of all checklists as the inspection score. + + AVG - Gets the average score of all checklists as the inspection score. + + SUBTRACT - Subtracts the total score of all the checklist items from the Total Score defined for the inspection + type. + unit_number (Union[Unset, str]): The number of time units (see timeUnitDuration) comprising an inspection. + units (Union[Unset, float]): The amount of time comprising the smallest time unit for conducting an inspection. + value (Union[Unset, str]): The value for the specified parameter. + """ + + allow_fail_checklist_items: Union[Unset, InspectionTypeModelAllowFailChecklistItems] = UNSET + allow_multi_inspections: Union[Unset, InspectionTypeModelAllowMultiInspections] = UNSET + associations: Union[Unset, "InspectionTypeAssociationsModel"] = UNSET + cancel_restriction: Union[Unset, "InspectionRestrictionModel"] = UNSET + carryover_flag: Union[Unset, InspectionTypeModelCarryoverFlag] = UNSET + default_department: Union[Unset, "DepartmentModel"] = UNSET + disciplines: Union[Unset, List[str]] = UNSET + flow_enabled_flag: Union[Unset, InspectionTypeModelFlowEnabledFlag] = UNSET + grade: Union[Unset, str] = UNSET + group: Union[Unset, str] = UNSET + group_name: Union[Unset, "InspectionTypeModelGroupName"] = UNSET + guide_group: Union[Unset, "RGuideSheetGroupModel"] = UNSET + has_cancel_permission: Union[Unset, InspectionTypeModelHasCancelPermission] = UNSET + has_flow_flag: Union[Unset, InspectionTypeModelHasFlowFlag] = UNSET + has_next_inspection_advance: Union[Unset, InspectionTypeModelHasNextInspectionAdvance] = UNSET + has_reschdule_permission: Union[Unset, InspectionTypeModelHasReschdulePermission] = UNSET + has_schdule_permission: Union[Unset, InspectionTypeModelHasSchdulePermission] = UNSET + id: Union[Unset, int] = UNSET + inspection_editable: Union[Unset, InspectionTypeModelInspectionEditable] = UNSET + is_auto_assign: Union[Unset, InspectionTypeModelIsAutoAssign] = UNSET + is_required: Union[Unset, InspectionTypeModelIsRequired] = UNSET + ivr_number: Union[Unset, int] = UNSET + max_points: Union[Unset, float] = UNSET + priority: Union[Unset, str] = UNSET + public_visible: Union[Unset, InspectionTypeModelPublicVisible] = UNSET + referece_number: Union[Unset, str] = UNSET + reschedule_restriction: Union[Unset, "InspectionRestrictionModel"] = UNSET + result_group: Union[Unset, str] = UNSET + schdule_permission: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + total_score: Union[Unset, int] = UNSET + total_score_option: Union[Unset, InspectionTypeModelTotalScoreOption] = UNSET + unit_number: Union[Unset, str] = UNSET + units: Union[Unset, float] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + allow_fail_checklist_items: Union[Unset, str] = UNSET + if not isinstance(self.allow_fail_checklist_items, Unset): + allow_fail_checklist_items = self.allow_fail_checklist_items.value + + allow_multi_inspections: Union[Unset, str] = UNSET + if not isinstance(self.allow_multi_inspections, Unset): + allow_multi_inspections = self.allow_multi_inspections.value + + associations: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.associations, Unset): + associations = self.associations.to_dict() + + cancel_restriction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.cancel_restriction, Unset): + cancel_restriction = self.cancel_restriction.to_dict() + + carryover_flag: Union[Unset, str] = UNSET + if not isinstance(self.carryover_flag, Unset): + carryover_flag = self.carryover_flag.value + + default_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.default_department, Unset): + default_department = self.default_department.to_dict() + + disciplines: Union[Unset, List[str]] = UNSET + if not isinstance(self.disciplines, Unset): + disciplines = self.disciplines + + flow_enabled_flag: Union[Unset, str] = UNSET + if not isinstance(self.flow_enabled_flag, Unset): + flow_enabled_flag = self.flow_enabled_flag.value + + grade = self.grade + group = self.group + group_name: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group_name, Unset): + group_name = self.group_name.to_dict() + + guide_group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.guide_group, Unset): + guide_group = self.guide_group.to_dict() + + has_cancel_permission: Union[Unset, str] = UNSET + if not isinstance(self.has_cancel_permission, Unset): + has_cancel_permission = self.has_cancel_permission.value + + has_flow_flag: Union[Unset, str] = UNSET + if not isinstance(self.has_flow_flag, Unset): + has_flow_flag = self.has_flow_flag.value + + has_next_inspection_advance: Union[Unset, str] = UNSET + if not isinstance(self.has_next_inspection_advance, Unset): + has_next_inspection_advance = self.has_next_inspection_advance.value + + has_reschdule_permission: Union[Unset, str] = UNSET + if not isinstance(self.has_reschdule_permission, Unset): + has_reschdule_permission = self.has_reschdule_permission.value + + has_schdule_permission: Union[Unset, str] = UNSET + if not isinstance(self.has_schdule_permission, Unset): + has_schdule_permission = self.has_schdule_permission.value + + id = self.id + inspection_editable: Union[Unset, str] = UNSET + if not isinstance(self.inspection_editable, Unset): + inspection_editable = self.inspection_editable.value + + is_auto_assign: Union[Unset, str] = UNSET + if not isinstance(self.is_auto_assign, Unset): + is_auto_assign = self.is_auto_assign.value + + is_required: Union[Unset, str] = UNSET + if not isinstance(self.is_required, Unset): + is_required = self.is_required.value + + ivr_number = self.ivr_number + max_points = self.max_points + priority = self.priority + public_visible: Union[Unset, str] = UNSET + if not isinstance(self.public_visible, Unset): + public_visible = self.public_visible.value + + referece_number = self.referece_number + reschedule_restriction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reschedule_restriction, Unset): + reschedule_restriction = self.reschedule_restriction.to_dict() + + result_group = self.result_group + schdule_permission = self.schdule_permission + text = self.text + total_score = self.total_score + total_score_option: Union[Unset, str] = UNSET + if not isinstance(self.total_score_option, Unset): + total_score_option = self.total_score_option.value + + unit_number = self.unit_number + units = self.units + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allow_fail_checklist_items is not UNSET: + field_dict["allowFailChecklistItems"] = allow_fail_checklist_items + if allow_multi_inspections is not UNSET: + field_dict["allowMultiInspections"] = allow_multi_inspections + if associations is not UNSET: + field_dict["associations"] = associations + if cancel_restriction is not UNSET: + field_dict["cancelRestriction"] = cancel_restriction + if carryover_flag is not UNSET: + field_dict["carryoverFlag"] = carryover_flag + if default_department is not UNSET: + field_dict["defaultDepartment"] = default_department + if disciplines is not UNSET: + field_dict["disciplines"] = disciplines + if flow_enabled_flag is not UNSET: + field_dict["flowEnabledFlag"] = flow_enabled_flag + if grade is not UNSET: + field_dict["grade"] = grade + if group is not UNSET: + field_dict["group"] = group + if group_name is not UNSET: + field_dict["groupName"] = group_name + if guide_group is not UNSET: + field_dict["guideGroup"] = guide_group + if has_cancel_permission is not UNSET: + field_dict["hasCancelPermission"] = has_cancel_permission + if has_flow_flag is not UNSET: + field_dict["hasFlowFlag"] = has_flow_flag + if has_next_inspection_advance is not UNSET: + field_dict["hasNextInspectionAdvance"] = has_next_inspection_advance + if has_reschdule_permission is not UNSET: + field_dict["hasReschdulePermission"] = has_reschdule_permission + if has_schdule_permission is not UNSET: + field_dict["hasSchdulePermission"] = has_schdule_permission + if id is not UNSET: + field_dict["id"] = id + if inspection_editable is not UNSET: + field_dict["inspectionEditable"] = inspection_editable + if is_auto_assign is not UNSET: + field_dict["isAutoAssign"] = is_auto_assign + if is_required is not UNSET: + field_dict["isRequired"] = is_required + if ivr_number is not UNSET: + field_dict["ivrNumber"] = ivr_number + if max_points is not UNSET: + field_dict["maxPoints"] = max_points + if priority is not UNSET: + field_dict["priority"] = priority + if public_visible is not UNSET: + field_dict["publicVisible"] = public_visible + if referece_number is not UNSET: + field_dict["refereceNumber"] = referece_number + if reschedule_restriction is not UNSET: + field_dict["rescheduleRestriction"] = reschedule_restriction + if result_group is not UNSET: + field_dict["resultGroup"] = result_group + if schdule_permission is not UNSET: + field_dict["schdulePermission"] = schdule_permission + if text is not UNSET: + field_dict["text"] = text + if total_score is not UNSET: + field_dict["totalScore"] = total_score + if total_score_option is not UNSET: + field_dict["totalScoreOption"] = total_score_option + if unit_number is not UNSET: + field_dict["unitNumber"] = unit_number + if units is not UNSET: + field_dict["units"] = units + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.department_model import DepartmentModel + from ..models.inspection_restriction_model import InspectionRestrictionModel + from ..models.inspection_type_associations_model import InspectionTypeAssociationsModel + from ..models.inspection_type_model_group_name import InspectionTypeModelGroupName + from ..models.r_guide_sheet_group_model import RGuideSheetGroupModel + + d = src_dict.copy() + _allow_fail_checklist_items = d.pop("allowFailChecklistItems", UNSET) + allow_fail_checklist_items: Union[Unset, InspectionTypeModelAllowFailChecklistItems] + if isinstance(_allow_fail_checklist_items, Unset): + allow_fail_checklist_items = UNSET + else: + allow_fail_checklist_items = InspectionTypeModelAllowFailChecklistItems(_allow_fail_checklist_items) + + _allow_multi_inspections = d.pop("allowMultiInspections", UNSET) + allow_multi_inspections: Union[Unset, InspectionTypeModelAllowMultiInspections] + if isinstance(_allow_multi_inspections, Unset): + allow_multi_inspections = UNSET + else: + allow_multi_inspections = InspectionTypeModelAllowMultiInspections(_allow_multi_inspections) + + _associations = d.pop("associations", UNSET) + associations: Union[Unset, InspectionTypeAssociationsModel] + if isinstance(_associations, Unset): + associations = UNSET + else: + associations = InspectionTypeAssociationsModel.from_dict(_associations) + + _cancel_restriction = d.pop("cancelRestriction", UNSET) + cancel_restriction: Union[Unset, InspectionRestrictionModel] + if isinstance(_cancel_restriction, Unset): + cancel_restriction = UNSET + else: + cancel_restriction = InspectionRestrictionModel.from_dict(_cancel_restriction) + + _carryover_flag = d.pop("carryoverFlag", UNSET) + carryover_flag: Union[Unset, InspectionTypeModelCarryoverFlag] + if isinstance(_carryover_flag, Unset): + carryover_flag = UNSET + else: + carryover_flag = InspectionTypeModelCarryoverFlag(_carryover_flag) + + _default_department = d.pop("defaultDepartment", UNSET) + default_department: Union[Unset, DepartmentModel] + if isinstance(_default_department, Unset): + default_department = UNSET + else: + default_department = DepartmentModel.from_dict(_default_department) + + disciplines = cast(List[str], d.pop("disciplines", UNSET)) + + _flow_enabled_flag = d.pop("flowEnabledFlag", UNSET) + flow_enabled_flag: Union[Unset, InspectionTypeModelFlowEnabledFlag] + if isinstance(_flow_enabled_flag, Unset): + flow_enabled_flag = UNSET + else: + flow_enabled_flag = InspectionTypeModelFlowEnabledFlag(_flow_enabled_flag) + + grade = d.pop("grade", UNSET) + + group = d.pop("group", UNSET) + + _group_name = d.pop("groupName", UNSET) + group_name: Union[Unset, InspectionTypeModelGroupName] + if isinstance(_group_name, Unset): + group_name = UNSET + else: + group_name = InspectionTypeModelGroupName.from_dict(_group_name) + + _guide_group = d.pop("guideGroup", UNSET) + guide_group: Union[Unset, RGuideSheetGroupModel] + if isinstance(_guide_group, Unset): + guide_group = UNSET + else: + guide_group = RGuideSheetGroupModel.from_dict(_guide_group) + + _has_cancel_permission = d.pop("hasCancelPermission", UNSET) + has_cancel_permission: Union[Unset, InspectionTypeModelHasCancelPermission] + if isinstance(_has_cancel_permission, Unset): + has_cancel_permission = UNSET + else: + has_cancel_permission = InspectionTypeModelHasCancelPermission(_has_cancel_permission) + + _has_flow_flag = d.pop("hasFlowFlag", UNSET) + has_flow_flag: Union[Unset, InspectionTypeModelHasFlowFlag] + if isinstance(_has_flow_flag, Unset): + has_flow_flag = UNSET + else: + has_flow_flag = InspectionTypeModelHasFlowFlag(_has_flow_flag) + + _has_next_inspection_advance = d.pop("hasNextInspectionAdvance", UNSET) + has_next_inspection_advance: Union[Unset, InspectionTypeModelHasNextInspectionAdvance] + if isinstance(_has_next_inspection_advance, Unset): + has_next_inspection_advance = UNSET + else: + has_next_inspection_advance = InspectionTypeModelHasNextInspectionAdvance(_has_next_inspection_advance) + + _has_reschdule_permission = d.pop("hasReschdulePermission", UNSET) + has_reschdule_permission: Union[Unset, InspectionTypeModelHasReschdulePermission] + if isinstance(_has_reschdule_permission, Unset): + has_reschdule_permission = UNSET + else: + has_reschdule_permission = InspectionTypeModelHasReschdulePermission(_has_reschdule_permission) + + _has_schdule_permission = d.pop("hasSchdulePermission", UNSET) + has_schdule_permission: Union[Unset, InspectionTypeModelHasSchdulePermission] + if isinstance(_has_schdule_permission, Unset): + has_schdule_permission = UNSET + else: + has_schdule_permission = InspectionTypeModelHasSchdulePermission(_has_schdule_permission) + + id = d.pop("id", UNSET) + + _inspection_editable = d.pop("inspectionEditable", UNSET) + inspection_editable: Union[Unset, InspectionTypeModelInspectionEditable] + if isinstance(_inspection_editable, Unset): + inspection_editable = UNSET + else: + inspection_editable = InspectionTypeModelInspectionEditable(_inspection_editable) + + _is_auto_assign = d.pop("isAutoAssign", UNSET) + is_auto_assign: Union[Unset, InspectionTypeModelIsAutoAssign] + if isinstance(_is_auto_assign, Unset): + is_auto_assign = UNSET + else: + is_auto_assign = InspectionTypeModelIsAutoAssign(_is_auto_assign) + + _is_required = d.pop("isRequired", UNSET) + is_required: Union[Unset, InspectionTypeModelIsRequired] + if isinstance(_is_required, Unset): + is_required = UNSET + else: + is_required = InspectionTypeModelIsRequired(_is_required) + + ivr_number = d.pop("ivrNumber", UNSET) + + max_points = d.pop("maxPoints", UNSET) + + priority = d.pop("priority", UNSET) + + _public_visible = d.pop("publicVisible", UNSET) + public_visible: Union[Unset, InspectionTypeModelPublicVisible] + if isinstance(_public_visible, Unset): + public_visible = UNSET + else: + public_visible = InspectionTypeModelPublicVisible(_public_visible) + + referece_number = d.pop("refereceNumber", UNSET) + + _reschedule_restriction = d.pop("rescheduleRestriction", UNSET) + reschedule_restriction: Union[Unset, InspectionRestrictionModel] + if isinstance(_reschedule_restriction, Unset): + reschedule_restriction = UNSET + else: + reschedule_restriction = InspectionRestrictionModel.from_dict(_reschedule_restriction) + + result_group = d.pop("resultGroup", UNSET) + + schdule_permission = d.pop("schdulePermission", UNSET) + + text = d.pop("text", UNSET) + + total_score = d.pop("totalScore", UNSET) + + _total_score_option = d.pop("totalScoreOption", UNSET) + total_score_option: Union[Unset, InspectionTypeModelTotalScoreOption] + if isinstance(_total_score_option, Unset): + total_score_option = UNSET + else: + total_score_option = InspectionTypeModelTotalScoreOption(_total_score_option) + + unit_number = d.pop("unitNumber", UNSET) + + units = d.pop("units", UNSET) + + value = d.pop("value", UNSET) + + inspection_type_model = cls( + allow_fail_checklist_items=allow_fail_checklist_items, + allow_multi_inspections=allow_multi_inspections, + associations=associations, + cancel_restriction=cancel_restriction, + carryover_flag=carryover_flag, + default_department=default_department, + disciplines=disciplines, + flow_enabled_flag=flow_enabled_flag, + grade=grade, + group=group, + group_name=group_name, + guide_group=guide_group, + has_cancel_permission=has_cancel_permission, + has_flow_flag=has_flow_flag, + has_next_inspection_advance=has_next_inspection_advance, + has_reschdule_permission=has_reschdule_permission, + has_schdule_permission=has_schdule_permission, + id=id, + inspection_editable=inspection_editable, + is_auto_assign=is_auto_assign, + is_required=is_required, + ivr_number=ivr_number, + max_points=max_points, + priority=priority, + public_visible=public_visible, + referece_number=referece_number, + reschedule_restriction=reschedule_restriction, + result_group=result_group, + schdule_permission=schdule_permission, + text=text, + total_score=total_score, + total_score_option=total_score_option, + unit_number=unit_number, + units=units, + value=value, + ) + + inspection_type_model.additional_properties = d + return inspection_type_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_allow_fail_checklist_items.py b/accelapy/accelapy/records_client/models/inspection_type_model_allow_fail_checklist_items.py new file mode 100644 index 0000000..efd8172 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_allow_fail_checklist_items.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelAllowFailChecklistItems(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_allow_multi_inspections.py b/accelapy/accelapy/records_client/models/inspection_type_model_allow_multi_inspections.py new file mode 100644 index 0000000..a23e75d --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_allow_multi_inspections.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelAllowMultiInspections(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_carryover_flag.py b/accelapy/accelapy/records_client/models/inspection_type_model_carryover_flag.py new file mode 100644 index 0000000..1a438cd --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_carryover_flag.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class InspectionTypeModelCarryoverFlag(str, Enum): + A = "A" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_flow_enabled_flag.py b/accelapy/accelapy/records_client/models/inspection_type_model_flow_enabled_flag.py new file mode 100644 index 0000000..1870f9f --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_flow_enabled_flag.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelFlowEnabledFlag(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_group_name.py b/accelapy/accelapy/records_client/models/inspection_type_model_group_name.py new file mode 100644 index 0000000..00fadc1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_group_name.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionTypeModelGroupName") + + +@_attrs_define +class InspectionTypeModelGroupName: + """The descriptive name associated to an inspection group code. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_type_model_group_name = cls( + text=text, + value=value, + ) + + inspection_type_model_group_name.additional_properties = d + return inspection_type_model_group_name + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_has_cancel_permission.py b/accelapy/accelapy/records_client/models/inspection_type_model_has_cancel_permission.py new file mode 100644 index 0000000..a1c0758 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_has_cancel_permission.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelHasCancelPermission(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_has_flow_flag.py b/accelapy/accelapy/records_client/models/inspection_type_model_has_flow_flag.py new file mode 100644 index 0000000..218b7c5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_has_flow_flag.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelHasFlowFlag(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_has_next_inspection_advance.py b/accelapy/accelapy/records_client/models/inspection_type_model_has_next_inspection_advance.py new file mode 100644 index 0000000..edbb53d --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_has_next_inspection_advance.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelHasNextInspectionAdvance(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_has_reschdule_permission.py b/accelapy/accelapy/records_client/models/inspection_type_model_has_reschdule_permission.py new file mode 100644 index 0000000..834b857 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_has_reschdule_permission.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelHasReschdulePermission(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_has_schdule_permission.py b/accelapy/accelapy/records_client/models/inspection_type_model_has_schdule_permission.py new file mode 100644 index 0000000..b57d833 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_has_schdule_permission.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelHasSchdulePermission(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_inspection_editable.py b/accelapy/accelapy/records_client/models/inspection_type_model_inspection_editable.py new file mode 100644 index 0000000..ab81707 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_inspection_editable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelInspectionEditable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_is_auto_assign.py b/accelapy/accelapy/records_client/models/inspection_type_model_is_auto_assign.py new file mode 100644 index 0000000..b556e75 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_is_auto_assign.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelIsAutoAssign(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_is_required.py b/accelapy/accelapy/records_client/models/inspection_type_model_is_required.py new file mode 100644 index 0000000..ab98d91 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_is_required.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelIsRequired(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_public_visible.py b/accelapy/accelapy/records_client/models/inspection_type_model_public_visible.py new file mode 100644 index 0000000..59538f1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_public_visible.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InspectionTypeModelPublicVisible(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_model_total_score_option.py b/accelapy/accelapy/records_client/models/inspection_type_model_total_score_option.py new file mode 100644 index 0000000..61bc7a7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_model_total_score_option.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class InspectionTypeModelTotalScoreOption(str, Enum): + AVG = "AVG" + MAX = "MAX" + MIN = "MIN" + SUBTRACT = "SUBTRACT" + TOTAL = "TOTAL" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/inspection_type_simple_model.py b/accelapy/accelapy/records_client/models/inspection_type_simple_model.py new file mode 100644 index 0000000..a9961d8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/inspection_type_simple_model.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="InspectionTypeSimpleModel") + + +@_attrs_define +class InspectionTypeSimpleModel: + """ + Attributes: + group (Union[Unset, str]): + id (Union[Unset, int]): + ivr_number (Union[Unset, int]): The IVR (Interactive Voice Response) number assigned to the inspection type. + + Added in Civic Platform 9.3.0 + text (Union[Unset, str]): + value (Union[Unset, str]): + """ + + group: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + ivr_number: Union[Unset, int] = UNSET + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + group = self.group + id = self.id + ivr_number = self.ivr_number + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if ivr_number is not UNSET: + field_dict["ivrNumber"] = ivr_number + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + group = d.pop("group", UNSET) + + id = d.pop("id", UNSET) + + ivr_number = d.pop("ivrNumber", UNSET) + + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + inspection_type_simple_model = cls( + group=group, + id=id, + ivr_number=ivr_number, + text=text, + value=value, + ) + + inspection_type_simple_model.additional_properties = d + return inspection_type_simple_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/invoice_model.py b/accelapy/accelapy/records_client/models/invoice_model.py new file mode 100644 index 0000000..269629a --- /dev/null +++ b/accelapy/accelapy/records_client/models/invoice_model.py @@ -0,0 +1,257 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.invoice_model_printed import InvoiceModelPrinted +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_model import FeeItemModel + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="InvoiceModel") + + +@_attrs_define +class InvoiceModel: + """ + Attributes: + amount (Union[Unset, float]): The invoice fee amount. + audit_status (Union[Unset, str]): The audit status of the invoice fee item. + balance (Union[Unset, float]): The amount due. + due_date (Union[Unset, datetime.datetime]): The invoice due date. + fees (Union[Unset, List['FeeItemModel']]): + id (Union[Unset, int]): The unique id of the invoice. + inv_batch_date (Union[Unset, datetime.datetime]): The invoice batch date. + inv_comment (Union[Unset, str]): A comment related to the invoice. + inv_status (Union[Unset, str]): The invoice status. + invoice_date (Union[Unset, datetime.datetime]): The invoice date. + invoice_number (Union[Unset, str]): The invoice number string. + printed (Union[Unset, InvoiceModelPrinted]): Indicates whether or not the invoice is printed. + record_id (Union[Unset, RecordIdModel]): + service_provider_code (Union[Unset, str]): The unique agency identifier. + udf1 (Union[Unset, str]): Invoice user defined field 1. + udf2 (Union[Unset, str]): Invoice user defined field 2. + udf3 (Union[Unset, str]): Invoice user defined field 3. + udf4 (Union[Unset, str]): Invoice user defined field 4. + """ + + amount: Union[Unset, float] = UNSET + audit_status: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + fees: Union[Unset, List["FeeItemModel"]] = UNSET + id: Union[Unset, int] = UNSET + inv_batch_date: Union[Unset, datetime.datetime] = UNSET + inv_comment: Union[Unset, str] = UNSET + inv_status: Union[Unset, str] = UNSET + invoice_date: Union[Unset, datetime.datetime] = UNSET + invoice_number: Union[Unset, str] = UNSET + printed: Union[Unset, InvoiceModelPrinted] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + udf1: Union[Unset, str] = UNSET + udf2: Union[Unset, str] = UNSET + udf3: Union[Unset, str] = UNSET + udf4: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount = self.amount + audit_status = self.audit_status + balance = self.balance + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + fees: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.fees, Unset): + fees = [] + for fees_item_data in self.fees: + fees_item = fees_item_data.to_dict() + + fees.append(fees_item) + + id = self.id + inv_batch_date: Union[Unset, str] = UNSET + if not isinstance(self.inv_batch_date, Unset): + inv_batch_date = self.inv_batch_date.isoformat() + + inv_comment = self.inv_comment + inv_status = self.inv_status + invoice_date: Union[Unset, str] = UNSET + if not isinstance(self.invoice_date, Unset): + invoice_date = self.invoice_date.isoformat() + + invoice_number = self.invoice_number + printed: Union[Unset, str] = UNSET + if not isinstance(self.printed, Unset): + printed = self.printed.value + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + service_provider_code = self.service_provider_code + udf1 = self.udf1 + udf2 = self.udf2 + udf3 = self.udf3 + udf4 = self.udf4 + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount is not UNSET: + field_dict["amount"] = amount + if audit_status is not UNSET: + field_dict["auditStatus"] = audit_status + if balance is not UNSET: + field_dict["balance"] = balance + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if fees is not UNSET: + field_dict["fees"] = fees + if id is not UNSET: + field_dict["id"] = id + if inv_batch_date is not UNSET: + field_dict["invBatchDate"] = inv_batch_date + if inv_comment is not UNSET: + field_dict["invComment"] = inv_comment + if inv_status is not UNSET: + field_dict["invStatus"] = inv_status + if invoice_date is not UNSET: + field_dict["invoiceDate"] = invoice_date + if invoice_number is not UNSET: + field_dict["invoiceNumber"] = invoice_number + if printed is not UNSET: + field_dict["printed"] = printed + if record_id is not UNSET: + field_dict["recordId"] = record_id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if udf1 is not UNSET: + field_dict["udf1"] = udf1 + if udf2 is not UNSET: + field_dict["udf2"] = udf2 + if udf3 is not UNSET: + field_dict["udf3"] = udf3 + if udf4 is not UNSET: + field_dict["udf4"] = udf4 + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_model import FeeItemModel + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + amount = d.pop("amount", UNSET) + + audit_status = d.pop("auditStatus", UNSET) + + balance = d.pop("balance", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + fees = [] + _fees = d.pop("fees", UNSET) + for fees_item_data in _fees or []: + fees_item = FeeItemModel.from_dict(fees_item_data) + + fees.append(fees_item) + + id = d.pop("id", UNSET) + + _inv_batch_date = d.pop("invBatchDate", UNSET) + inv_batch_date: Union[Unset, datetime.datetime] + if isinstance(_inv_batch_date, Unset): + inv_batch_date = UNSET + else: + inv_batch_date = isoparse(_inv_batch_date) + + inv_comment = d.pop("invComment", UNSET) + + inv_status = d.pop("invStatus", UNSET) + + _invoice_date = d.pop("invoiceDate", UNSET) + invoice_date: Union[Unset, datetime.datetime] + if isinstance(_invoice_date, Unset): + invoice_date = UNSET + else: + invoice_date = isoparse(_invoice_date) + + invoice_number = d.pop("invoiceNumber", UNSET) + + _printed = d.pop("printed", UNSET) + printed: Union[Unset, InvoiceModelPrinted] + if isinstance(_printed, Unset): + printed = UNSET + else: + printed = InvoiceModelPrinted(_printed) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + udf1 = d.pop("udf1", UNSET) + + udf2 = d.pop("udf2", UNSET) + + udf3 = d.pop("udf3", UNSET) + + udf4 = d.pop("udf4", UNSET) + + invoice_model = cls( + amount=amount, + audit_status=audit_status, + balance=balance, + due_date=due_date, + fees=fees, + id=id, + inv_batch_date=inv_batch_date, + inv_comment=inv_comment, + inv_status=inv_status, + invoice_date=invoice_date, + invoice_number=invoice_number, + printed=printed, + record_id=record_id, + service_provider_code=service_provider_code, + udf1=udf1, + udf2=udf2, + udf3=udf3, + udf4=udf4, + ) + + invoice_model.additional_properties = d + return invoice_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/invoice_model_printed.py b/accelapy/accelapy/records_client/models/invoice_model_printed.py new file mode 100644 index 0000000..c36c7b1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/invoice_model_printed.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class InvoiceModelPrinted(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/license_professional_model.py b/accelapy/accelapy/records_client/models/license_professional_model.py new file mode 100644 index 0000000..c66e4d7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model.py @@ -0,0 +1,467 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.license_professional_model_country import LicenseProfessionalModelCountry + from ..models.license_professional_model_gender import LicenseProfessionalModelGender + from ..models.license_professional_model_license_type import LicenseProfessionalModelLicenseType + from ..models.license_professional_model_licensing_board import LicenseProfessionalModelLicensingBoard + from ..models.license_professional_model_salutation import LicenseProfessionalModelSalutation + from ..models.license_professional_model_state import LicenseProfessionalModelState + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="LicenseProfessionalModel") + + +@_attrs_define +class LicenseProfessionalModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): The first line of the address. + address_line_2 (Union[Unset, str]): The second line of the address. + address_line_3 (Union[Unset, str]): The third line of the address. + birth_date (Union[Unset, datetime.datetime]): The birth date of an individual. + business_license (Union[Unset, str]): The official business license number issued by an agency. A licensed + professional can have the same license number assigned to multiple license types. + business_name (Union[Unset, str]): A business name for the applicable individual. + business_name_2 (Union[Unset, str]): A secondary business name for the applicable individual. + city (Union[Unset, str]): The name of the city. + comment (Union[Unset, str]): Comments or notes about the current context. + country (Union[Unset, LicenseProfessionalModelCountry]): The name of the country. + email (Union[Unset, str]): The contact's email address. + expiration_date (Union[Unset, datetime.datetime]): The license expiration date. + fax (Union[Unset, str]): The fax number for the contact. + federal_employer_id (Union[Unset, str]): The Federal Employer Identification Number. It is used to identify a + business for tax purposes. + first_name (Union[Unset, str]): The licensed professional's first name. + full_name (Union[Unset, str]): The licensed professional's full name. + gender (Union[Unset, LicenseProfessionalModelGender]): The gender (male or female) of the individual. + id (Union[Unset, str]): The licensed professional system id assigned by the Civic Platform server. + is_primary (Union[Unset, str]): Indicates whether or not to designate the professional as the primary + professional. + last_name (Union[Unset, str]): The licensed professional's last name. + last_renewal_date (Union[Unset, datetime.datetime]): The last date for a professionals renewal license. + license_number (Union[Unset, str]): The licensed professional's license number. + license_type (Union[Unset, LicenseProfessionalModelLicenseType]): The type of license held by the professional. + licensing_board (Union[Unset, LicenseProfessionalModelLicensingBoard]): The name of the licensing board that + issued the license. + middle_name (Union[Unset, str]): The licensed professional's middle name. + original_issue_date (Union[Unset, datetime.datetime]): The original issuance date of license. + phone1 (Union[Unset, str]): The primary phone number of the contact. + phone2 (Union[Unset, str]): The secondary phone number of the contact. + phone3 (Union[Unset, str]): The tertiary phone number for the contact. + post_office_box (Union[Unset, str]): The post office box number. + postal_code (Union[Unset, str]): The postal ZIP code for the address. + record_id (Union[Unset, RecordIdModel]): + reference_license_id (Union[Unset, str]): The unique Id generated for a professional stored in the system. + salutation (Union[Unset, LicenseProfessionalModelSalutation]): The salutation to be used when addressing the + contact; for example Mr. or Ms. This field is active only when Contact Type = Individual. + service_provider_code (Union[Unset, str]): The unique agency identifier. + state (Union[Unset, LicenseProfessionalModelState]): The state corresponding to the address on record. + suffix (Union[Unset, str]): The licensed professional's name suffix. + title (Union[Unset, str]): The individual's professional title. + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_line_3: Union[Unset, str] = UNSET + birth_date: Union[Unset, datetime.datetime] = UNSET + business_license: Union[Unset, str] = UNSET + business_name: Union[Unset, str] = UNSET + business_name_2: Union[Unset, str] = UNSET + city: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + country: Union[Unset, "LicenseProfessionalModelCountry"] = UNSET + email: Union[Unset, str] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + fax: Union[Unset, str] = UNSET + federal_employer_id: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + full_name: Union[Unset, str] = UNSET + gender: Union[Unset, "LicenseProfessionalModelGender"] = UNSET + id: Union[Unset, str] = UNSET + is_primary: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + last_renewal_date: Union[Unset, datetime.datetime] = UNSET + license_number: Union[Unset, str] = UNSET + license_type: Union[Unset, "LicenseProfessionalModelLicenseType"] = UNSET + licensing_board: Union[Unset, "LicenseProfessionalModelLicensingBoard"] = UNSET + middle_name: Union[Unset, str] = UNSET + original_issue_date: Union[Unset, datetime.datetime] = UNSET + phone1: Union[Unset, str] = UNSET + phone2: Union[Unset, str] = UNSET + phone3: Union[Unset, str] = UNSET + post_office_box: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + reference_license_id: Union[Unset, str] = UNSET + salutation: Union[Unset, "LicenseProfessionalModelSalutation"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + state: Union[Unset, "LicenseProfessionalModelState"] = UNSET + suffix: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_line_3 = self.address_line_3 + birth_date: Union[Unset, str] = UNSET + if not isinstance(self.birth_date, Unset): + birth_date = self.birth_date.isoformat() + + business_license = self.business_license + business_name = self.business_name + business_name_2 = self.business_name_2 + city = self.city + comment = self.comment + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + email = self.email + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + fax = self.fax + federal_employer_id = self.federal_employer_id + first_name = self.first_name + full_name = self.full_name + gender: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + id = self.id + is_primary = self.is_primary + last_name = self.last_name + last_renewal_date: Union[Unset, str] = UNSET + if not isinstance(self.last_renewal_date, Unset): + last_renewal_date = self.last_renewal_date.isoformat() + + license_number = self.license_number + license_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.license_type, Unset): + license_type = self.license_type.to_dict() + + licensing_board: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.licensing_board, Unset): + licensing_board = self.licensing_board.to_dict() + + middle_name = self.middle_name + original_issue_date: Union[Unset, str] = UNSET + if not isinstance(self.original_issue_date, Unset): + original_issue_date = self.original_issue_date.isoformat() + + phone1 = self.phone1 + phone2 = self.phone2 + phone3 = self.phone3 + post_office_box = self.post_office_box + postal_code = self.postal_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + reference_license_id = self.reference_license_id + salutation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.salutation, Unset): + salutation = self.salutation.to_dict() + + service_provider_code = self.service_provider_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + suffix = self.suffix + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_line_3 is not UNSET: + field_dict["addressLine3"] = address_line_3 + if birth_date is not UNSET: + field_dict["birthDate"] = birth_date + if business_license is not UNSET: + field_dict["businessLicense"] = business_license + if business_name is not UNSET: + field_dict["businessName"] = business_name + if business_name_2 is not UNSET: + field_dict["businessName2"] = business_name_2 + if city is not UNSET: + field_dict["city"] = city + if comment is not UNSET: + field_dict["comment"] = comment + if country is not UNSET: + field_dict["country"] = country + if email is not UNSET: + field_dict["email"] = email + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if fax is not UNSET: + field_dict["fax"] = fax + if federal_employer_id is not UNSET: + field_dict["federalEmployerId"] = federal_employer_id + if first_name is not UNSET: + field_dict["firstName"] = first_name + if full_name is not UNSET: + field_dict["fullName"] = full_name + if gender is not UNSET: + field_dict["gender"] = gender + if id is not UNSET: + field_dict["id"] = id + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if last_name is not UNSET: + field_dict["lastName"] = last_name + if last_renewal_date is not UNSET: + field_dict["lastRenewalDate"] = last_renewal_date + if license_number is not UNSET: + field_dict["licenseNumber"] = license_number + if license_type is not UNSET: + field_dict["licenseType"] = license_type + if licensing_board is not UNSET: + field_dict["licensingBoard"] = licensing_board + if middle_name is not UNSET: + field_dict["middleName"] = middle_name + if original_issue_date is not UNSET: + field_dict["originalIssueDate"] = original_issue_date + if phone1 is not UNSET: + field_dict["phone1"] = phone1 + if phone2 is not UNSET: + field_dict["phone2"] = phone2 + if phone3 is not UNSET: + field_dict["phone3"] = phone3 + if post_office_box is not UNSET: + field_dict["postOfficeBox"] = post_office_box + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if reference_license_id is not UNSET: + field_dict["referenceLicenseId"] = reference_license_id + if salutation is not UNSET: + field_dict["salutation"] = salutation + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if state is not UNSET: + field_dict["state"] = state + if suffix is not UNSET: + field_dict["suffix"] = suffix + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.license_professional_model_country import LicenseProfessionalModelCountry + from ..models.license_professional_model_gender import LicenseProfessionalModelGender + from ..models.license_professional_model_license_type import LicenseProfessionalModelLicenseType + from ..models.license_professional_model_licensing_board import LicenseProfessionalModelLicensingBoard + from ..models.license_professional_model_salutation import LicenseProfessionalModelSalutation + from ..models.license_professional_model_state import LicenseProfessionalModelState + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + address_line_3 = d.pop("addressLine3", UNSET) + + _birth_date = d.pop("birthDate", UNSET) + birth_date: Union[Unset, datetime.datetime] + if isinstance(_birth_date, Unset): + birth_date = UNSET + else: + birth_date = isoparse(_birth_date) + + business_license = d.pop("businessLicense", UNSET) + + business_name = d.pop("businessName", UNSET) + + business_name_2 = d.pop("businessName2", UNSET) + + city = d.pop("city", UNSET) + + comment = d.pop("comment", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, LicenseProfessionalModelCountry] + if isinstance(_country, Unset): + country = UNSET + else: + country = LicenseProfessionalModelCountry.from_dict(_country) + + email = d.pop("email", UNSET) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + fax = d.pop("fax", UNSET) + + federal_employer_id = d.pop("federalEmployerId", UNSET) + + first_name = d.pop("firstName", UNSET) + + full_name = d.pop("fullName", UNSET) + + _gender = d.pop("gender", UNSET) + gender: Union[Unset, LicenseProfessionalModelGender] + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = LicenseProfessionalModelGender.from_dict(_gender) + + id = d.pop("id", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + last_name = d.pop("lastName", UNSET) + + _last_renewal_date = d.pop("lastRenewalDate", UNSET) + last_renewal_date: Union[Unset, datetime.datetime] + if isinstance(_last_renewal_date, Unset): + last_renewal_date = UNSET + else: + last_renewal_date = isoparse(_last_renewal_date) + + license_number = d.pop("licenseNumber", UNSET) + + _license_type = d.pop("licenseType", UNSET) + license_type: Union[Unset, LicenseProfessionalModelLicenseType] + if isinstance(_license_type, Unset): + license_type = UNSET + else: + license_type = LicenseProfessionalModelLicenseType.from_dict(_license_type) + + _licensing_board = d.pop("licensingBoard", UNSET) + licensing_board: Union[Unset, LicenseProfessionalModelLicensingBoard] + if isinstance(_licensing_board, Unset): + licensing_board = UNSET + else: + licensing_board = LicenseProfessionalModelLicensingBoard.from_dict(_licensing_board) + + middle_name = d.pop("middleName", UNSET) + + _original_issue_date = d.pop("originalIssueDate", UNSET) + original_issue_date: Union[Unset, datetime.datetime] + if isinstance(_original_issue_date, Unset): + original_issue_date = UNSET + else: + original_issue_date = isoparse(_original_issue_date) + + phone1 = d.pop("phone1", UNSET) + + phone2 = d.pop("phone2", UNSET) + + phone3 = d.pop("phone3", UNSET) + + post_office_box = d.pop("postOfficeBox", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + reference_license_id = d.pop("referenceLicenseId", UNSET) + + _salutation = d.pop("salutation", UNSET) + salutation: Union[Unset, LicenseProfessionalModelSalutation] + if isinstance(_salutation, Unset): + salutation = UNSET + else: + salutation = LicenseProfessionalModelSalutation.from_dict(_salutation) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, LicenseProfessionalModelState] + if isinstance(_state, Unset): + state = UNSET + else: + state = LicenseProfessionalModelState.from_dict(_state) + + suffix = d.pop("suffix", UNSET) + + title = d.pop("title", UNSET) + + license_professional_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_line_3=address_line_3, + birth_date=birth_date, + business_license=business_license, + business_name=business_name, + business_name_2=business_name_2, + city=city, + comment=comment, + country=country, + email=email, + expiration_date=expiration_date, + fax=fax, + federal_employer_id=federal_employer_id, + first_name=first_name, + full_name=full_name, + gender=gender, + id=id, + is_primary=is_primary, + last_name=last_name, + last_renewal_date=last_renewal_date, + license_number=license_number, + license_type=license_type, + licensing_board=licensing_board, + middle_name=middle_name, + original_issue_date=original_issue_date, + phone1=phone1, + phone2=phone2, + phone3=phone3, + post_office_box=post_office_box, + postal_code=postal_code, + record_id=record_id, + reference_license_id=reference_license_id, + salutation=salutation, + service_provider_code=service_provider_code, + state=state, + suffix=suffix, + title=title, + ) + + license_professional_model.additional_properties = d + return license_professional_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_country.py b/accelapy/accelapy/records_client/models/license_professional_model_country.py new file mode 100644 index 0000000..3494844 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_country.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelCountry") + + +@_attrs_define +class LicenseProfessionalModelCountry: + """The name of the country. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_country = cls( + text=text, + value=value, + ) + + license_professional_model_country.additional_properties = d + return license_professional_model_country + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_gender.py b/accelapy/accelapy/records_client/models/license_professional_model_gender.py new file mode 100644 index 0000000..dcf6088 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_gender.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelGender") + + +@_attrs_define +class LicenseProfessionalModelGender: + """The gender (male or female) of the individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_gender = cls( + text=text, + value=value, + ) + + license_professional_model_gender.additional_properties = d + return license_professional_model_gender + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_license_type.py b/accelapy/accelapy/records_client/models/license_professional_model_license_type.py new file mode 100644 index 0000000..e56c084 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_license_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelLicenseType") + + +@_attrs_define +class LicenseProfessionalModelLicenseType: + """The type of license held by the professional. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_license_type = cls( + text=text, + value=value, + ) + + license_professional_model_license_type.additional_properties = d + return license_professional_model_license_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_licensing_board.py b/accelapy/accelapy/records_client/models/license_professional_model_licensing_board.py new file mode 100644 index 0000000..2d8c416 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_licensing_board.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelLicensingBoard") + + +@_attrs_define +class LicenseProfessionalModelLicensingBoard: + """The name of the licensing board that issued the license. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_licensing_board = cls( + text=text, + value=value, + ) + + license_professional_model_licensing_board.additional_properties = d + return license_professional_model_licensing_board + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_salutation.py b/accelapy/accelapy/records_client/models/license_professional_model_salutation.py new file mode 100644 index 0000000..9b1a813 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_salutation.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelSalutation") + + +@_attrs_define +class LicenseProfessionalModelSalutation: + """The salutation to be used when addressing the contact; for example Mr. or Ms. This field is active only when Contact + Type = Individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_salutation = cls( + text=text, + value=value, + ) + + license_professional_model_salutation.additional_properties = d + return license_professional_model_salutation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/license_professional_model_state.py b/accelapy/accelapy/records_client/models/license_professional_model_state.py new file mode 100644 index 0000000..8bb88d6 --- /dev/null +++ b/accelapy/accelapy/records_client/models/license_professional_model_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LicenseProfessionalModelState") + + +@_attrs_define +class LicenseProfessionalModelState: + """The state corresponding to the address on record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + license_professional_model_state = cls( + text=text, + value=value, + ) + + license_professional_model_state.additional_properties = d + return license_professional_model_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/notice_condition_model.py b/accelapy/accelapy/records_client/models/notice_condition_model.py new file mode 100644 index 0000000..d0d976a --- /dev/null +++ b/accelapy/accelapy/records_client/models/notice_condition_model.py @@ -0,0 +1,475 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="NoticeConditionModel") + + +@_attrs_define +class NoticeConditionModel: + """ + Attributes: + actionby_department (Union[Unset, IdentifierModel]): + actionby_user (Union[Unset, IdentifierModel]): + active_status (Union[Unset, IdentifierModel]): + additional_information (Union[Unset, str]): + additional_information_plain_text (Union[Unset, str]): + agency_list_sql (Union[Unset, str]): + applied_date (Union[Unset, datetime.datetime]): + appliedby_department (Union[Unset, IdentifierModel]): + appliedby_user (Union[Unset, IdentifierModel]): + disp_additional_information_plain_text (Union[Unset, str]): + display_notice_in_agency (Union[Unset, bool]): + display_notice_in_citizens (Union[Unset, bool]): + display_notice_in_citizens_fee (Union[Unset, bool]): + display_order (Union[Unset, int]): + effective_date (Union[Unset, datetime.datetime]): + expiration_date (Union[Unset, datetime.datetime]): + group (Union[Unset, IdentifierModel]): + id (Union[Unset, int]): + inheritable (Union[Unset, IdentifierModel]): + is_include_name_in_notice (Union[Unset, bool]): + is_include_short_comments_in_notice (Union[Unset, bool]): + long_comments (Union[Unset, str]): + name (Union[Unset, str]): + priority (Union[Unset, IdentifierModel]): + public_display_message (Union[Unset, str]): + record_id (Union[Unset, CapIDModel]): + res_additional_information_plain_text (Union[Unset, str]): + resolution_action (Union[Unset, str]): + service_provider_code (Union[Unset, str]): + service_provider_codes (Union[Unset, str]): + severity (Union[Unset, IdentifierModel]): + short_comments (Union[Unset, str]): + status (Union[Unset, IdentifierModel]): + status_date (Union[Unset, datetime.datetime]): + status_type (Union[Unset, str]): + type (Union[Unset, IdentifierModel]): + """ + + actionby_department: Union[Unset, "IdentifierModel"] = UNSET + actionby_user: Union[Unset, "IdentifierModel"] = UNSET + active_status: Union[Unset, "IdentifierModel"] = UNSET + additional_information: Union[Unset, str] = UNSET + additional_information_plain_text: Union[Unset, str] = UNSET + agency_list_sql: Union[Unset, str] = UNSET + applied_date: Union[Unset, datetime.datetime] = UNSET + appliedby_department: Union[Unset, "IdentifierModel"] = UNSET + appliedby_user: Union[Unset, "IdentifierModel"] = UNSET + disp_additional_information_plain_text: Union[Unset, str] = UNSET + display_notice_in_agency: Union[Unset, bool] = UNSET + display_notice_in_citizens: Union[Unset, bool] = UNSET + display_notice_in_citizens_fee: Union[Unset, bool] = UNSET + display_order: Union[Unset, int] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + group: Union[Unset, "IdentifierModel"] = UNSET + id: Union[Unset, int] = UNSET + inheritable: Union[Unset, "IdentifierModel"] = UNSET + is_include_name_in_notice: Union[Unset, bool] = UNSET + is_include_short_comments_in_notice: Union[Unset, bool] = UNSET + long_comments: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "IdentifierModel"] = UNSET + public_display_message: Union[Unset, str] = UNSET + record_id: Union[Unset, "CapIDModel"] = UNSET + res_additional_information_plain_text: Union[Unset, str] = UNSET + resolution_action: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + service_provider_codes: Union[Unset, str] = UNSET + severity: Union[Unset, "IdentifierModel"] = UNSET + short_comments: Union[Unset, str] = UNSET + status: Union[Unset, "IdentifierModel"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_type: Union[Unset, str] = UNSET + type: Union[Unset, "IdentifierModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + active_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.active_status, Unset): + active_status = self.active_status.to_dict() + + additional_information = self.additional_information + additional_information_plain_text = self.additional_information_plain_text + agency_list_sql = self.agency_list_sql + applied_date: Union[Unset, str] = UNSET + if not isinstance(self.applied_date, Unset): + applied_date = self.applied_date.isoformat() + + appliedby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_department, Unset): + appliedby_department = self.appliedby_department.to_dict() + + appliedby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_user, Unset): + appliedby_user = self.appliedby_user.to_dict() + + disp_additional_information_plain_text = self.disp_additional_information_plain_text + display_notice_in_agency = self.display_notice_in_agency + display_notice_in_citizens = self.display_notice_in_citizens + display_notice_in_citizens_fee = self.display_notice_in_citizens_fee + display_order = self.display_order + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + inheritable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.inheritable, Unset): + inheritable = self.inheritable.to_dict() + + is_include_name_in_notice = self.is_include_name_in_notice + is_include_short_comments_in_notice = self.is_include_short_comments_in_notice + long_comments = self.long_comments + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_display_message = self.public_display_message + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + res_additional_information_plain_text = self.res_additional_information_plain_text + resolution_action = self.resolution_action + service_provider_code = self.service_provider_code + service_provider_codes = self.service_provider_codes + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_comments = self.short_comments + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_type = self.status_type + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if active_status is not UNSET: + field_dict["activeStatus"] = active_status + if additional_information is not UNSET: + field_dict["additionalInformation"] = additional_information + if additional_information_plain_text is not UNSET: + field_dict["additionalInformationPlainText"] = additional_information_plain_text + if agency_list_sql is not UNSET: + field_dict["agencyListSQL"] = agency_list_sql + if applied_date is not UNSET: + field_dict["appliedDate"] = applied_date + if appliedby_department is not UNSET: + field_dict["appliedbyDepartment"] = appliedby_department + if appliedby_user is not UNSET: + field_dict["appliedbyUser"] = appliedby_user + if disp_additional_information_plain_text is not UNSET: + field_dict["dispAdditionalInformationPlainText"] = disp_additional_information_plain_text + if display_notice_in_agency is not UNSET: + field_dict["displayNoticeInAgency"] = display_notice_in_agency + if display_notice_in_citizens is not UNSET: + field_dict["displayNoticeInCitizens"] = display_notice_in_citizens + if display_notice_in_citizens_fee is not UNSET: + field_dict["displayNoticeInCitizensFee"] = display_notice_in_citizens_fee + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if inheritable is not UNSET: + field_dict["inheritable"] = inheritable + if is_include_name_in_notice is not UNSET: + field_dict["isIncludeNameInNotice"] = is_include_name_in_notice + if is_include_short_comments_in_notice is not UNSET: + field_dict["isIncludeShortCommentsInNotice"] = is_include_short_comments_in_notice + if long_comments is not UNSET: + field_dict["longComments"] = long_comments + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if public_display_message is not UNSET: + field_dict["publicDisplayMessage"] = public_display_message + if record_id is not UNSET: + field_dict["recordId"] = record_id + if res_additional_information_plain_text is not UNSET: + field_dict["resAdditionalInformationPlainText"] = res_additional_information_plain_text + if resolution_action is not UNSET: + field_dict["resolutionAction"] = resolution_action + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if service_provider_codes is not UNSET: + field_dict["serviceProviderCodes"] = service_provider_codes + if severity is not UNSET: + field_dict["severity"] = severity + if short_comments is not UNSET: + field_dict["shortComments"] = short_comments + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_type is not UNSET: + field_dict["statusType"] = status_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.cap_id_model import CapIDModel + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, IdentifierModel] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = IdentifierModel.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, IdentifierModel] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = IdentifierModel.from_dict(_actionby_user) + + _active_status = d.pop("activeStatus", UNSET) + active_status: Union[Unset, IdentifierModel] + if isinstance(_active_status, Unset): + active_status = UNSET + else: + active_status = IdentifierModel.from_dict(_active_status) + + additional_information = d.pop("additionalInformation", UNSET) + + additional_information_plain_text = d.pop("additionalInformationPlainText", UNSET) + + agency_list_sql = d.pop("agencyListSQL", UNSET) + + _applied_date = d.pop("appliedDate", UNSET) + applied_date: Union[Unset, datetime.datetime] + if isinstance(_applied_date, Unset): + applied_date = UNSET + else: + applied_date = isoparse(_applied_date) + + _appliedby_department = d.pop("appliedbyDepartment", UNSET) + appliedby_department: Union[Unset, IdentifierModel] + if isinstance(_appliedby_department, Unset): + appliedby_department = UNSET + else: + appliedby_department = IdentifierModel.from_dict(_appliedby_department) + + _appliedby_user = d.pop("appliedbyUser", UNSET) + appliedby_user: Union[Unset, IdentifierModel] + if isinstance(_appliedby_user, Unset): + appliedby_user = UNSET + else: + appliedby_user = IdentifierModel.from_dict(_appliedby_user) + + disp_additional_information_plain_text = d.pop("dispAdditionalInformationPlainText", UNSET) + + display_notice_in_agency = d.pop("displayNoticeInAgency", UNSET) + + display_notice_in_citizens = d.pop("displayNoticeInCitizens", UNSET) + + display_notice_in_citizens_fee = d.pop("displayNoticeInCitizensFee", UNSET) + + display_order = d.pop("displayOrder", UNSET) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _group = d.pop("group", UNSET) + group: Union[Unset, IdentifierModel] + if isinstance(_group, Unset): + group = UNSET + else: + group = IdentifierModel.from_dict(_group) + + id = d.pop("id", UNSET) + + _inheritable = d.pop("inheritable", UNSET) + inheritable: Union[Unset, IdentifierModel] + if isinstance(_inheritable, Unset): + inheritable = UNSET + else: + inheritable = IdentifierModel.from_dict(_inheritable) + + is_include_name_in_notice = d.pop("isIncludeNameInNotice", UNSET) + + is_include_short_comments_in_notice = d.pop("isIncludeShortCommentsInNotice", UNSET) + + long_comments = d.pop("longComments", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, IdentifierModel] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = IdentifierModel.from_dict(_priority) + + public_display_message = d.pop("publicDisplayMessage", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, CapIDModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = CapIDModel.from_dict(_record_id) + + res_additional_information_plain_text = d.pop("resAdditionalInformationPlainText", UNSET) + + resolution_action = d.pop("resolutionAction", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + service_provider_codes = d.pop("serviceProviderCodes", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, IdentifierModel] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = IdentifierModel.from_dict(_severity) + + short_comments = d.pop("shortComments", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, IdentifierModel] + if isinstance(_status, Unset): + status = UNSET + else: + status = IdentifierModel.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + status_type = d.pop("statusType", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, IdentifierModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = IdentifierModel.from_dict(_type) + + notice_condition_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + active_status=active_status, + additional_information=additional_information, + additional_information_plain_text=additional_information_plain_text, + agency_list_sql=agency_list_sql, + applied_date=applied_date, + appliedby_department=appliedby_department, + appliedby_user=appliedby_user, + disp_additional_information_plain_text=disp_additional_information_plain_text, + display_notice_in_agency=display_notice_in_agency, + display_notice_in_citizens=display_notice_in_citizens, + display_notice_in_citizens_fee=display_notice_in_citizens_fee, + display_order=display_order, + effective_date=effective_date, + expiration_date=expiration_date, + group=group, + id=id, + inheritable=inheritable, + is_include_name_in_notice=is_include_name_in_notice, + is_include_short_comments_in_notice=is_include_short_comments_in_notice, + long_comments=long_comments, + name=name, + priority=priority, + public_display_message=public_display_message, + record_id=record_id, + res_additional_information_plain_text=res_additional_information_plain_text, + resolution_action=resolution_action, + service_provider_code=service_provider_code, + service_provider_codes=service_provider_codes, + severity=severity, + short_comments=short_comments, + status=status, + status_date=status_date, + status_type=status_type, + type=type, + ) + + notice_condition_model.additional_properties = d + return notice_condition_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/owner_address_model.py b/accelapy/accelapy/records_client/models/owner_address_model.py new file mode 100644 index 0000000..98503b2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/owner_address_model.py @@ -0,0 +1,127 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="OwnerAddressModel") + + +@_attrs_define +class OwnerAddressModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): + address_line_2 (Union[Unset, str]): + address_line_3 (Union[Unset, str]): + city (Union[Unset, str]): + country (Union[Unset, IdentifierModel]): + postal_code (Union[Unset, str]): + state (Union[Unset, IdentifierModel]): + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_line_3: Union[Unset, str] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "IdentifierModel"] = UNSET + postal_code: Union[Unset, str] = UNSET + state: Union[Unset, "IdentifierModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_line_3 = self.address_line_3 + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + postal_code = self.postal_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_line_3 is not UNSET: + field_dict["addressLine3"] = address_line_3 + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + address_line_3 = d.pop("addressLine3", UNSET) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, IdentifierModel] + if isinstance(_country, Unset): + country = UNSET + else: + country = IdentifierModel.from_dict(_country) + + postal_code = d.pop("postalCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, IdentifierModel] + if isinstance(_state, Unset): + state = UNSET + else: + state = IdentifierModel.from_dict(_state) + + owner_address_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_line_3=address_line_3, + city=city, + country=country, + postal_code=postal_code, + state=state, + ) + + owner_address_model.additional_properties = d + return owner_address_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/parcel_model_1.py b/accelapy/accelapy/records_client/models/parcel_model_1.py new file mode 100644 index 0000000..e99c567 --- /dev/null +++ b/accelapy/accelapy/records_client/models/parcel_model_1.py @@ -0,0 +1,280 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="ParcelModel1") + + +@_attrs_define +class ParcelModel1: + """ + Attributes: + block (Union[Unset, str]): + book (Union[Unset, str]): + census_tract (Union[Unset, str]): + council_district (Union[Unset, str]): + exemption_value (Union[Unset, float]): + gis_sequence_number (Union[Unset, int]): + id (Union[Unset, str]): + improved_value (Union[Unset, float]): + is_primary (Union[Unset, str]): + land_value (Union[Unset, float]): + legal_description (Union[Unset, str]): + lot (Union[Unset, str]): + map_number (Union[Unset, str]): + map_reference_info (Union[Unset, str]): + page (Union[Unset, str]): + parcel (Union[Unset, str]): + parcel_area (Union[Unset, float]): + parcel_number (Union[Unset, str]): + plan_area (Union[Unset, str]): + range_ (Union[Unset, str]): + section (Union[Unset, int]): + status (Union[Unset, IdentifierModel]): + subdivision (Union[Unset, IdentifierModel]): + supervisor_district (Union[Unset, str]): + township (Union[Unset, str]): + tract (Union[Unset, str]): + """ + + block: Union[Unset, str] = UNSET + book: Union[Unset, str] = UNSET + census_tract: Union[Unset, str] = UNSET + council_district: Union[Unset, str] = UNSET + exemption_value: Union[Unset, float] = UNSET + gis_sequence_number: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + improved_value: Union[Unset, float] = UNSET + is_primary: Union[Unset, str] = UNSET + land_value: Union[Unset, float] = UNSET + legal_description: Union[Unset, str] = UNSET + lot: Union[Unset, str] = UNSET + map_number: Union[Unset, str] = UNSET + map_reference_info: Union[Unset, str] = UNSET + page: Union[Unset, str] = UNSET + parcel: Union[Unset, str] = UNSET + parcel_area: Union[Unset, float] = UNSET + parcel_number: Union[Unset, str] = UNSET + plan_area: Union[Unset, str] = UNSET + range_: Union[Unset, str] = UNSET + section: Union[Unset, int] = UNSET + status: Union[Unset, "IdentifierModel"] = UNSET + subdivision: Union[Unset, "IdentifierModel"] = UNSET + supervisor_district: Union[Unset, str] = UNSET + township: Union[Unset, str] = UNSET + tract: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + block = self.block + book = self.book + census_tract = self.census_tract + council_district = self.council_district + exemption_value = self.exemption_value + gis_sequence_number = self.gis_sequence_number + id = self.id + improved_value = self.improved_value + is_primary = self.is_primary + land_value = self.land_value + legal_description = self.legal_description + lot = self.lot + map_number = self.map_number + map_reference_info = self.map_reference_info + page = self.page + parcel = self.parcel + parcel_area = self.parcel_area + parcel_number = self.parcel_number + plan_area = self.plan_area + range_ = self.range_ + section = self.section + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + subdivision: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.subdivision, Unset): + subdivision = self.subdivision.to_dict() + + supervisor_district = self.supervisor_district + township = self.township + tract = self.tract + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if block is not UNSET: + field_dict["block"] = block + if book is not UNSET: + field_dict["book"] = book + if census_tract is not UNSET: + field_dict["censusTract"] = census_tract + if council_district is not UNSET: + field_dict["councilDistrict"] = council_district + if exemption_value is not UNSET: + field_dict["exemptionValue"] = exemption_value + if gis_sequence_number is not UNSET: + field_dict["gisSequenceNumber"] = gis_sequence_number + if id is not UNSET: + field_dict["id"] = id + if improved_value is not UNSET: + field_dict["improvedValue"] = improved_value + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if land_value is not UNSET: + field_dict["landValue"] = land_value + if legal_description is not UNSET: + field_dict["legalDescription"] = legal_description + if lot is not UNSET: + field_dict["lot"] = lot + if map_number is not UNSET: + field_dict["mapNumber"] = map_number + if map_reference_info is not UNSET: + field_dict["mapReferenceInfo"] = map_reference_info + if page is not UNSET: + field_dict["page"] = page + if parcel is not UNSET: + field_dict["parcel"] = parcel + if parcel_area is not UNSET: + field_dict["parcelArea"] = parcel_area + if parcel_number is not UNSET: + field_dict["parcelNumber"] = parcel_number + if plan_area is not UNSET: + field_dict["planArea"] = plan_area + if range_ is not UNSET: + field_dict["range"] = range_ + if section is not UNSET: + field_dict["section"] = section + if status is not UNSET: + field_dict["status"] = status + if subdivision is not UNSET: + field_dict["subdivision"] = subdivision + if supervisor_district is not UNSET: + field_dict["supervisorDistrict"] = supervisor_district + if township is not UNSET: + field_dict["township"] = township + if tract is not UNSET: + field_dict["tract"] = tract + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + block = d.pop("block", UNSET) + + book = d.pop("book", UNSET) + + census_tract = d.pop("censusTract", UNSET) + + council_district = d.pop("councilDistrict", UNSET) + + exemption_value = d.pop("exemptionValue", UNSET) + + gis_sequence_number = d.pop("gisSequenceNumber", UNSET) + + id = d.pop("id", UNSET) + + improved_value = d.pop("improvedValue", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + land_value = d.pop("landValue", UNSET) + + legal_description = d.pop("legalDescription", UNSET) + + lot = d.pop("lot", UNSET) + + map_number = d.pop("mapNumber", UNSET) + + map_reference_info = d.pop("mapReferenceInfo", UNSET) + + page = d.pop("page", UNSET) + + parcel = d.pop("parcel", UNSET) + + parcel_area = d.pop("parcelArea", UNSET) + + parcel_number = d.pop("parcelNumber", UNSET) + + plan_area = d.pop("planArea", UNSET) + + range_ = d.pop("range", UNSET) + + section = d.pop("section", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, IdentifierModel] + if isinstance(_status, Unset): + status = UNSET + else: + status = IdentifierModel.from_dict(_status) + + _subdivision = d.pop("subdivision", UNSET) + subdivision: Union[Unset, IdentifierModel] + if isinstance(_subdivision, Unset): + subdivision = UNSET + else: + subdivision = IdentifierModel.from_dict(_subdivision) + + supervisor_district = d.pop("supervisorDistrict", UNSET) + + township = d.pop("township", UNSET) + + tract = d.pop("tract", UNSET) + + parcel_model_1 = cls( + block=block, + book=book, + census_tract=census_tract, + council_district=council_district, + exemption_value=exemption_value, + gis_sequence_number=gis_sequence_number, + id=id, + improved_value=improved_value, + is_primary=is_primary, + land_value=land_value, + legal_description=legal_description, + lot=lot, + map_number=map_number, + map_reference_info=map_reference_info, + page=page, + parcel=parcel, + parcel_area=parcel_area, + parcel_number=parcel_number, + plan_area=plan_area, + range_=range_, + section=section, + status=status, + subdivision=subdivision, + supervisor_district=supervisor_district, + township=township, + tract=tract, + ) + + parcel_model_1.additional_properties = d + return parcel_model_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/part_transaction_model.py b/accelapy/accelapy/records_client/models/part_transaction_model.py new file mode 100644 index 0000000..2fb18d3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model.py @@ -0,0 +1,388 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.part_transaction_model_hard_reservation import PartTransactionModelHardReservation +from ..models.part_transaction_model_taxable import PartTransactionModelTaxable +from ..models.part_transaction_model_transaction_type import PartTransactionModelTransactionType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.part_transaction_model_status import PartTransactionModelStatus + from ..models.part_transaction_model_type import PartTransactionModelType + from ..models.part_transaction_model_unit_measurement import PartTransactionModelUnitMeasurement + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="PartTransactionModel") + + +@_attrs_define +class PartTransactionModel: + """ + Attributes: + account_name (Union[Unset, str]): The budget account name associated with the part transaction. + account_number (Union[Unset, str]): The budget account number associated with the part transaction. + comments (Union[Unset, str]): Comments or notes about the current context. + cost_total (Union[Unset, float]): The total cost of the part transaction. + hard_reservation (Union[Unset, PartTransactionModelHardReservation]): Indicates whether or not the part + transaction is a hard reservation. "Y": A hard reservation which guarantees the reservation, and subtract the + order from the quantity on hand. "N" : A soft reservation which alerts the warehouse that houses the part that + someone may request the part. The quantity on hand of the part does not change. + id (Union[Unset, int]): The part transaction system id assigned by the Civic Platform server. + location_id (Union[Unset, int]): The location ID associated with the part transaction. + part_bin (Union[Unset, str]): The name of the part bin. + part_brand (Union[Unset, str]): The name of the part brand. + part_description (Union[Unset, str]): The description of the part. + part_id (Union[Unset, int]): The part ID. + part_location (Union[Unset, str]): The location of the part. + part_number (Union[Unset, str]): The number of the part. + quantity (Union[Unset, float]): The number of units for which the same fee applies. + record_id (Union[Unset, RecordIdModel]): + res_to_part_location (Union[Unset, str]): + reservation_number (Union[Unset, int]): The part reservation number. + reservation_status (Union[Unset, str]): The status of the part reservation. + service_provider_code (Union[Unset, str]): The unique agency identifier. + status (Union[Unset, PartTransactionModelStatus]): The part transaction status. + taxable (Union[Unset, PartTransactionModelTaxable]): Indicates whether or not the part is taxable. + transaction_cost (Union[Unset, float]): The part transaction cost. + transaction_date (Union[Unset, datetime.datetime]): The part transaction date. + transaction_type (Union[Unset, PartTransactionModelTransactionType]): The part transaction type. Possible + values: + + "Issue" : occurs either when someone requests and receives a part on the spot, or when someone receives a + reserved part. + + "Receive" : occurs when someone purchases a part or returns a part to a location. + + "Transfer" : occurs when someone moves a part from one location to another. + + "Adjust" : occurs when someone makes quantity adjustments for cycle counts. + + "Reserve" : occurs when someone sets aside parts so they can issue them at a later date. + type (Union[Unset, PartTransactionModelType]): + unit_cost (Union[Unset, float]): The unit cost per part. + unit_measurement (Union[Unset, PartTransactionModelUnitMeasurement]): The unit of measurement for quantifying + the part. + updated_by (Union[Unset, str]): The user who last updated the checklist or checklist item. + work_order_task_code (Union[Unset, str]): The work order task code associated with the part transactionmodel. + work_order_task_code_index (Union[Unset, int]): The work order task code index associated with the part + transactionmodel. + """ + + account_name: Union[Unset, str] = UNSET + account_number: Union[Unset, str] = UNSET + comments: Union[Unset, str] = UNSET + cost_total: Union[Unset, float] = UNSET + hard_reservation: Union[Unset, PartTransactionModelHardReservation] = UNSET + id: Union[Unset, int] = UNSET + location_id: Union[Unset, int] = UNSET + part_bin: Union[Unset, str] = UNSET + part_brand: Union[Unset, str] = UNSET + part_description: Union[Unset, str] = UNSET + part_id: Union[Unset, int] = UNSET + part_location: Union[Unset, str] = UNSET + part_number: Union[Unset, str] = UNSET + quantity: Union[Unset, float] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + res_to_part_location: Union[Unset, str] = UNSET + reservation_number: Union[Unset, int] = UNSET + reservation_status: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + status: Union[Unset, "PartTransactionModelStatus"] = UNSET + taxable: Union[Unset, PartTransactionModelTaxable] = UNSET + transaction_cost: Union[Unset, float] = UNSET + transaction_date: Union[Unset, datetime.datetime] = UNSET + transaction_type: Union[Unset, PartTransactionModelTransactionType] = UNSET + type: Union[Unset, "PartTransactionModelType"] = UNSET + unit_cost: Union[Unset, float] = UNSET + unit_measurement: Union[Unset, "PartTransactionModelUnitMeasurement"] = UNSET + updated_by: Union[Unset, str] = UNSET + work_order_task_code: Union[Unset, str] = UNSET + work_order_task_code_index: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + account_name = self.account_name + account_number = self.account_number + comments = self.comments + cost_total = self.cost_total + hard_reservation: Union[Unset, str] = UNSET + if not isinstance(self.hard_reservation, Unset): + hard_reservation = self.hard_reservation.value + + id = self.id + location_id = self.location_id + part_bin = self.part_bin + part_brand = self.part_brand + part_description = self.part_description + part_id = self.part_id + part_location = self.part_location + part_number = self.part_number + quantity = self.quantity + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + res_to_part_location = self.res_to_part_location + reservation_number = self.reservation_number + reservation_status = self.reservation_status + service_provider_code = self.service_provider_code + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + taxable: Union[Unset, str] = UNSET + if not isinstance(self.taxable, Unset): + taxable = self.taxable.value + + transaction_cost = self.transaction_cost + transaction_date: Union[Unset, str] = UNSET + if not isinstance(self.transaction_date, Unset): + transaction_date = self.transaction_date.isoformat() + + transaction_type: Union[Unset, str] = UNSET + if not isinstance(self.transaction_type, Unset): + transaction_type = self.transaction_type.value + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_cost = self.unit_cost + unit_measurement: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_measurement, Unset): + unit_measurement = self.unit_measurement.to_dict() + + updated_by = self.updated_by + work_order_task_code = self.work_order_task_code + work_order_task_code_index = self.work_order_task_code_index + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if account_name is not UNSET: + field_dict["accountName"] = account_name + if account_number is not UNSET: + field_dict["accountNumber"] = account_number + if comments is not UNSET: + field_dict["comments"] = comments + if cost_total is not UNSET: + field_dict["costTotal"] = cost_total + if hard_reservation is not UNSET: + field_dict["hardReservation"] = hard_reservation + if id is not UNSET: + field_dict["id"] = id + if location_id is not UNSET: + field_dict["locationId"] = location_id + if part_bin is not UNSET: + field_dict["partBin"] = part_bin + if part_brand is not UNSET: + field_dict["partBrand"] = part_brand + if part_description is not UNSET: + field_dict["partDescription"] = part_description + if part_id is not UNSET: + field_dict["partId"] = part_id + if part_location is not UNSET: + field_dict["partLocation"] = part_location + if part_number is not UNSET: + field_dict["partNumber"] = part_number + if quantity is not UNSET: + field_dict["quantity"] = quantity + if record_id is not UNSET: + field_dict["recordId"] = record_id + if res_to_part_location is not UNSET: + field_dict["resToPartLocation"] = res_to_part_location + if reservation_number is not UNSET: + field_dict["reservationNumber"] = reservation_number + if reservation_status is not UNSET: + field_dict["reservationStatus"] = reservation_status + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if status is not UNSET: + field_dict["status"] = status + if taxable is not UNSET: + field_dict["taxable"] = taxable + if transaction_cost is not UNSET: + field_dict["transactionCost"] = transaction_cost + if transaction_date is not UNSET: + field_dict["transactionDate"] = transaction_date + if transaction_type is not UNSET: + field_dict["transactionType"] = transaction_type + if type is not UNSET: + field_dict["type"] = type + if unit_cost is not UNSET: + field_dict["unitCost"] = unit_cost + if unit_measurement is not UNSET: + field_dict["unitMeasurement"] = unit_measurement + if updated_by is not UNSET: + field_dict["updatedBy"] = updated_by + if work_order_task_code is not UNSET: + field_dict["workOrderTaskCode"] = work_order_task_code + if work_order_task_code_index is not UNSET: + field_dict["workOrderTaskCodeIndex"] = work_order_task_code_index + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.part_transaction_model_status import PartTransactionModelStatus + from ..models.part_transaction_model_type import PartTransactionModelType + from ..models.part_transaction_model_unit_measurement import PartTransactionModelUnitMeasurement + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + account_name = d.pop("accountName", UNSET) + + account_number = d.pop("accountNumber", UNSET) + + comments = d.pop("comments", UNSET) + + cost_total = d.pop("costTotal", UNSET) + + _hard_reservation = d.pop("hardReservation", UNSET) + hard_reservation: Union[Unset, PartTransactionModelHardReservation] + if isinstance(_hard_reservation, Unset): + hard_reservation = UNSET + else: + hard_reservation = PartTransactionModelHardReservation(_hard_reservation) + + id = d.pop("id", UNSET) + + location_id = d.pop("locationId", UNSET) + + part_bin = d.pop("partBin", UNSET) + + part_brand = d.pop("partBrand", UNSET) + + part_description = d.pop("partDescription", UNSET) + + part_id = d.pop("partId", UNSET) + + part_location = d.pop("partLocation", UNSET) + + part_number = d.pop("partNumber", UNSET) + + quantity = d.pop("quantity", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + res_to_part_location = d.pop("resToPartLocation", UNSET) + + reservation_number = d.pop("reservationNumber", UNSET) + + reservation_status = d.pop("reservationStatus", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, PartTransactionModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = PartTransactionModelStatus.from_dict(_status) + + _taxable = d.pop("taxable", UNSET) + taxable: Union[Unset, PartTransactionModelTaxable] + if isinstance(_taxable, Unset): + taxable = UNSET + else: + taxable = PartTransactionModelTaxable(_taxable) + + transaction_cost = d.pop("transactionCost", UNSET) + + _transaction_date = d.pop("transactionDate", UNSET) + transaction_date: Union[Unset, datetime.datetime] + if isinstance(_transaction_date, Unset): + transaction_date = UNSET + else: + transaction_date = isoparse(_transaction_date) + + _transaction_type = d.pop("transactionType", UNSET) + transaction_type: Union[Unset, PartTransactionModelTransactionType] + if isinstance(_transaction_type, Unset): + transaction_type = UNSET + else: + transaction_type = PartTransactionModelTransactionType(_transaction_type) + + _type = d.pop("type", UNSET) + type: Union[Unset, PartTransactionModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = PartTransactionModelType.from_dict(_type) + + unit_cost = d.pop("unitCost", UNSET) + + _unit_measurement = d.pop("unitMeasurement", UNSET) + unit_measurement: Union[Unset, PartTransactionModelUnitMeasurement] + if isinstance(_unit_measurement, Unset): + unit_measurement = UNSET + else: + unit_measurement = PartTransactionModelUnitMeasurement.from_dict(_unit_measurement) + + updated_by = d.pop("updatedBy", UNSET) + + work_order_task_code = d.pop("workOrderTaskCode", UNSET) + + work_order_task_code_index = d.pop("workOrderTaskCodeIndex", UNSET) + + part_transaction_model = cls( + account_name=account_name, + account_number=account_number, + comments=comments, + cost_total=cost_total, + hard_reservation=hard_reservation, + id=id, + location_id=location_id, + part_bin=part_bin, + part_brand=part_brand, + part_description=part_description, + part_id=part_id, + part_location=part_location, + part_number=part_number, + quantity=quantity, + record_id=record_id, + res_to_part_location=res_to_part_location, + reservation_number=reservation_number, + reservation_status=reservation_status, + service_provider_code=service_provider_code, + status=status, + taxable=taxable, + transaction_cost=transaction_cost, + transaction_date=transaction_date, + transaction_type=transaction_type, + type=type, + unit_cost=unit_cost, + unit_measurement=unit_measurement, + updated_by=updated_by, + work_order_task_code=work_order_task_code, + work_order_task_code_index=work_order_task_code_index, + ) + + part_transaction_model.additional_properties = d + return part_transaction_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_hard_reservation.py b/accelapy/accelapy/records_client/models/part_transaction_model_hard_reservation.py new file mode 100644 index 0000000..18cbb97 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_hard_reservation.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PartTransactionModelHardReservation(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_status.py b/accelapy/accelapy/records_client/models/part_transaction_model_status.py new file mode 100644 index 0000000..fd4731f --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartTransactionModelStatus") + + +@_attrs_define +class PartTransactionModelStatus: + """The part transaction status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + part_transaction_model_status = cls( + text=text, + value=value, + ) + + part_transaction_model_status.additional_properties = d + return part_transaction_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_taxable.py b/accelapy/accelapy/records_client/models/part_transaction_model_taxable.py new file mode 100644 index 0000000..893d566 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_taxable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class PartTransactionModelTaxable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_transaction_type.py b/accelapy/accelapy/records_client/models/part_transaction_model_transaction_type.py new file mode 100644 index 0000000..bbf1802 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_transaction_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class PartTransactionModelTransactionType(str, Enum): + ADJUST = "Adjust" + ISSUE = "Issue" + RECEIVE = "Receive" + RESERVE = "Reserve" + TRANSFER = "Transfer" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_type.py b/accelapy/accelapy/records_client/models/part_transaction_model_type.py new file mode 100644 index 0000000..7b963f8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_type.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartTransactionModelType") + + +@_attrs_define +class PartTransactionModelType: + """ + Attributes: + text (Union[Unset, str]): The part transaction type. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + part_transaction_model_type = cls( + text=text, + value=value, + ) + + part_transaction_model_type.additional_properties = d + return part_transaction_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/part_transaction_model_unit_measurement.py b/accelapy/accelapy/records_client/models/part_transaction_model_unit_measurement.py new file mode 100644 index 0000000..d32a2e2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/part_transaction_model_unit_measurement.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartTransactionModelUnitMeasurement") + + +@_attrs_define +class PartTransactionModelUnitMeasurement: + """The unit of measurement for quantifying the part. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + part_transaction_model_unit_measurement = cls( + text=text, + value=value, + ) + + part_transaction_model_unit_measurement.additional_properties = d + return part_transaction_model_unit_measurement + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/payment_model.py b/accelapy/accelapy/records_client/models/payment_model.py new file mode 100644 index 0000000..5ed2a66 --- /dev/null +++ b/accelapy/accelapy/records_client/models/payment_model.py @@ -0,0 +1,163 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="PaymentModel") + + +@_attrs_define +class PaymentModel: + """ + Attributes: + amount (Union[Unset, float]): The amount of a payment transaction or account balance. + amount_not_allocated (Union[Unset, float]): The payment amount which has not been allocated. + cashier_id (Union[Unset, str]): The unique ID associated with the cashier. + id (Union[Unset, int]): The payment system id assigned by the Civic Platform server. + payment_date (Union[Unset, datetime.datetime]): The date a payment was entered into the system. + payment_method (Union[Unset, str]): Describes the method of payment, for example; credit card, cash, debit card, + and so forth. + payment_status (Union[Unset, str]): Indicates whether or not a payment has been made in full. + receipt_id (Union[Unset, int]): The unique ID generated for the recipient. + record_id (Union[Unset, RecordIdModel]): + transaction_code (Union[Unset, str]): An industry standard code that identifies the type of transaction. + transaction_id (Union[Unset, int]): A unique number, assigned by the system, that indentifies the transaction. + """ + + amount: Union[Unset, float] = UNSET + amount_not_allocated: Union[Unset, float] = UNSET + cashier_id: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + payment_date: Union[Unset, datetime.datetime] = UNSET + payment_method: Union[Unset, str] = UNSET + payment_status: Union[Unset, str] = UNSET + receipt_id: Union[Unset, int] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + transaction_code: Union[Unset, str] = UNSET + transaction_id: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount = self.amount + amount_not_allocated = self.amount_not_allocated + cashier_id = self.cashier_id + id = self.id + payment_date: Union[Unset, str] = UNSET + if not isinstance(self.payment_date, Unset): + payment_date = self.payment_date.isoformat() + + payment_method = self.payment_method + payment_status = self.payment_status + receipt_id = self.receipt_id + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + transaction_code = self.transaction_code + transaction_id = self.transaction_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount is not UNSET: + field_dict["amount"] = amount + if amount_not_allocated is not UNSET: + field_dict["amountNotAllocated"] = amount_not_allocated + if cashier_id is not UNSET: + field_dict["cashierId"] = cashier_id + if id is not UNSET: + field_dict["id"] = id + if payment_date is not UNSET: + field_dict["paymentDate"] = payment_date + if payment_method is not UNSET: + field_dict["paymentMethod"] = payment_method + if payment_status is not UNSET: + field_dict["paymentStatus"] = payment_status + if receipt_id is not UNSET: + field_dict["receiptId"] = receipt_id + if record_id is not UNSET: + field_dict["recordId"] = record_id + if transaction_code is not UNSET: + field_dict["transactionCode"] = transaction_code + if transaction_id is not UNSET: + field_dict["transactionId"] = transaction_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + amount = d.pop("amount", UNSET) + + amount_not_allocated = d.pop("amountNotAllocated", UNSET) + + cashier_id = d.pop("cashierId", UNSET) + + id = d.pop("id", UNSET) + + _payment_date = d.pop("paymentDate", UNSET) + payment_date: Union[Unset, datetime.datetime] + if isinstance(_payment_date, Unset): + payment_date = UNSET + else: + payment_date = isoparse(_payment_date) + + payment_method = d.pop("paymentMethod", UNSET) + + payment_status = d.pop("paymentStatus", UNSET) + + receipt_id = d.pop("receiptId", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + transaction_code = d.pop("transactionCode", UNSET) + + transaction_id = d.pop("transactionId", UNSET) + + payment_model = cls( + amount=amount, + amount_not_allocated=amount_not_allocated, + cashier_id=cashier_id, + id=id, + payment_date=payment_date, + payment_method=payment_method, + payment_status=payment_status, + receipt_id=receipt_id, + record_id=record_id, + transaction_code=transaction_code, + transaction_id=transaction_id, + ) + + payment_model.additional_properties = d + return payment_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/r_guide_sheet_group_model.py b/accelapy/accelapy/records_client/models/r_guide_sheet_group_model.py new file mode 100644 index 0000000..17bdee8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/r_guide_sheet_group_model.py @@ -0,0 +1,74 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RGuideSheetGroupModel") + + +@_attrs_define +class RGuideSheetGroupModel: + """ + Attributes: + id (Union[Unset, str]): The inspection checklist sytem id assigned by the Civic Platform server. + text (Union[Unset, str]): The localized display text. + value (Union[Unset, str]): The stored value. + """ + + id: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + r_guide_sheet_group_model = cls( + id=id, + text=text, + value=value, + ) + + r_guide_sheet_group_model.additional_properties = d + return r_guide_sheet_group_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_additional_model.py b/accelapy/accelapy/records_client/models/record_additional_model.py new file mode 100644 index 0000000..f44d226 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_additional_model.py @@ -0,0 +1,122 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_additional_model_construction_type import RecordAdditionalModelConstructionType + from ..models.record_id_simple_model import RecordIdSimpleModel + + +T = TypeVar("T", bound="RecordAdditionalModel") + + +@_attrs_define +class RecordAdditionalModel: + """ + Attributes: + building_count (Union[Unset, int]): The number of buildings associated with the record. + construction_type (Union[Unset, RecordAdditionalModelConstructionType]): The US Census Bureau construction type + code. + estimated_value (Union[Unset, float]): The application's estimated value. + house_unit (Union[Unset, int]): The house unit associated with the application. + public_owned (Union[Unset, str]): A flag that indicates whether or not the public owns the item. + record_id (Union[Unset, RecordIdSimpleModel]): + """ + + building_count: Union[Unset, int] = UNSET + construction_type: Union[Unset, "RecordAdditionalModelConstructionType"] = UNSET + estimated_value: Union[Unset, float] = UNSET + house_unit: Union[Unset, int] = UNSET + public_owned: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdSimpleModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + building_count = self.building_count + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + estimated_value = self.estimated_value + house_unit = self.house_unit + public_owned = self.public_owned + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if building_count is not UNSET: + field_dict["buildingCount"] = building_count + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if estimated_value is not UNSET: + field_dict["estimatedValue"] = estimated_value + if house_unit is not UNSET: + field_dict["houseUnit"] = house_unit + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_id is not UNSET: + field_dict["recordId"] = record_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_additional_model_construction_type import RecordAdditionalModelConstructionType + from ..models.record_id_simple_model import RecordIdSimpleModel + + d = src_dict.copy() + building_count = d.pop("buildingCount", UNSET) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RecordAdditionalModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RecordAdditionalModelConstructionType.from_dict(_construction_type) + + estimated_value = d.pop("estimatedValue", UNSET) + + house_unit = d.pop("houseUnit", UNSET) + + public_owned = d.pop("publicOwned", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdSimpleModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdSimpleModel.from_dict(_record_id) + + record_additional_model = cls( + building_count=building_count, + construction_type=construction_type, + estimated_value=estimated_value, + house_unit=house_unit, + public_owned=public_owned, + record_id=record_id, + ) + + record_additional_model.additional_properties = d + return record_additional_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_additional_model_construction_type.py b/accelapy/accelapy/records_client/models/record_additional_model_construction_type.py new file mode 100644 index 0000000..8b89984 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_additional_model_construction_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAdditionalModelConstructionType") + + +@_attrs_define +class RecordAdditionalModelConstructionType: + """The US Census Bureau construction type code. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_additional_model_construction_type = cls( + text=text, + value=value, + ) + + record_additional_model_construction_type.additional_properties = d + return record_additional_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model.py new file mode 100644 index 0000000..7b84294 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model.py @@ -0,0 +1,659 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.record_address_custom_forms_model_address_type_flag import ( + RecordAddressCustomFormsModelAddressTypeFlag, + ) + from ..models.record_address_custom_forms_model_country import RecordAddressCustomFormsModelCountry + from ..models.record_address_custom_forms_model_direction import RecordAddressCustomFormsModelDirection + from ..models.record_address_custom_forms_model_house_fraction_end import ( + RecordAddressCustomFormsModelHouseFractionEnd, + ) + from ..models.record_address_custom_forms_model_house_fraction_start import ( + RecordAddressCustomFormsModelHouseFractionStart, + ) + from ..models.record_address_custom_forms_model_state import RecordAddressCustomFormsModelState + from ..models.record_address_custom_forms_model_status import RecordAddressCustomFormsModelStatus + from ..models.record_address_custom_forms_model_street_suffix import RecordAddressCustomFormsModelStreetSuffix + from ..models.record_address_custom_forms_model_street_suffix_direction import ( + RecordAddressCustomFormsModelStreetSuffixDirection, + ) + from ..models.record_address_custom_forms_model_type import RecordAddressCustomFormsModelType + from ..models.record_address_custom_forms_model_unit_type import RecordAddressCustomFormsModelUnitType + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="RecordAddressCustomFormsModel") + + +@_attrs_define +class RecordAddressCustomFormsModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): The first line of the address. + address_line_2 (Union[Unset, str]): The second line of the address. + address_type_flag (Union[Unset, RecordAddressCustomFormsModelAddressTypeFlag]): A code name or an abbreviation + of the address type. + city (Union[Unset, str]): The name of the city. + country (Union[Unset, RecordAddressCustomFormsModelCountry]): The name of the country. See [Get All Address + Countries](./api-settings.html#operation/v4.get.settings.addresses.countries). + cross_street_name_start (Union[Unset, str]): The beginning intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + cross_street_name_end (Union[Unset, str]): The ending intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + county (Union[Unset, str]): The name of the county. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + description (Union[Unset, str]): A description of the address. + direction (Union[Unset, RecordAddressCustomFormsModelDirection]): The street direction of the primary address + associated with the application. + distance (Union[Unset, float]): The distance from another landmark used to locate the address. + house_alpha_start (Union[Unset, str]): The beginning alphabetic unit in street address. + house_alpha_end (Union[Unset, str]): The ending alphabetic unit in street address. + house_fraction_start (Union[Unset, RecordAddressCustomFormsModelHouseFractionStart]): Beginning fraction value + used in combination with the Street number fields. + house_fraction_end (Union[Unset, RecordAddressCustomFormsModelHouseFractionEnd]): Ending franction value used in + combination with the Street number fields. + id (Union[Unset, int]): The unique address id assigned by the Civic Platform server. + inspection_district (Union[Unset, str]): The inspection district where the address is located. + inspection_district_prefix (Union[Unset, str]): The prefix for the inspection district where the address is + located. + is_primary (Union[Unset, str]): Indicates whether or not to designate the address as the primary address. Only + one address can be primary at any given time. + level_end (Union[Unset, str]): The ending level number (floor number) that makes up the address within a + complex. + level_prefix (Union[Unset, str]): The prefix for the level numbers (floor numbers) that make up the address. + level_start (Union[Unset, str]): The starting level number (floor number) that makes up the address within a + complex. + location_type (Union[Unset, str]): The type of location used for Right of Way Management. The valid values are + configured with the LOCATION_TYPE standard choice in Civic Platform Administration. + + Added in Civic Platform version: 9.2.0 + neighborhood (Union[Unset, str]): The neighborhood where the address is located. + neighborhood_prefix (Union[Unset, str]): The prefix for neighborhood where the address is located. + postal_code (Union[Unset, str]): The postal ZIP code for the address. + record_id (Union[Unset, RecordIdModel]): + ref_address_id (Union[Unset, int]): The reference address id. + secondary_street (Union[Unset, str]): This field (along with the Secondary Road Number field) displays an extra + description for the location when two roads that cross or a street with two names makes up the address of the + location. + secondary_street_number (Union[Unset, float]): This field (along with the Secondary Road field) displays an + extra description for the location when two roads that cross or a street with two names makes up the address of + the location. + service_provider_code (Union[Unset, str]): The unique agency identifier. + state (Union[Unset, RecordAddressCustomFormsModelState]): The name of the state. + status (Union[Unset, RecordAddressCustomFormsModelStatus]): The address status indicating whether the address is + active or inactive. + street_address (Union[Unset, str]): The street address. + street_end (Union[Unset, float]): The ending number of a street address range. + street_end_from (Union[Unset, int]): The beginning number of a street end address range. + street_end_to (Union[Unset, int]): The ending number of a street end address range. + street_name (Union[Unset, str]): The name of the street. + street_name_start (Union[Unset, str]): The beginning street name for searching. + + Added in Civic Platform version: 9.2.0 + street_name_end (Union[Unset, str]): The ending street name for searching. + + Added in Civic Platform version: 9.2.0 + street_prefix (Union[Unset, str]): Any part of an address that appears before a street name or number. For + example, if the address is 123 West Main, "West" is the street prefix. + street_start (Union[Unset, float]): The starting number of a street address range. + street_start_from (Union[Unset, int]): The beginning number of a street start address range. + street_start_to (Union[Unset, int]): The ending number of a street start address range. + street_suffix (Union[Unset, RecordAddressCustomFormsModelStreetSuffix]): The type of street such as "Lane" or + "Boulevard". + street_suffix_direction (Union[Unset, RecordAddressCustomFormsModelStreetSuffixDirection]): The direction + appended to the street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street suffix + direction. + type (Union[Unset, RecordAddressCustomFormsModelType]): The address type. + unit_start (Union[Unset, str]): The starting value of a range of unit numbers. + unit_end (Union[Unset, str]): The ending value of a range of unit numbers. + unit_type (Union[Unset, RecordAddressCustomFormsModelUnitType]): The unit type designation of the address. + x_coordinate (Union[Unset, float]): The longitudinal coordinate for this address. + y_coordinate (Union[Unset, float]): The latitudinal coordinate for this address. + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_type_flag: Union[Unset, "RecordAddressCustomFormsModelAddressTypeFlag"] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "RecordAddressCustomFormsModelCountry"] = UNSET + cross_street_name_start: Union[Unset, str] = UNSET + cross_street_name_end: Union[Unset, str] = UNSET + county: Union[Unset, str] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + description: Union[Unset, str] = UNSET + direction: Union[Unset, "RecordAddressCustomFormsModelDirection"] = UNSET + distance: Union[Unset, float] = UNSET + house_alpha_start: Union[Unset, str] = UNSET + house_alpha_end: Union[Unset, str] = UNSET + house_fraction_start: Union[Unset, "RecordAddressCustomFormsModelHouseFractionStart"] = UNSET + house_fraction_end: Union[Unset, "RecordAddressCustomFormsModelHouseFractionEnd"] = UNSET + id: Union[Unset, int] = UNSET + inspection_district: Union[Unset, str] = UNSET + inspection_district_prefix: Union[Unset, str] = UNSET + is_primary: Union[Unset, str] = UNSET + level_end: Union[Unset, str] = UNSET + level_prefix: Union[Unset, str] = UNSET + level_start: Union[Unset, str] = UNSET + location_type: Union[Unset, str] = UNSET + neighborhood: Union[Unset, str] = UNSET + neighborhood_prefix: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + ref_address_id: Union[Unset, int] = UNSET + secondary_street: Union[Unset, str] = UNSET + secondary_street_number: Union[Unset, float] = UNSET + service_provider_code: Union[Unset, str] = UNSET + state: Union[Unset, "RecordAddressCustomFormsModelState"] = UNSET + status: Union[Unset, "RecordAddressCustomFormsModelStatus"] = UNSET + street_address: Union[Unset, str] = UNSET + street_end: Union[Unset, float] = UNSET + street_end_from: Union[Unset, int] = UNSET + street_end_to: Union[Unset, int] = UNSET + street_name: Union[Unset, str] = UNSET + street_name_start: Union[Unset, str] = UNSET + street_name_end: Union[Unset, str] = UNSET + street_prefix: Union[Unset, str] = UNSET + street_start: Union[Unset, float] = UNSET + street_start_from: Union[Unset, int] = UNSET + street_start_to: Union[Unset, int] = UNSET + street_suffix: Union[Unset, "RecordAddressCustomFormsModelStreetSuffix"] = UNSET + street_suffix_direction: Union[Unset, "RecordAddressCustomFormsModelStreetSuffixDirection"] = UNSET + type: Union[Unset, "RecordAddressCustomFormsModelType"] = UNSET + unit_start: Union[Unset, str] = UNSET + unit_end: Union[Unset, str] = UNSET + unit_type: Union[Unset, "RecordAddressCustomFormsModelUnitType"] = UNSET + x_coordinate: Union[Unset, float] = UNSET + y_coordinate: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_type_flag: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address_type_flag, Unset): + address_type_flag = self.address_type_flag.to_dict() + + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + cross_street_name_start = self.cross_street_name_start + cross_street_name_end = self.cross_street_name_end + county = self.county + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + description = self.description + direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.direction, Unset): + direction = self.direction.to_dict() + + distance = self.distance + house_alpha_start = self.house_alpha_start + house_alpha_end = self.house_alpha_end + house_fraction_start: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_start, Unset): + house_fraction_start = self.house_fraction_start.to_dict() + + house_fraction_end: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_end, Unset): + house_fraction_end = self.house_fraction_end.to_dict() + + id = self.id + inspection_district = self.inspection_district + inspection_district_prefix = self.inspection_district_prefix + is_primary = self.is_primary + level_end = self.level_end + level_prefix = self.level_prefix + level_start = self.level_start + location_type = self.location_type + neighborhood = self.neighborhood + neighborhood_prefix = self.neighborhood_prefix + postal_code = self.postal_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + ref_address_id = self.ref_address_id + secondary_street = self.secondary_street + secondary_street_number = self.secondary_street_number + service_provider_code = self.service_provider_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + street_address = self.street_address + street_end = self.street_end + street_end_from = self.street_end_from + street_end_to = self.street_end_to + street_name = self.street_name + street_name_start = self.street_name_start + street_name_end = self.street_name_end + street_prefix = self.street_prefix + street_start = self.street_start + street_start_from = self.street_start_from + street_start_to = self.street_start_to + street_suffix: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix, Unset): + street_suffix = self.street_suffix.to_dict() + + street_suffix_direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix_direction, Unset): + street_suffix_direction = self.street_suffix_direction.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_start = self.unit_start + unit_end = self.unit_end + unit_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_type, Unset): + unit_type = self.unit_type.to_dict() + + x_coordinate = self.x_coordinate + y_coordinate = self.y_coordinate + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_type_flag is not UNSET: + field_dict["addressTypeFlag"] = address_type_flag + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if cross_street_name_start is not UNSET: + field_dict["crossStreetNameStart"] = cross_street_name_start + if cross_street_name_end is not UNSET: + field_dict["crossStreetNameEnd"] = cross_street_name_end + if county is not UNSET: + field_dict["county"] = county + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if description is not UNSET: + field_dict["description"] = description + if direction is not UNSET: + field_dict["direction"] = direction + if distance is not UNSET: + field_dict["distance"] = distance + if house_alpha_start is not UNSET: + field_dict["houseAlphaStart"] = house_alpha_start + if house_alpha_end is not UNSET: + field_dict["houseAlphaEnd"] = house_alpha_end + if house_fraction_start is not UNSET: + field_dict["houseFractionStart"] = house_fraction_start + if house_fraction_end is not UNSET: + field_dict["houseFractionEnd"] = house_fraction_end + if id is not UNSET: + field_dict["id"] = id + if inspection_district is not UNSET: + field_dict["inspectionDistrict"] = inspection_district + if inspection_district_prefix is not UNSET: + field_dict["inspectionDistrictPrefix"] = inspection_district_prefix + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if level_end is not UNSET: + field_dict["levelEnd"] = level_end + if level_prefix is not UNSET: + field_dict["levelPrefix"] = level_prefix + if level_start is not UNSET: + field_dict["levelStart"] = level_start + if location_type is not UNSET: + field_dict["locationType"] = location_type + if neighborhood is not UNSET: + field_dict["neighborhood"] = neighborhood + if neighborhood_prefix is not UNSET: + field_dict["neighborhoodPrefix"] = neighborhood_prefix + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if ref_address_id is not UNSET: + field_dict["refAddressId"] = ref_address_id + if secondary_street is not UNSET: + field_dict["secondaryStreet"] = secondary_street + if secondary_street_number is not UNSET: + field_dict["secondaryStreetNumber"] = secondary_street_number + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if street_address is not UNSET: + field_dict["streetAddress"] = street_address + if street_end is not UNSET: + field_dict["streetEnd"] = street_end + if street_end_from is not UNSET: + field_dict["streetEndFrom"] = street_end_from + if street_end_to is not UNSET: + field_dict["streetEndTo"] = street_end_to + if street_name is not UNSET: + field_dict["streetName"] = street_name + if street_name_start is not UNSET: + field_dict["streetNameStart"] = street_name_start + if street_name_end is not UNSET: + field_dict["streetNameEnd"] = street_name_end + if street_prefix is not UNSET: + field_dict["streetPrefix"] = street_prefix + if street_start is not UNSET: + field_dict["streetStart"] = street_start + if street_start_from is not UNSET: + field_dict["streetStartFrom"] = street_start_from + if street_start_to is not UNSET: + field_dict["streetStartTo"] = street_start_to + if street_suffix is not UNSET: + field_dict["streetSuffix"] = street_suffix + if street_suffix_direction is not UNSET: + field_dict["streetSuffixDirection"] = street_suffix_direction + if type is not UNSET: + field_dict["type"] = type + if unit_start is not UNSET: + field_dict["unitStart"] = unit_start + if unit_end is not UNSET: + field_dict["unitEnd"] = unit_end + if unit_type is not UNSET: + field_dict["unitType"] = unit_type + if x_coordinate is not UNSET: + field_dict["xCoordinate"] = x_coordinate + if y_coordinate is not UNSET: + field_dict["yCoordinate"] = y_coordinate + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.record_address_custom_forms_model_address_type_flag import ( + RecordAddressCustomFormsModelAddressTypeFlag, + ) + from ..models.record_address_custom_forms_model_country import RecordAddressCustomFormsModelCountry + from ..models.record_address_custom_forms_model_direction import RecordAddressCustomFormsModelDirection + from ..models.record_address_custom_forms_model_house_fraction_end import ( + RecordAddressCustomFormsModelHouseFractionEnd, + ) + from ..models.record_address_custom_forms_model_house_fraction_start import ( + RecordAddressCustomFormsModelHouseFractionStart, + ) + from ..models.record_address_custom_forms_model_state import RecordAddressCustomFormsModelState + from ..models.record_address_custom_forms_model_status import RecordAddressCustomFormsModelStatus + from ..models.record_address_custom_forms_model_street_suffix import RecordAddressCustomFormsModelStreetSuffix + from ..models.record_address_custom_forms_model_street_suffix_direction import ( + RecordAddressCustomFormsModelStreetSuffixDirection, + ) + from ..models.record_address_custom_forms_model_type import RecordAddressCustomFormsModelType + from ..models.record_address_custom_forms_model_unit_type import RecordAddressCustomFormsModelUnitType + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + _address_type_flag = d.pop("addressTypeFlag", UNSET) + address_type_flag: Union[Unset, RecordAddressCustomFormsModelAddressTypeFlag] + if isinstance(_address_type_flag, Unset): + address_type_flag = UNSET + else: + address_type_flag = RecordAddressCustomFormsModelAddressTypeFlag.from_dict(_address_type_flag) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, RecordAddressCustomFormsModelCountry] + if isinstance(_country, Unset): + country = UNSET + else: + country = RecordAddressCustomFormsModelCountry.from_dict(_country) + + cross_street_name_start = d.pop("crossStreetNameStart", UNSET) + + cross_street_name_end = d.pop("crossStreetNameEnd", UNSET) + + county = d.pop("county", UNSET) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + description = d.pop("description", UNSET) + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, RecordAddressCustomFormsModelDirection] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = RecordAddressCustomFormsModelDirection.from_dict(_direction) + + distance = d.pop("distance", UNSET) + + house_alpha_start = d.pop("houseAlphaStart", UNSET) + + house_alpha_end = d.pop("houseAlphaEnd", UNSET) + + _house_fraction_start = d.pop("houseFractionStart", UNSET) + house_fraction_start: Union[Unset, RecordAddressCustomFormsModelHouseFractionStart] + if isinstance(_house_fraction_start, Unset): + house_fraction_start = UNSET + else: + house_fraction_start = RecordAddressCustomFormsModelHouseFractionStart.from_dict(_house_fraction_start) + + _house_fraction_end = d.pop("houseFractionEnd", UNSET) + house_fraction_end: Union[Unset, RecordAddressCustomFormsModelHouseFractionEnd] + if isinstance(_house_fraction_end, Unset): + house_fraction_end = UNSET + else: + house_fraction_end = RecordAddressCustomFormsModelHouseFractionEnd.from_dict(_house_fraction_end) + + id = d.pop("id", UNSET) + + inspection_district = d.pop("inspectionDistrict", UNSET) + + inspection_district_prefix = d.pop("inspectionDistrictPrefix", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + level_end = d.pop("levelEnd", UNSET) + + level_prefix = d.pop("levelPrefix", UNSET) + + level_start = d.pop("levelStart", UNSET) + + location_type = d.pop("locationType", UNSET) + + neighborhood = d.pop("neighborhood", UNSET) + + neighborhood_prefix = d.pop("neighborhoodPrefix", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + ref_address_id = d.pop("refAddressId", UNSET) + + secondary_street = d.pop("secondaryStreet", UNSET) + + secondary_street_number = d.pop("secondaryStreetNumber", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, RecordAddressCustomFormsModelState] + if isinstance(_state, Unset): + state = UNSET + else: + state = RecordAddressCustomFormsModelState.from_dict(_state) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordAddressCustomFormsModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordAddressCustomFormsModelStatus.from_dict(_status) + + street_address = d.pop("streetAddress", UNSET) + + street_end = d.pop("streetEnd", UNSET) + + street_end_from = d.pop("streetEndFrom", UNSET) + + street_end_to = d.pop("streetEndTo", UNSET) + + street_name = d.pop("streetName", UNSET) + + street_name_start = d.pop("streetNameStart", UNSET) + + street_name_end = d.pop("streetNameEnd", UNSET) + + street_prefix = d.pop("streetPrefix", UNSET) + + street_start = d.pop("streetStart", UNSET) + + street_start_from = d.pop("streetStartFrom", UNSET) + + street_start_to = d.pop("streetStartTo", UNSET) + + _street_suffix = d.pop("streetSuffix", UNSET) + street_suffix: Union[Unset, RecordAddressCustomFormsModelStreetSuffix] + if isinstance(_street_suffix, Unset): + street_suffix = UNSET + else: + street_suffix = RecordAddressCustomFormsModelStreetSuffix.from_dict(_street_suffix) + + _street_suffix_direction = d.pop("streetSuffixDirection", UNSET) + street_suffix_direction: Union[Unset, RecordAddressCustomFormsModelStreetSuffixDirection] + if isinstance(_street_suffix_direction, Unset): + street_suffix_direction = UNSET + else: + street_suffix_direction = RecordAddressCustomFormsModelStreetSuffixDirection.from_dict( + _street_suffix_direction + ) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordAddressCustomFormsModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordAddressCustomFormsModelType.from_dict(_type) + + unit_start = d.pop("unitStart", UNSET) + + unit_end = d.pop("unitEnd", UNSET) + + _unit_type = d.pop("unitType", UNSET) + unit_type: Union[Unset, RecordAddressCustomFormsModelUnitType] + if isinstance(_unit_type, Unset): + unit_type = UNSET + else: + unit_type = RecordAddressCustomFormsModelUnitType.from_dict(_unit_type) + + x_coordinate = d.pop("xCoordinate", UNSET) + + y_coordinate = d.pop("yCoordinate", UNSET) + + record_address_custom_forms_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_type_flag=address_type_flag, + city=city, + country=country, + cross_street_name_start=cross_street_name_start, + cross_street_name_end=cross_street_name_end, + county=county, + custom_forms=custom_forms, + description=description, + direction=direction, + distance=distance, + house_alpha_start=house_alpha_start, + house_alpha_end=house_alpha_end, + house_fraction_start=house_fraction_start, + house_fraction_end=house_fraction_end, + id=id, + inspection_district=inspection_district, + inspection_district_prefix=inspection_district_prefix, + is_primary=is_primary, + level_end=level_end, + level_prefix=level_prefix, + level_start=level_start, + location_type=location_type, + neighborhood=neighborhood, + neighborhood_prefix=neighborhood_prefix, + postal_code=postal_code, + record_id=record_id, + ref_address_id=ref_address_id, + secondary_street=secondary_street, + secondary_street_number=secondary_street_number, + service_provider_code=service_provider_code, + state=state, + status=status, + street_address=street_address, + street_end=street_end, + street_end_from=street_end_from, + street_end_to=street_end_to, + street_name=street_name, + street_name_start=street_name_start, + street_name_end=street_name_end, + street_prefix=street_prefix, + street_start=street_start, + street_start_from=street_start_from, + street_start_to=street_start_to, + street_suffix=street_suffix, + street_suffix_direction=street_suffix_direction, + type=type, + unit_start=unit_start, + unit_end=unit_end, + unit_type=unit_type, + x_coordinate=x_coordinate, + y_coordinate=y_coordinate, + ) + + record_address_custom_forms_model.additional_properties = d + return record_address_custom_forms_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_address_type_flag.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_address_type_flag.py new file mode 100644 index 0000000..32ba257 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_address_type_flag.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelAddressTypeFlag") + + +@_attrs_define +class RecordAddressCustomFormsModelAddressTypeFlag: + """A code name or an abbreviation of the address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_address_type_flag = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_address_type_flag.additional_properties = d + return record_address_custom_forms_model_address_type_flag + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_country.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_country.py new file mode 100644 index 0000000..845aabf --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_country.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelCountry") + + +@_attrs_define +class RecordAddressCustomFormsModelCountry: + """The name of the country. See [Get All Address Countries](./api- + settings.html#operation/v4.get.settings.addresses.countries). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_country = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_country.additional_properties = d + return record_address_custom_forms_model_country + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_direction.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_direction.py new file mode 100644 index 0000000..469c3c5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_direction.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelDirection") + + +@_attrs_define +class RecordAddressCustomFormsModelDirection: + """The street direction of the primary address associated with the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_direction = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_direction.additional_properties = d + return record_address_custom_forms_model_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_end.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_end.py new file mode 100644 index 0000000..7560bd4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_end.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelHouseFractionEnd") + + +@_attrs_define +class RecordAddressCustomFormsModelHouseFractionEnd: + """Ending franction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_house_fraction_end = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_house_fraction_end.additional_properties = d + return record_address_custom_forms_model_house_fraction_end + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_start.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_start.py new file mode 100644 index 0000000..33091a2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_house_fraction_start.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelHouseFractionStart") + + +@_attrs_define +class RecordAddressCustomFormsModelHouseFractionStart: + """Beginning fraction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_house_fraction_start = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_house_fraction_start.additional_properties = d + return record_address_custom_forms_model_house_fraction_start + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_state.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_state.py new file mode 100644 index 0000000..0f7a2be --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelState") + + +@_attrs_define +class RecordAddressCustomFormsModelState: + """The name of the state. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_state = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_state.additional_properties = d + return record_address_custom_forms_model_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_status.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_status.py new file mode 100644 index 0000000..36e167d --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelStatus") + + +@_attrs_define +class RecordAddressCustomFormsModelStatus: + """The address status indicating whether the address is active or inactive. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_status = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_status.additional_properties = d + return record_address_custom_forms_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix.py new file mode 100644 index 0000000..5695327 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelStreetSuffix") + + +@_attrs_define +class RecordAddressCustomFormsModelStreetSuffix: + """The type of street such as "Lane" or "Boulevard". + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_street_suffix = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_street_suffix.additional_properties = d + return record_address_custom_forms_model_street_suffix + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix_direction.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix_direction.py new file mode 100644 index 0000000..1fb19e3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_street_suffix_direction.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelStreetSuffixDirection") + + +@_attrs_define +class RecordAddressCustomFormsModelStreetSuffixDirection: + """The direction appended to the street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street + suffix direction. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_street_suffix_direction = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_street_suffix_direction.additional_properties = d + return record_address_custom_forms_model_street_suffix_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_type.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_type.py new file mode 100644 index 0000000..6901ddc --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelType") + + +@_attrs_define +class RecordAddressCustomFormsModelType: + """The address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_type = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_type.additional_properties = d + return record_address_custom_forms_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_custom_forms_model_unit_type.py b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_unit_type.py new file mode 100644 index 0000000..ec0a432 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_custom_forms_model_unit_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressCustomFormsModelUnitType") + + +@_attrs_define +class RecordAddressCustomFormsModelUnitType: + """The unit type designation of the address. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_custom_forms_model_unit_type = cls( + text=text, + value=value, + ) + + record_address_custom_forms_model_unit_type.additional_properties = d + return record_address_custom_forms_model_unit_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model.py b/accelapy/accelapy/records_client/models/record_address_model.py new file mode 100644 index 0000000..d8814d1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model.py @@ -0,0 +1,617 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_address_model_address_type_flag import RecordAddressModelAddressTypeFlag + from ..models.record_address_model_country import RecordAddressModelCountry + from ..models.record_address_model_direction import RecordAddressModelDirection + from ..models.record_address_model_house_fraction_end import RecordAddressModelHouseFractionEnd + from ..models.record_address_model_house_fraction_start import RecordAddressModelHouseFractionStart + from ..models.record_address_model_state import RecordAddressModelState + from ..models.record_address_model_status import RecordAddressModelStatus + from ..models.record_address_model_street_suffix import RecordAddressModelStreetSuffix + from ..models.record_address_model_street_suffix_direction import RecordAddressModelStreetSuffixDirection + from ..models.record_address_model_type import RecordAddressModelType + from ..models.record_address_model_unit_type import RecordAddressModelUnitType + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="RecordAddressModel") + + +@_attrs_define +class RecordAddressModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): The first line of the address. + address_line_2 (Union[Unset, str]): The second line of the address. + address_type_flag (Union[Unset, RecordAddressModelAddressTypeFlag]): A code name or an abbreviation of the + address type. + city (Union[Unset, str]): The name of the city. + country (Union[Unset, RecordAddressModelCountry]): The name of the country. See [Get All Address + Countries](./api-settings.html#operation/v4.get.settings.addresses.countries). + cross_street_name_start (Union[Unset, str]): The beginning intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + cross_street_name_end (Union[Unset, str]): The ending intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + county (Union[Unset, str]): The name of the county. + description (Union[Unset, str]): A description of the address. + direction (Union[Unset, RecordAddressModelDirection]): The street direction of the primary address associated + with the application. + distance (Union[Unset, float]): The distance from another landmark used to locate the address. + house_alpha_start (Union[Unset, str]): The beginning alphabetic unit in street address. + house_alpha_end (Union[Unset, str]): The ending alphabetic unit in street address. + house_fraction_start (Union[Unset, RecordAddressModelHouseFractionStart]): Beginning fraction value used in + combination with the Street number fields. + house_fraction_end (Union[Unset, RecordAddressModelHouseFractionEnd]): Ending franction value used in + combination with the Street number fields. + id (Union[Unset, int]): The unique address id assigned by the Civic Platform server. + inspection_district (Union[Unset, str]): The inspection district where the address is located. + inspection_district_prefix (Union[Unset, str]): The prefix for the inspection district where the address is + located. + is_primary (Union[Unset, str]): Indicates whether or not to designate the address as the primary address. Only + one address can be primary at any given time. + level_end (Union[Unset, str]): The ending level number (floor number) that makes up the address within a + complex. + level_prefix (Union[Unset, str]): The prefix for the level numbers (floor numbers) that make up the address. + level_start (Union[Unset, str]): The starting level number (floor number) that makes up the address within a + complex. + location_type (Union[Unset, str]): The type of location used for Right of Way Management. The valid values are + configured with the LOCATION_TYPE standard choice in Civic Platform Administration. + + Added in Civic Platform version: 9.2.0 + neighborhood (Union[Unset, str]): The neighborhood where the address is located. + neighborhood_prefix (Union[Unset, str]): The prefix for neighborhood where the address is located. + postal_code (Union[Unset, str]): The postal ZIP code for the address. + record_id (Union[Unset, RecordIdModel]): + ref_address_id (Union[Unset, int]): The reference address id. + secondary_street (Union[Unset, str]): This field (along with the Secondary Road Number field) displays an extra + description for the location when two roads that cross or a street with two names makes up the address of the + location. + secondary_street_number (Union[Unset, float]): This field (along with the Secondary Road field) displays an + extra description for the location when two roads that cross or a street with two names makes up the address of + the location. + service_provider_code (Union[Unset, str]): The unique agency identifier. + state (Union[Unset, RecordAddressModelState]): The name of the state. + status (Union[Unset, RecordAddressModelStatus]): The address status indicating whether the address is active or + inactive. + street_address (Union[Unset, str]): The street address. + street_end (Union[Unset, float]): The ending number of a street address range. + street_end_from (Union[Unset, int]): The beginning number of a street end address range. + street_end_to (Union[Unset, int]): The ending number of a street end address range. + street_name (Union[Unset, str]): The name of the street. + street_name_start (Union[Unset, str]): The beginning street name for searching. + + Added in Civic Platform version: 9.2.0 + street_name_end (Union[Unset, str]): The ending street name for searching. + + Added in Civic Platform version: 9.2.0 + street_prefix (Union[Unset, str]): Any part of an address that appears before a street name or number. For + example, if the address is 123 West Main, "West" is the street prefix. + street_start (Union[Unset, float]): The starting number of a street address range. + street_start_from (Union[Unset, int]): The beginning number of a street start address range. + street_start_to (Union[Unset, int]): The ending number of a street start address range. + street_suffix (Union[Unset, RecordAddressModelStreetSuffix]): The type of street such as "Lane" or "Boulevard". + street_suffix_direction (Union[Unset, RecordAddressModelStreetSuffixDirection]): The direction appended to the + street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street suffix direction. + type (Union[Unset, RecordAddressModelType]): The address type. + unit_start (Union[Unset, str]): The starting value of a range of unit numbers. + unit_end (Union[Unset, str]): The ending value of a range of unit numbers. + unit_type (Union[Unset, RecordAddressModelUnitType]): The unit type designation of the address. + x_coordinate (Union[Unset, float]): The longitudinal coordinate for this address. + y_coordinate (Union[Unset, float]): The latitudinal coordinate for this address. + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_type_flag: Union[Unset, "RecordAddressModelAddressTypeFlag"] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "RecordAddressModelCountry"] = UNSET + cross_street_name_start: Union[Unset, str] = UNSET + cross_street_name_end: Union[Unset, str] = UNSET + county: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + direction: Union[Unset, "RecordAddressModelDirection"] = UNSET + distance: Union[Unset, float] = UNSET + house_alpha_start: Union[Unset, str] = UNSET + house_alpha_end: Union[Unset, str] = UNSET + house_fraction_start: Union[Unset, "RecordAddressModelHouseFractionStart"] = UNSET + house_fraction_end: Union[Unset, "RecordAddressModelHouseFractionEnd"] = UNSET + id: Union[Unset, int] = UNSET + inspection_district: Union[Unset, str] = UNSET + inspection_district_prefix: Union[Unset, str] = UNSET + is_primary: Union[Unset, str] = UNSET + level_end: Union[Unset, str] = UNSET + level_prefix: Union[Unset, str] = UNSET + level_start: Union[Unset, str] = UNSET + location_type: Union[Unset, str] = UNSET + neighborhood: Union[Unset, str] = UNSET + neighborhood_prefix: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + ref_address_id: Union[Unset, int] = UNSET + secondary_street: Union[Unset, str] = UNSET + secondary_street_number: Union[Unset, float] = UNSET + service_provider_code: Union[Unset, str] = UNSET + state: Union[Unset, "RecordAddressModelState"] = UNSET + status: Union[Unset, "RecordAddressModelStatus"] = UNSET + street_address: Union[Unset, str] = UNSET + street_end: Union[Unset, float] = UNSET + street_end_from: Union[Unset, int] = UNSET + street_end_to: Union[Unset, int] = UNSET + street_name: Union[Unset, str] = UNSET + street_name_start: Union[Unset, str] = UNSET + street_name_end: Union[Unset, str] = UNSET + street_prefix: Union[Unset, str] = UNSET + street_start: Union[Unset, float] = UNSET + street_start_from: Union[Unset, int] = UNSET + street_start_to: Union[Unset, int] = UNSET + street_suffix: Union[Unset, "RecordAddressModelStreetSuffix"] = UNSET + street_suffix_direction: Union[Unset, "RecordAddressModelStreetSuffixDirection"] = UNSET + type: Union[Unset, "RecordAddressModelType"] = UNSET + unit_start: Union[Unset, str] = UNSET + unit_end: Union[Unset, str] = UNSET + unit_type: Union[Unset, "RecordAddressModelUnitType"] = UNSET + x_coordinate: Union[Unset, float] = UNSET + y_coordinate: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_type_flag: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address_type_flag, Unset): + address_type_flag = self.address_type_flag.to_dict() + + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + cross_street_name_start = self.cross_street_name_start + cross_street_name_end = self.cross_street_name_end + county = self.county + description = self.description + direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.direction, Unset): + direction = self.direction.to_dict() + + distance = self.distance + house_alpha_start = self.house_alpha_start + house_alpha_end = self.house_alpha_end + house_fraction_start: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_start, Unset): + house_fraction_start = self.house_fraction_start.to_dict() + + house_fraction_end: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_end, Unset): + house_fraction_end = self.house_fraction_end.to_dict() + + id = self.id + inspection_district = self.inspection_district + inspection_district_prefix = self.inspection_district_prefix + is_primary = self.is_primary + level_end = self.level_end + level_prefix = self.level_prefix + level_start = self.level_start + location_type = self.location_type + neighborhood = self.neighborhood + neighborhood_prefix = self.neighborhood_prefix + postal_code = self.postal_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + ref_address_id = self.ref_address_id + secondary_street = self.secondary_street + secondary_street_number = self.secondary_street_number + service_provider_code = self.service_provider_code + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + street_address = self.street_address + street_end = self.street_end + street_end_from = self.street_end_from + street_end_to = self.street_end_to + street_name = self.street_name + street_name_start = self.street_name_start + street_name_end = self.street_name_end + street_prefix = self.street_prefix + street_start = self.street_start + street_start_from = self.street_start_from + street_start_to = self.street_start_to + street_suffix: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix, Unset): + street_suffix = self.street_suffix.to_dict() + + street_suffix_direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix_direction, Unset): + street_suffix_direction = self.street_suffix_direction.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_start = self.unit_start + unit_end = self.unit_end + unit_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_type, Unset): + unit_type = self.unit_type.to_dict() + + x_coordinate = self.x_coordinate + y_coordinate = self.y_coordinate + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_type_flag is not UNSET: + field_dict["addressTypeFlag"] = address_type_flag + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if cross_street_name_start is not UNSET: + field_dict["crossStreetNameStart"] = cross_street_name_start + if cross_street_name_end is not UNSET: + field_dict["crossStreetNameEnd"] = cross_street_name_end + if county is not UNSET: + field_dict["county"] = county + if description is not UNSET: + field_dict["description"] = description + if direction is not UNSET: + field_dict["direction"] = direction + if distance is not UNSET: + field_dict["distance"] = distance + if house_alpha_start is not UNSET: + field_dict["houseAlphaStart"] = house_alpha_start + if house_alpha_end is not UNSET: + field_dict["houseAlphaEnd"] = house_alpha_end + if house_fraction_start is not UNSET: + field_dict["houseFractionStart"] = house_fraction_start + if house_fraction_end is not UNSET: + field_dict["houseFractionEnd"] = house_fraction_end + if id is not UNSET: + field_dict["id"] = id + if inspection_district is not UNSET: + field_dict["inspectionDistrict"] = inspection_district + if inspection_district_prefix is not UNSET: + field_dict["inspectionDistrictPrefix"] = inspection_district_prefix + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if level_end is not UNSET: + field_dict["levelEnd"] = level_end + if level_prefix is not UNSET: + field_dict["levelPrefix"] = level_prefix + if level_start is not UNSET: + field_dict["levelStart"] = level_start + if location_type is not UNSET: + field_dict["locationType"] = location_type + if neighborhood is not UNSET: + field_dict["neighborhood"] = neighborhood + if neighborhood_prefix is not UNSET: + field_dict["neighborhoodPrefix"] = neighborhood_prefix + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if ref_address_id is not UNSET: + field_dict["refAddressId"] = ref_address_id + if secondary_street is not UNSET: + field_dict["secondaryStreet"] = secondary_street + if secondary_street_number is not UNSET: + field_dict["secondaryStreetNumber"] = secondary_street_number + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if street_address is not UNSET: + field_dict["streetAddress"] = street_address + if street_end is not UNSET: + field_dict["streetEnd"] = street_end + if street_end_from is not UNSET: + field_dict["streetEndFrom"] = street_end_from + if street_end_to is not UNSET: + field_dict["streetEndTo"] = street_end_to + if street_name is not UNSET: + field_dict["streetName"] = street_name + if street_name_start is not UNSET: + field_dict["streetNameStart"] = street_name_start + if street_name_end is not UNSET: + field_dict["streetNameEnd"] = street_name_end + if street_prefix is not UNSET: + field_dict["streetPrefix"] = street_prefix + if street_start is not UNSET: + field_dict["streetStart"] = street_start + if street_start_from is not UNSET: + field_dict["streetStartFrom"] = street_start_from + if street_start_to is not UNSET: + field_dict["streetStartTo"] = street_start_to + if street_suffix is not UNSET: + field_dict["streetSuffix"] = street_suffix + if street_suffix_direction is not UNSET: + field_dict["streetSuffixDirection"] = street_suffix_direction + if type is not UNSET: + field_dict["type"] = type + if unit_start is not UNSET: + field_dict["unitStart"] = unit_start + if unit_end is not UNSET: + field_dict["unitEnd"] = unit_end + if unit_type is not UNSET: + field_dict["unitType"] = unit_type + if x_coordinate is not UNSET: + field_dict["xCoordinate"] = x_coordinate + if y_coordinate is not UNSET: + field_dict["yCoordinate"] = y_coordinate + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_address_model_address_type_flag import RecordAddressModelAddressTypeFlag + from ..models.record_address_model_country import RecordAddressModelCountry + from ..models.record_address_model_direction import RecordAddressModelDirection + from ..models.record_address_model_house_fraction_end import RecordAddressModelHouseFractionEnd + from ..models.record_address_model_house_fraction_start import RecordAddressModelHouseFractionStart + from ..models.record_address_model_state import RecordAddressModelState + from ..models.record_address_model_status import RecordAddressModelStatus + from ..models.record_address_model_street_suffix import RecordAddressModelStreetSuffix + from ..models.record_address_model_street_suffix_direction import RecordAddressModelStreetSuffixDirection + from ..models.record_address_model_type import RecordAddressModelType + from ..models.record_address_model_unit_type import RecordAddressModelUnitType + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + _address_type_flag = d.pop("addressTypeFlag", UNSET) + address_type_flag: Union[Unset, RecordAddressModelAddressTypeFlag] + if isinstance(_address_type_flag, Unset): + address_type_flag = UNSET + else: + address_type_flag = RecordAddressModelAddressTypeFlag.from_dict(_address_type_flag) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, RecordAddressModelCountry] + if isinstance(_country, Unset): + country = UNSET + else: + country = RecordAddressModelCountry.from_dict(_country) + + cross_street_name_start = d.pop("crossStreetNameStart", UNSET) + + cross_street_name_end = d.pop("crossStreetNameEnd", UNSET) + + county = d.pop("county", UNSET) + + description = d.pop("description", UNSET) + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, RecordAddressModelDirection] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = RecordAddressModelDirection.from_dict(_direction) + + distance = d.pop("distance", UNSET) + + house_alpha_start = d.pop("houseAlphaStart", UNSET) + + house_alpha_end = d.pop("houseAlphaEnd", UNSET) + + _house_fraction_start = d.pop("houseFractionStart", UNSET) + house_fraction_start: Union[Unset, RecordAddressModelHouseFractionStart] + if isinstance(_house_fraction_start, Unset): + house_fraction_start = UNSET + else: + house_fraction_start = RecordAddressModelHouseFractionStart.from_dict(_house_fraction_start) + + _house_fraction_end = d.pop("houseFractionEnd", UNSET) + house_fraction_end: Union[Unset, RecordAddressModelHouseFractionEnd] + if isinstance(_house_fraction_end, Unset): + house_fraction_end = UNSET + else: + house_fraction_end = RecordAddressModelHouseFractionEnd.from_dict(_house_fraction_end) + + id = d.pop("id", UNSET) + + inspection_district = d.pop("inspectionDistrict", UNSET) + + inspection_district_prefix = d.pop("inspectionDistrictPrefix", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + level_end = d.pop("levelEnd", UNSET) + + level_prefix = d.pop("levelPrefix", UNSET) + + level_start = d.pop("levelStart", UNSET) + + location_type = d.pop("locationType", UNSET) + + neighborhood = d.pop("neighborhood", UNSET) + + neighborhood_prefix = d.pop("neighborhoodPrefix", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + ref_address_id = d.pop("refAddressId", UNSET) + + secondary_street = d.pop("secondaryStreet", UNSET) + + secondary_street_number = d.pop("secondaryStreetNumber", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, RecordAddressModelState] + if isinstance(_state, Unset): + state = UNSET + else: + state = RecordAddressModelState.from_dict(_state) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordAddressModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordAddressModelStatus.from_dict(_status) + + street_address = d.pop("streetAddress", UNSET) + + street_end = d.pop("streetEnd", UNSET) + + street_end_from = d.pop("streetEndFrom", UNSET) + + street_end_to = d.pop("streetEndTo", UNSET) + + street_name = d.pop("streetName", UNSET) + + street_name_start = d.pop("streetNameStart", UNSET) + + street_name_end = d.pop("streetNameEnd", UNSET) + + street_prefix = d.pop("streetPrefix", UNSET) + + street_start = d.pop("streetStart", UNSET) + + street_start_from = d.pop("streetStartFrom", UNSET) + + street_start_to = d.pop("streetStartTo", UNSET) + + _street_suffix = d.pop("streetSuffix", UNSET) + street_suffix: Union[Unset, RecordAddressModelStreetSuffix] + if isinstance(_street_suffix, Unset): + street_suffix = UNSET + else: + street_suffix = RecordAddressModelStreetSuffix.from_dict(_street_suffix) + + _street_suffix_direction = d.pop("streetSuffixDirection", UNSET) + street_suffix_direction: Union[Unset, RecordAddressModelStreetSuffixDirection] + if isinstance(_street_suffix_direction, Unset): + street_suffix_direction = UNSET + else: + street_suffix_direction = RecordAddressModelStreetSuffixDirection.from_dict(_street_suffix_direction) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordAddressModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordAddressModelType.from_dict(_type) + + unit_start = d.pop("unitStart", UNSET) + + unit_end = d.pop("unitEnd", UNSET) + + _unit_type = d.pop("unitType", UNSET) + unit_type: Union[Unset, RecordAddressModelUnitType] + if isinstance(_unit_type, Unset): + unit_type = UNSET + else: + unit_type = RecordAddressModelUnitType.from_dict(_unit_type) + + x_coordinate = d.pop("xCoordinate", UNSET) + + y_coordinate = d.pop("yCoordinate", UNSET) + + record_address_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_type_flag=address_type_flag, + city=city, + country=country, + cross_street_name_start=cross_street_name_start, + cross_street_name_end=cross_street_name_end, + county=county, + description=description, + direction=direction, + distance=distance, + house_alpha_start=house_alpha_start, + house_alpha_end=house_alpha_end, + house_fraction_start=house_fraction_start, + house_fraction_end=house_fraction_end, + id=id, + inspection_district=inspection_district, + inspection_district_prefix=inspection_district_prefix, + is_primary=is_primary, + level_end=level_end, + level_prefix=level_prefix, + level_start=level_start, + location_type=location_type, + neighborhood=neighborhood, + neighborhood_prefix=neighborhood_prefix, + postal_code=postal_code, + record_id=record_id, + ref_address_id=ref_address_id, + secondary_street=secondary_street, + secondary_street_number=secondary_street_number, + service_provider_code=service_provider_code, + state=state, + status=status, + street_address=street_address, + street_end=street_end, + street_end_from=street_end_from, + street_end_to=street_end_to, + street_name=street_name, + street_name_start=street_name_start, + street_name_end=street_name_end, + street_prefix=street_prefix, + street_start=street_start, + street_start_from=street_start_from, + street_start_to=street_start_to, + street_suffix=street_suffix, + street_suffix_direction=street_suffix_direction, + type=type, + unit_start=unit_start, + unit_end=unit_end, + unit_type=unit_type, + x_coordinate=x_coordinate, + y_coordinate=y_coordinate, + ) + + record_address_model.additional_properties = d + return record_address_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_address_type_flag.py b/accelapy/accelapy/records_client/models/record_address_model_address_type_flag.py new file mode 100644 index 0000000..3a76349 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_address_type_flag.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelAddressTypeFlag") + + +@_attrs_define +class RecordAddressModelAddressTypeFlag: + """A code name or an abbreviation of the address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_address_type_flag = cls( + text=text, + value=value, + ) + + record_address_model_address_type_flag.additional_properties = d + return record_address_model_address_type_flag + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_country.py b/accelapy/accelapy/records_client/models/record_address_model_country.py new file mode 100644 index 0000000..09e9e82 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_country.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelCountry") + + +@_attrs_define +class RecordAddressModelCountry: + """The name of the country. See [Get All Address Countries](./api- + settings.html#operation/v4.get.settings.addresses.countries). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_country = cls( + text=text, + value=value, + ) + + record_address_model_country.additional_properties = d + return record_address_model_country + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_direction.py b/accelapy/accelapy/records_client/models/record_address_model_direction.py new file mode 100644 index 0000000..eb380ac --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_direction.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelDirection") + + +@_attrs_define +class RecordAddressModelDirection: + """The street direction of the primary address associated with the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_direction = cls( + text=text, + value=value, + ) + + record_address_model_direction.additional_properties = d + return record_address_model_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_house_fraction_end.py b/accelapy/accelapy/records_client/models/record_address_model_house_fraction_end.py new file mode 100644 index 0000000..fb7760a --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_house_fraction_end.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelHouseFractionEnd") + + +@_attrs_define +class RecordAddressModelHouseFractionEnd: + """Ending franction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_house_fraction_end = cls( + text=text, + value=value, + ) + + record_address_model_house_fraction_end.additional_properties = d + return record_address_model_house_fraction_end + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_house_fraction_start.py b/accelapy/accelapy/records_client/models/record_address_model_house_fraction_start.py new file mode 100644 index 0000000..2d141ea --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_house_fraction_start.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelHouseFractionStart") + + +@_attrs_define +class RecordAddressModelHouseFractionStart: + """Beginning fraction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_house_fraction_start = cls( + text=text, + value=value, + ) + + record_address_model_house_fraction_start.additional_properties = d + return record_address_model_house_fraction_start + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_state.py b/accelapy/accelapy/records_client/models/record_address_model_state.py new file mode 100644 index 0000000..0c2fa97 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelState") + + +@_attrs_define +class RecordAddressModelState: + """The name of the state. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_state = cls( + text=text, + value=value, + ) + + record_address_model_state.additional_properties = d + return record_address_model_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_status.py b/accelapy/accelapy/records_client/models/record_address_model_status.py new file mode 100644 index 0000000..db5860c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelStatus") + + +@_attrs_define +class RecordAddressModelStatus: + """The address status indicating whether the address is active or inactive. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_status = cls( + text=text, + value=value, + ) + + record_address_model_status.additional_properties = d + return record_address_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_street_suffix.py b/accelapy/accelapy/records_client/models/record_address_model_street_suffix.py new file mode 100644 index 0000000..d529c57 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_street_suffix.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelStreetSuffix") + + +@_attrs_define +class RecordAddressModelStreetSuffix: + """The type of street such as "Lane" or "Boulevard". + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_street_suffix = cls( + text=text, + value=value, + ) + + record_address_model_street_suffix.additional_properties = d + return record_address_model_street_suffix + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_street_suffix_direction.py b/accelapy/accelapy/records_client/models/record_address_model_street_suffix_direction.py new file mode 100644 index 0000000..c9e716f --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_street_suffix_direction.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelStreetSuffixDirection") + + +@_attrs_define +class RecordAddressModelStreetSuffixDirection: + """The direction appended to the street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street + suffix direction. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_street_suffix_direction = cls( + text=text, + value=value, + ) + + record_address_model_street_suffix_direction.additional_properties = d + return record_address_model_street_suffix_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_type.py b/accelapy/accelapy/records_client/models/record_address_model_type.py new file mode 100644 index 0000000..ad70fba --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelType") + + +@_attrs_define +class RecordAddressModelType: + """The address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_type = cls( + text=text, + value=value, + ) + + record_address_model_type.additional_properties = d + return record_address_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_address_model_unit_type.py b/accelapy/accelapy/records_client/models/record_address_model_unit_type.py new file mode 100644 index 0000000..61b425a --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_address_model_unit_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAddressModelUnitType") + + +@_attrs_define +class RecordAddressModelUnitType: + """The unit type designation of the address. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_address_model_unit_type = cls( + text=text, + value=value, + ) + + record_address_model_unit_type.additional_properties = d + return record_address_model_unit_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model.py new file mode 100644 index 0000000..3eb8c7c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model.py @@ -0,0 +1,1022 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.record_apo_custom_forms_model_created_by_cloning import RecordAPOCustomFormsModelCreatedByCloning +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.asset_master_model import AssetMasterModel + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_custom_forms_model import RecordAddressCustomFormsModel + from ..models.record_apo_custom_forms_model_construction_type import RecordAPOCustomFormsModelConstructionType + from ..models.record_apo_custom_forms_model_priority import RecordAPOCustomFormsModelPriority + from ..models.record_apo_custom_forms_model_reported_channel import RecordAPOCustomFormsModelReportedChannel + from ..models.record_apo_custom_forms_model_reported_type import RecordAPOCustomFormsModelReportedType + from ..models.record_apo_custom_forms_model_severity import RecordAPOCustomFormsModelSeverity + from ..models.record_apo_custom_forms_model_status import RecordAPOCustomFormsModelStatus + from ..models.record_apo_custom_forms_model_status_reason import RecordAPOCustomFormsModelStatusReason + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="RecordAPOCustomFormsModel") + + +@_attrs_define +class RecordAPOCustomFormsModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + addresses (Union[Unset, List['RecordAddressCustomFormsModel']]): + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assets (Union[Unset, List['AssetMasterModel']]): + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + condition_of_approvals (Union[Unset, List['CapConditionModel2']]): + conditions (Union[Unset, List['NoticeConditionModel']]): + construction_type (Union[Unset, RecordAPOCustomFormsModelConstructionType]): The US Census Bureau construction + type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + contact (Union[Unset, List['RecordContactSimpleModel']]): + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_by_cloning (Union[Unset, RecordAPOCustomFormsModelCreatedByCloning]): Indictes whether or not the record + was cloned. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + custom_tables (Union[Unset, List['TableModel']]): + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + initiated_product (Union[Unset, str]): The Civic Platform product where the application is submitted: "AA" : + Classic Accela Automation. "ACA" : Accela Citizen Access. "AIVR" : Accela Integrated Voice Response. "AMO" : + Accela Mobile Office. "AV360" : Accela Asset Management, Accela Land Management. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + opened_date (Union[Unset, datetime.datetime]): The date the application was opened. + overall_application_time (Union[Unset, float]): The amount of elapsed time from the time tracking start date to + the completion of the application. + owner (Union[Unset, List['RefOwnerModel']]): + parcel (Union[Unset, List['ParcelModel1']]): + priority (Union[Unset, RecordAPOCustomFormsModelPriority]): The priority level assigned to the record. See [Get + All Priorities](./api-settings.html#operation/v4.get.settings.priorities). + professional (Union[Unset, List['LicenseProfessionalModel']]): + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RecordAPOCustomFormsModelReportedChannel]): The incoming channel through which + the applicant submitted the application. + reported_date (Union[Unset, datetime.datetime]): The date the complaint was reported. + reported_type (Union[Unset, RecordAPOCustomFormsModelReportedType]): The type of complaint or incident being + reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RecordAPOCustomFormsModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RecordAPOCustomFormsModelStatus]): The record status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_reason (Union[Unset, RecordAPOCustomFormsModelStatusReason]): The reason for the status setting on the + record. + status_type (Union[Unset, List[str]]): The record status type. + total_fee (Union[Unset, float]): The total amount of the fees invoiced to the record. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + total_pay (Union[Unset, float]): The total amount of pay. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + update_date (Union[Unset, datetime.datetime]): The last update date. + value (Union[Unset, str]): The record value. + """ + + actual_production_unit: Union[Unset, float] = UNSET + addresses: Union[Unset, List["RecordAddressCustomFormsModel"]] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assets: Union[Unset, List["AssetMasterModel"]] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + condition_of_approvals: Union[Unset, List["CapConditionModel2"]] = UNSET + conditions: Union[Unset, List["NoticeConditionModel"]] = UNSET + construction_type: Union[Unset, "RecordAPOCustomFormsModelConstructionType"] = UNSET + contact: Union[Unset, List["RecordContactSimpleModel"]] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + created_by_cloning: Union[Unset, RecordAPOCustomFormsModelCreatedByCloning] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + custom_id: Union[Unset, str] = UNSET + custom_tables: Union[Unset, List["TableModel"]] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + initiated_product: Union[Unset, str] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + opened_date: Union[Unset, datetime.datetime] = UNSET + overall_application_time: Union[Unset, float] = UNSET + owner: Union[Unset, List["RefOwnerModel"]] = UNSET + parcel: Union[Unset, List["ParcelModel1"]] = UNSET + priority: Union[Unset, "RecordAPOCustomFormsModelPriority"] = UNSET + professional: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RecordAPOCustomFormsModelReportedChannel"] = UNSET + reported_date: Union[Unset, datetime.datetime] = UNSET + reported_type: Union[Unset, "RecordAPOCustomFormsModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RecordAPOCustomFormsModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RecordAPOCustomFormsModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_reason: Union[Unset, "RecordAPOCustomFormsModelStatusReason"] = UNSET + status_type: Union[Unset, List[str]] = UNSET + total_fee: Union[Unset, float] = UNSET + total_job_cost: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + update_date: Union[Unset, datetime.datetime] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + addresses: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.addresses, Unset): + addresses = [] + for addresses_item_data in self.addresses: + addresses_item = addresses_item_data.to_dict() + + addresses.append(addresses_item) + + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assets: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.assets, Unset): + assets = [] + for assets_item_data in self.assets: + assets_item = assets_item_data.to_dict() + + assets.append(assets_item) + + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + condition_of_approvals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.condition_of_approvals, Unset): + condition_of_approvals = [] + for condition_of_approvals_item_data in self.condition_of_approvals: + condition_of_approvals_item = condition_of_approvals_item_data.to_dict() + + condition_of_approvals.append(condition_of_approvals_item) + + conditions: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + + conditions.append(conditions_item) + + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + contact: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.contact, Unset): + contact = [] + for contact_item_data in self.contact: + contact_item = contact_item_data.to_dict() + + contact.append(contact_item) + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + created_by_cloning: Union[Unset, str] = UNSET + if not isinstance(self.created_by_cloning, Unset): + created_by_cloning = self.created_by_cloning.value + + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + custom_id = self.custom_id + custom_tables: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_tables, Unset): + custom_tables = [] + for custom_tables_item_data in self.custom_tables: + custom_tables_item = custom_tables_item_data.to_dict() + + custom_tables.append(custom_tables_item) + + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + in_possession_time = self.in_possession_time + infraction = self.infraction + initiated_product = self.initiated_product + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + opened_date: Union[Unset, str] = UNSET + if not isinstance(self.opened_date, Unset): + opened_date = self.opened_date.isoformat() + + overall_application_time = self.overall_application_time + owner: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owner, Unset): + owner = [] + for owner_item_data in self.owner: + owner_item = owner_item_data.to_dict() + + owner.append(owner_item) + + parcel: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.parcel, Unset): + parcel = [] + for parcel_item_data in self.parcel: + parcel_item = parcel_item_data.to_dict() + + parcel.append(parcel_item) + + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + professional: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.professional, Unset): + professional = [] + for professional_item_data in self.professional: + professional_item = professional_item_data.to_dict() + + professional.append(professional_item) + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_date: Union[Unset, str] = UNSET + if not isinstance(self.reported_date, Unset): + reported_date = self.reported_date.isoformat() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + status_type: Union[Unset, List[str]] = UNSET + if not isinstance(self.status_type, Unset): + status_type = self.status_type + + total_fee = self.total_fee + total_job_cost = self.total_job_cost + total_pay = self.total_pay + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + update_date: Union[Unset, str] = UNSET + if not isinstance(self.update_date, Unset): + update_date = self.update_date.isoformat() + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if addresses is not UNSET: + field_dict["addresses"] = addresses + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assets is not UNSET: + field_dict["assets"] = assets + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if condition_of_approvals is not UNSET: + field_dict["conditionOfApprovals"] = condition_of_approvals + if conditions is not UNSET: + field_dict["conditions"] = conditions + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if contact is not UNSET: + field_dict["contact"] = contact + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_by_cloning is not UNSET: + field_dict["createdByCloning"] = created_by_cloning + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if custom_tables is not UNSET: + field_dict["customTables"] = custom_tables + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if opened_date is not UNSET: + field_dict["openedDate"] = opened_date + if overall_application_time is not UNSET: + field_dict["overallApplicationTime"] = overall_application_time + if owner is not UNSET: + field_dict["owner"] = owner + if parcel is not UNSET: + field_dict["parcel"] = parcel + if priority is not UNSET: + field_dict["priority"] = priority + if professional is not UNSET: + field_dict["professional"] = professional + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_date is not UNSET: + field_dict["reportedDate"] = reported_date + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if status_type is not UNSET: + field_dict["statusType"] = status_type + if total_fee is not UNSET: + field_dict["totalFee"] = total_fee + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + if update_date is not UNSET: + field_dict["updateDate"] = update_date + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.asset_master_model import AssetMasterModel + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_custom_forms_model import RecordAddressCustomFormsModel + from ..models.record_apo_custom_forms_model_construction_type import RecordAPOCustomFormsModelConstructionType + from ..models.record_apo_custom_forms_model_priority import RecordAPOCustomFormsModelPriority + from ..models.record_apo_custom_forms_model_reported_channel import RecordAPOCustomFormsModelReportedChannel + from ..models.record_apo_custom_forms_model_reported_type import RecordAPOCustomFormsModelReportedType + from ..models.record_apo_custom_forms_model_severity import RecordAPOCustomFormsModelSeverity + from ..models.record_apo_custom_forms_model_status import RecordAPOCustomFormsModelStatus + from ..models.record_apo_custom_forms_model_status_reason import RecordAPOCustomFormsModelStatusReason + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + addresses = [] + _addresses = d.pop("addresses", UNSET) + for addresses_item_data in _addresses or []: + addresses_item = RecordAddressCustomFormsModel.from_dict(addresses_item_data) + + addresses.append(addresses_item) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + assets = [] + _assets = d.pop("assets", UNSET) + for assets_item_data in _assets or []: + assets_item = AssetMasterModel.from_dict(assets_item_data) + + assets.append(assets_item) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + condition_of_approvals = [] + _condition_of_approvals = d.pop("conditionOfApprovals", UNSET) + for condition_of_approvals_item_data in _condition_of_approvals or []: + condition_of_approvals_item = CapConditionModel2.from_dict(condition_of_approvals_item_data) + + condition_of_approvals.append(condition_of_approvals_item) + + conditions = [] + _conditions = d.pop("conditions", UNSET) + for conditions_item_data in _conditions or []: + conditions_item = NoticeConditionModel.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RecordAPOCustomFormsModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RecordAPOCustomFormsModelConstructionType.from_dict(_construction_type) + + contact = [] + _contact = d.pop("contact", UNSET) + for contact_item_data in _contact or []: + contact_item = RecordContactSimpleModel.from_dict(contact_item_data) + + contact.append(contact_item) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_by_cloning = d.pop("createdByCloning", UNSET) + created_by_cloning: Union[Unset, RecordAPOCustomFormsModelCreatedByCloning] + if isinstance(_created_by_cloning, Unset): + created_by_cloning = UNSET + else: + created_by_cloning = RecordAPOCustomFormsModelCreatedByCloning(_created_by_cloning) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + custom_id = d.pop("customId", UNSET) + + custom_tables = [] + _custom_tables = d.pop("customTables", UNSET) + for custom_tables_item_data in _custom_tables or []: + custom_tables_item = TableModel.from_dict(custom_tables_item_data) + + custom_tables.append(custom_tables_item) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _opened_date = d.pop("openedDate", UNSET) + opened_date: Union[Unset, datetime.datetime] + if isinstance(_opened_date, Unset): + opened_date = UNSET + else: + opened_date = isoparse(_opened_date) + + overall_application_time = d.pop("overallApplicationTime", UNSET) + + owner = [] + _owner = d.pop("owner", UNSET) + for owner_item_data in _owner or []: + owner_item = RefOwnerModel.from_dict(owner_item_data) + + owner.append(owner_item) + + parcel = [] + _parcel = d.pop("parcel", UNSET) + for parcel_item_data in _parcel or []: + parcel_item = ParcelModel1.from_dict(parcel_item_data) + + parcel.append(parcel_item) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RecordAPOCustomFormsModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RecordAPOCustomFormsModelPriority.from_dict(_priority) + + professional = [] + _professional = d.pop("professional", UNSET) + for professional_item_data in _professional or []: + professional_item = LicenseProfessionalModel.from_dict(professional_item_data) + + professional.append(professional_item) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RecordAPOCustomFormsModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RecordAPOCustomFormsModelReportedChannel.from_dict(_reported_channel) + + _reported_date = d.pop("reportedDate", UNSET) + reported_date: Union[Unset, datetime.datetime] + if isinstance(_reported_date, Unset): + reported_date = UNSET + else: + reported_date = isoparse(_reported_date) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RecordAPOCustomFormsModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RecordAPOCustomFormsModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RecordAPOCustomFormsModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RecordAPOCustomFormsModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordAPOCustomFormsModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordAPOCustomFormsModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RecordAPOCustomFormsModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RecordAPOCustomFormsModelStatusReason.from_dict(_status_reason) + + status_type = cast(List[str], d.pop("statusType", UNSET)) + + total_fee = d.pop("totalFee", UNSET) + + total_job_cost = d.pop("totalJobCost", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + _update_date = d.pop("updateDate", UNSET) + update_date: Union[Unset, datetime.datetime] + if isinstance(_update_date, Unset): + update_date = UNSET + else: + update_date = isoparse(_update_date) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model = cls( + actual_production_unit=actual_production_unit, + addresses=addresses, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assets=assets, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + condition_of_approvals=condition_of_approvals, + conditions=conditions, + construction_type=construction_type, + contact=contact, + cost_per_unit=cost_per_unit, + created_by=created_by, + created_by_cloning=created_by_cloning, + custom_forms=custom_forms, + custom_id=custom_id, + custom_tables=custom_tables, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + in_possession_time=in_possession_time, + infraction=infraction, + initiated_product=initiated_product, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + opened_date=opened_date, + overall_application_time=overall_application_time, + owner=owner, + parcel=parcel, + priority=priority, + professional=professional, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_date=reported_date, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_date=status_date, + status_reason=status_reason, + status_type=status_type, + total_fee=total_fee, + total_job_cost=total_job_cost, + total_pay=total_pay, + tracking_id=tracking_id, + type=type, + undistributed_cost=undistributed_cost, + update_date=update_date, + value=value, + ) + + record_apo_custom_forms_model.additional_properties = d + return record_apo_custom_forms_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_construction_type.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_construction_type.py new file mode 100644 index 0000000..c30a630 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelConstructionType") + + +@_attrs_define +class RecordAPOCustomFormsModelConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_construction_type = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_construction_type.additional_properties = d + return record_apo_custom_forms_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_created_by_cloning.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_created_by_cloning.py new file mode 100644 index 0000000..f3843a9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_created_by_cloning.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RecordAPOCustomFormsModelCreatedByCloning(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_priority.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_priority.py new file mode 100644 index 0000000..7b0e06a --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelPriority") + + +@_attrs_define +class RecordAPOCustomFormsModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_priority = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_priority.additional_properties = d + return record_apo_custom_forms_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_channel.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_channel.py new file mode 100644 index 0000000..56cbae7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelReportedChannel") + + +@_attrs_define +class RecordAPOCustomFormsModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_reported_channel = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_reported_channel.additional_properties = d + return record_apo_custom_forms_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_type.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_type.py new file mode 100644 index 0000000..6d1a1e9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelReportedType") + + +@_attrs_define +class RecordAPOCustomFormsModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_reported_type = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_reported_type.additional_properties = d + return record_apo_custom_forms_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_severity.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_severity.py new file mode 100644 index 0000000..8fc4b77 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelSeverity") + + +@_attrs_define +class RecordAPOCustomFormsModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_severity = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_severity.additional_properties = d + return record_apo_custom_forms_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status.py new file mode 100644 index 0000000..540c1db --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelStatus") + + +@_attrs_define +class RecordAPOCustomFormsModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_status = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_status.additional_properties = d + return record_apo_custom_forms_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status_reason.py b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status_reason.py new file mode 100644 index 0000000..4934a6c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_apo_custom_forms_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordAPOCustomFormsModelStatusReason") + + +@_attrs_define +class RecordAPOCustomFormsModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_apo_custom_forms_model_status_reason = cls( + text=text, + value=value, + ) + + record_apo_custom_forms_model_status_reason.additional_properties = d + return record_apo_custom_forms_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_comment_model.py b/accelapy/accelapy/records_client/models/record_comment_model.py new file mode 100644 index 0000000..0672609 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_comment_model.py @@ -0,0 +1,132 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.record_comment_model_display_on_inspection import RecordCommentModelDisplayOnInspection +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="RecordCommentModel") + + +@_attrs_define +class RecordCommentModel: + """ + Attributes: + created_by (Union[Unset, str]): The user who added the record comment. + created_date (Union[Unset, datetime.datetime]): The date when the record comment was added. + display_on_inspection (Union[Unset, RecordCommentModelDisplayOnInspection]): Indicates whether or not the + comment is displayed on inspection. + id (Union[Unset, int]): The comment system id assigned by the Civic Platform server. + record_id (Union[Unset, RecordIdModel]): + text (Union[Unset, str]): The comment text. + """ + + created_by: Union[Unset, str] = UNSET + created_date: Union[Unset, datetime.datetime] = UNSET + display_on_inspection: Union[Unset, RecordCommentModelDisplayOnInspection] = UNSET + id: Union[Unset, int] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + text: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_by = self.created_by + created_date: Union[Unset, str] = UNSET + if not isinstance(self.created_date, Unset): + created_date = self.created_date.isoformat() + + display_on_inspection: Union[Unset, str] = UNSET + if not isinstance(self.display_on_inspection, Unset): + display_on_inspection = self.display_on_inspection.value + + id = self.id + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_date is not UNSET: + field_dict["createdDate"] = created_date + if display_on_inspection is not UNSET: + field_dict["displayOnInspection"] = display_on_inspection + if id is not UNSET: + field_dict["id"] = id + if record_id is not UNSET: + field_dict["recordId"] = record_id + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + created_by = d.pop("createdBy", UNSET) + + _created_date = d.pop("createdDate", UNSET) + created_date: Union[Unset, datetime.datetime] + if isinstance(_created_date, Unset): + created_date = UNSET + else: + created_date = isoparse(_created_date) + + _display_on_inspection = d.pop("displayOnInspection", UNSET) + display_on_inspection: Union[Unset, RecordCommentModelDisplayOnInspection] + if isinstance(_display_on_inspection, Unset): + display_on_inspection = UNSET + else: + display_on_inspection = RecordCommentModelDisplayOnInspection(_display_on_inspection) + + id = d.pop("id", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + text = d.pop("text", UNSET) + + record_comment_model = cls( + created_by=created_by, + created_date=created_date, + display_on_inspection=display_on_inspection, + id=id, + record_id=record_id, + text=text, + ) + + record_comment_model.additional_properties = d + return record_comment_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_comment_model_display_on_inspection.py b/accelapy/accelapy/records_client/models/record_comment_model_display_on_inspection.py new file mode 100644 index 0000000..f01346e --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_comment_model_display_on_inspection.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RecordCommentModelDisplayOnInspection(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_condition_model.py b/accelapy/accelapy/records_client/models/record_condition_model.py new file mode 100644 index 0000000..1a8db60 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model.py @@ -0,0 +1,481 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_condition_model_actionby_department import RecordConditionModelActionbyDepartment + from ..models.record_condition_model_actionby_user import RecordConditionModelActionbyUser + from ..models.record_condition_model_active_status import RecordConditionModelActiveStatus + from ..models.record_condition_model_appliedby_department import RecordConditionModelAppliedbyDepartment + from ..models.record_condition_model_appliedby_user import RecordConditionModelAppliedbyUser + from ..models.record_condition_model_group import RecordConditionModelGroup + from ..models.record_condition_model_inheritable import RecordConditionModelInheritable + from ..models.record_condition_model_priority import RecordConditionModelPriority + from ..models.record_condition_model_severity import RecordConditionModelSeverity + from ..models.record_condition_model_status import RecordConditionModelStatus + from ..models.record_condition_model_type import RecordConditionModelType + + +T = TypeVar("T", bound="RecordConditionModel") + + +@_attrs_define +class RecordConditionModel: + """ + Attributes: + actionby_department (Union[Unset, RecordConditionModelActionbyDepartment]): The department responsible for the + action. + actionby_user (Union[Unset, RecordConditionModelActionbyUser]): The individual responsible for the action. + active_status (Union[Unset, RecordConditionModelActiveStatus]): Indicates whether or not the condition is + active. + additional_information (Union[Unset, str]): An unlimited text field to use if other fields are filled. + additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + applied_date (Union[Unset, datetime.datetime]): The date the standard condition was applied. + appliedby_department (Union[Unset, RecordConditionModelAppliedbyDepartment]): The department responsible for + applying a condition. + appliedby_user (Union[Unset, RecordConditionModelAppliedbyUser]): The staff member responsible for applying a + condition. + disp_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + display_notice_in_agency (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Automation when a condition to a record or parcel is applied. + display_notice_in_citizens (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access when a condition to a record or parcel is applied. + display_notice_in_citizens_fee (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access Fee Estimate page when a condition to a record or parcel is applied. + display_order (Union[Unset, int]): The display order of the condition in a list. + effective_date (Union[Unset, datetime.datetime]): The date when you want the condition to become effective. + expiration_date (Union[Unset, datetime.datetime]): The date when the condition expires. + group (Union[Unset, RecordConditionModelGroup]): The condition group is an attribute of a condition that + organizes condition types. Your agency defines these groups. + id (Union[Unset, int]): The condition system id assigned by the Civic Platform server. + inheritable (Union[Unset, RecordConditionModelInheritable]): This defines whether or not Accela Automation + checks for inheritable conditions when a user associates a child record with a parent record. + is_include_name_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition name in the + notice. + is_include_short_comments_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition + comments in the notice. + long_comments (Union[Unset, str]): Narrative comments to help identify the purpose or uses of the standard + condition. + name (Union[Unset, str]): The name of the standard condition. + priority (Union[Unset, RecordConditionModelPriority]): The priority level assigned to the condition. + public_display_message (Union[Unset, str]): Text entered into this field displays in the condition notice or + condition status bar for the Condition Name for the public user in Accela IVR (AIVR) and Accela Citizen Access + (ACA). + res_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + resolution_action (Union[Unset, str]): he action performed in response to a condition. + service_provider_code (Union[Unset, str]): The unique agency identifier. + severity (Union[Unset, RecordConditionModelSeverity]): The severity of the condition. + short_comments (Union[Unset, str]): A brief description of the condition name. For example, the text may + describe the situation that requires the system to apply the condition. You can set these short comments to + display when a user accesses an application with this condition applied to it + status (Union[Unset, RecordConditionModelStatus]): The condition status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_type (Union[Unset, str]): The status type for a standard condition or an approval condition, applied or + not applied for example. + type (Union[Unset, RecordConditionModelType]): The condition type. + """ + + actionby_department: Union[Unset, "RecordConditionModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "RecordConditionModelActionbyUser"] = UNSET + active_status: Union[Unset, "RecordConditionModelActiveStatus"] = UNSET + additional_information: Union[Unset, str] = UNSET + additional_information_plain_text: Union[Unset, str] = UNSET + applied_date: Union[Unset, datetime.datetime] = UNSET + appliedby_department: Union[Unset, "RecordConditionModelAppliedbyDepartment"] = UNSET + appliedby_user: Union[Unset, "RecordConditionModelAppliedbyUser"] = UNSET + disp_additional_information_plain_text: Union[Unset, str] = UNSET + display_notice_in_agency: Union[Unset, bool] = UNSET + display_notice_in_citizens: Union[Unset, bool] = UNSET + display_notice_in_citizens_fee: Union[Unset, bool] = UNSET + display_order: Union[Unset, int] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + group: Union[Unset, "RecordConditionModelGroup"] = UNSET + id: Union[Unset, int] = UNSET + inheritable: Union[Unset, "RecordConditionModelInheritable"] = UNSET + is_include_name_in_notice: Union[Unset, bool] = UNSET + is_include_short_comments_in_notice: Union[Unset, bool] = UNSET + long_comments: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "RecordConditionModelPriority"] = UNSET + public_display_message: Union[Unset, str] = UNSET + res_additional_information_plain_text: Union[Unset, str] = UNSET + resolution_action: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + severity: Union[Unset, "RecordConditionModelSeverity"] = UNSET + short_comments: Union[Unset, str] = UNSET + status: Union[Unset, "RecordConditionModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_type: Union[Unset, str] = UNSET + type: Union[Unset, "RecordConditionModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + active_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.active_status, Unset): + active_status = self.active_status.to_dict() + + additional_information = self.additional_information + additional_information_plain_text = self.additional_information_plain_text + applied_date: Union[Unset, str] = UNSET + if not isinstance(self.applied_date, Unset): + applied_date = self.applied_date.isoformat() + + appliedby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_department, Unset): + appliedby_department = self.appliedby_department.to_dict() + + appliedby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_user, Unset): + appliedby_user = self.appliedby_user.to_dict() + + disp_additional_information_plain_text = self.disp_additional_information_plain_text + display_notice_in_agency = self.display_notice_in_agency + display_notice_in_citizens = self.display_notice_in_citizens + display_notice_in_citizens_fee = self.display_notice_in_citizens_fee + display_order = self.display_order + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + id = self.id + inheritable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.inheritable, Unset): + inheritable = self.inheritable.to_dict() + + is_include_name_in_notice = self.is_include_name_in_notice + is_include_short_comments_in_notice = self.is_include_short_comments_in_notice + long_comments = self.long_comments + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_display_message = self.public_display_message + res_additional_information_plain_text = self.res_additional_information_plain_text + resolution_action = self.resolution_action + service_provider_code = self.service_provider_code + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_comments = self.short_comments + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_type = self.status_type + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if active_status is not UNSET: + field_dict["activeStatus"] = active_status + if additional_information is not UNSET: + field_dict["additionalInformation"] = additional_information + if additional_information_plain_text is not UNSET: + field_dict["additionalInformationPlainText"] = additional_information_plain_text + if applied_date is not UNSET: + field_dict["appliedDate"] = applied_date + if appliedby_department is not UNSET: + field_dict["appliedbyDepartment"] = appliedby_department + if appliedby_user is not UNSET: + field_dict["appliedbyUser"] = appliedby_user + if disp_additional_information_plain_text is not UNSET: + field_dict["dispAdditionalInformationPlainText"] = disp_additional_information_plain_text + if display_notice_in_agency is not UNSET: + field_dict["displayNoticeInAgency"] = display_notice_in_agency + if display_notice_in_citizens is not UNSET: + field_dict["displayNoticeInCitizens"] = display_notice_in_citizens + if display_notice_in_citizens_fee is not UNSET: + field_dict["displayNoticeInCitizensFee"] = display_notice_in_citizens_fee + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if inheritable is not UNSET: + field_dict["inheritable"] = inheritable + if is_include_name_in_notice is not UNSET: + field_dict["isIncludeNameInNotice"] = is_include_name_in_notice + if is_include_short_comments_in_notice is not UNSET: + field_dict["isIncludeShortCommentsInNotice"] = is_include_short_comments_in_notice + if long_comments is not UNSET: + field_dict["longComments"] = long_comments + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if public_display_message is not UNSET: + field_dict["publicDisplayMessage"] = public_display_message + if res_additional_information_plain_text is not UNSET: + field_dict["resAdditionalInformationPlainText"] = res_additional_information_plain_text + if resolution_action is not UNSET: + field_dict["resolutionAction"] = resolution_action + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if severity is not UNSET: + field_dict["severity"] = severity + if short_comments is not UNSET: + field_dict["shortComments"] = short_comments + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_type is not UNSET: + field_dict["statusType"] = status_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_condition_model_actionby_department import RecordConditionModelActionbyDepartment + from ..models.record_condition_model_actionby_user import RecordConditionModelActionbyUser + from ..models.record_condition_model_active_status import RecordConditionModelActiveStatus + from ..models.record_condition_model_appliedby_department import RecordConditionModelAppliedbyDepartment + from ..models.record_condition_model_appliedby_user import RecordConditionModelAppliedbyUser + from ..models.record_condition_model_group import RecordConditionModelGroup + from ..models.record_condition_model_inheritable import RecordConditionModelInheritable + from ..models.record_condition_model_priority import RecordConditionModelPriority + from ..models.record_condition_model_severity import RecordConditionModelSeverity + from ..models.record_condition_model_status import RecordConditionModelStatus + from ..models.record_condition_model_type import RecordConditionModelType + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, RecordConditionModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = RecordConditionModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, RecordConditionModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = RecordConditionModelActionbyUser.from_dict(_actionby_user) + + _active_status = d.pop("activeStatus", UNSET) + active_status: Union[Unset, RecordConditionModelActiveStatus] + if isinstance(_active_status, Unset): + active_status = UNSET + else: + active_status = RecordConditionModelActiveStatus.from_dict(_active_status) + + additional_information = d.pop("additionalInformation", UNSET) + + additional_information_plain_text = d.pop("additionalInformationPlainText", UNSET) + + _applied_date = d.pop("appliedDate", UNSET) + applied_date: Union[Unset, datetime.datetime] + if isinstance(_applied_date, Unset): + applied_date = UNSET + else: + applied_date = isoparse(_applied_date) + + _appliedby_department = d.pop("appliedbyDepartment", UNSET) + appliedby_department: Union[Unset, RecordConditionModelAppliedbyDepartment] + if isinstance(_appliedby_department, Unset): + appliedby_department = UNSET + else: + appliedby_department = RecordConditionModelAppliedbyDepartment.from_dict(_appliedby_department) + + _appliedby_user = d.pop("appliedbyUser", UNSET) + appliedby_user: Union[Unset, RecordConditionModelAppliedbyUser] + if isinstance(_appliedby_user, Unset): + appliedby_user = UNSET + else: + appliedby_user = RecordConditionModelAppliedbyUser.from_dict(_appliedby_user) + + disp_additional_information_plain_text = d.pop("dispAdditionalInformationPlainText", UNSET) + + display_notice_in_agency = d.pop("displayNoticeInAgency", UNSET) + + display_notice_in_citizens = d.pop("displayNoticeInCitizens", UNSET) + + display_notice_in_citizens_fee = d.pop("displayNoticeInCitizensFee", UNSET) + + display_order = d.pop("displayOrder", UNSET) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _group = d.pop("group", UNSET) + group: Union[Unset, RecordConditionModelGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = RecordConditionModelGroup.from_dict(_group) + + id = d.pop("id", UNSET) + + _inheritable = d.pop("inheritable", UNSET) + inheritable: Union[Unset, RecordConditionModelInheritable] + if isinstance(_inheritable, Unset): + inheritable = UNSET + else: + inheritable = RecordConditionModelInheritable.from_dict(_inheritable) + + is_include_name_in_notice = d.pop("isIncludeNameInNotice", UNSET) + + is_include_short_comments_in_notice = d.pop("isIncludeShortCommentsInNotice", UNSET) + + long_comments = d.pop("longComments", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RecordConditionModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RecordConditionModelPriority.from_dict(_priority) + + public_display_message = d.pop("publicDisplayMessage", UNSET) + + res_additional_information_plain_text = d.pop("resAdditionalInformationPlainText", UNSET) + + resolution_action = d.pop("resolutionAction", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RecordConditionModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RecordConditionModelSeverity.from_dict(_severity) + + short_comments = d.pop("shortComments", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordConditionModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordConditionModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + status_type = d.pop("statusType", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordConditionModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordConditionModelType.from_dict(_type) + + record_condition_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + active_status=active_status, + additional_information=additional_information, + additional_information_plain_text=additional_information_plain_text, + applied_date=applied_date, + appliedby_department=appliedby_department, + appliedby_user=appliedby_user, + disp_additional_information_plain_text=disp_additional_information_plain_text, + display_notice_in_agency=display_notice_in_agency, + display_notice_in_citizens=display_notice_in_citizens, + display_notice_in_citizens_fee=display_notice_in_citizens_fee, + display_order=display_order, + effective_date=effective_date, + expiration_date=expiration_date, + group=group, + id=id, + inheritable=inheritable, + is_include_name_in_notice=is_include_name_in_notice, + is_include_short_comments_in_notice=is_include_short_comments_in_notice, + long_comments=long_comments, + name=name, + priority=priority, + public_display_message=public_display_message, + res_additional_information_plain_text=res_additional_information_plain_text, + resolution_action=resolution_action, + service_provider_code=service_provider_code, + severity=severity, + short_comments=short_comments, + status=status, + status_date=status_date, + status_type=status_type, + type=type, + ) + + record_condition_model.additional_properties = d + return record_condition_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_actionby_department.py b/accelapy/accelapy/records_client/models/record_condition_model_actionby_department.py new file mode 100644 index 0000000..3f04b52 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelActionbyDepartment") + + +@_attrs_define +class RecordConditionModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_actionby_department = cls( + text=text, + value=value, + ) + + record_condition_model_actionby_department.additional_properties = d + return record_condition_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_actionby_user.py b/accelapy/accelapy/records_client/models/record_condition_model_actionby_user.py new file mode 100644 index 0000000..d49a4f4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelActionbyUser") + + +@_attrs_define +class RecordConditionModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_actionby_user = cls( + text=text, + value=value, + ) + + record_condition_model_actionby_user.additional_properties = d + return record_condition_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_active_status.py b/accelapy/accelapy/records_client/models/record_condition_model_active_status.py new file mode 100644 index 0000000..d81d1f2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_active_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelActiveStatus") + + +@_attrs_define +class RecordConditionModelActiveStatus: + """Indicates whether or not the condition is active. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_active_status = cls( + text=text, + value=value, + ) + + record_condition_model_active_status.additional_properties = d + return record_condition_model_active_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_appliedby_department.py b/accelapy/accelapy/records_client/models/record_condition_model_appliedby_department.py new file mode 100644 index 0000000..75ee8a7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_appliedby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelAppliedbyDepartment") + + +@_attrs_define +class RecordConditionModelAppliedbyDepartment: + """The department responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_appliedby_department = cls( + text=text, + value=value, + ) + + record_condition_model_appliedby_department.additional_properties = d + return record_condition_model_appliedby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_appliedby_user.py b/accelapy/accelapy/records_client/models/record_condition_model_appliedby_user.py new file mode 100644 index 0000000..7353707 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_appliedby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelAppliedbyUser") + + +@_attrs_define +class RecordConditionModelAppliedbyUser: + """The staff member responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_appliedby_user = cls( + text=text, + value=value, + ) + + record_condition_model_appliedby_user.additional_properties = d + return record_condition_model_appliedby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_group.py b/accelapy/accelapy/records_client/models/record_condition_model_group.py new file mode 100644 index 0000000..88ffb7d --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelGroup") + + +@_attrs_define +class RecordConditionModelGroup: + """The condition group is an attribute of a condition that organizes condition types. Your agency defines these groups. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_group = cls( + text=text, + value=value, + ) + + record_condition_model_group.additional_properties = d + return record_condition_model_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_inheritable.py b/accelapy/accelapy/records_client/models/record_condition_model_inheritable.py new file mode 100644 index 0000000..5df413c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_inheritable.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelInheritable") + + +@_attrs_define +class RecordConditionModelInheritable: + """This defines whether or not Accela Automation checks for inheritable conditions when a user associates a child + record with a parent record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_inheritable = cls( + text=text, + value=value, + ) + + record_condition_model_inheritable.additional_properties = d + return record_condition_model_inheritable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_priority.py b/accelapy/accelapy/records_client/models/record_condition_model_priority.py new file mode 100644 index 0000000..1647866 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelPriority") + + +@_attrs_define +class RecordConditionModelPriority: + """The priority level assigned to the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_priority = cls( + text=text, + value=value, + ) + + record_condition_model_priority.additional_properties = d + return record_condition_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_severity.py b/accelapy/accelapy/records_client/models/record_condition_model_severity.py new file mode 100644 index 0000000..e6afa00 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelSeverity") + + +@_attrs_define +class RecordConditionModelSeverity: + """The severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_severity = cls( + text=text, + value=value, + ) + + record_condition_model_severity.additional_properties = d + return record_condition_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_status.py b/accelapy/accelapy/records_client/models/record_condition_model_status.py new file mode 100644 index 0000000..52d6b80 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelStatus") + + +@_attrs_define +class RecordConditionModelStatus: + """The condition status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_status = cls( + text=text, + value=value, + ) + + record_condition_model_status.additional_properties = d + return record_condition_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_condition_model_type.py b/accelapy/accelapy/records_client/models/record_condition_model_type.py new file mode 100644 index 0000000..291c261 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_condition_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordConditionModelType") + + +@_attrs_define +class RecordConditionModelType: + """The condition type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_condition_model_type = cls( + text=text, + value=value, + ) + + record_condition_model_type.additional_properties = d + return record_condition_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model.py b/accelapy/accelapy/records_client/models/record_contact_model.py new file mode 100644 index 0000000..7346329 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model.py @@ -0,0 +1,612 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.record_contact_model_is_primary import RecordContactModelIsPrimary +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compact_address_model import CompactAddressModel + from ..models.record_contact_model_birth_city import RecordContactModelBirthCity + from ..models.record_contact_model_birth_region import RecordContactModelBirthRegion + from ..models.record_contact_model_birth_state import RecordContactModelBirthState + from ..models.record_contact_model_driver_license_state import RecordContactModelDriverLicenseState + from ..models.record_contact_model_gender import RecordContactModelGender + from ..models.record_contact_model_preferred_channel import RecordContactModelPreferredChannel + from ..models.record_contact_model_race import RecordContactModelRace + from ..models.record_contact_model_relation import RecordContactModelRelation + from ..models.record_contact_model_salutation import RecordContactModelSalutation + from ..models.record_contact_model_status import RecordContactModelStatus + from ..models.record_contact_model_type import RecordContactModelType + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="RecordContactModel") + + +@_attrs_define +class RecordContactModel: + """ + Attributes: + address (Union[Unset, CompactAddressModel]): + birth_city (Union[Unset, RecordContactModelBirthCity]): The city of birth for an individual. + birth_date (Union[Unset, datetime.datetime]): The birth date. + birth_region (Union[Unset, RecordContactModelBirthRegion]): The country of birth or region of birth for an + individual. + birth_state (Union[Unset, RecordContactModelBirthState]): The state of birth for an individual. + business_name (Union[Unset, str]): A secondary business name for the applicable individual. + comment (Union[Unset, str]): A comment about the inspection contact. + deceased_date (Union[Unset, datetime.datetime]): The deceased date. + driver_license_number (Union[Unset, str]): The driver's license number of the contact. This field is active only + when the Contact Type selected is Individual. + driver_license_state (Union[Unset, RecordContactModelDriverLicenseState]): The state that issued the driver's + license. + email (Union[Unset, str]): The contact's email address. + end_date (Union[Unset, datetime.datetime]): The date when the contact address ceases to be active. + fax (Union[Unset, str]): The fax number for the contact. + fax_country_code (Union[Unset, str]): Fax Number Country Code + federal_employer_id (Union[Unset, str]): The Federal Employer Identification Number. It is used to identify a + business for tax purposes. + first_name (Union[Unset, str]): The contact's first name. + full_name (Union[Unset, str]): The contact's full name. + gender (Union[Unset, RecordContactModelGender]): The gender (male or female) of the individual. + id (Union[Unset, str]): The contact system id assigned by the Civic Platform server. + individual_or_organization (Union[Unset, str]): The organization to which the contact belongs. This field is + only active when the Contact Type selected is Organization. + is_primary (Union[Unset, RecordContactModelIsPrimary]): Indicates whether or not to designate the contact as the + primary contact Only one address can be primary at any given time. + last_name (Union[Unset, str]): The last name (surname). + middle_name (Union[Unset, str]): The middle name. + organization_name (Union[Unset, str]): The organization to which the contact belongs. This field is only active + when the Contact Type selected is Organization. + passport_number (Union[Unset, str]): The contact's passport number. This field is only active when the Contact + Type selected is Individual. + phone1 (Union[Unset, str]): The primary telephone number of the contact. + phone_1_country_code (Union[Unset, str]): Phone Number 1 Country Code + phone2 (Union[Unset, str]): The secondary telephone number of the contact. + phone_2_country_code (Union[Unset, str]): Phone Number 2 Country Code + phone3 (Union[Unset, str]): The tertiary telephone number for the contact. + phone_3_country_code (Union[Unset, str]): Phone Number 3 Country Code + post_office_box (Union[Unset, str]): The post office box number. + preferred_channel (Union[Unset, RecordContactModelPreferredChannel]): The method by which the contact prefers to + be notified, by phone for example. See [Get All Contact Preferred Channels](./api- + settings.html#operation/v4.get.settings.contacts.preferredChannels). + race (Union[Unset, RecordContactModelRace]): The contact's race or ethnicity. See [Get All Contact Races](./api- + settings.html#operation/v4.get.settings.contacts.races). + record_id (Union[Unset, RecordIdModel]): + reference_contact_id (Union[Unset, str]): The unique Id generated for a contact stored in the sytem. + relation (Union[Unset, RecordContactModelRelation]): The contact's relationship to the application or service + request. + salutation (Union[Unset, RecordContactModelSalutation]): The salutation to be used when addressing the contact; + for example Mr. oar Ms. This field is active only when Contact Type = Individual. See [Get All Contact + Salutations](./api-settings.html#operation/v4.get.settings.contacts.salutations). + social_security_number (Union[Unset, str]): The individual's social security number. This field is only active + when the Contact Type selected is Individual. + start_date (Union[Unset, datetime.datetime]): The date the contact became active. + state_id_number (Union[Unset, str]): The contact's state ID number. This field is only active when the Contact + Type selected is Individual. + status (Union[Unset, RecordContactModelStatus]): The contact status. + suffix (Union[Unset, str]): The contact name suffix. + title (Union[Unset, str]): The individual's business title. + trade_name (Union[Unset, str]): The contact's preferred business or trade name. This field is active only when + the Contact Type selected is Organization. + type (Union[Unset, RecordContactModelType]): The contact type. See [Get All Contact Types](./api- + settings.html#operation/v4.get.settings.contacts.types). + """ + + address: Union[Unset, "CompactAddressModel"] = UNSET + birth_city: Union[Unset, "RecordContactModelBirthCity"] = UNSET + birth_date: Union[Unset, datetime.datetime] = UNSET + birth_region: Union[Unset, "RecordContactModelBirthRegion"] = UNSET + birth_state: Union[Unset, "RecordContactModelBirthState"] = UNSET + business_name: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + deceased_date: Union[Unset, datetime.datetime] = UNSET + driver_license_number: Union[Unset, str] = UNSET + driver_license_state: Union[Unset, "RecordContactModelDriverLicenseState"] = UNSET + email: Union[Unset, str] = UNSET + end_date: Union[Unset, datetime.datetime] = UNSET + fax: Union[Unset, str] = UNSET + fax_country_code: Union[Unset, str] = UNSET + federal_employer_id: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + full_name: Union[Unset, str] = UNSET + gender: Union[Unset, "RecordContactModelGender"] = UNSET + id: Union[Unset, str] = UNSET + individual_or_organization: Union[Unset, str] = UNSET + is_primary: Union[Unset, RecordContactModelIsPrimary] = UNSET + last_name: Union[Unset, str] = UNSET + middle_name: Union[Unset, str] = UNSET + organization_name: Union[Unset, str] = UNSET + passport_number: Union[Unset, str] = UNSET + phone1: Union[Unset, str] = UNSET + phone_1_country_code: Union[Unset, str] = UNSET + phone2: Union[Unset, str] = UNSET + phone_2_country_code: Union[Unset, str] = UNSET + phone3: Union[Unset, str] = UNSET + phone_3_country_code: Union[Unset, str] = UNSET + post_office_box: Union[Unset, str] = UNSET + preferred_channel: Union[Unset, "RecordContactModelPreferredChannel"] = UNSET + race: Union[Unset, "RecordContactModelRace"] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + reference_contact_id: Union[Unset, str] = UNSET + relation: Union[Unset, "RecordContactModelRelation"] = UNSET + salutation: Union[Unset, "RecordContactModelSalutation"] = UNSET + social_security_number: Union[Unset, str] = UNSET + start_date: Union[Unset, datetime.datetime] = UNSET + state_id_number: Union[Unset, str] = UNSET + status: Union[Unset, "RecordContactModelStatus"] = UNSET + suffix: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + trade_name: Union[Unset, str] = UNSET + type: Union[Unset, "RecordContactModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address, Unset): + address = self.address.to_dict() + + birth_city: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_city, Unset): + birth_city = self.birth_city.to_dict() + + birth_date: Union[Unset, str] = UNSET + if not isinstance(self.birth_date, Unset): + birth_date = self.birth_date.isoformat() + + birth_region: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_region, Unset): + birth_region = self.birth_region.to_dict() + + birth_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_state, Unset): + birth_state = self.birth_state.to_dict() + + business_name = self.business_name + comment = self.comment + deceased_date: Union[Unset, str] = UNSET + if not isinstance(self.deceased_date, Unset): + deceased_date = self.deceased_date.isoformat() + + driver_license_number = self.driver_license_number + driver_license_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.driver_license_state, Unset): + driver_license_state = self.driver_license_state.to_dict() + + email = self.email + end_date: Union[Unset, str] = UNSET + if not isinstance(self.end_date, Unset): + end_date = self.end_date.isoformat() + + fax = self.fax + fax_country_code = self.fax_country_code + federal_employer_id = self.federal_employer_id + first_name = self.first_name + full_name = self.full_name + gender: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + id = self.id + individual_or_organization = self.individual_or_organization + is_primary: Union[Unset, str] = UNSET + if not isinstance(self.is_primary, Unset): + is_primary = self.is_primary.value + + last_name = self.last_name + middle_name = self.middle_name + organization_name = self.organization_name + passport_number = self.passport_number + phone1 = self.phone1 + phone_1_country_code = self.phone_1_country_code + phone2 = self.phone2 + phone_2_country_code = self.phone_2_country_code + phone3 = self.phone3 + phone_3_country_code = self.phone_3_country_code + post_office_box = self.post_office_box + preferred_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.preferred_channel, Unset): + preferred_channel = self.preferred_channel.to_dict() + + race: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.race, Unset): + race = self.race.to_dict() + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + reference_contact_id = self.reference_contact_id + relation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relation, Unset): + relation = self.relation.to_dict() + + salutation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.salutation, Unset): + salutation = self.salutation.to_dict() + + social_security_number = self.social_security_number + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + state_id_number = self.state_id_number + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + suffix = self.suffix + title = self.title + trade_name = self.trade_name + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if birth_city is not UNSET: + field_dict["birthCity"] = birth_city + if birth_date is not UNSET: + field_dict["birthDate"] = birth_date + if birth_region is not UNSET: + field_dict["birthRegion"] = birth_region + if birth_state is not UNSET: + field_dict["birthState"] = birth_state + if business_name is not UNSET: + field_dict["businessName"] = business_name + if comment is not UNSET: + field_dict["comment"] = comment + if deceased_date is not UNSET: + field_dict["deceasedDate"] = deceased_date + if driver_license_number is not UNSET: + field_dict["driverLicenseNumber"] = driver_license_number + if driver_license_state is not UNSET: + field_dict["driverLicenseState"] = driver_license_state + if email is not UNSET: + field_dict["email"] = email + if end_date is not UNSET: + field_dict["endDate"] = end_date + if fax is not UNSET: + field_dict["fax"] = fax + if fax_country_code is not UNSET: + field_dict["faxCountryCode"] = fax_country_code + if federal_employer_id is not UNSET: + field_dict["federalEmployerId"] = federal_employer_id + if first_name is not UNSET: + field_dict["firstName"] = first_name + if full_name is not UNSET: + field_dict["fullName"] = full_name + if gender is not UNSET: + field_dict["gender"] = gender + if id is not UNSET: + field_dict["id"] = id + if individual_or_organization is not UNSET: + field_dict["individualOrOrganization"] = individual_or_organization + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if last_name is not UNSET: + field_dict["lastName"] = last_name + if middle_name is not UNSET: + field_dict["middleName"] = middle_name + if organization_name is not UNSET: + field_dict["organizationName"] = organization_name + if passport_number is not UNSET: + field_dict["passportNumber"] = passport_number + if phone1 is not UNSET: + field_dict["phone1"] = phone1 + if phone_1_country_code is not UNSET: + field_dict["phone1CountryCode"] = phone_1_country_code + if phone2 is not UNSET: + field_dict["phone2"] = phone2 + if phone_2_country_code is not UNSET: + field_dict["phone2CountryCode"] = phone_2_country_code + if phone3 is not UNSET: + field_dict["phone3"] = phone3 + if phone_3_country_code is not UNSET: + field_dict["phone3CountryCode"] = phone_3_country_code + if post_office_box is not UNSET: + field_dict["postOfficeBox"] = post_office_box + if preferred_channel is not UNSET: + field_dict["preferredChannel"] = preferred_channel + if race is not UNSET: + field_dict["race"] = race + if record_id is not UNSET: + field_dict["recordId"] = record_id + if reference_contact_id is not UNSET: + field_dict["referenceContactId"] = reference_contact_id + if relation is not UNSET: + field_dict["relation"] = relation + if salutation is not UNSET: + field_dict["salutation"] = salutation + if social_security_number is not UNSET: + field_dict["socialSecurityNumber"] = social_security_number + if start_date is not UNSET: + field_dict["startDate"] = start_date + if state_id_number is not UNSET: + field_dict["stateIdNumber"] = state_id_number + if status is not UNSET: + field_dict["status"] = status + if suffix is not UNSET: + field_dict["suffix"] = suffix + if title is not UNSET: + field_dict["title"] = title + if trade_name is not UNSET: + field_dict["tradeName"] = trade_name + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.compact_address_model import CompactAddressModel + from ..models.record_contact_model_birth_city import RecordContactModelBirthCity + from ..models.record_contact_model_birth_region import RecordContactModelBirthRegion + from ..models.record_contact_model_birth_state import RecordContactModelBirthState + from ..models.record_contact_model_driver_license_state import RecordContactModelDriverLicenseState + from ..models.record_contact_model_gender import RecordContactModelGender + from ..models.record_contact_model_preferred_channel import RecordContactModelPreferredChannel + from ..models.record_contact_model_race import RecordContactModelRace + from ..models.record_contact_model_relation import RecordContactModelRelation + from ..models.record_contact_model_salutation import RecordContactModelSalutation + from ..models.record_contact_model_status import RecordContactModelStatus + from ..models.record_contact_model_type import RecordContactModelType + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, CompactAddressModel] + if isinstance(_address, Unset): + address = UNSET + else: + address = CompactAddressModel.from_dict(_address) + + _birth_city = d.pop("birthCity", UNSET) + birth_city: Union[Unset, RecordContactModelBirthCity] + if isinstance(_birth_city, Unset): + birth_city = UNSET + else: + birth_city = RecordContactModelBirthCity.from_dict(_birth_city) + + _birth_date = d.pop("birthDate", UNSET) + birth_date: Union[Unset, datetime.datetime] + if isinstance(_birth_date, Unset): + birth_date = UNSET + else: + birth_date = isoparse(_birth_date) + + _birth_region = d.pop("birthRegion", UNSET) + birth_region: Union[Unset, RecordContactModelBirthRegion] + if isinstance(_birth_region, Unset): + birth_region = UNSET + else: + birth_region = RecordContactModelBirthRegion.from_dict(_birth_region) + + _birth_state = d.pop("birthState", UNSET) + birth_state: Union[Unset, RecordContactModelBirthState] + if isinstance(_birth_state, Unset): + birth_state = UNSET + else: + birth_state = RecordContactModelBirthState.from_dict(_birth_state) + + business_name = d.pop("businessName", UNSET) + + comment = d.pop("comment", UNSET) + + _deceased_date = d.pop("deceasedDate", UNSET) + deceased_date: Union[Unset, datetime.datetime] + if isinstance(_deceased_date, Unset): + deceased_date = UNSET + else: + deceased_date = isoparse(_deceased_date) + + driver_license_number = d.pop("driverLicenseNumber", UNSET) + + _driver_license_state = d.pop("driverLicenseState", UNSET) + driver_license_state: Union[Unset, RecordContactModelDriverLicenseState] + if isinstance(_driver_license_state, Unset): + driver_license_state = UNSET + else: + driver_license_state = RecordContactModelDriverLicenseState.from_dict(_driver_license_state) + + email = d.pop("email", UNSET) + + _end_date = d.pop("endDate", UNSET) + end_date: Union[Unset, datetime.datetime] + if isinstance(_end_date, Unset): + end_date = UNSET + else: + end_date = isoparse(_end_date) + + fax = d.pop("fax", UNSET) + + fax_country_code = d.pop("faxCountryCode", UNSET) + + federal_employer_id = d.pop("federalEmployerId", UNSET) + + first_name = d.pop("firstName", UNSET) + + full_name = d.pop("fullName", UNSET) + + _gender = d.pop("gender", UNSET) + gender: Union[Unset, RecordContactModelGender] + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = RecordContactModelGender.from_dict(_gender) + + id = d.pop("id", UNSET) + + individual_or_organization = d.pop("individualOrOrganization", UNSET) + + _is_primary = d.pop("isPrimary", UNSET) + is_primary: Union[Unset, RecordContactModelIsPrimary] + if isinstance(_is_primary, Unset): + is_primary = UNSET + else: + is_primary = RecordContactModelIsPrimary(_is_primary) + + last_name = d.pop("lastName", UNSET) + + middle_name = d.pop("middleName", UNSET) + + organization_name = d.pop("organizationName", UNSET) + + passport_number = d.pop("passportNumber", UNSET) + + phone1 = d.pop("phone1", UNSET) + + phone_1_country_code = d.pop("phone1CountryCode", UNSET) + + phone2 = d.pop("phone2", UNSET) + + phone_2_country_code = d.pop("phone2CountryCode", UNSET) + + phone3 = d.pop("phone3", UNSET) + + phone_3_country_code = d.pop("phone3CountryCode", UNSET) + + post_office_box = d.pop("postOfficeBox", UNSET) + + _preferred_channel = d.pop("preferredChannel", UNSET) + preferred_channel: Union[Unset, RecordContactModelPreferredChannel] + if isinstance(_preferred_channel, Unset): + preferred_channel = UNSET + else: + preferred_channel = RecordContactModelPreferredChannel.from_dict(_preferred_channel) + + _race = d.pop("race", UNSET) + race: Union[Unset, RecordContactModelRace] + if isinstance(_race, Unset): + race = UNSET + else: + race = RecordContactModelRace.from_dict(_race) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + reference_contact_id = d.pop("referenceContactId", UNSET) + + _relation = d.pop("relation", UNSET) + relation: Union[Unset, RecordContactModelRelation] + if isinstance(_relation, Unset): + relation = UNSET + else: + relation = RecordContactModelRelation.from_dict(_relation) + + _salutation = d.pop("salutation", UNSET) + salutation: Union[Unset, RecordContactModelSalutation] + if isinstance(_salutation, Unset): + salutation = UNSET + else: + salutation = RecordContactModelSalutation.from_dict(_salutation) + + social_security_number = d.pop("socialSecurityNumber", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.datetime] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date) + + state_id_number = d.pop("stateIdNumber", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordContactModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordContactModelStatus.from_dict(_status) + + suffix = d.pop("suffix", UNSET) + + title = d.pop("title", UNSET) + + trade_name = d.pop("tradeName", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordContactModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordContactModelType.from_dict(_type) + + record_contact_model = cls( + address=address, + birth_city=birth_city, + birth_date=birth_date, + birth_region=birth_region, + birth_state=birth_state, + business_name=business_name, + comment=comment, + deceased_date=deceased_date, + driver_license_number=driver_license_number, + driver_license_state=driver_license_state, + email=email, + end_date=end_date, + fax=fax, + fax_country_code=fax_country_code, + federal_employer_id=federal_employer_id, + first_name=first_name, + full_name=full_name, + gender=gender, + id=id, + individual_or_organization=individual_or_organization, + is_primary=is_primary, + last_name=last_name, + middle_name=middle_name, + organization_name=organization_name, + passport_number=passport_number, + phone1=phone1, + phone_1_country_code=phone_1_country_code, + phone2=phone2, + phone_2_country_code=phone_2_country_code, + phone3=phone3, + phone_3_country_code=phone_3_country_code, + post_office_box=post_office_box, + preferred_channel=preferred_channel, + race=race, + record_id=record_id, + reference_contact_id=reference_contact_id, + relation=relation, + salutation=salutation, + social_security_number=social_security_number, + start_date=start_date, + state_id_number=state_id_number, + status=status, + suffix=suffix, + title=title, + trade_name=trade_name, + type=type, + ) + + record_contact_model.additional_properties = d + return record_contact_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_birth_city.py b/accelapy/accelapy/records_client/models/record_contact_model_birth_city.py new file mode 100644 index 0000000..73ef23e --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_birth_city.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelBirthCity") + + +@_attrs_define +class RecordContactModelBirthCity: + """The city of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_birth_city = cls( + text=text, + value=value, + ) + + record_contact_model_birth_city.additional_properties = d + return record_contact_model_birth_city + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_birth_region.py b/accelapy/accelapy/records_client/models/record_contact_model_birth_region.py new file mode 100644 index 0000000..695f17d --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_birth_region.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelBirthRegion") + + +@_attrs_define +class RecordContactModelBirthRegion: + """The country of birth or region of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_birth_region = cls( + text=text, + value=value, + ) + + record_contact_model_birth_region.additional_properties = d + return record_contact_model_birth_region + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_birth_state.py b/accelapy/accelapy/records_client/models/record_contact_model_birth_state.py new file mode 100644 index 0000000..64509a4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_birth_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelBirthState") + + +@_attrs_define +class RecordContactModelBirthState: + """The state of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_birth_state = cls( + text=text, + value=value, + ) + + record_contact_model_birth_state.additional_properties = d + return record_contact_model_birth_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_driver_license_state.py b/accelapy/accelapy/records_client/models/record_contact_model_driver_license_state.py new file mode 100644 index 0000000..b2743f2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_driver_license_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelDriverLicenseState") + + +@_attrs_define +class RecordContactModelDriverLicenseState: + """The state that issued the driver's license. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_driver_license_state = cls( + text=text, + value=value, + ) + + record_contact_model_driver_license_state.additional_properties = d + return record_contact_model_driver_license_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_gender.py b/accelapy/accelapy/records_client/models/record_contact_model_gender.py new file mode 100644 index 0000000..ab35681 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_gender.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelGender") + + +@_attrs_define +class RecordContactModelGender: + """The gender (male or female) of the individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_gender = cls( + text=text, + value=value, + ) + + record_contact_model_gender.additional_properties = d + return record_contact_model_gender + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_is_primary.py b/accelapy/accelapy/records_client/models/record_contact_model_is_primary.py new file mode 100644 index 0000000..571ba7e --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_is_primary.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RecordContactModelIsPrimary(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_contact_model_preferred_channel.py b/accelapy/accelapy/records_client/models/record_contact_model_preferred_channel.py new file mode 100644 index 0000000..77cca04 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_preferred_channel.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelPreferredChannel") + + +@_attrs_define +class RecordContactModelPreferredChannel: + """The method by which the contact prefers to be notified, by phone for example. See [Get All Contact Preferred + Channels](./api-settings.html#operation/v4.get.settings.contacts.preferredChannels). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_preferred_channel = cls( + text=text, + value=value, + ) + + record_contact_model_preferred_channel.additional_properties = d + return record_contact_model_preferred_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_race.py b/accelapy/accelapy/records_client/models/record_contact_model_race.py new file mode 100644 index 0000000..6f0bb37 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_race.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelRace") + + +@_attrs_define +class RecordContactModelRace: + """The contact's race or ethnicity. See [Get All Contact Races](./api- + settings.html#operation/v4.get.settings.contacts.races). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_race = cls( + text=text, + value=value, + ) + + record_contact_model_race.additional_properties = d + return record_contact_model_race + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_relation.py b/accelapy/accelapy/records_client/models/record_contact_model_relation.py new file mode 100644 index 0000000..0393a41 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_relation.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelRelation") + + +@_attrs_define +class RecordContactModelRelation: + """The contact's relationship to the application or service request. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_relation = cls( + text=text, + value=value, + ) + + record_contact_model_relation.additional_properties = d + return record_contact_model_relation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_salutation.py b/accelapy/accelapy/records_client/models/record_contact_model_salutation.py new file mode 100644 index 0000000..5955502 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_salutation.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelSalutation") + + +@_attrs_define +class RecordContactModelSalutation: + """The salutation to be used when addressing the contact; for example Mr. oar Ms. This field is active only when + Contact Type = Individual. See [Get All Contact Salutations](./api- + settings.html#operation/v4.get.settings.contacts.salutations). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_salutation = cls( + text=text, + value=value, + ) + + record_contact_model_salutation.additional_properties = d + return record_contact_model_salutation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_status.py b/accelapy/accelapy/records_client/models/record_contact_model_status.py new file mode 100644 index 0000000..f5711dc --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelStatus") + + +@_attrs_define +class RecordContactModelStatus: + """The contact status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_status = cls( + text=text, + value=value, + ) + + record_contact_model_status.additional_properties = d + return record_contact_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_model_type.py b/accelapy/accelapy/records_client/models/record_contact_model_type.py new file mode 100644 index 0000000..94bf551 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactModelType") + + +@_attrs_define +class RecordContactModelType: + """The contact type. See [Get All Contact Types](./api-settings.html#operation/v4.get.settings.contacts.types). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_model_type = cls( + text=text, + value=value, + ) + + record_contact_model_type.additional_properties = d + return record_contact_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model.py b/accelapy/accelapy/records_client/models/record_contact_simple_model.py new file mode 100644 index 0000000..58502e2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model.py @@ -0,0 +1,612 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.record_contact_simple_model_is_primary import RecordContactSimpleModelIsPrimary +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.compact_address_model import CompactAddressModel + from ..models.record_contact_simple_model_birth_city import RecordContactSimpleModelBirthCity + from ..models.record_contact_simple_model_birth_region import RecordContactSimpleModelBirthRegion + from ..models.record_contact_simple_model_birth_state import RecordContactSimpleModelBirthState + from ..models.record_contact_simple_model_driver_license_state import RecordContactSimpleModelDriverLicenseState + from ..models.record_contact_simple_model_gender import RecordContactSimpleModelGender + from ..models.record_contact_simple_model_preferred_channel import RecordContactSimpleModelPreferredChannel + from ..models.record_contact_simple_model_race import RecordContactSimpleModelRace + from ..models.record_contact_simple_model_relation import RecordContactSimpleModelRelation + from ..models.record_contact_simple_model_salutation import RecordContactSimpleModelSalutation + from ..models.record_contact_simple_model_status import RecordContactSimpleModelStatus + from ..models.record_contact_simple_model_type import RecordContactSimpleModelType + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="RecordContactSimpleModel") + + +@_attrs_define +class RecordContactSimpleModel: + """ + Attributes: + address (Union[Unset, CompactAddressModel]): + birth_city (Union[Unset, RecordContactSimpleModelBirthCity]): The city of birth for an individual. + birth_date (Union[Unset, datetime.datetime]): The birth date. + birth_region (Union[Unset, RecordContactSimpleModelBirthRegion]): The country of birth or region of birth for an + individual. + birth_state (Union[Unset, RecordContactSimpleModelBirthState]): The state of birth for an individual. + business_name (Union[Unset, str]): A secondary business name for the applicable individual. + comment (Union[Unset, str]): A comment about the inspection contact. + deceased_date (Union[Unset, datetime.datetime]): The deceased date. + driver_license_number (Union[Unset, str]): The driver's license number of the contact. This field is active only + when the Contact Type selected is Individual. + driver_license_state (Union[Unset, RecordContactSimpleModelDriverLicenseState]): The state that issued the + driver's license. + email (Union[Unset, str]): The contact's email address. + end_date (Union[Unset, datetime.datetime]): The date when the contact address ceases to be active. + fax (Union[Unset, str]): The fax number for the contact. + fax_country_code (Union[Unset, str]): Fax Number Country Code + federal_employer_id (Union[Unset, str]): The Federal Employer Identification Number. It is used to identify a + business for tax purposes. + first_name (Union[Unset, str]): The contact's first name. + full_name (Union[Unset, str]): The contact's full name. + gender (Union[Unset, RecordContactSimpleModelGender]): The gender (male or female) of the individual. + id (Union[Unset, str]): The contact system id assigned by the Civic Platform server. + individual_or_organization (Union[Unset, str]): The organization to which the contact belongs. This field is + only active when the Contact Type selected is Organization. + is_primary (Union[Unset, RecordContactSimpleModelIsPrimary]): Indicates whether or not to designate the contact + as the primary contact Only one address can be primary at any given time. + last_name (Union[Unset, str]): The last name (surname). + middle_name (Union[Unset, str]): The middle name. + organization_name (Union[Unset, str]): The organization to which the contact belongs. This field is only active + when the Contact Type selected is Organization. + passport_number (Union[Unset, str]): The contact's passport number. This field is only active when the Contact + Type selected is Individual. + phone1 (Union[Unset, str]): The primary telephone number of the contact. + phone_1_country_code (Union[Unset, str]): Phone Number 1 Country Code + phone2 (Union[Unset, str]): The secondary telephone number of the contact. + phone_2_country_code (Union[Unset, str]): Phone Number 2 Country Code + phone3 (Union[Unset, str]): The tertiary telephone number for the contact. + phone_3_country_code (Union[Unset, str]): Phone Number 3 Country Code + post_office_box (Union[Unset, str]): The post office box number. + preferred_channel (Union[Unset, RecordContactSimpleModelPreferredChannel]): The method by which the contact + prefers to be notified, by phone for example. See [Get All Contact Preferred Channels](./api- + settings.html#operation/v4.get.settings.contacts.preferredChannels). + race (Union[Unset, RecordContactSimpleModelRace]): The contact's race or ethnicity. See [Get All Contact + Races](./api-settings.html#operation/v4.get.settings.contacts.races). + record_id (Union[Unset, RecordIdModel]): + reference_contact_id (Union[Unset, str]): The unique Id generated for a contact stored in the sytem. + relation (Union[Unset, RecordContactSimpleModelRelation]): The contact's relationship to the application or + service request. + salutation (Union[Unset, RecordContactSimpleModelSalutation]): The salutation to be used when addressing the + contact; for example Mr. oar Ms. This field is active only when Contact Type = Individual. See [Get All Contact + Salutations](./api-settings.html#operation/v4.get.settings.contacts.salutations). + social_security_number (Union[Unset, str]): The individual's social security number. This field is only active + when the Contact Type selected is Individual. + start_date (Union[Unset, datetime.datetime]): The date the contact became active. + state_id_number (Union[Unset, str]): The contact's state ID number. This field is only active when the Contact + Type selected is Individual. + status (Union[Unset, RecordContactSimpleModelStatus]): The contact status. + suffix (Union[Unset, str]): The contact name suffix. + title (Union[Unset, str]): The individual's business title. + trade_name (Union[Unset, str]): The contact's preferred business or trade name. This field is active only when + the Contact Type selected is Organization. + type (Union[Unset, RecordContactSimpleModelType]): The contact type. See [Get All Contact Types](./api- + settings.html#operation/v4.get.settings.contacts.types). + """ + + address: Union[Unset, "CompactAddressModel"] = UNSET + birth_city: Union[Unset, "RecordContactSimpleModelBirthCity"] = UNSET + birth_date: Union[Unset, datetime.datetime] = UNSET + birth_region: Union[Unset, "RecordContactSimpleModelBirthRegion"] = UNSET + birth_state: Union[Unset, "RecordContactSimpleModelBirthState"] = UNSET + business_name: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + deceased_date: Union[Unset, datetime.datetime] = UNSET + driver_license_number: Union[Unset, str] = UNSET + driver_license_state: Union[Unset, "RecordContactSimpleModelDriverLicenseState"] = UNSET + email: Union[Unset, str] = UNSET + end_date: Union[Unset, datetime.datetime] = UNSET + fax: Union[Unset, str] = UNSET + fax_country_code: Union[Unset, str] = UNSET + federal_employer_id: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + full_name: Union[Unset, str] = UNSET + gender: Union[Unset, "RecordContactSimpleModelGender"] = UNSET + id: Union[Unset, str] = UNSET + individual_or_organization: Union[Unset, str] = UNSET + is_primary: Union[Unset, RecordContactSimpleModelIsPrimary] = UNSET + last_name: Union[Unset, str] = UNSET + middle_name: Union[Unset, str] = UNSET + organization_name: Union[Unset, str] = UNSET + passport_number: Union[Unset, str] = UNSET + phone1: Union[Unset, str] = UNSET + phone_1_country_code: Union[Unset, str] = UNSET + phone2: Union[Unset, str] = UNSET + phone_2_country_code: Union[Unset, str] = UNSET + phone3: Union[Unset, str] = UNSET + phone_3_country_code: Union[Unset, str] = UNSET + post_office_box: Union[Unset, str] = UNSET + preferred_channel: Union[Unset, "RecordContactSimpleModelPreferredChannel"] = UNSET + race: Union[Unset, "RecordContactSimpleModelRace"] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + reference_contact_id: Union[Unset, str] = UNSET + relation: Union[Unset, "RecordContactSimpleModelRelation"] = UNSET + salutation: Union[Unset, "RecordContactSimpleModelSalutation"] = UNSET + social_security_number: Union[Unset, str] = UNSET + start_date: Union[Unset, datetime.datetime] = UNSET + state_id_number: Union[Unset, str] = UNSET + status: Union[Unset, "RecordContactSimpleModelStatus"] = UNSET + suffix: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + trade_name: Union[Unset, str] = UNSET + type: Union[Unset, "RecordContactSimpleModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address, Unset): + address = self.address.to_dict() + + birth_city: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_city, Unset): + birth_city = self.birth_city.to_dict() + + birth_date: Union[Unset, str] = UNSET + if not isinstance(self.birth_date, Unset): + birth_date = self.birth_date.isoformat() + + birth_region: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_region, Unset): + birth_region = self.birth_region.to_dict() + + birth_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.birth_state, Unset): + birth_state = self.birth_state.to_dict() + + business_name = self.business_name + comment = self.comment + deceased_date: Union[Unset, str] = UNSET + if not isinstance(self.deceased_date, Unset): + deceased_date = self.deceased_date.isoformat() + + driver_license_number = self.driver_license_number + driver_license_state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.driver_license_state, Unset): + driver_license_state = self.driver_license_state.to_dict() + + email = self.email + end_date: Union[Unset, str] = UNSET + if not isinstance(self.end_date, Unset): + end_date = self.end_date.isoformat() + + fax = self.fax + fax_country_code = self.fax_country_code + federal_employer_id = self.federal_employer_id + first_name = self.first_name + full_name = self.full_name + gender: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.gender, Unset): + gender = self.gender.to_dict() + + id = self.id + individual_or_organization = self.individual_or_organization + is_primary: Union[Unset, str] = UNSET + if not isinstance(self.is_primary, Unset): + is_primary = self.is_primary.value + + last_name = self.last_name + middle_name = self.middle_name + organization_name = self.organization_name + passport_number = self.passport_number + phone1 = self.phone1 + phone_1_country_code = self.phone_1_country_code + phone2 = self.phone2 + phone_2_country_code = self.phone_2_country_code + phone3 = self.phone3 + phone_3_country_code = self.phone_3_country_code + post_office_box = self.post_office_box + preferred_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.preferred_channel, Unset): + preferred_channel = self.preferred_channel.to_dict() + + race: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.race, Unset): + race = self.race.to_dict() + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + reference_contact_id = self.reference_contact_id + relation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.relation, Unset): + relation = self.relation.to_dict() + + salutation: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.salutation, Unset): + salutation = self.salutation.to_dict() + + social_security_number = self.social_security_number + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + state_id_number = self.state_id_number + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + suffix = self.suffix + title = self.title + trade_name = self.trade_name + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if birth_city is not UNSET: + field_dict["birthCity"] = birth_city + if birth_date is not UNSET: + field_dict["birthDate"] = birth_date + if birth_region is not UNSET: + field_dict["birthRegion"] = birth_region + if birth_state is not UNSET: + field_dict["birthState"] = birth_state + if business_name is not UNSET: + field_dict["businessName"] = business_name + if comment is not UNSET: + field_dict["comment"] = comment + if deceased_date is not UNSET: + field_dict["deceasedDate"] = deceased_date + if driver_license_number is not UNSET: + field_dict["driverLicenseNumber"] = driver_license_number + if driver_license_state is not UNSET: + field_dict["driverLicenseState"] = driver_license_state + if email is not UNSET: + field_dict["email"] = email + if end_date is not UNSET: + field_dict["endDate"] = end_date + if fax is not UNSET: + field_dict["fax"] = fax + if fax_country_code is not UNSET: + field_dict["faxCountryCode"] = fax_country_code + if federal_employer_id is not UNSET: + field_dict["federalEmployerId"] = federal_employer_id + if first_name is not UNSET: + field_dict["firstName"] = first_name + if full_name is not UNSET: + field_dict["fullName"] = full_name + if gender is not UNSET: + field_dict["gender"] = gender + if id is not UNSET: + field_dict["id"] = id + if individual_or_organization is not UNSET: + field_dict["individualOrOrganization"] = individual_or_organization + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if last_name is not UNSET: + field_dict["lastName"] = last_name + if middle_name is not UNSET: + field_dict["middleName"] = middle_name + if organization_name is not UNSET: + field_dict["organizationName"] = organization_name + if passport_number is not UNSET: + field_dict["passportNumber"] = passport_number + if phone1 is not UNSET: + field_dict["phone1"] = phone1 + if phone_1_country_code is not UNSET: + field_dict["phone1CountryCode"] = phone_1_country_code + if phone2 is not UNSET: + field_dict["phone2"] = phone2 + if phone_2_country_code is not UNSET: + field_dict["phone2CountryCode"] = phone_2_country_code + if phone3 is not UNSET: + field_dict["phone3"] = phone3 + if phone_3_country_code is not UNSET: + field_dict["phone3CountryCode"] = phone_3_country_code + if post_office_box is not UNSET: + field_dict["postOfficeBox"] = post_office_box + if preferred_channel is not UNSET: + field_dict["preferredChannel"] = preferred_channel + if race is not UNSET: + field_dict["race"] = race + if record_id is not UNSET: + field_dict["recordId"] = record_id + if reference_contact_id is not UNSET: + field_dict["referenceContactId"] = reference_contact_id + if relation is not UNSET: + field_dict["relation"] = relation + if salutation is not UNSET: + field_dict["salutation"] = salutation + if social_security_number is not UNSET: + field_dict["socialSecurityNumber"] = social_security_number + if start_date is not UNSET: + field_dict["startDate"] = start_date + if state_id_number is not UNSET: + field_dict["stateIdNumber"] = state_id_number + if status is not UNSET: + field_dict["status"] = status + if suffix is not UNSET: + field_dict["suffix"] = suffix + if title is not UNSET: + field_dict["title"] = title + if trade_name is not UNSET: + field_dict["tradeName"] = trade_name + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.compact_address_model import CompactAddressModel + from ..models.record_contact_simple_model_birth_city import RecordContactSimpleModelBirthCity + from ..models.record_contact_simple_model_birth_region import RecordContactSimpleModelBirthRegion + from ..models.record_contact_simple_model_birth_state import RecordContactSimpleModelBirthState + from ..models.record_contact_simple_model_driver_license_state import RecordContactSimpleModelDriverLicenseState + from ..models.record_contact_simple_model_gender import RecordContactSimpleModelGender + from ..models.record_contact_simple_model_preferred_channel import RecordContactSimpleModelPreferredChannel + from ..models.record_contact_simple_model_race import RecordContactSimpleModelRace + from ..models.record_contact_simple_model_relation import RecordContactSimpleModelRelation + from ..models.record_contact_simple_model_salutation import RecordContactSimpleModelSalutation + from ..models.record_contact_simple_model_status import RecordContactSimpleModelStatus + from ..models.record_contact_simple_model_type import RecordContactSimpleModelType + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, CompactAddressModel] + if isinstance(_address, Unset): + address = UNSET + else: + address = CompactAddressModel.from_dict(_address) + + _birth_city = d.pop("birthCity", UNSET) + birth_city: Union[Unset, RecordContactSimpleModelBirthCity] + if isinstance(_birth_city, Unset): + birth_city = UNSET + else: + birth_city = RecordContactSimpleModelBirthCity.from_dict(_birth_city) + + _birth_date = d.pop("birthDate", UNSET) + birth_date: Union[Unset, datetime.datetime] + if isinstance(_birth_date, Unset): + birth_date = UNSET + else: + birth_date = isoparse(_birth_date) + + _birth_region = d.pop("birthRegion", UNSET) + birth_region: Union[Unset, RecordContactSimpleModelBirthRegion] + if isinstance(_birth_region, Unset): + birth_region = UNSET + else: + birth_region = RecordContactSimpleModelBirthRegion.from_dict(_birth_region) + + _birth_state = d.pop("birthState", UNSET) + birth_state: Union[Unset, RecordContactSimpleModelBirthState] + if isinstance(_birth_state, Unset): + birth_state = UNSET + else: + birth_state = RecordContactSimpleModelBirthState.from_dict(_birth_state) + + business_name = d.pop("businessName", UNSET) + + comment = d.pop("comment", UNSET) + + _deceased_date = d.pop("deceasedDate", UNSET) + deceased_date: Union[Unset, datetime.datetime] + if isinstance(_deceased_date, Unset): + deceased_date = UNSET + else: + deceased_date = isoparse(_deceased_date) + + driver_license_number = d.pop("driverLicenseNumber", UNSET) + + _driver_license_state = d.pop("driverLicenseState", UNSET) + driver_license_state: Union[Unset, RecordContactSimpleModelDriverLicenseState] + if isinstance(_driver_license_state, Unset): + driver_license_state = UNSET + else: + driver_license_state = RecordContactSimpleModelDriverLicenseState.from_dict(_driver_license_state) + + email = d.pop("email", UNSET) + + _end_date = d.pop("endDate", UNSET) + end_date: Union[Unset, datetime.datetime] + if isinstance(_end_date, Unset): + end_date = UNSET + else: + end_date = isoparse(_end_date) + + fax = d.pop("fax", UNSET) + + fax_country_code = d.pop("faxCountryCode", UNSET) + + federal_employer_id = d.pop("federalEmployerId", UNSET) + + first_name = d.pop("firstName", UNSET) + + full_name = d.pop("fullName", UNSET) + + _gender = d.pop("gender", UNSET) + gender: Union[Unset, RecordContactSimpleModelGender] + if isinstance(_gender, Unset): + gender = UNSET + else: + gender = RecordContactSimpleModelGender.from_dict(_gender) + + id = d.pop("id", UNSET) + + individual_or_organization = d.pop("individualOrOrganization", UNSET) + + _is_primary = d.pop("isPrimary", UNSET) + is_primary: Union[Unset, RecordContactSimpleModelIsPrimary] + if isinstance(_is_primary, Unset): + is_primary = UNSET + else: + is_primary = RecordContactSimpleModelIsPrimary(_is_primary) + + last_name = d.pop("lastName", UNSET) + + middle_name = d.pop("middleName", UNSET) + + organization_name = d.pop("organizationName", UNSET) + + passport_number = d.pop("passportNumber", UNSET) + + phone1 = d.pop("phone1", UNSET) + + phone_1_country_code = d.pop("phone1CountryCode", UNSET) + + phone2 = d.pop("phone2", UNSET) + + phone_2_country_code = d.pop("phone2CountryCode", UNSET) + + phone3 = d.pop("phone3", UNSET) + + phone_3_country_code = d.pop("phone3CountryCode", UNSET) + + post_office_box = d.pop("postOfficeBox", UNSET) + + _preferred_channel = d.pop("preferredChannel", UNSET) + preferred_channel: Union[Unset, RecordContactSimpleModelPreferredChannel] + if isinstance(_preferred_channel, Unset): + preferred_channel = UNSET + else: + preferred_channel = RecordContactSimpleModelPreferredChannel.from_dict(_preferred_channel) + + _race = d.pop("race", UNSET) + race: Union[Unset, RecordContactSimpleModelRace] + if isinstance(_race, Unset): + race = UNSET + else: + race = RecordContactSimpleModelRace.from_dict(_race) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + reference_contact_id = d.pop("referenceContactId", UNSET) + + _relation = d.pop("relation", UNSET) + relation: Union[Unset, RecordContactSimpleModelRelation] + if isinstance(_relation, Unset): + relation = UNSET + else: + relation = RecordContactSimpleModelRelation.from_dict(_relation) + + _salutation = d.pop("salutation", UNSET) + salutation: Union[Unset, RecordContactSimpleModelSalutation] + if isinstance(_salutation, Unset): + salutation = UNSET + else: + salutation = RecordContactSimpleModelSalutation.from_dict(_salutation) + + social_security_number = d.pop("socialSecurityNumber", UNSET) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.datetime] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date) + + state_id_number = d.pop("stateIdNumber", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordContactSimpleModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordContactSimpleModelStatus.from_dict(_status) + + suffix = d.pop("suffix", UNSET) + + title = d.pop("title", UNSET) + + trade_name = d.pop("tradeName", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordContactSimpleModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordContactSimpleModelType.from_dict(_type) + + record_contact_simple_model = cls( + address=address, + birth_city=birth_city, + birth_date=birth_date, + birth_region=birth_region, + birth_state=birth_state, + business_name=business_name, + comment=comment, + deceased_date=deceased_date, + driver_license_number=driver_license_number, + driver_license_state=driver_license_state, + email=email, + end_date=end_date, + fax=fax, + fax_country_code=fax_country_code, + federal_employer_id=federal_employer_id, + first_name=first_name, + full_name=full_name, + gender=gender, + id=id, + individual_or_organization=individual_or_organization, + is_primary=is_primary, + last_name=last_name, + middle_name=middle_name, + organization_name=organization_name, + passport_number=passport_number, + phone1=phone1, + phone_1_country_code=phone_1_country_code, + phone2=phone2, + phone_2_country_code=phone_2_country_code, + phone3=phone3, + phone_3_country_code=phone_3_country_code, + post_office_box=post_office_box, + preferred_channel=preferred_channel, + race=race, + record_id=record_id, + reference_contact_id=reference_contact_id, + relation=relation, + salutation=salutation, + social_security_number=social_security_number, + start_date=start_date, + state_id_number=state_id_number, + status=status, + suffix=suffix, + title=title, + trade_name=trade_name, + type=type, + ) + + record_contact_simple_model.additional_properties = d + return record_contact_simple_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_city.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_city.py new file mode 100644 index 0000000..a04ab26 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_city.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelBirthCity") + + +@_attrs_define +class RecordContactSimpleModelBirthCity: + """The city of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_birth_city = cls( + text=text, + value=value, + ) + + record_contact_simple_model_birth_city.additional_properties = d + return record_contact_simple_model_birth_city + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_region.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_region.py new file mode 100644 index 0000000..b9c7805 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_region.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelBirthRegion") + + +@_attrs_define +class RecordContactSimpleModelBirthRegion: + """The country of birth or region of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_birth_region = cls( + text=text, + value=value, + ) + + record_contact_simple_model_birth_region.additional_properties = d + return record_contact_simple_model_birth_region + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_state.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_state.py new file mode 100644 index 0000000..95d0a4a --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_birth_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelBirthState") + + +@_attrs_define +class RecordContactSimpleModelBirthState: + """The state of birth for an individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_birth_state = cls( + text=text, + value=value, + ) + + record_contact_simple_model_birth_state.additional_properties = d + return record_contact_simple_model_birth_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_driver_license_state.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_driver_license_state.py new file mode 100644 index 0000000..ede776c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_driver_license_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelDriverLicenseState") + + +@_attrs_define +class RecordContactSimpleModelDriverLicenseState: + """The state that issued the driver's license. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_driver_license_state = cls( + text=text, + value=value, + ) + + record_contact_simple_model_driver_license_state.additional_properties = d + return record_contact_simple_model_driver_license_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_gender.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_gender.py new file mode 100644 index 0000000..239ac17 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_gender.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelGender") + + +@_attrs_define +class RecordContactSimpleModelGender: + """The gender (male or female) of the individual. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_gender = cls( + text=text, + value=value, + ) + + record_contact_simple_model_gender.additional_properties = d + return record_contact_simple_model_gender + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_is_primary.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_is_primary.py new file mode 100644 index 0000000..b9a4237 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_is_primary.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RecordContactSimpleModelIsPrimary(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_preferred_channel.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_preferred_channel.py new file mode 100644 index 0000000..9ea3439 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_preferred_channel.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelPreferredChannel") + + +@_attrs_define +class RecordContactSimpleModelPreferredChannel: + """The method by which the contact prefers to be notified, by phone for example. See [Get All Contact Preferred + Channels](./api-settings.html#operation/v4.get.settings.contacts.preferredChannels). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_preferred_channel = cls( + text=text, + value=value, + ) + + record_contact_simple_model_preferred_channel.additional_properties = d + return record_contact_simple_model_preferred_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_race.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_race.py new file mode 100644 index 0000000..8b9bdac --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_race.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelRace") + + +@_attrs_define +class RecordContactSimpleModelRace: + """The contact's race or ethnicity. See [Get All Contact Races](./api- + settings.html#operation/v4.get.settings.contacts.races). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_race = cls( + text=text, + value=value, + ) + + record_contact_simple_model_race.additional_properties = d + return record_contact_simple_model_race + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_relation.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_relation.py new file mode 100644 index 0000000..7d0a170 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_relation.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelRelation") + + +@_attrs_define +class RecordContactSimpleModelRelation: + """The contact's relationship to the application or service request. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_relation = cls( + text=text, + value=value, + ) + + record_contact_simple_model_relation.additional_properties = d + return record_contact_simple_model_relation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_salutation.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_salutation.py new file mode 100644 index 0000000..b9e17dd --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_salutation.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelSalutation") + + +@_attrs_define +class RecordContactSimpleModelSalutation: + """The salutation to be used when addressing the contact; for example Mr. oar Ms. This field is active only when + Contact Type = Individual. See [Get All Contact Salutations](./api- + settings.html#operation/v4.get.settings.contacts.salutations). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_salutation = cls( + text=text, + value=value, + ) + + record_contact_simple_model_salutation.additional_properties = d + return record_contact_simple_model_salutation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_status.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_status.py new file mode 100644 index 0000000..5d6abca --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelStatus") + + +@_attrs_define +class RecordContactSimpleModelStatus: + """The contact status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_status = cls( + text=text, + value=value, + ) + + record_contact_simple_model_status.additional_properties = d + return record_contact_simple_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_contact_simple_model_type.py b/accelapy/accelapy/records_client/models/record_contact_simple_model_type.py new file mode 100644 index 0000000..89667a2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_contact_simple_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordContactSimpleModelType") + + +@_attrs_define +class RecordContactSimpleModelType: + """The contact type. See [Get All Contact Types](./api-settings.html#operation/v4.get.settings.contacts.types). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_contact_simple_model_type = cls( + text=text, + value=value, + ) + + record_contact_simple_model_type.additional_properties = d + return record_contact_simple_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_expiration_model.py b/accelapy/accelapy/records_client/models/record_expiration_model.py new file mode 100644 index 0000000..d2055fc --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_expiration_model.py @@ -0,0 +1,91 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_expiration_model_expiration_status import RecordExpirationModelExpirationStatus + + +T = TypeVar("T", bound="RecordExpirationModel") + + +@_attrs_define +class RecordExpirationModel: + """ + Attributes: + expiration_date (Union[Unset, datetime.datetime]): The date when the condition expires. + expiration_status (Union[Unset, RecordExpirationModelExpirationStatus]): Indicates whether the expiration is + enabled or disabled. See [Get All Record Expiration Statuses](./api- + settings.html#operation/v4.get.settings.records.expirationStatuses). + """ + + expiration_date: Union[Unset, datetime.datetime] = UNSET + expiration_status: Union[Unset, "RecordExpirationModelExpirationStatus"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + expiration_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.expiration_status, Unset): + expiration_status = self.expiration_status.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if expiration_status is not UNSET: + field_dict["expirationStatus"] = expiration_status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_expiration_model_expiration_status import RecordExpirationModelExpirationStatus + + d = src_dict.copy() + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _expiration_status = d.pop("expirationStatus", UNSET) + expiration_status: Union[Unset, RecordExpirationModelExpirationStatus] + if isinstance(_expiration_status, Unset): + expiration_status = UNSET + else: + expiration_status = RecordExpirationModelExpirationStatus.from_dict(_expiration_status) + + record_expiration_model = cls( + expiration_date=expiration_date, + expiration_status=expiration_status, + ) + + record_expiration_model.additional_properties = d + return record_expiration_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_expiration_model_expiration_status.py b/accelapy/accelapy/records_client/models/record_expiration_model_expiration_status.py new file mode 100644 index 0000000..8f6d6a8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_expiration_model_expiration_status.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExpirationModelExpirationStatus") + + +@_attrs_define +class RecordExpirationModelExpirationStatus: + """Indicates whether the expiration is enabled or disabled. See [Get All Record Expiration Statuses](./api- + settings.html#operation/v4.get.settings.records.expirationStatuses). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_expiration_model_expiration_status = cls( + text=text, + value=value, + ) + + record_expiration_model_expiration_status.additional_properties = d + return record_expiration_model_expiration_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1.py b/accelapy/accelapy/records_client/models/record_ext_model_1.py new file mode 100644 index 0000000..b2a03c1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1.py @@ -0,0 +1,940 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_custom_forms_model import RecordAddressCustomFormsModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_ext_model_1_construction_type import RecordExtModel1ConstructionType + from ..models.record_ext_model_1_priority import RecordExtModel1Priority + from ..models.record_ext_model_1_reported_channel import RecordExtModel1ReportedChannel + from ..models.record_ext_model_1_reported_type import RecordExtModel1ReportedType + from ..models.record_ext_model_1_severity import RecordExtModel1Severity + from ..models.record_ext_model_1_status import RecordExtModel1Status + from ..models.record_ext_model_1_status_reason import RecordExtModel1StatusReason + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="RecordExtModel1") + + +@_attrs_define +class RecordExtModel1: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + addresses (Union[Unset, List['RecordAddressCustomFormsModel']]): + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + condition_of_approvals (Union[Unset, List['CapConditionModel2']]): + conditions (Union[Unset, List['NoticeConditionModel']]): + construction_type (Union[Unset, RecordExtModel1ConstructionType]): The US Census Bureau construction type code. + See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + contacts (Union[Unset, List['RecordContactSimpleModel']]): + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + custom_tables (Union[Unset, List['TableModel']]): + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + initiated_product (Union[Unset, str]): The Civic Platform product where the application is submitted: "AA" : + Classic Accela Automation. "ACA" : Accela Citizen Access. "AIVR" : Accela Integrated Voice Response. "AMO" : + Accela Mobile Office. "AV360" : Accela Asset Management, Accela Land Management. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + opened_date (Union[Unset, datetime.datetime]): The date the application was opened. + overall_application_time (Union[Unset, float]): The amount of elapsed time from the time tracking start date to + the completion of the application. + owners (Union[Unset, List['RefOwnerModel']]): + parcels (Union[Unset, List['ParcelModel1']]): + priority (Union[Unset, RecordExtModel1Priority]): The priority level assigned to the record. See [Get All + Priorities](./api-settings.html#operation/v4.get.settings.priorities). + professionals (Union[Unset, List['LicenseProfessionalModel']]): + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RecordExtModel1ReportedChannel]): The incoming channel through which the + applicant submitted the application. + reported_type (Union[Unset, RecordExtModel1ReportedType]): The type of complaint or incident being reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RecordExtModel1Severity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RecordExtModel1Status]): The record status. + status_reason (Union[Unset, RecordExtModel1StatusReason]): The reason for the status setting on the record. + status_type (Union[Unset, List[str]]): The record status type. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + total_pay (Union[Unset, float]): The combination of work order assignments (labor) and costs. + tracking_id (Union[Unset, int]): The total amount of pay. + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + update_date (Union[Unset, datetime.datetime]): The last update date. + value (Union[Unset, str]): + """ + + actual_production_unit: Union[Unset, float] = UNSET + addresses: Union[Unset, List["RecordAddressCustomFormsModel"]] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + condition_of_approvals: Union[Unset, List["CapConditionModel2"]] = UNSET + conditions: Union[Unset, List["NoticeConditionModel"]] = UNSET + construction_type: Union[Unset, "RecordExtModel1ConstructionType"] = UNSET + contacts: Union[Unset, List["RecordContactSimpleModel"]] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + custom_id: Union[Unset, str] = UNSET + custom_tables: Union[Unset, List["TableModel"]] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + initiated_product: Union[Unset, str] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + opened_date: Union[Unset, datetime.datetime] = UNSET + overall_application_time: Union[Unset, float] = UNSET + owners: Union[Unset, List["RefOwnerModel"]] = UNSET + parcels: Union[Unset, List["ParcelModel1"]] = UNSET + priority: Union[Unset, "RecordExtModel1Priority"] = UNSET + professionals: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RecordExtModel1ReportedChannel"] = UNSET + reported_type: Union[Unset, "RecordExtModel1ReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RecordExtModel1Severity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RecordExtModel1Status"] = UNSET + status_reason: Union[Unset, "RecordExtModel1StatusReason"] = UNSET + status_type: Union[Unset, List[str]] = UNSET + total_job_cost: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + update_date: Union[Unset, datetime.datetime] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + addresses: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.addresses, Unset): + addresses = [] + for addresses_item_data in self.addresses: + addresses_item = addresses_item_data.to_dict() + + addresses.append(addresses_item) + + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + condition_of_approvals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.condition_of_approvals, Unset): + condition_of_approvals = [] + for condition_of_approvals_item_data in self.condition_of_approvals: + condition_of_approvals_item = condition_of_approvals_item_data.to_dict() + + condition_of_approvals.append(condition_of_approvals_item) + + conditions: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + + conditions.append(conditions_item) + + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + contacts: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.contacts, Unset): + contacts = [] + for contacts_item_data in self.contacts: + contacts_item = contacts_item_data.to_dict() + + contacts.append(contacts_item) + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + custom_id = self.custom_id + custom_tables: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_tables, Unset): + custom_tables = [] + for custom_tables_item_data in self.custom_tables: + custom_tables_item = custom_tables_item_data.to_dict() + + custom_tables.append(custom_tables_item) + + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + in_possession_time = self.in_possession_time + infraction = self.infraction + initiated_product = self.initiated_product + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + opened_date: Union[Unset, str] = UNSET + if not isinstance(self.opened_date, Unset): + opened_date = self.opened_date.isoformat() + + overall_application_time = self.overall_application_time + owners: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owners, Unset): + owners = [] + for owners_item_data in self.owners: + owners_item = owners_item_data.to_dict() + + owners.append(owners_item) + + parcels: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.parcels, Unset): + parcels = [] + for parcels_item_data in self.parcels: + parcels_item = parcels_item_data.to_dict() + + parcels.append(parcels_item) + + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + professionals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.professionals, Unset): + professionals = [] + for professionals_item_data in self.professionals: + professionals_item = professionals_item_data.to_dict() + + professionals.append(professionals_item) + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + status_type: Union[Unset, List[str]] = UNSET + if not isinstance(self.status_type, Unset): + status_type = self.status_type + + total_job_cost = self.total_job_cost + total_pay = self.total_pay + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + update_date: Union[Unset, str] = UNSET + if not isinstance(self.update_date, Unset): + update_date = self.update_date.isoformat() + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if addresses is not UNSET: + field_dict["addresses"] = addresses + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if condition_of_approvals is not UNSET: + field_dict["conditionOfApprovals"] = condition_of_approvals + if conditions is not UNSET: + field_dict["conditions"] = conditions + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if contacts is not UNSET: + field_dict["contacts"] = contacts + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if custom_tables is not UNSET: + field_dict["customTables"] = custom_tables + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if opened_date is not UNSET: + field_dict["openedDate"] = opened_date + if overall_application_time is not UNSET: + field_dict["overallApplicationTime"] = overall_application_time + if owners is not UNSET: + field_dict["owners"] = owners + if parcels is not UNSET: + field_dict["parcels"] = parcels + if priority is not UNSET: + field_dict["priority"] = priority + if professionals is not UNSET: + field_dict["professionals"] = professionals + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if status_type is not UNSET: + field_dict["statusType"] = status_type + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + if update_date is not UNSET: + field_dict["updateDate"] = update_date + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_custom_forms_model import RecordAddressCustomFormsModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_ext_model_1_construction_type import RecordExtModel1ConstructionType + from ..models.record_ext_model_1_priority import RecordExtModel1Priority + from ..models.record_ext_model_1_reported_channel import RecordExtModel1ReportedChannel + from ..models.record_ext_model_1_reported_type import RecordExtModel1ReportedType + from ..models.record_ext_model_1_severity import RecordExtModel1Severity + from ..models.record_ext_model_1_status import RecordExtModel1Status + from ..models.record_ext_model_1_status_reason import RecordExtModel1StatusReason + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + addresses = [] + _addresses = d.pop("addresses", UNSET) + for addresses_item_data in _addresses or []: + addresses_item = RecordAddressCustomFormsModel.from_dict(addresses_item_data) + + addresses.append(addresses_item) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + condition_of_approvals = [] + _condition_of_approvals = d.pop("conditionOfApprovals", UNSET) + for condition_of_approvals_item_data in _condition_of_approvals or []: + condition_of_approvals_item = CapConditionModel2.from_dict(condition_of_approvals_item_data) + + condition_of_approvals.append(condition_of_approvals_item) + + conditions = [] + _conditions = d.pop("conditions", UNSET) + for conditions_item_data in _conditions or []: + conditions_item = NoticeConditionModel.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RecordExtModel1ConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RecordExtModel1ConstructionType.from_dict(_construction_type) + + contacts = [] + _contacts = d.pop("contacts", UNSET) + for contacts_item_data in _contacts or []: + contacts_item = RecordContactSimpleModel.from_dict(contacts_item_data) + + contacts.append(contacts_item) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + custom_id = d.pop("customId", UNSET) + + custom_tables = [] + _custom_tables = d.pop("customTables", UNSET) + for custom_tables_item_data in _custom_tables or []: + custom_tables_item = TableModel.from_dict(custom_tables_item_data) + + custom_tables.append(custom_tables_item) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _opened_date = d.pop("openedDate", UNSET) + opened_date: Union[Unset, datetime.datetime] + if isinstance(_opened_date, Unset): + opened_date = UNSET + else: + opened_date = isoparse(_opened_date) + + overall_application_time = d.pop("overallApplicationTime", UNSET) + + owners = [] + _owners = d.pop("owners", UNSET) + for owners_item_data in _owners or []: + owners_item = RefOwnerModel.from_dict(owners_item_data) + + owners.append(owners_item) + + parcels = [] + _parcels = d.pop("parcels", UNSET) + for parcels_item_data in _parcels or []: + parcels_item = ParcelModel1.from_dict(parcels_item_data) + + parcels.append(parcels_item) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RecordExtModel1Priority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RecordExtModel1Priority.from_dict(_priority) + + professionals = [] + _professionals = d.pop("professionals", UNSET) + for professionals_item_data in _professionals or []: + professionals_item = LicenseProfessionalModel.from_dict(professionals_item_data) + + professionals.append(professionals_item) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RecordExtModel1ReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RecordExtModel1ReportedChannel.from_dict(_reported_channel) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RecordExtModel1ReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RecordExtModel1ReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RecordExtModel1Severity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RecordExtModel1Severity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordExtModel1Status] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordExtModel1Status.from_dict(_status) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RecordExtModel1StatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RecordExtModel1StatusReason.from_dict(_status_reason) + + status_type = cast(List[str], d.pop("statusType", UNSET)) + + total_job_cost = d.pop("totalJobCost", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + _update_date = d.pop("updateDate", UNSET) + update_date: Union[Unset, datetime.datetime] + if isinstance(_update_date, Unset): + update_date = UNSET + else: + update_date = isoparse(_update_date) + + value = d.pop("value", UNSET) + + record_ext_model_1 = cls( + actual_production_unit=actual_production_unit, + addresses=addresses, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + condition_of_approvals=condition_of_approvals, + conditions=conditions, + construction_type=construction_type, + contacts=contacts, + cost_per_unit=cost_per_unit, + created_by=created_by, + custom_forms=custom_forms, + custom_id=custom_id, + custom_tables=custom_tables, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + in_possession_time=in_possession_time, + infraction=infraction, + initiated_product=initiated_product, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + opened_date=opened_date, + overall_application_time=overall_application_time, + owners=owners, + parcels=parcels, + priority=priority, + professionals=professionals, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_reason=status_reason, + status_type=status_type, + total_job_cost=total_job_cost, + total_pay=total_pay, + tracking_id=tracking_id, + type=type, + undistributed_cost=undistributed_cost, + update_date=update_date, + value=value, + ) + + record_ext_model_1.additional_properties = d + return record_ext_model_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_construction_type.py b/accelapy/accelapy/records_client/models/record_ext_model_1_construction_type.py new file mode 100644 index 0000000..9ba6da3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1ConstructionType") + + +@_attrs_define +class RecordExtModel1ConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_construction_type = cls( + text=text, + value=value, + ) + + record_ext_model_1_construction_type.additional_properties = d + return record_ext_model_1_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_priority.py b/accelapy/accelapy/records_client/models/record_ext_model_1_priority.py new file mode 100644 index 0000000..2ee01e1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1Priority") + + +@_attrs_define +class RecordExtModel1Priority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_priority = cls( + text=text, + value=value, + ) + + record_ext_model_1_priority.additional_properties = d + return record_ext_model_1_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_reported_channel.py b/accelapy/accelapy/records_client/models/record_ext_model_1_reported_channel.py new file mode 100644 index 0000000..ed40962 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1ReportedChannel") + + +@_attrs_define +class RecordExtModel1ReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_reported_channel = cls( + text=text, + value=value, + ) + + record_ext_model_1_reported_channel.additional_properties = d + return record_ext_model_1_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_reported_type.py b/accelapy/accelapy/records_client/models/record_ext_model_1_reported_type.py new file mode 100644 index 0000000..96bccd2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1ReportedType") + + +@_attrs_define +class RecordExtModel1ReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_reported_type = cls( + text=text, + value=value, + ) + + record_ext_model_1_reported_type.additional_properties = d + return record_ext_model_1_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_severity.py b/accelapy/accelapy/records_client/models/record_ext_model_1_severity.py new file mode 100644 index 0000000..9b7d622 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1Severity") + + +@_attrs_define +class RecordExtModel1Severity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_severity = cls( + text=text, + value=value, + ) + + record_ext_model_1_severity.additional_properties = d + return record_ext_model_1_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_status.py b/accelapy/accelapy/records_client/models/record_ext_model_1_status.py new file mode 100644 index 0000000..0638225 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1Status") + + +@_attrs_define +class RecordExtModel1Status: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_status = cls( + text=text, + value=value, + ) + + record_ext_model_1_status.additional_properties = d + return record_ext_model_1_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_ext_model_1_status_reason.py b/accelapy/accelapy/records_client/models/record_ext_model_1_status_reason.py new file mode 100644 index 0000000..3affa11 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_ext_model_1_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordExtModel1StatusReason") + + +@_attrs_define +class RecordExtModel1StatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_ext_model_1_status_reason = cls( + text=text, + value=value, + ) + + record_ext_model_1_status_reason.additional_properties = d + return record_ext_model_1_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_id_model.py b/accelapy/accelapy/records_client/models/record_id_model.py new file mode 100644 index 0000000..c6db414 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_id_model.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordIdModel") + + +@_attrs_define +class RecordIdModel: + """ + Attributes: + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Accela Automation auto-generates and applies an alternate ID value when + you submit a new application. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + service_provider_code (Union[Unset, str]): The unique agency identifier. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + value (Union[Unset, str]): The alphanumeric record id. + """ + + custom_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + tracking_id: Union[Unset, int] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + custom_id = self.custom_id + id = self.id + service_provider_code = self.service_provider_code + tracking_id = self.tracking_id + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if id is not UNSET: + field_dict["id"] = id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + custom_id = d.pop("customId", UNSET) + + id = d.pop("id", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + value = d.pop("value", UNSET) + + record_id_model = cls( + custom_id=custom_id, + id=id, + service_provider_code=service_provider_code, + tracking_id=tracking_id, + value=value, + ) + + record_id_model.additional_properties = d + return record_id_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_id_simple_model.py b/accelapy/accelapy/records_client/models/record_id_simple_model.py new file mode 100644 index 0000000..554abb1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_id_simple_model.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordIdSimpleModel") + + +@_attrs_define +class RecordIdSimpleModel: + """ + Attributes: + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Accela Automation auto-generates and applies an alternate ID value when + you submit a new application. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + service_provider_code (Union[Unset, str]): The unique agency identifier. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + """ + + custom_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + tracking_id: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + custom_id = self.custom_id + id = self.id + service_provider_code = self.service_provider_code + tracking_id = self.tracking_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if id is not UNSET: + field_dict["id"] = id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + custom_id = d.pop("customId", UNSET) + + id = d.pop("id", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + record_id_simple_model = cls( + custom_id=custom_id, + id=id, + service_provider_code=service_provider_code, + tracking_id=tracking_id, + ) + + record_id_simple_model.additional_properties = d + return record_id_simple_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_inspection_type_model.py b/accelapy/accelapy/records_client/models/record_inspection_type_model.py new file mode 100644 index 0000000..7675217 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_inspection_type_model.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_type_model import InspectionTypeModel + + +T = TypeVar("T", bound="RecordInspectionTypeModel") + + +@_attrs_define +class RecordInspectionTypeModel: + """ + Attributes: + inspection_types (Union[Unset, List['InspectionTypeModel']]): + record_id (Union[Unset, str]): The unique ID associated with a record. + """ + + inspection_types: Union[Unset, List["InspectionTypeModel"]] = UNSET + record_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + inspection_types: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.inspection_types, Unset): + inspection_types = [] + for inspection_types_item_data in self.inspection_types: + inspection_types_item = inspection_types_item_data.to_dict() + + inspection_types.append(inspection_types_item) + + record_id = self.record_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if inspection_types is not UNSET: + field_dict["inspectionTypes"] = inspection_types + if record_id is not UNSET: + field_dict["recordId"] = record_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_type_model import InspectionTypeModel + + d = src_dict.copy() + inspection_types = [] + _inspection_types = d.pop("inspectionTypes", UNSET) + for inspection_types_item_data in _inspection_types or []: + inspection_types_item = InspectionTypeModel.from_dict(inspection_types_item_data) + + inspection_types.append(inspection_types_item) + + record_id = d.pop("recordId", UNSET) + + record_inspection_type_model = cls( + inspection_types=inspection_types, + record_id=record_id, + ) + + record_inspection_type_model.additional_properties = d + return record_inspection_type_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model.py b/accelapy/accelapy/records_client/models/record_model.py new file mode 100644 index 0000000..c05a557 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model.py @@ -0,0 +1,1018 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.record_model_created_by_cloning import RecordModelCreatedByCloning +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.asset_master_model import AssetMasterModel + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_model_construction_type import RecordModelConstructionType + from ..models.record_model_priority import RecordModelPriority + from ..models.record_model_reported_channel import RecordModelReportedChannel + from ..models.record_model_reported_type import RecordModelReportedType + from ..models.record_model_severity import RecordModelSeverity + from ..models.record_model_status import RecordModelStatus + from ..models.record_model_status_reason import RecordModelStatusReason + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="RecordModel") + + +@_attrs_define +class RecordModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + addresses (Union[Unset, List['RecordAddressModel']]): + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assets (Union[Unset, List['AssetMasterModel']]): + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + condition_of_approvals (Union[Unset, List['CapConditionModel2']]): + conditions (Union[Unset, List['NoticeConditionModel']]): + construction_type (Union[Unset, RecordModelConstructionType]): The US Census Bureau construction type code. See + [Get All Record Construction Types](./api-settings.html#operation/v4.get.settings.records.constructionTypes). + contact (Union[Unset, List['RecordContactSimpleModel']]): + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_by_cloning (Union[Unset, RecordModelCreatedByCloning]): Indictes whether or not the record was cloned. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + custom_tables (Union[Unset, List['TableModel']]): + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + initiated_product (Union[Unset, str]): The Civic Platform product where the application is submitted: "AA" : + Classic Accela Automation. "ACA" : Accela Citizen Access. "AIVR" : Accela Integrated Voice Response. "AMO" : + Accela Mobile Office. "AV360" : Accela Asset Management, Accela Land Management. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + opened_date (Union[Unset, datetime.datetime]): The date the application was opened. + overall_application_time (Union[Unset, float]): The amount of elapsed time from the time tracking start date to + the completion of the application. + owner (Union[Unset, List['RefOwnerModel']]): + parcel (Union[Unset, List['ParcelModel1']]): + priority (Union[Unset, RecordModelPriority]): The priority level assigned to the record. See [Get All + Priorities](./api-settings.html#operation/v4.get.settings.priorities). + professional (Union[Unset, List['LicenseProfessionalModel']]): + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RecordModelReportedChannel]): The incoming channel through which the applicant + submitted the application. + reported_date (Union[Unset, datetime.datetime]): The date the complaint was reported. + reported_type (Union[Unset, RecordModelReportedType]): The type of complaint or incident being reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RecordModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RecordModelStatus]): The record status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_reason (Union[Unset, RecordModelStatusReason]): The reason for the status setting on the record. + status_type (Union[Unset, List[str]]): The record status type. + total_fee (Union[Unset, float]): The total amount of the fees invoiced to the record. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + total_pay (Union[Unset, float]): The total amount of pay. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + update_date (Union[Unset, datetime.datetime]): The last update date. + value (Union[Unset, str]): The record value. + """ + + actual_production_unit: Union[Unset, float] = UNSET + addresses: Union[Unset, List["RecordAddressModel"]] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assets: Union[Unset, List["AssetMasterModel"]] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + condition_of_approvals: Union[Unset, List["CapConditionModel2"]] = UNSET + conditions: Union[Unset, List["NoticeConditionModel"]] = UNSET + construction_type: Union[Unset, "RecordModelConstructionType"] = UNSET + contact: Union[Unset, List["RecordContactSimpleModel"]] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + created_by_cloning: Union[Unset, RecordModelCreatedByCloning] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + custom_id: Union[Unset, str] = UNSET + custom_tables: Union[Unset, List["TableModel"]] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + initiated_product: Union[Unset, str] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + opened_date: Union[Unset, datetime.datetime] = UNSET + overall_application_time: Union[Unset, float] = UNSET + owner: Union[Unset, List["RefOwnerModel"]] = UNSET + parcel: Union[Unset, List["ParcelModel1"]] = UNSET + priority: Union[Unset, "RecordModelPriority"] = UNSET + professional: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RecordModelReportedChannel"] = UNSET + reported_date: Union[Unset, datetime.datetime] = UNSET + reported_type: Union[Unset, "RecordModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RecordModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RecordModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_reason: Union[Unset, "RecordModelStatusReason"] = UNSET + status_type: Union[Unset, List[str]] = UNSET + total_fee: Union[Unset, float] = UNSET + total_job_cost: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + update_date: Union[Unset, datetime.datetime] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + addresses: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.addresses, Unset): + addresses = [] + for addresses_item_data in self.addresses: + addresses_item = addresses_item_data.to_dict() + + addresses.append(addresses_item) + + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assets: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.assets, Unset): + assets = [] + for assets_item_data in self.assets: + assets_item = assets_item_data.to_dict() + + assets.append(assets_item) + + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + condition_of_approvals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.condition_of_approvals, Unset): + condition_of_approvals = [] + for condition_of_approvals_item_data in self.condition_of_approvals: + condition_of_approvals_item = condition_of_approvals_item_data.to_dict() + + condition_of_approvals.append(condition_of_approvals_item) + + conditions: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + + conditions.append(conditions_item) + + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + contact: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.contact, Unset): + contact = [] + for contact_item_data in self.contact: + contact_item = contact_item_data.to_dict() + + contact.append(contact_item) + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + created_by_cloning: Union[Unset, str] = UNSET + if not isinstance(self.created_by_cloning, Unset): + created_by_cloning = self.created_by_cloning.value + + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + custom_id = self.custom_id + custom_tables: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_tables, Unset): + custom_tables = [] + for custom_tables_item_data in self.custom_tables: + custom_tables_item = custom_tables_item_data.to_dict() + + custom_tables.append(custom_tables_item) + + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + in_possession_time = self.in_possession_time + infraction = self.infraction + initiated_product = self.initiated_product + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + opened_date: Union[Unset, str] = UNSET + if not isinstance(self.opened_date, Unset): + opened_date = self.opened_date.isoformat() + + overall_application_time = self.overall_application_time + owner: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owner, Unset): + owner = [] + for owner_item_data in self.owner: + owner_item = owner_item_data.to_dict() + + owner.append(owner_item) + + parcel: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.parcel, Unset): + parcel = [] + for parcel_item_data in self.parcel: + parcel_item = parcel_item_data.to_dict() + + parcel.append(parcel_item) + + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + professional: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.professional, Unset): + professional = [] + for professional_item_data in self.professional: + professional_item = professional_item_data.to_dict() + + professional.append(professional_item) + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_date: Union[Unset, str] = UNSET + if not isinstance(self.reported_date, Unset): + reported_date = self.reported_date.isoformat() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + status_type: Union[Unset, List[str]] = UNSET + if not isinstance(self.status_type, Unset): + status_type = self.status_type + + total_fee = self.total_fee + total_job_cost = self.total_job_cost + total_pay = self.total_pay + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + update_date: Union[Unset, str] = UNSET + if not isinstance(self.update_date, Unset): + update_date = self.update_date.isoformat() + + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if addresses is not UNSET: + field_dict["addresses"] = addresses + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assets is not UNSET: + field_dict["assets"] = assets + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if condition_of_approvals is not UNSET: + field_dict["conditionOfApprovals"] = condition_of_approvals + if conditions is not UNSET: + field_dict["conditions"] = conditions + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if contact is not UNSET: + field_dict["contact"] = contact + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_by_cloning is not UNSET: + field_dict["createdByCloning"] = created_by_cloning + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if custom_tables is not UNSET: + field_dict["customTables"] = custom_tables + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if opened_date is not UNSET: + field_dict["openedDate"] = opened_date + if overall_application_time is not UNSET: + field_dict["overallApplicationTime"] = overall_application_time + if owner is not UNSET: + field_dict["owner"] = owner + if parcel is not UNSET: + field_dict["parcel"] = parcel + if priority is not UNSET: + field_dict["priority"] = priority + if professional is not UNSET: + field_dict["professional"] = professional + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_date is not UNSET: + field_dict["reportedDate"] = reported_date + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if status_type is not UNSET: + field_dict["statusType"] = status_type + if total_fee is not UNSET: + field_dict["totalFee"] = total_fee + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + if update_date is not UNSET: + field_dict["updateDate"] = update_date + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.asset_master_model import AssetMasterModel + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_model_construction_type import RecordModelConstructionType + from ..models.record_model_priority import RecordModelPriority + from ..models.record_model_reported_channel import RecordModelReportedChannel + from ..models.record_model_reported_type import RecordModelReportedType + from ..models.record_model_severity import RecordModelSeverity + from ..models.record_model_status import RecordModelStatus + from ..models.record_model_status_reason import RecordModelStatusReason + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.table_model import TableModel + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + addresses = [] + _addresses = d.pop("addresses", UNSET) + for addresses_item_data in _addresses or []: + addresses_item = RecordAddressModel.from_dict(addresses_item_data) + + addresses.append(addresses_item) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + assets = [] + _assets = d.pop("assets", UNSET) + for assets_item_data in _assets or []: + assets_item = AssetMasterModel.from_dict(assets_item_data) + + assets.append(assets_item) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + condition_of_approvals = [] + _condition_of_approvals = d.pop("conditionOfApprovals", UNSET) + for condition_of_approvals_item_data in _condition_of_approvals or []: + condition_of_approvals_item = CapConditionModel2.from_dict(condition_of_approvals_item_data) + + condition_of_approvals.append(condition_of_approvals_item) + + conditions = [] + _conditions = d.pop("conditions", UNSET) + for conditions_item_data in _conditions or []: + conditions_item = NoticeConditionModel.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RecordModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RecordModelConstructionType.from_dict(_construction_type) + + contact = [] + _contact = d.pop("contact", UNSET) + for contact_item_data in _contact or []: + contact_item = RecordContactSimpleModel.from_dict(contact_item_data) + + contact.append(contact_item) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_by_cloning = d.pop("createdByCloning", UNSET) + created_by_cloning: Union[Unset, RecordModelCreatedByCloning] + if isinstance(_created_by_cloning, Unset): + created_by_cloning = UNSET + else: + created_by_cloning = RecordModelCreatedByCloning(_created_by_cloning) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + custom_id = d.pop("customId", UNSET) + + custom_tables = [] + _custom_tables = d.pop("customTables", UNSET) + for custom_tables_item_data in _custom_tables or []: + custom_tables_item = TableModel.from_dict(custom_tables_item_data) + + custom_tables.append(custom_tables_item) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _opened_date = d.pop("openedDate", UNSET) + opened_date: Union[Unset, datetime.datetime] + if isinstance(_opened_date, Unset): + opened_date = UNSET + else: + opened_date = isoparse(_opened_date) + + overall_application_time = d.pop("overallApplicationTime", UNSET) + + owner = [] + _owner = d.pop("owner", UNSET) + for owner_item_data in _owner or []: + owner_item = RefOwnerModel.from_dict(owner_item_data) + + owner.append(owner_item) + + parcel = [] + _parcel = d.pop("parcel", UNSET) + for parcel_item_data in _parcel or []: + parcel_item = ParcelModel1.from_dict(parcel_item_data) + + parcel.append(parcel_item) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RecordModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RecordModelPriority.from_dict(_priority) + + professional = [] + _professional = d.pop("professional", UNSET) + for professional_item_data in _professional or []: + professional_item = LicenseProfessionalModel.from_dict(professional_item_data) + + professional.append(professional_item) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RecordModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RecordModelReportedChannel.from_dict(_reported_channel) + + _reported_date = d.pop("reportedDate", UNSET) + reported_date: Union[Unset, datetime.datetime] + if isinstance(_reported_date, Unset): + reported_date = UNSET + else: + reported_date = isoparse(_reported_date) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RecordModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RecordModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RecordModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RecordModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RecordModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RecordModelStatusReason.from_dict(_status_reason) + + status_type = cast(List[str], d.pop("statusType", UNSET)) + + total_fee = d.pop("totalFee", UNSET) + + total_job_cost = d.pop("totalJobCost", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + _update_date = d.pop("updateDate", UNSET) + update_date: Union[Unset, datetime.datetime] + if isinstance(_update_date, Unset): + update_date = UNSET + else: + update_date = isoparse(_update_date) + + value = d.pop("value", UNSET) + + record_model = cls( + actual_production_unit=actual_production_unit, + addresses=addresses, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assets=assets, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + condition_of_approvals=condition_of_approvals, + conditions=conditions, + construction_type=construction_type, + contact=contact, + cost_per_unit=cost_per_unit, + created_by=created_by, + created_by_cloning=created_by_cloning, + custom_forms=custom_forms, + custom_id=custom_id, + custom_tables=custom_tables, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + in_possession_time=in_possession_time, + infraction=infraction, + initiated_product=initiated_product, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + opened_date=opened_date, + overall_application_time=overall_application_time, + owner=owner, + parcel=parcel, + priority=priority, + professional=professional, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_date=reported_date, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_date=status_date, + status_reason=status_reason, + status_type=status_type, + total_fee=total_fee, + total_job_cost=total_job_cost, + total_pay=total_pay, + tracking_id=tracking_id, + type=type, + undistributed_cost=undistributed_cost, + update_date=update_date, + value=value, + ) + + record_model.additional_properties = d + return record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_construction_type.py b/accelapy/accelapy/records_client/models/record_model_construction_type.py new file mode 100644 index 0000000..8e3781c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelConstructionType") + + +@_attrs_define +class RecordModelConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_construction_type = cls( + text=text, + value=value, + ) + + record_model_construction_type.additional_properties = d + return record_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_created_by_cloning.py b/accelapy/accelapy/records_client/models/record_model_created_by_cloning.py new file mode 100644 index 0000000..6a2afe5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_created_by_cloning.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RecordModelCreatedByCloning(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_model_priority.py b/accelapy/accelapy/records_client/models/record_model_priority.py new file mode 100644 index 0000000..8575292 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelPriority") + + +@_attrs_define +class RecordModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_priority = cls( + text=text, + value=value, + ) + + record_model_priority.additional_properties = d + return record_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_reported_channel.py b/accelapy/accelapy/records_client/models/record_model_reported_channel.py new file mode 100644 index 0000000..4d0f614 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelReportedChannel") + + +@_attrs_define +class RecordModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_reported_channel = cls( + text=text, + value=value, + ) + + record_model_reported_channel.additional_properties = d + return record_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_reported_type.py b/accelapy/accelapy/records_client/models/record_model_reported_type.py new file mode 100644 index 0000000..c4d658b --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelReportedType") + + +@_attrs_define +class RecordModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_reported_type = cls( + text=text, + value=value, + ) + + record_model_reported_type.additional_properties = d + return record_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_severity.py b/accelapy/accelapy/records_client/models/record_model_severity.py new file mode 100644 index 0000000..eb5458e --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelSeverity") + + +@_attrs_define +class RecordModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_severity = cls( + text=text, + value=value, + ) + + record_model_severity.additional_properties = d + return record_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_status.py b/accelapy/accelapy/records_client/models/record_model_status.py new file mode 100644 index 0000000..946193c --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelStatus") + + +@_attrs_define +class RecordModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_status = cls( + text=text, + value=value, + ) + + record_model_status.additional_properties = d + return record_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_model_status_reason.py b/accelapy/accelapy/records_client/models/record_model_status_reason.py new file mode 100644 index 0000000..fd3fefe --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordModelStatusReason") + + +@_attrs_define +class RecordModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_model_status_reason = cls( + text=text, + value=value, + ) + + record_model_status_reason.additional_properties = d + return record_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_parcel_model.py b/accelapy/accelapy/records_client/models/record_parcel_model.py new file mode 100644 index 0000000..dde4e6d --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_parcel_model.py @@ -0,0 +1,334 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + from ..models.record_parcel_model_status import RecordParcelModelStatus + from ..models.record_parcel_model_subdivision import RecordParcelModelSubdivision + from ..models.ref_owner_model import RefOwnerModel + + +T = TypeVar("T", bound="RecordParcelModel") + + +@_attrs_define +class RecordParcelModel: + """ + Attributes: + block (Union[Unset, str]): The block number associated with the parcel. + book (Union[Unset, str]): A reference to the physical location of parcel information in the County Assessor's + office. + census_tract (Union[Unset, str]): The unique number assigned by the Census Bureau that identifies the tract to + which this parcel belongs. + council_district (Union[Unset, str]): The council district to which the parcel belongs. + exemption_value (Union[Unset, float]): The total value of any tax exemptions that apply to the land within the + parcel. + gis_sequence_number (Union[Unset, int]): The GIS object ID of the parcel. + id (Union[Unset, str]): The system id of the parcel assigned by the Civic Platform server. + improved_value (Union[Unset, float]): The total value of any improvements to the land within the parcel. + is_primary (Union[Unset, str]): Indicates whether or not to designate the parcel as the primary parcel. + land_value (Union[Unset, float]): The total value of the land within the parcel. + legal_description (Union[Unset, str]): The legal description of the parcel. + lot (Union[Unset, str]): The lot name. + map_number (Union[Unset, str]): The unique map number that identifies the map for this parcel. + map_reference_info (Union[Unset, str]): The map reference for this parcel. + owners (Union[Unset, List['RefOwnerModel']]): + page (Union[Unset, str]): A reference to the physical location of the parcel information in the records of the + County Assessor (or other responsible department). + parcel (Union[Unset, str]): The official parcel name or number, as determined by the county assessor or other + responsible department. + parcel_area (Union[Unset, float]): The total area of the parcel. Your agency determines the standard unit of + measure. + parcel_number (Union[Unset, str]): The alpha-numeric parcel number. + plan_area (Union[Unset, str]): The total area of the parcel. Your agency determines the standard unit of + measure. + range_ (Union[Unset, str]): When land is surveyed using the rectangular-survey system, range represents the + measure of units east and west of the base line. + record_id (Union[Unset, RecordIdModel]): + section (Union[Unset, int]): A piece of a township measuring 640 acres, one square mile, numbered with reference + to the base line and meridian line. + status (Union[Unset, RecordParcelModelStatus]): The parcel status. + subdivision (Union[Unset, RecordParcelModelSubdivision]): The name of the subdivision. + supervisor_district (Union[Unset, str]): The supervisor district to which the parcel belongs. + township (Union[Unset, str]): When land is surveyed using the rectangular-survey system, township represents the + measure of units North or South of the base line. Townships typically measure 6 miles to a side, or 36 square + miles. + tract (Union[Unset, str]): The name of the tract associated with this application. A tract may contain one or + more related parcels. + """ + + block: Union[Unset, str] = UNSET + book: Union[Unset, str] = UNSET + census_tract: Union[Unset, str] = UNSET + council_district: Union[Unset, str] = UNSET + exemption_value: Union[Unset, float] = UNSET + gis_sequence_number: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + improved_value: Union[Unset, float] = UNSET + is_primary: Union[Unset, str] = UNSET + land_value: Union[Unset, float] = UNSET + legal_description: Union[Unset, str] = UNSET + lot: Union[Unset, str] = UNSET + map_number: Union[Unset, str] = UNSET + map_reference_info: Union[Unset, str] = UNSET + owners: Union[Unset, List["RefOwnerModel"]] = UNSET + page: Union[Unset, str] = UNSET + parcel: Union[Unset, str] = UNSET + parcel_area: Union[Unset, float] = UNSET + parcel_number: Union[Unset, str] = UNSET + plan_area: Union[Unset, str] = UNSET + range_: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + section: Union[Unset, int] = UNSET + status: Union[Unset, "RecordParcelModelStatus"] = UNSET + subdivision: Union[Unset, "RecordParcelModelSubdivision"] = UNSET + supervisor_district: Union[Unset, str] = UNSET + township: Union[Unset, str] = UNSET + tract: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + block = self.block + book = self.book + census_tract = self.census_tract + council_district = self.council_district + exemption_value = self.exemption_value + gis_sequence_number = self.gis_sequence_number + id = self.id + improved_value = self.improved_value + is_primary = self.is_primary + land_value = self.land_value + legal_description = self.legal_description + lot = self.lot + map_number = self.map_number + map_reference_info = self.map_reference_info + owners: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owners, Unset): + owners = [] + for owners_item_data in self.owners: + owners_item = owners_item_data.to_dict() + + owners.append(owners_item) + + page = self.page + parcel = self.parcel + parcel_area = self.parcel_area + parcel_number = self.parcel_number + plan_area = self.plan_area + range_ = self.range_ + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + section = self.section + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + subdivision: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.subdivision, Unset): + subdivision = self.subdivision.to_dict() + + supervisor_district = self.supervisor_district + township = self.township + tract = self.tract + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if block is not UNSET: + field_dict["block"] = block + if book is not UNSET: + field_dict["book"] = book + if census_tract is not UNSET: + field_dict["censusTract"] = census_tract + if council_district is not UNSET: + field_dict["councilDistrict"] = council_district + if exemption_value is not UNSET: + field_dict["exemptionValue"] = exemption_value + if gis_sequence_number is not UNSET: + field_dict["gisSequenceNumber"] = gis_sequence_number + if id is not UNSET: + field_dict["id"] = id + if improved_value is not UNSET: + field_dict["improvedValue"] = improved_value + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if land_value is not UNSET: + field_dict["landValue"] = land_value + if legal_description is not UNSET: + field_dict["legalDescription"] = legal_description + if lot is not UNSET: + field_dict["lot"] = lot + if map_number is not UNSET: + field_dict["mapNumber"] = map_number + if map_reference_info is not UNSET: + field_dict["mapReferenceInfo"] = map_reference_info + if owners is not UNSET: + field_dict["owners"] = owners + if page is not UNSET: + field_dict["page"] = page + if parcel is not UNSET: + field_dict["parcel"] = parcel + if parcel_area is not UNSET: + field_dict["parcelArea"] = parcel_area + if parcel_number is not UNSET: + field_dict["parcelNumber"] = parcel_number + if plan_area is not UNSET: + field_dict["planArea"] = plan_area + if range_ is not UNSET: + field_dict["range"] = range_ + if record_id is not UNSET: + field_dict["recordId"] = record_id + if section is not UNSET: + field_dict["section"] = section + if status is not UNSET: + field_dict["status"] = status + if subdivision is not UNSET: + field_dict["subdivision"] = subdivision + if supervisor_district is not UNSET: + field_dict["supervisorDistrict"] = supervisor_district + if township is not UNSET: + field_dict["township"] = township + if tract is not UNSET: + field_dict["tract"] = tract + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + from ..models.record_parcel_model_status import RecordParcelModelStatus + from ..models.record_parcel_model_subdivision import RecordParcelModelSubdivision + from ..models.ref_owner_model import RefOwnerModel + + d = src_dict.copy() + block = d.pop("block", UNSET) + + book = d.pop("book", UNSET) + + census_tract = d.pop("censusTract", UNSET) + + council_district = d.pop("councilDistrict", UNSET) + + exemption_value = d.pop("exemptionValue", UNSET) + + gis_sequence_number = d.pop("gisSequenceNumber", UNSET) + + id = d.pop("id", UNSET) + + improved_value = d.pop("improvedValue", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + land_value = d.pop("landValue", UNSET) + + legal_description = d.pop("legalDescription", UNSET) + + lot = d.pop("lot", UNSET) + + map_number = d.pop("mapNumber", UNSET) + + map_reference_info = d.pop("mapReferenceInfo", UNSET) + + owners = [] + _owners = d.pop("owners", UNSET) + for owners_item_data in _owners or []: + owners_item = RefOwnerModel.from_dict(owners_item_data) + + owners.append(owners_item) + + page = d.pop("page", UNSET) + + parcel = d.pop("parcel", UNSET) + + parcel_area = d.pop("parcelArea", UNSET) + + parcel_number = d.pop("parcelNumber", UNSET) + + plan_area = d.pop("planArea", UNSET) + + range_ = d.pop("range", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + section = d.pop("section", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RecordParcelModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RecordParcelModelStatus.from_dict(_status) + + _subdivision = d.pop("subdivision", UNSET) + subdivision: Union[Unset, RecordParcelModelSubdivision] + if isinstance(_subdivision, Unset): + subdivision = UNSET + else: + subdivision = RecordParcelModelSubdivision.from_dict(_subdivision) + + supervisor_district = d.pop("supervisorDistrict", UNSET) + + township = d.pop("township", UNSET) + + tract = d.pop("tract", UNSET) + + record_parcel_model = cls( + block=block, + book=book, + census_tract=census_tract, + council_district=council_district, + exemption_value=exemption_value, + gis_sequence_number=gis_sequence_number, + id=id, + improved_value=improved_value, + is_primary=is_primary, + land_value=land_value, + legal_description=legal_description, + lot=lot, + map_number=map_number, + map_reference_info=map_reference_info, + owners=owners, + page=page, + parcel=parcel, + parcel_area=parcel_area, + parcel_number=parcel_number, + plan_area=plan_area, + range_=range_, + record_id=record_id, + section=section, + status=status, + subdivision=subdivision, + supervisor_district=supervisor_district, + township=township, + tract=tract, + ) + + record_parcel_model.additional_properties = d + return record_parcel_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_parcel_model_status.py b/accelapy/accelapy/records_client/models/record_parcel_model_status.py new file mode 100644 index 0000000..1991e88 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_parcel_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordParcelModelStatus") + + +@_attrs_define +class RecordParcelModelStatus: + """The parcel status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_parcel_model_status = cls( + text=text, + value=value, + ) + + record_parcel_model_status.additional_properties = d + return record_parcel_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_parcel_model_subdivision.py b/accelapy/accelapy/records_client/models/record_parcel_model_subdivision.py new file mode 100644 index 0000000..29be2c3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_parcel_model_subdivision.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordParcelModelSubdivision") + + +@_attrs_define +class RecordParcelModelSubdivision: + """The name of the subdivision. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + record_parcel_model_subdivision = cls( + text=text, + value=value, + ) + + record_parcel_model_subdivision.additional_properties = d + return record_parcel_model_subdivision + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_related_model.py b/accelapy/accelapy/records_client/models/record_related_model.py new file mode 100644 index 0000000..a504622 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_related_model.py @@ -0,0 +1,122 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.record_related_model_relationship import RecordRelatedModelRelationship +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_type_no_alias_model import RecordTypeNoAliasModel + + +T = TypeVar("T", bound="RecordRelatedModel") + + +@_attrs_define +class RecordRelatedModel: + """ + Attributes: + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Accela Automation auto-generates and applies an alternate ID value when + you submit a new application. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + relationship (Union[Unset, RecordRelatedModelRelationship]): The type of relationship of a related record. + service_prove_code (Union[Unset, str]): The unique agency id. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + type (Union[Unset, RecordTypeNoAliasModel]): + """ + + custom_id: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + relationship: Union[Unset, RecordRelatedModelRelationship] = UNSET + service_prove_code: Union[Unset, str] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeNoAliasModel"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + custom_id = self.custom_id + id = self.id + relationship: Union[Unset, str] = UNSET + if not isinstance(self.relationship, Unset): + relationship = self.relationship.value + + service_prove_code = self.service_prove_code + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if id is not UNSET: + field_dict["id"] = id + if relationship is not UNSET: + field_dict["relationship"] = relationship + if service_prove_code is not UNSET: + field_dict["serviceProveCode"] = service_prove_code + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_type_no_alias_model import RecordTypeNoAliasModel + + d = src_dict.copy() + custom_id = d.pop("customId", UNSET) + + id = d.pop("id", UNSET) + + _relationship = d.pop("relationship", UNSET) + relationship: Union[Unset, RecordRelatedModelRelationship] + if isinstance(_relationship, Unset): + relationship = UNSET + else: + relationship = RecordRelatedModelRelationship(_relationship) + + service_prove_code = d.pop("serviceProveCode", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeNoAliasModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeNoAliasModel.from_dict(_type) + + record_related_model = cls( + custom_id=custom_id, + id=id, + relationship=relationship, + service_prove_code=service_prove_code, + tracking_id=tracking_id, + type=type, + ) + + record_related_model.additional_properties = d + return record_related_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_related_model_relationship.py b/accelapy/accelapy/records_client/models/record_related_model_relationship.py new file mode 100644 index 0000000..a107f7d --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_related_model_relationship.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RecordRelatedModelRelationship(str, Enum): + CHILD = "child" + PARENT = "parent" + RENEWAL = "renewal" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/record_type_model.py b/accelapy/accelapy/records_client/models/record_type_model.py new file mode 100644 index 0000000..86f613e --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_type_model.py @@ -0,0 +1,131 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordTypeModel") + + +@_attrs_define +class RecordTypeModel: + """ + Attributes: + alias (Union[Unset, str]): The record type alias. + category (Union[Unset, str]): The 4th level in a 4-level record type structure (Group-Type-Subtype-Category). + filter_name (Union[Unset, str]): The name of the record type filter which defines the record types to be + displayed for the citizen user. + group (Union[Unset, str]): The 1st level in a 4-level record type structure (Group-Type-Subtype-Category). + id (Union[Unset, str]): The record type id. + module (Union[Unset, str]): The module the record type belongs to. + sub_type (Union[Unset, str]): The 3rd level in a 4-level record type structure (Group-Type-Subtype-Category). + text (Union[Unset, str]): The localized display text. + type (Union[Unset, str]): The 2nd level in a 4-level record type structure (Group-Type-Subtype-Category). + value (Union[Unset, str]): The stored value. + """ + + alias: Union[Unset, str] = UNSET + category: Union[Unset, str] = UNSET + filter_name: Union[Unset, str] = UNSET + group: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + module: Union[Unset, str] = UNSET + sub_type: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + alias = self.alias + category = self.category + filter_name = self.filter_name + group = self.group + id = self.id + module = self.module + sub_type = self.sub_type + text = self.text + type = self.type + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if alias is not UNSET: + field_dict["alias"] = alias + if category is not UNSET: + field_dict["category"] = category + if filter_name is not UNSET: + field_dict["filterName"] = filter_name + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if module is not UNSET: + field_dict["module"] = module + if sub_type is not UNSET: + field_dict["subType"] = sub_type + if text is not UNSET: + field_dict["text"] = text + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + alias = d.pop("alias", UNSET) + + category = d.pop("category", UNSET) + + filter_name = d.pop("filterName", UNSET) + + group = d.pop("group", UNSET) + + id = d.pop("id", UNSET) + + module = d.pop("module", UNSET) + + sub_type = d.pop("subType", UNSET) + + text = d.pop("text", UNSET) + + type = d.pop("type", UNSET) + + value = d.pop("value", UNSET) + + record_type_model = cls( + alias=alias, + category=category, + filter_name=filter_name, + group=group, + id=id, + module=module, + sub_type=sub_type, + text=text, + type=type, + value=value, + ) + + record_type_model.additional_properties = d + return record_type_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/record_type_no_alias_model.py b/accelapy/accelapy/records_client/models/record_type_no_alias_model.py new file mode 100644 index 0000000..10f2b23 --- /dev/null +++ b/accelapy/accelapy/records_client/models/record_type_no_alias_model.py @@ -0,0 +1,124 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordTypeNoAliasModel") + + +@_attrs_define +class RecordTypeNoAliasModel: + """ + Attributes: + category (Union[Unset, str]): The 4th level in a 4-level record type structure (Group-Type-Subtype-Category). + filter_name (Union[Unset, str]): The name of the record type filter which defines the record types to be + displayed for the citizen user. + group (Union[Unset, str]): The 1st level in a 4-level record type structure (Group-Type-Subtype-Category). + id (Union[Unset, str]): The record type system id assigned by the Civic Platform server. + module (Union[Unset, str]): Use to filter by the module. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + sub_type (Union[Unset, str]): The 3rd level in a 4-level record type structure (Group-Type-Subtype-Category). + text (Union[Unset, str]): The record type display text + type (Union[Unset, str]): The 2nd level in a 4-level record type structure (Group-Type-Subtype-Category). + value (Union[Unset, str]): The record type value. + """ + + category: Union[Unset, str] = UNSET + filter_name: Union[Unset, str] = UNSET + group: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + module: Union[Unset, str] = UNSET + sub_type: Union[Unset, str] = UNSET + text: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + category = self.category + filter_name = self.filter_name + group = self.group + id = self.id + module = self.module + sub_type = self.sub_type + text = self.text + type = self.type + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if category is not UNSET: + field_dict["category"] = category + if filter_name is not UNSET: + field_dict["filterName"] = filter_name + if group is not UNSET: + field_dict["group"] = group + if id is not UNSET: + field_dict["id"] = id + if module is not UNSET: + field_dict["module"] = module + if sub_type is not UNSET: + field_dict["subType"] = sub_type + if text is not UNSET: + field_dict["text"] = text + if type is not UNSET: + field_dict["type"] = type + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + category = d.pop("category", UNSET) + + filter_name = d.pop("filterName", UNSET) + + group = d.pop("group", UNSET) + + id = d.pop("id", UNSET) + + module = d.pop("module", UNSET) + + sub_type = d.pop("subType", UNSET) + + text = d.pop("text", UNSET) + + type = d.pop("type", UNSET) + + value = d.pop("value", UNSET) + + record_type_no_alias_model = cls( + category=category, + filter_name=filter_name, + group=group, + id=id, + module=module, + sub_type=sub_type, + text=text, + type=type, + value=value, + ) + + record_type_no_alias_model.additional_properties = d + return record_type_no_alias_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/ref_owner_model.py b/accelapy/accelapy/records_client/models/ref_owner_model.py new file mode 100644 index 0000000..a240c4c --- /dev/null +++ b/accelapy/accelapy/records_client/models/ref_owner_model.py @@ -0,0 +1,230 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.owner_address_model import OwnerAddressModel + from ..models.record_id_model import RecordIdModel + from ..models.ref_owner_model_status import RefOwnerModelStatus + + +T = TypeVar("T", bound="RefOwnerModel") + + +@_attrs_define +class RefOwnerModel: + """ + Attributes: + email (Union[Unset, str]): The contact's email address. + fax (Union[Unset, str]): The fax number for the contact. + first_name (Union[Unset, str]): The contact's first name. This field is only active when the Contact Type + selected is Individual. + full_name (Union[Unset, str]): The contact's full name. This field is only active when the Contact Type selected + is Individual. + id (Union[Unset, int]): The owner system id assigned by the Civic Platform server. + is_primary (Union[Unset, str]): Indicates whether or not to designate the owner as the primary owner. + last_name (Union[Unset, str]): The last name (surname). + mail_address (Union[Unset, OwnerAddressModel]): + middle_name (Union[Unset, str]): The contact's middle name. + parcel_id (Union[Unset, str]): The unique Id generated for a parcel. + phone (Union[Unset, str]): The telephone number of the owner. + phone_country_code (Union[Unset, str]): The country code for the assoicated phone number. + record_id (Union[Unset, RecordIdModel]): + ref_owner_id (Union[Unset, float]): The reference owner id. + status (Union[Unset, RefOwnerModelStatus]): The owner status. + tax_id (Union[Unset, str]): The owner's tax ID number. + title (Union[Unset, str]): The individual's business title. + type (Union[Unset, str]): The owner type. + """ + + email: Union[Unset, str] = UNSET + fax: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + full_name: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + is_primary: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + mail_address: Union[Unset, "OwnerAddressModel"] = UNSET + middle_name: Union[Unset, str] = UNSET + parcel_id: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + phone_country_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + ref_owner_id: Union[Unset, float] = UNSET + status: Union[Unset, "RefOwnerModelStatus"] = UNSET + tax_id: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + email = self.email + fax = self.fax + first_name = self.first_name + full_name = self.full_name + id = self.id + is_primary = self.is_primary + last_name = self.last_name + mail_address: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.mail_address, Unset): + mail_address = self.mail_address.to_dict() + + middle_name = self.middle_name + parcel_id = self.parcel_id + phone = self.phone + phone_country_code = self.phone_country_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + ref_owner_id = self.ref_owner_id + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + tax_id = self.tax_id + title = self.title + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if email is not UNSET: + field_dict["email"] = email + if fax is not UNSET: + field_dict["fax"] = fax + if first_name is not UNSET: + field_dict["firstName"] = first_name + if full_name is not UNSET: + field_dict["fullName"] = full_name + if id is not UNSET: + field_dict["id"] = id + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if last_name is not UNSET: + field_dict["lastName"] = last_name + if mail_address is not UNSET: + field_dict["mailAddress"] = mail_address + if middle_name is not UNSET: + field_dict["middleName"] = middle_name + if parcel_id is not UNSET: + field_dict["parcelId"] = parcel_id + if phone is not UNSET: + field_dict["phone"] = phone + if phone_country_code is not UNSET: + field_dict["phoneCountryCode"] = phone_country_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if ref_owner_id is not UNSET: + field_dict["refOwnerId"] = ref_owner_id + if status is not UNSET: + field_dict["status"] = status + if tax_id is not UNSET: + field_dict["taxId"] = tax_id + if title is not UNSET: + field_dict["title"] = title + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.owner_address_model import OwnerAddressModel + from ..models.record_id_model import RecordIdModel + from ..models.ref_owner_model_status import RefOwnerModelStatus + + d = src_dict.copy() + email = d.pop("email", UNSET) + + fax = d.pop("fax", UNSET) + + first_name = d.pop("firstName", UNSET) + + full_name = d.pop("fullName", UNSET) + + id = d.pop("id", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + last_name = d.pop("lastName", UNSET) + + _mail_address = d.pop("mailAddress", UNSET) + mail_address: Union[Unset, OwnerAddressModel] + if isinstance(_mail_address, Unset): + mail_address = UNSET + else: + mail_address = OwnerAddressModel.from_dict(_mail_address) + + middle_name = d.pop("middleName", UNSET) + + parcel_id = d.pop("parcelId", UNSET) + + phone = d.pop("phone", UNSET) + + phone_country_code = d.pop("phoneCountryCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + ref_owner_id = d.pop("refOwnerId", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RefOwnerModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RefOwnerModelStatus.from_dict(_status) + + tax_id = d.pop("taxId", UNSET) + + title = d.pop("title", UNSET) + + type = d.pop("type", UNSET) + + ref_owner_model = cls( + email=email, + fax=fax, + first_name=first_name, + full_name=full_name, + id=id, + is_primary=is_primary, + last_name=last_name, + mail_address=mail_address, + middle_name=middle_name, + parcel_id=parcel_id, + phone=phone, + phone_country_code=phone_country_code, + record_id=record_id, + ref_owner_id=ref_owner_id, + status=status, + tax_id=tax_id, + title=title, + type=type, + ) + + ref_owner_model.additional_properties = d + return ref_owner_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/ref_owner_model_status.py b/accelapy/accelapy/records_client/models/ref_owner_model_status.py new file mode 100644 index 0000000..1d92b6e --- /dev/null +++ b/accelapy/accelapy/records_client/models/ref_owner_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RefOwnerModelStatus") + + +@_attrs_define +class RefOwnerModelStatus: + """The owner status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + ref_owner_model_status = cls( + text=text, + value=value, + ) + + ref_owner_model_status.additional_properties = d + return ref_owner_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model.py b/accelapy/accelapy/records_client/models/request_activity_add_model.py new file mode 100644 index 0000000..0310b1c --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model.py @@ -0,0 +1,195 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.request_activity_add_model_activity_status import RequestActivityAddModelActivityStatus + from ..models.request_activity_add_model_assigned_department import RequestActivityAddModelAssignedDepartment + from ..models.request_activity_add_model_assigned_user import RequestActivityAddModelAssignedUser + from ..models.request_activity_add_model_priority import RequestActivityAddModelPriority + from ..models.request_activity_add_model_type import RequestActivityAddModelType + + +T = TypeVar("T", bound="RequestActivityAddModel") + + +@_attrs_define +class RequestActivityAddModel: + """ + Attributes: + activity_status (Union[Unset, RequestActivityAddModelActivityStatus]): The status of the record activity. + assigned_department (Union[Unset, RequestActivityAddModelAssignedDepartment]): The department responsible for + the activity. + assigned_user (Union[Unset, RequestActivityAddModelAssignedUser]): The staff member responsible for the + activity. + description (Union[Unset, str]): The activity description + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + name (Union[Unset, str]): The activity name. + priority (Union[Unset, RequestActivityAddModelPriority]): The priority level assigned to the activity. + start_date (Union[Unset, datetime.datetime]): The activity start date. + type (Union[Unset, RequestActivityAddModelType]): The activity type. + """ + + activity_status: Union[Unset, "RequestActivityAddModelActivityStatus"] = UNSET + assigned_department: Union[Unset, "RequestActivityAddModelAssignedDepartment"] = UNSET + assigned_user: Union[Unset, "RequestActivityAddModelAssignedUser"] = UNSET + description: Union[Unset, str] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "RequestActivityAddModelPriority"] = UNSET + start_date: Union[Unset, datetime.datetime] = UNSET + type: Union[Unset, "RequestActivityAddModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + activity_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.activity_status, Unset): + activity_status = self.activity_status.to_dict() + + assigned_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_department, Unset): + assigned_department = self.assigned_department.to_dict() + + assigned_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_user, Unset): + assigned_user = self.assigned_user.to_dict() + + description = self.description + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if activity_status is not UNSET: + field_dict["activityStatus"] = activity_status + if assigned_department is not UNSET: + field_dict["assignedDepartment"] = assigned_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if start_date is not UNSET: + field_dict["startDate"] = start_date + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.request_activity_add_model_activity_status import RequestActivityAddModelActivityStatus + from ..models.request_activity_add_model_assigned_department import RequestActivityAddModelAssignedDepartment + from ..models.request_activity_add_model_assigned_user import RequestActivityAddModelAssignedUser + from ..models.request_activity_add_model_priority import RequestActivityAddModelPriority + from ..models.request_activity_add_model_type import RequestActivityAddModelType + + d = src_dict.copy() + _activity_status = d.pop("activityStatus", UNSET) + activity_status: Union[Unset, RequestActivityAddModelActivityStatus] + if isinstance(_activity_status, Unset): + activity_status = UNSET + else: + activity_status = RequestActivityAddModelActivityStatus.from_dict(_activity_status) + + _assigned_department = d.pop("assignedDepartment", UNSET) + assigned_department: Union[Unset, RequestActivityAddModelAssignedDepartment] + if isinstance(_assigned_department, Unset): + assigned_department = UNSET + else: + assigned_department = RequestActivityAddModelAssignedDepartment.from_dict(_assigned_department) + + _assigned_user = d.pop("assignedUser", UNSET) + assigned_user: Union[Unset, RequestActivityAddModelAssignedUser] + if isinstance(_assigned_user, Unset): + assigned_user = UNSET + else: + assigned_user = RequestActivityAddModelAssignedUser.from_dict(_assigned_user) + + description = d.pop("description", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestActivityAddModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestActivityAddModelPriority.from_dict(_priority) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.datetime] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date) + + _type = d.pop("type", UNSET) + type: Union[Unset, RequestActivityAddModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RequestActivityAddModelType.from_dict(_type) + + request_activity_add_model = cls( + activity_status=activity_status, + assigned_department=assigned_department, + assigned_user=assigned_user, + description=description, + due_date=due_date, + name=name, + priority=priority, + start_date=start_date, + type=type, + ) + + request_activity_add_model.additional_properties = d + return request_activity_add_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model_activity_status.py b/accelapy/accelapy/records_client/models/request_activity_add_model_activity_status.py new file mode 100644 index 0000000..33075af --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model_activity_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityAddModelActivityStatus") + + +@_attrs_define +class RequestActivityAddModelActivityStatus: + """The status of the record activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_add_model_activity_status = cls( + text=text, + value=value, + ) + + request_activity_add_model_activity_status.additional_properties = d + return request_activity_add_model_activity_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_department.py b/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_department.py new file mode 100644 index 0000000..8626a9a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityAddModelAssignedDepartment") + + +@_attrs_define +class RequestActivityAddModelAssignedDepartment: + """The department responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_add_model_assigned_department = cls( + text=text, + value=value, + ) + + request_activity_add_model_assigned_department.additional_properties = d + return request_activity_add_model_assigned_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_user.py b/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_user.py new file mode 100644 index 0000000..5601b89 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model_assigned_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityAddModelAssignedUser") + + +@_attrs_define +class RequestActivityAddModelAssignedUser: + """The staff member responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_add_model_assigned_user = cls( + text=text, + value=value, + ) + + request_activity_add_model_assigned_user.additional_properties = d + return request_activity_add_model_assigned_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model_priority.py b/accelapy/accelapy/records_client/models/request_activity_add_model_priority.py new file mode 100644 index 0000000..c706071 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityAddModelPriority") + + +@_attrs_define +class RequestActivityAddModelPriority: + """The priority level assigned to the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_add_model_priority = cls( + text=text, + value=value, + ) + + request_activity_add_model_priority.additional_properties = d + return request_activity_add_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_add_model_type.py b/accelapy/accelapy/records_client/models/request_activity_add_model_type.py new file mode 100644 index 0000000..92fde81 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_add_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityAddModelType") + + +@_attrs_define +class RequestActivityAddModelType: + """The activity type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_add_model_type = cls( + text=text, + value=value, + ) + + request_activity_add_model_type.additional_properties = d + return request_activity_add_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model.py b/accelapy/accelapy/records_client/models/request_activity_update_model.py new file mode 100644 index 0000000..5082ec1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model.py @@ -0,0 +1,215 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.request_activity_update_model_activity_status import RequestActivityUpdateModelActivityStatus + from ..models.request_activity_update_model_assigned_department import RequestActivityUpdateModelAssignedDepartment + from ..models.request_activity_update_model_assigned_user import RequestActivityUpdateModelAssignedUser + from ..models.request_activity_update_model_priority import RequestActivityUpdateModelPriority + from ..models.request_activity_update_model_status import RequestActivityUpdateModelStatus + from ..models.request_activity_update_model_type import RequestActivityUpdateModelType + + +T = TypeVar("T", bound="RequestActivityUpdateModel") + + +@_attrs_define +class RequestActivityUpdateModel: + """ + Attributes: + activity_status (Union[Unset, RequestActivityUpdateModelActivityStatus]): The status of the record activity. + assigned_department (Union[Unset, RequestActivityUpdateModelAssignedDepartment]): The department responsible for + the activity. + assigned_user (Union[Unset, RequestActivityUpdateModelAssignedUser]): The staff member responsible for the + activity. + description (Union[Unset, str]): The activity description + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + name (Union[Unset, str]): The activity name. + priority (Union[Unset, RequestActivityUpdateModelPriority]): The priority level assigned to the activity. + start_date (Union[Unset, datetime.datetime]): The activity start date. + status (Union[Unset, RequestActivityUpdateModelStatus]): The activity status. + type (Union[Unset, RequestActivityUpdateModelType]): The activity type. + """ + + activity_status: Union[Unset, "RequestActivityUpdateModelActivityStatus"] = UNSET + assigned_department: Union[Unset, "RequestActivityUpdateModelAssignedDepartment"] = UNSET + assigned_user: Union[Unset, "RequestActivityUpdateModelAssignedUser"] = UNSET + description: Union[Unset, str] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "RequestActivityUpdateModelPriority"] = UNSET + start_date: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "RequestActivityUpdateModelStatus"] = UNSET + type: Union[Unset, "RequestActivityUpdateModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + activity_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.activity_status, Unset): + activity_status = self.activity_status.to_dict() + + assigned_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_department, Unset): + assigned_department = self.assigned_department.to_dict() + + assigned_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_user, Unset): + assigned_user = self.assigned_user.to_dict() + + description = self.description + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + start_date: Union[Unset, str] = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if activity_status is not UNSET: + field_dict["activityStatus"] = activity_status + if assigned_department is not UNSET: + field_dict["assignedDepartment"] = assigned_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if description is not UNSET: + field_dict["description"] = description + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if start_date is not UNSET: + field_dict["startDate"] = start_date + if status is not UNSET: + field_dict["status"] = status + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.request_activity_update_model_activity_status import RequestActivityUpdateModelActivityStatus + from ..models.request_activity_update_model_assigned_department import ( + RequestActivityUpdateModelAssignedDepartment, + ) + from ..models.request_activity_update_model_assigned_user import RequestActivityUpdateModelAssignedUser + from ..models.request_activity_update_model_priority import RequestActivityUpdateModelPriority + from ..models.request_activity_update_model_status import RequestActivityUpdateModelStatus + from ..models.request_activity_update_model_type import RequestActivityUpdateModelType + + d = src_dict.copy() + _activity_status = d.pop("activityStatus", UNSET) + activity_status: Union[Unset, RequestActivityUpdateModelActivityStatus] + if isinstance(_activity_status, Unset): + activity_status = UNSET + else: + activity_status = RequestActivityUpdateModelActivityStatus.from_dict(_activity_status) + + _assigned_department = d.pop("assignedDepartment", UNSET) + assigned_department: Union[Unset, RequestActivityUpdateModelAssignedDepartment] + if isinstance(_assigned_department, Unset): + assigned_department = UNSET + else: + assigned_department = RequestActivityUpdateModelAssignedDepartment.from_dict(_assigned_department) + + _assigned_user = d.pop("assignedUser", UNSET) + assigned_user: Union[Unset, RequestActivityUpdateModelAssignedUser] + if isinstance(_assigned_user, Unset): + assigned_user = UNSET + else: + assigned_user = RequestActivityUpdateModelAssignedUser.from_dict(_assigned_user) + + description = d.pop("description", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestActivityUpdateModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestActivityUpdateModelPriority.from_dict(_priority) + + _start_date = d.pop("startDate", UNSET) + start_date: Union[Unset, datetime.datetime] + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestActivityUpdateModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestActivityUpdateModelStatus.from_dict(_status) + + _type = d.pop("type", UNSET) + type: Union[Unset, RequestActivityUpdateModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RequestActivityUpdateModelType.from_dict(_type) + + request_activity_update_model = cls( + activity_status=activity_status, + assigned_department=assigned_department, + assigned_user=assigned_user, + description=description, + due_date=due_date, + name=name, + priority=priority, + start_date=start_date, + status=status, + type=type, + ) + + request_activity_update_model.additional_properties = d + return request_activity_update_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_activity_status.py b/accelapy/accelapy/records_client/models/request_activity_update_model_activity_status.py new file mode 100644 index 0000000..6984c33 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_activity_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelActivityStatus") + + +@_attrs_define +class RequestActivityUpdateModelActivityStatus: + """The status of the record activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_activity_status = cls( + text=text, + value=value, + ) + + request_activity_update_model_activity_status.additional_properties = d + return request_activity_update_model_activity_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_department.py b/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_department.py new file mode 100644 index 0000000..59df2d7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelAssignedDepartment") + + +@_attrs_define +class RequestActivityUpdateModelAssignedDepartment: + """The department responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_assigned_department = cls( + text=text, + value=value, + ) + + request_activity_update_model_assigned_department.additional_properties = d + return request_activity_update_model_assigned_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_user.py b/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_user.py new file mode 100644 index 0000000..3f8686e --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_assigned_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelAssignedUser") + + +@_attrs_define +class RequestActivityUpdateModelAssignedUser: + """The staff member responsible for the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_assigned_user = cls( + text=text, + value=value, + ) + + request_activity_update_model_assigned_user.additional_properties = d + return request_activity_update_model_assigned_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_priority.py b/accelapy/accelapy/records_client/models/request_activity_update_model_priority.py new file mode 100644 index 0000000..8a0f59d --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelPriority") + + +@_attrs_define +class RequestActivityUpdateModelPriority: + """The priority level assigned to the activity. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_priority = cls( + text=text, + value=value, + ) + + request_activity_update_model_priority.additional_properties = d + return request_activity_update_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_status.py b/accelapy/accelapy/records_client/models/request_activity_update_model_status.py new file mode 100644 index 0000000..9577fbe --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelStatus") + + +@_attrs_define +class RequestActivityUpdateModelStatus: + """The activity status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_status = cls( + text=text, + value=value, + ) + + request_activity_update_model_status.additional_properties = d + return request_activity_update_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_activity_update_model_type.py b/accelapy/accelapy/records_client/models/request_activity_update_model_type.py new file mode 100644 index 0000000..eccd5cc --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_activity_update_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestActivityUpdateModelType") + + +@_attrs_define +class RequestActivityUpdateModelType: + """The activity type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_activity_update_model_type = cls( + text=text, + value=value, + ) + + request_activity_update_model_type.additional_properties = d + return request_activity_update_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array.py b/accelapy/accelapy/records_client/models/request_costing_model_array.py new file mode 100644 index 0000000..980b456 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array.py @@ -0,0 +1,300 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.request_costing_model_array_distribute_flag import RequestCostingModelArrayDistributeFlag +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.costing_quantity_model import CostingQuantityModel + from ..models.request_costing_model_array_cost_factor import RequestCostingModelArrayCostFactor + from ..models.request_costing_model_array_status import RequestCostingModelArrayStatus + from ..models.request_costing_model_array_type import RequestCostingModelArrayType + from ..models.request_costing_model_array_unit_of_measure import RequestCostingModelArrayUnitOfMeasure + + +T = TypeVar("T", bound="RequestCostingModelArray") + + +@_attrs_define +class RequestCostingModelArray: + """ + Attributes: + comments (Union[Unset, str]): Comments about the cost. + cost_account (Union[Unset, str]): The cost account name. + cost_date (Union[Unset, datetime.datetime]): The date when the cost applied. + cost_factor (Union[Unset, RequestCostingModelArrayCostFactor]): The cost factor. + cost_item (Union[Unset, str]): The cost item name. + disp_costing_cost_item (Union[Unset, str]): The cost item display name. + distribute_flag (Union[Unset, RequestCostingModelArrayDistributeFlag]): Indicates whether or not costing is + distributed. + end_time (Union[Unset, str]): The end time associated to the cost item. + fixed_rate (Union[Unset, float]): The fixed rate associated to the cost item. + id (Union[Unset, int]): The cost item system id assigned by the Civic Platform server. + quantity (Union[Unset, float]): The cost item quantity. + quantity_detail (Union[Unset, str]): Details about the cost item quantity. + quantity_detail_list (Union[Unset, CostingQuantityModel]): + related_asgn_nbr (Union[Unset, int]): Related cost item. + start_time (Union[Unset, str]): The start time associated to the cost item. + status (Union[Unset, RequestCostingModelArrayStatus]): The cost item status. + total_cost (Union[Unset, float]): The total cost. + type (Union[Unset, RequestCostingModelArrayType]): The cost item type. + unit_of_measure (Union[Unset, RequestCostingModelArrayUnitOfMeasure]): The cost item's unit of measure. + unit_rate (Union[Unset, float]): The cost unit rate. + work_order_task_code (Union[Unset, str]): The work order task code associated to the cost item. + work_order_task_code_index (Union[Unset, int]): The order of the work order task. + """ + + comments: Union[Unset, str] = UNSET + cost_account: Union[Unset, str] = UNSET + cost_date: Union[Unset, datetime.datetime] = UNSET + cost_factor: Union[Unset, "RequestCostingModelArrayCostFactor"] = UNSET + cost_item: Union[Unset, str] = UNSET + disp_costing_cost_item: Union[Unset, str] = UNSET + distribute_flag: Union[Unset, RequestCostingModelArrayDistributeFlag] = UNSET + end_time: Union[Unset, str] = UNSET + fixed_rate: Union[Unset, float] = UNSET + id: Union[Unset, int] = UNSET + quantity: Union[Unset, float] = UNSET + quantity_detail: Union[Unset, str] = UNSET + quantity_detail_list: Union[Unset, "CostingQuantityModel"] = UNSET + related_asgn_nbr: Union[Unset, int] = UNSET + start_time: Union[Unset, str] = UNSET + status: Union[Unset, "RequestCostingModelArrayStatus"] = UNSET + total_cost: Union[Unset, float] = UNSET + type: Union[Unset, "RequestCostingModelArrayType"] = UNSET + unit_of_measure: Union[Unset, "RequestCostingModelArrayUnitOfMeasure"] = UNSET + unit_rate: Union[Unset, float] = UNSET + work_order_task_code: Union[Unset, str] = UNSET + work_order_task_code_index: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + comments = self.comments + cost_account = self.cost_account + cost_date: Union[Unset, str] = UNSET + if not isinstance(self.cost_date, Unset): + cost_date = self.cost_date.isoformat() + + cost_factor: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.cost_factor, Unset): + cost_factor = self.cost_factor.to_dict() + + cost_item = self.cost_item + disp_costing_cost_item = self.disp_costing_cost_item + distribute_flag: Union[Unset, str] = UNSET + if not isinstance(self.distribute_flag, Unset): + distribute_flag = self.distribute_flag.value + + end_time = self.end_time + fixed_rate = self.fixed_rate + id = self.id + quantity = self.quantity + quantity_detail = self.quantity_detail + quantity_detail_list: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.quantity_detail_list, Unset): + quantity_detail_list = self.quantity_detail_list.to_dict() + + related_asgn_nbr = self.related_asgn_nbr + start_time = self.start_time + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + total_cost = self.total_cost + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_of_measure: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_of_measure, Unset): + unit_of_measure = self.unit_of_measure.to_dict() + + unit_rate = self.unit_rate + work_order_task_code = self.work_order_task_code + work_order_task_code_index = self.work_order_task_code_index + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comments is not UNSET: + field_dict["comments"] = comments + if cost_account is not UNSET: + field_dict["costAccount"] = cost_account + if cost_date is not UNSET: + field_dict["costDate"] = cost_date + if cost_factor is not UNSET: + field_dict["costFactor"] = cost_factor + if cost_item is not UNSET: + field_dict["costItem"] = cost_item + if disp_costing_cost_item is not UNSET: + field_dict["dispCostingCostItem"] = disp_costing_cost_item + if distribute_flag is not UNSET: + field_dict["distributeFlag"] = distribute_flag + if end_time is not UNSET: + field_dict["endTime"] = end_time + if fixed_rate is not UNSET: + field_dict["fixedRate"] = fixed_rate + if id is not UNSET: + field_dict["id"] = id + if quantity is not UNSET: + field_dict["quantity"] = quantity + if quantity_detail is not UNSET: + field_dict["quantityDetail"] = quantity_detail + if quantity_detail_list is not UNSET: + field_dict["quantityDetailList"] = quantity_detail_list + if related_asgn_nbr is not UNSET: + field_dict["relatedAsgnNbr"] = related_asgn_nbr + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if total_cost is not UNSET: + field_dict["totalCost"] = total_cost + if type is not UNSET: + field_dict["type"] = type + if unit_of_measure is not UNSET: + field_dict["unitOfMeasure"] = unit_of_measure + if unit_rate is not UNSET: + field_dict["unitRate"] = unit_rate + if work_order_task_code is not UNSET: + field_dict["workOrderTaskCode"] = work_order_task_code + if work_order_task_code_index is not UNSET: + field_dict["workOrderTaskCodeIndex"] = work_order_task_code_index + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.costing_quantity_model import CostingQuantityModel + from ..models.request_costing_model_array_cost_factor import RequestCostingModelArrayCostFactor + from ..models.request_costing_model_array_status import RequestCostingModelArrayStatus + from ..models.request_costing_model_array_type import RequestCostingModelArrayType + from ..models.request_costing_model_array_unit_of_measure import RequestCostingModelArrayUnitOfMeasure + + d = src_dict.copy() + comments = d.pop("comments", UNSET) + + cost_account = d.pop("costAccount", UNSET) + + _cost_date = d.pop("costDate", UNSET) + cost_date: Union[Unset, datetime.datetime] + if isinstance(_cost_date, Unset): + cost_date = UNSET + else: + cost_date = isoparse(_cost_date) + + _cost_factor = d.pop("costFactor", UNSET) + cost_factor: Union[Unset, RequestCostingModelArrayCostFactor] + if isinstance(_cost_factor, Unset): + cost_factor = UNSET + else: + cost_factor = RequestCostingModelArrayCostFactor.from_dict(_cost_factor) + + cost_item = d.pop("costItem", UNSET) + + disp_costing_cost_item = d.pop("dispCostingCostItem", UNSET) + + _distribute_flag = d.pop("distributeFlag", UNSET) + distribute_flag: Union[Unset, RequestCostingModelArrayDistributeFlag] + if isinstance(_distribute_flag, Unset): + distribute_flag = UNSET + else: + distribute_flag = RequestCostingModelArrayDistributeFlag(_distribute_flag) + + end_time = d.pop("endTime", UNSET) + + fixed_rate = d.pop("fixedRate", UNSET) + + id = d.pop("id", UNSET) + + quantity = d.pop("quantity", UNSET) + + quantity_detail = d.pop("quantityDetail", UNSET) + + _quantity_detail_list = d.pop("quantityDetailList", UNSET) + quantity_detail_list: Union[Unset, CostingQuantityModel] + if isinstance(_quantity_detail_list, Unset): + quantity_detail_list = UNSET + else: + quantity_detail_list = CostingQuantityModel.from_dict(_quantity_detail_list) + + related_asgn_nbr = d.pop("relatedAsgnNbr", UNSET) + + start_time = d.pop("startTime", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestCostingModelArrayStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestCostingModelArrayStatus.from_dict(_status) + + total_cost = d.pop("totalCost", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RequestCostingModelArrayType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RequestCostingModelArrayType.from_dict(_type) + + _unit_of_measure = d.pop("unitOfMeasure", UNSET) + unit_of_measure: Union[Unset, RequestCostingModelArrayUnitOfMeasure] + if isinstance(_unit_of_measure, Unset): + unit_of_measure = UNSET + else: + unit_of_measure = RequestCostingModelArrayUnitOfMeasure.from_dict(_unit_of_measure) + + unit_rate = d.pop("unitRate", UNSET) + + work_order_task_code = d.pop("workOrderTaskCode", UNSET) + + work_order_task_code_index = d.pop("workOrderTaskCodeIndex", UNSET) + + request_costing_model_array = cls( + comments=comments, + cost_account=cost_account, + cost_date=cost_date, + cost_factor=cost_factor, + cost_item=cost_item, + disp_costing_cost_item=disp_costing_cost_item, + distribute_flag=distribute_flag, + end_time=end_time, + fixed_rate=fixed_rate, + id=id, + quantity=quantity, + quantity_detail=quantity_detail, + quantity_detail_list=quantity_detail_list, + related_asgn_nbr=related_asgn_nbr, + start_time=start_time, + status=status, + total_cost=total_cost, + type=type, + unit_of_measure=unit_of_measure, + unit_rate=unit_rate, + work_order_task_code=work_order_task_code, + work_order_task_code_index=work_order_task_code_index, + ) + + request_costing_model_array.additional_properties = d + return request_costing_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array_cost_factor.py b/accelapy/accelapy/records_client/models/request_costing_model_array_cost_factor.py new file mode 100644 index 0000000..8681bd9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array_cost_factor.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCostingModelArrayCostFactor") + + +@_attrs_define +class RequestCostingModelArrayCostFactor: + """The cost factor. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_costing_model_array_cost_factor = cls( + text=text, + value=value, + ) + + request_costing_model_array_cost_factor.additional_properties = d + return request_costing_model_array_cost_factor + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array_distribute_flag.py b/accelapy/accelapy/records_client/models/request_costing_model_array_distribute_flag.py new file mode 100644 index 0000000..c21d906 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array_distribute_flag.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RequestCostingModelArrayDistributeFlag(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array_status.py b/accelapy/accelapy/records_client/models/request_costing_model_array_status.py new file mode 100644 index 0000000..c78cdd2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCostingModelArrayStatus") + + +@_attrs_define +class RequestCostingModelArrayStatus: + """The cost item status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_costing_model_array_status = cls( + text=text, + value=value, + ) + + request_costing_model_array_status.additional_properties = d + return request_costing_model_array_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array_type.py b/accelapy/accelapy/records_client/models/request_costing_model_array_type.py new file mode 100644 index 0000000..bfe20f7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCostingModelArrayType") + + +@_attrs_define +class RequestCostingModelArrayType: + """The cost item type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_costing_model_array_type = cls( + text=text, + value=value, + ) + + request_costing_model_array_type.additional_properties = d + return request_costing_model_array_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_costing_model_array_unit_of_measure.py b/accelapy/accelapy/records_client/models/request_costing_model_array_unit_of_measure.py new file mode 100644 index 0000000..34d5e77 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_costing_model_array_unit_of_measure.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCostingModelArrayUnitOfMeasure") + + +@_attrs_define +class RequestCostingModelArrayUnitOfMeasure: + """The cost item's unit of measure. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_costing_model_array_unit_of_measure = cls( + text=text, + value=value, + ) + + request_costing_model_array_unit_of_measure.additional_properties = d + return request_costing_model_array_unit_of_measure + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model.py b/accelapy/accelapy/records_client/models/request_create_record_model.py new file mode 100644 index 0000000..658a494 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model.py @@ -0,0 +1,952 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.request_create_record_model_created_by_cloning import RequestCreateRecordModelCreatedByCloning +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.request_create_record_model_construction_type import RequestCreateRecordModelConstructionType + from ..models.request_create_record_model_priority import RequestCreateRecordModelPriority + from ..models.request_create_record_model_reported_channel import RequestCreateRecordModelReportedChannel + from ..models.request_create_record_model_reported_type import RequestCreateRecordModelReportedType + from ..models.request_create_record_model_severity import RequestCreateRecordModelSeverity + from ..models.request_create_record_model_status import RequestCreateRecordModelStatus + from ..models.request_create_record_model_status_reason import RequestCreateRecordModelStatusReason + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="RequestCreateRecordModel") + + +@_attrs_define +class RequestCreateRecordModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + addresses (Union[Unset, List['RecordAddressModel']]): + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + condition_of_approvals (Union[Unset, List['CapConditionModel2']]): + conditions (Union[Unset, List['NoticeConditionModel']]): + construction_type (Union[Unset, RequestCreateRecordModelConstructionType]): The US Census Bureau construction + type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + contacts (Union[Unset, List['RecordContactSimpleModel']]): + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_by_cloning (Union[Unset, RequestCreateRecordModelCreatedByCloning]): Indictes whether or not the record + was cloned. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + custom_tables (Union[Unset, List['TableModel']]): + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + initiated_product (Union[Unset, str]): The product or app that created the record. If initiatedProduct is null + or not specified in the request, the default is "AV360" (Civic Platform application). + + Added in Civic Platform version: 9.2.0 + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + opened_date (Union[Unset, datetime.datetime]): The date the application was opened. + overall_application_time (Union[Unset, float]): The amount of elapsed time from the time tracking start date to + the completion of the application. + owners (Union[Unset, List['RefOwnerModel']]): + parcels (Union[Unset, List['ParcelModel1']]): + priority (Union[Unset, RequestCreateRecordModelPriority]): The priority level assigned to the record. See [Get + All Priorities](./api-settings.html#operation/v4.get.settings.priorities). + professionals (Union[Unset, List['LicenseProfessionalModel']]): + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RequestCreateRecordModelReportedChannel]): The incoming channel through which the + applicant submitted the application. + reported_type (Union[Unset, RequestCreateRecordModelReportedType]): The type of complaint or incident being + reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RequestCreateRecordModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RequestCreateRecordModelStatus]): The record status. + status_reason (Union[Unset, RequestCreateRecordModelStatusReason]): The reason for the status setting on the + record. + status_type (Union[Unset, List[str]]): The record status type. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + total_pay (Union[Unset, float]): The combination of work order assignments (labor) and costs. + tracking_id (Union[Unset, int]): The total amount of pay. + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + update_date (Union[Unset, datetime.datetime]): The last update date. + """ + + actual_production_unit: Union[Unset, float] = UNSET + addresses: Union[Unset, List["RecordAddressModel"]] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + condition_of_approvals: Union[Unset, List["CapConditionModel2"]] = UNSET + conditions: Union[Unset, List["NoticeConditionModel"]] = UNSET + construction_type: Union[Unset, "RequestCreateRecordModelConstructionType"] = UNSET + contacts: Union[Unset, List["RecordContactSimpleModel"]] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + created_by_cloning: Union[Unset, RequestCreateRecordModelCreatedByCloning] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + custom_id: Union[Unset, str] = UNSET + custom_tables: Union[Unset, List["TableModel"]] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + initiated_product: Union[Unset, str] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + opened_date: Union[Unset, datetime.datetime] = UNSET + overall_application_time: Union[Unset, float] = UNSET + owners: Union[Unset, List["RefOwnerModel"]] = UNSET + parcels: Union[Unset, List["ParcelModel1"]] = UNSET + priority: Union[Unset, "RequestCreateRecordModelPriority"] = UNSET + professionals: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RequestCreateRecordModelReportedChannel"] = UNSET + reported_type: Union[Unset, "RequestCreateRecordModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RequestCreateRecordModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RequestCreateRecordModelStatus"] = UNSET + status_reason: Union[Unset, "RequestCreateRecordModelStatusReason"] = UNSET + status_type: Union[Unset, List[str]] = UNSET + total_job_cost: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + update_date: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + addresses: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.addresses, Unset): + addresses = [] + for addresses_item_data in self.addresses: + addresses_item = addresses_item_data.to_dict() + + addresses.append(addresses_item) + + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + condition_of_approvals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.condition_of_approvals, Unset): + condition_of_approvals = [] + for condition_of_approvals_item_data in self.condition_of_approvals: + condition_of_approvals_item = condition_of_approvals_item_data.to_dict() + + condition_of_approvals.append(condition_of_approvals_item) + + conditions: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + + conditions.append(conditions_item) + + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + contacts: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.contacts, Unset): + contacts = [] + for contacts_item_data in self.contacts: + contacts_item = contacts_item_data.to_dict() + + contacts.append(contacts_item) + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + created_by_cloning: Union[Unset, str] = UNSET + if not isinstance(self.created_by_cloning, Unset): + created_by_cloning = self.created_by_cloning.value + + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + custom_id = self.custom_id + custom_tables: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_tables, Unset): + custom_tables = [] + for custom_tables_item_data in self.custom_tables: + custom_tables_item = custom_tables_item_data.to_dict() + + custom_tables.append(custom_tables_item) + + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + in_possession_time = self.in_possession_time + infraction = self.infraction + initiated_product = self.initiated_product + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + opened_date: Union[Unset, str] = UNSET + if not isinstance(self.opened_date, Unset): + opened_date = self.opened_date.isoformat() + + overall_application_time = self.overall_application_time + owners: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owners, Unset): + owners = [] + for owners_item_data in self.owners: + owners_item = owners_item_data.to_dict() + + owners.append(owners_item) + + parcels: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.parcels, Unset): + parcels = [] + for parcels_item_data in self.parcels: + parcels_item = parcels_item_data.to_dict() + + parcels.append(parcels_item) + + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + professionals: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.professionals, Unset): + professionals = [] + for professionals_item_data in self.professionals: + professionals_item = professionals_item_data.to_dict() + + professionals.append(professionals_item) + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + status_type: Union[Unset, List[str]] = UNSET + if not isinstance(self.status_type, Unset): + status_type = self.status_type + + total_job_cost = self.total_job_cost + total_pay = self.total_pay + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + update_date: Union[Unset, str] = UNSET + if not isinstance(self.update_date, Unset): + update_date = self.update_date.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if addresses is not UNSET: + field_dict["addresses"] = addresses + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if condition_of_approvals is not UNSET: + field_dict["conditionOfApprovals"] = condition_of_approvals + if conditions is not UNSET: + field_dict["conditions"] = conditions + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if contacts is not UNSET: + field_dict["contacts"] = contacts + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_by_cloning is not UNSET: + field_dict["createdByCloning"] = created_by_cloning + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if custom_tables is not UNSET: + field_dict["customTables"] = custom_tables + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if opened_date is not UNSET: + field_dict["openedDate"] = opened_date + if overall_application_time is not UNSET: + field_dict["overallApplicationTime"] = overall_application_time + if owners is not UNSET: + field_dict["owners"] = owners + if parcels is not UNSET: + field_dict["parcels"] = parcels + if priority is not UNSET: + field_dict["priority"] = priority + if professionals is not UNSET: + field_dict["professionals"] = professionals + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if status_type is not UNSET: + field_dict["statusType"] = status_type + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + if update_date is not UNSET: + field_dict["updateDate"] = update_date + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.cap_condition_model_2 import CapConditionModel2 + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.notice_condition_model import NoticeConditionModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_simple_model import RecordContactSimpleModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.request_create_record_model_construction_type import RequestCreateRecordModelConstructionType + from ..models.request_create_record_model_priority import RequestCreateRecordModelPriority + from ..models.request_create_record_model_reported_channel import RequestCreateRecordModelReportedChannel + from ..models.request_create_record_model_reported_type import RequestCreateRecordModelReportedType + from ..models.request_create_record_model_severity import RequestCreateRecordModelSeverity + from ..models.request_create_record_model_status import RequestCreateRecordModelStatus + from ..models.request_create_record_model_status_reason import RequestCreateRecordModelStatusReason + from ..models.table_model import TableModel + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + addresses = [] + _addresses = d.pop("addresses", UNSET) + for addresses_item_data in _addresses or []: + addresses_item = RecordAddressModel.from_dict(addresses_item_data) + + addresses.append(addresses_item) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + condition_of_approvals = [] + _condition_of_approvals = d.pop("conditionOfApprovals", UNSET) + for condition_of_approvals_item_data in _condition_of_approvals or []: + condition_of_approvals_item = CapConditionModel2.from_dict(condition_of_approvals_item_data) + + condition_of_approvals.append(condition_of_approvals_item) + + conditions = [] + _conditions = d.pop("conditions", UNSET) + for conditions_item_data in _conditions or []: + conditions_item = NoticeConditionModel.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RequestCreateRecordModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RequestCreateRecordModelConstructionType.from_dict(_construction_type) + + contacts = [] + _contacts = d.pop("contacts", UNSET) + for contacts_item_data in _contacts or []: + contacts_item = RecordContactSimpleModel.from_dict(contacts_item_data) + + contacts.append(contacts_item) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_by_cloning = d.pop("createdByCloning", UNSET) + created_by_cloning: Union[Unset, RequestCreateRecordModelCreatedByCloning] + if isinstance(_created_by_cloning, Unset): + created_by_cloning = UNSET + else: + created_by_cloning = RequestCreateRecordModelCreatedByCloning(_created_by_cloning) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + custom_id = d.pop("customId", UNSET) + + custom_tables = [] + _custom_tables = d.pop("customTables", UNSET) + for custom_tables_item_data in _custom_tables or []: + custom_tables_item = TableModel.from_dict(custom_tables_item_data) + + custom_tables.append(custom_tables_item) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _opened_date = d.pop("openedDate", UNSET) + opened_date: Union[Unset, datetime.datetime] + if isinstance(_opened_date, Unset): + opened_date = UNSET + else: + opened_date = isoparse(_opened_date) + + overall_application_time = d.pop("overallApplicationTime", UNSET) + + owners = [] + _owners = d.pop("owners", UNSET) + for owners_item_data in _owners or []: + owners_item = RefOwnerModel.from_dict(owners_item_data) + + owners.append(owners_item) + + parcels = [] + _parcels = d.pop("parcels", UNSET) + for parcels_item_data in _parcels or []: + parcels_item = ParcelModel1.from_dict(parcels_item_data) + + parcels.append(parcels_item) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestCreateRecordModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestCreateRecordModelPriority.from_dict(_priority) + + professionals = [] + _professionals = d.pop("professionals", UNSET) + for professionals_item_data in _professionals or []: + professionals_item = LicenseProfessionalModel.from_dict(professionals_item_data) + + professionals.append(professionals_item) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RequestCreateRecordModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RequestCreateRecordModelReportedChannel.from_dict(_reported_channel) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RequestCreateRecordModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RequestCreateRecordModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RequestCreateRecordModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RequestCreateRecordModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestCreateRecordModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestCreateRecordModelStatus.from_dict(_status) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RequestCreateRecordModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RequestCreateRecordModelStatusReason.from_dict(_status_reason) + + status_type = cast(List[str], d.pop("statusType", UNSET)) + + total_job_cost = d.pop("totalJobCost", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + _update_date = d.pop("updateDate", UNSET) + update_date: Union[Unset, datetime.datetime] + if isinstance(_update_date, Unset): + update_date = UNSET + else: + update_date = isoparse(_update_date) + + request_create_record_model = cls( + actual_production_unit=actual_production_unit, + addresses=addresses, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + condition_of_approvals=condition_of_approvals, + conditions=conditions, + construction_type=construction_type, + contacts=contacts, + cost_per_unit=cost_per_unit, + created_by=created_by, + created_by_cloning=created_by_cloning, + custom_forms=custom_forms, + custom_id=custom_id, + custom_tables=custom_tables, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + in_possession_time=in_possession_time, + infraction=infraction, + initiated_product=initiated_product, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + opened_date=opened_date, + overall_application_time=overall_application_time, + owners=owners, + parcels=parcels, + priority=priority, + professionals=professionals, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_reason=status_reason, + status_type=status_type, + total_job_cost=total_job_cost, + total_pay=total_pay, + tracking_id=tracking_id, + type=type, + undistributed_cost=undistributed_cost, + update_date=update_date, + ) + + request_create_record_model.additional_properties = d + return request_create_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_construction_type.py b/accelapy/accelapy/records_client/models/request_create_record_model_construction_type.py new file mode 100644 index 0000000..412b0cc --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelConstructionType") + + +@_attrs_define +class RequestCreateRecordModelConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_construction_type = cls( + text=text, + value=value, + ) + + request_create_record_model_construction_type.additional_properties = d + return request_create_record_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_created_by_cloning.py b/accelapy/accelapy/records_client/models/request_create_record_model_created_by_cloning.py new file mode 100644 index 0000000..9658cf1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_created_by_cloning.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RequestCreateRecordModelCreatedByCloning(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_priority.py b/accelapy/accelapy/records_client/models/request_create_record_model_priority.py new file mode 100644 index 0000000..c480f7a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelPriority") + + +@_attrs_define +class RequestCreateRecordModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_priority = cls( + text=text, + value=value, + ) + + request_create_record_model_priority.additional_properties = d + return request_create_record_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_reported_channel.py b/accelapy/accelapy/records_client/models/request_create_record_model_reported_channel.py new file mode 100644 index 0000000..2b90d6d --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelReportedChannel") + + +@_attrs_define +class RequestCreateRecordModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_reported_channel = cls( + text=text, + value=value, + ) + + request_create_record_model_reported_channel.additional_properties = d + return request_create_record_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_reported_type.py b/accelapy/accelapy/records_client/models/request_create_record_model_reported_type.py new file mode 100644 index 0000000..07df100 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelReportedType") + + +@_attrs_define +class RequestCreateRecordModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_reported_type = cls( + text=text, + value=value, + ) + + request_create_record_model_reported_type.additional_properties = d + return request_create_record_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_severity.py b/accelapy/accelapy/records_client/models/request_create_record_model_severity.py new file mode 100644 index 0000000..66de4ac --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelSeverity") + + +@_attrs_define +class RequestCreateRecordModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_severity = cls( + text=text, + value=value, + ) + + request_create_record_model_severity.additional_properties = d + return request_create_record_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_status.py b/accelapy/accelapy/records_client/models/request_create_record_model_status.py new file mode 100644 index 0000000..02b642c --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelStatus") + + +@_attrs_define +class RequestCreateRecordModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_status = cls( + text=text, + value=value, + ) + + request_create_record_model_status.additional_properties = d + return request_create_record_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_create_record_model_status_reason.py b/accelapy/accelapy/records_client/models/request_create_record_model_status_reason.py new file mode 100644 index 0000000..7786028 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_create_record_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestCreateRecordModelStatusReason") + + +@_attrs_define +class RequestCreateRecordModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_create_record_model_status_reason = cls( + text=text, + value=value, + ) + + request_create_record_model_status_reason.additional_properties = d + return request_create_record_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model.py b/accelapy/accelapy/records_client/models/request_record_address_model.py new file mode 100644 index 0000000..e13786d --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model.py @@ -0,0 +1,550 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.request_record_address_model_address_type_flag import RequestRecordAddressModelAddressTypeFlag + from ..models.request_record_address_model_country import RequestRecordAddressModelCountry + from ..models.request_record_address_model_direction import RequestRecordAddressModelDirection + from ..models.request_record_address_model_house_fraction_end import RequestRecordAddressModelHouseFractionEnd + from ..models.request_record_address_model_house_fraction_start import RequestRecordAddressModelHouseFractionStart + from ..models.request_record_address_model_state import RequestRecordAddressModelState + from ..models.request_record_address_model_status import RequestRecordAddressModelStatus + from ..models.request_record_address_model_street_suffix import RequestRecordAddressModelStreetSuffix + from ..models.request_record_address_model_street_suffix_direction import ( + RequestRecordAddressModelStreetSuffixDirection, + ) + from ..models.request_record_address_model_type import RequestRecordAddressModelType + from ..models.request_record_address_model_unit_type import RequestRecordAddressModelUnitType + + +T = TypeVar("T", bound="RequestRecordAddressModel") + + +@_attrs_define +class RequestRecordAddressModel: + """ + Attributes: + address_line_1 (Union[Unset, str]): The first line of the address. + address_line_2 (Union[Unset, str]): The first line of the address. + address_type_flag (Union[Unset, RequestRecordAddressModelAddressTypeFlag]): A code name or an abbreviation of + the address type. + city (Union[Unset, str]): The name of the city. + country (Union[Unset, RequestRecordAddressModelCountry]): The name of the country. See [Get All Address + Countries](./api-settings.html#operation/v4.get.settings.addresses.countries). + county (Union[Unset, str]): The name of the county. + cross_street_name_start (Union[Unset, str]): The beginning intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + cross_street_name_end (Union[Unset, str]): The ending intersecting street name for searching. + + Added in Civic Platform version: 9.2.0 + description (Union[Unset, str]): A description of the address. + direction (Union[Unset, RequestRecordAddressModelDirection]): The street direction of the primary address + associated with the application. + distance (Union[Unset, float]): The distance from another landmark used to locate the address. + house_alpha_start (Union[Unset, str]): The beginning alphabetic unit in street address. + house_alpha_end (Union[Unset, str]): The ending alphabetic unit in street address. + house_fraction_start (Union[Unset, RequestRecordAddressModelHouseFractionStart]): Beginning fraction value used + in combination with the Street number fields. + house_fraction_end (Union[Unset, RequestRecordAddressModelHouseFractionEnd]): Ending franction value used in + combination with the Street number fields. + inspection_district (Union[Unset, str]): The inspection district where the address is located. + inspection_district_prefix (Union[Unset, str]): The prefix for the inspection district where the address is + located. + is_primary (Union[Unset, str]): Indicates whether or not to designate the address as the primary address. Only + one address can be primary at any given time. + level_start (Union[Unset, str]): The starting level number (floor number) that makes up the address within a + complex. + level_end (Union[Unset, str]): The ending level number (floor number) that makes up the address within a + complex. + level_prefix (Union[Unset, str]): The prefix for the level numbers (floor numbers) that make up the address. + location_type (Union[Unset, str]): The type of location used for Right of Way Management. The valid values are + configured with the LOCATION_TYPE standard choice in Civic Platform Administration. + + Added in Civic Platform version: 9.2.0 + neighborhood (Union[Unset, str]): The neighborhood where the address is located. + neighborhood_prefix (Union[Unset, str]): The prefix for neighborhood where the address is located. + postal_code (Union[Unset, str]): The postal ZIP code for the address. + secondary_street (Union[Unset, str]): This field (along with the Secondary Road Number field) displays an extra + description for the location when two roads that cross or a street with two names makes up the address of the + location. + secondary_street_number (Union[Unset, float]): This field (along with the Secondary Road field) displays an + extra description for the location when two roads that cross or a street with two names makes up the address of + the location. + state (Union[Unset, RequestRecordAddressModelState]): The name of the state. + status (Union[Unset, RequestRecordAddressModelStatus]): The address status indicating whether the address is + active or inactive. + street_address (Union[Unset, str]): The street address. + street_end (Union[Unset, float]): The ending number of a street address range. + street_name (Union[Unset, str]): The name of the street. + street_name_start (Union[Unset, str]): The beginning street name for searching. + + Added in Civic Platform version: 9.2.0 + street_name_end (Union[Unset, str]): The ending street name for searching. + + Added in Civic Platform version: 9.2.0 + street_prefix (Union[Unset, str]): Any part of an address that appears before a street name or number. For + example, if the address is 123 West Main, "West" is the street prefix. + street_start (Union[Unset, float]): The starting number of a street address range. + street_suffix (Union[Unset, RequestRecordAddressModelStreetSuffix]): The type of street such as "Lane" or + "Boulevard". + street_suffix_direction (Union[Unset, RequestRecordAddressModelStreetSuffixDirection]): The direction appended + to the street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street suffix direction. + type (Union[Unset, RequestRecordAddressModelType]): The address type. + unit_start (Union[Unset, str]): The starting value of a range of unit numbers. + unit_end (Union[Unset, str]): The ending value of a range of unit numbers. + unit_type (Union[Unset, RequestRecordAddressModelUnitType]): The unit type designation of the address. + x_coordinate (Union[Unset, float]): The longitudinal coordinate for this address. + y_coordinate (Union[Unset, float]): The latitudinal coordinate for this address. + """ + + address_line_1: Union[Unset, str] = UNSET + address_line_2: Union[Unset, str] = UNSET + address_type_flag: Union[Unset, "RequestRecordAddressModelAddressTypeFlag"] = UNSET + city: Union[Unset, str] = UNSET + country: Union[Unset, "RequestRecordAddressModelCountry"] = UNSET + county: Union[Unset, str] = UNSET + cross_street_name_start: Union[Unset, str] = UNSET + cross_street_name_end: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + direction: Union[Unset, "RequestRecordAddressModelDirection"] = UNSET + distance: Union[Unset, float] = UNSET + house_alpha_start: Union[Unset, str] = UNSET + house_alpha_end: Union[Unset, str] = UNSET + house_fraction_start: Union[Unset, "RequestRecordAddressModelHouseFractionStart"] = UNSET + house_fraction_end: Union[Unset, "RequestRecordAddressModelHouseFractionEnd"] = UNSET + inspection_district: Union[Unset, str] = UNSET + inspection_district_prefix: Union[Unset, str] = UNSET + is_primary: Union[Unset, str] = UNSET + level_start: Union[Unset, str] = UNSET + level_end: Union[Unset, str] = UNSET + level_prefix: Union[Unset, str] = UNSET + location_type: Union[Unset, str] = UNSET + neighborhood: Union[Unset, str] = UNSET + neighborhood_prefix: Union[Unset, str] = UNSET + postal_code: Union[Unset, str] = UNSET + secondary_street: Union[Unset, str] = UNSET + secondary_street_number: Union[Unset, float] = UNSET + state: Union[Unset, "RequestRecordAddressModelState"] = UNSET + status: Union[Unset, "RequestRecordAddressModelStatus"] = UNSET + street_address: Union[Unset, str] = UNSET + street_end: Union[Unset, float] = UNSET + street_name: Union[Unset, str] = UNSET + street_name_start: Union[Unset, str] = UNSET + street_name_end: Union[Unset, str] = UNSET + street_prefix: Union[Unset, str] = UNSET + street_start: Union[Unset, float] = UNSET + street_suffix: Union[Unset, "RequestRecordAddressModelStreetSuffix"] = UNSET + street_suffix_direction: Union[Unset, "RequestRecordAddressModelStreetSuffixDirection"] = UNSET + type: Union[Unset, "RequestRecordAddressModelType"] = UNSET + unit_start: Union[Unset, str] = UNSET + unit_end: Union[Unset, str] = UNSET + unit_type: Union[Unset, "RequestRecordAddressModelUnitType"] = UNSET + x_coordinate: Union[Unset, float] = UNSET + y_coordinate: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address_line_1 = self.address_line_1 + address_line_2 = self.address_line_2 + address_type_flag: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.address_type_flag, Unset): + address_type_flag = self.address_type_flag.to_dict() + + city = self.city + country: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.country, Unset): + country = self.country.to_dict() + + county = self.county + cross_street_name_start = self.cross_street_name_start + cross_street_name_end = self.cross_street_name_end + description = self.description + direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.direction, Unset): + direction = self.direction.to_dict() + + distance = self.distance + house_alpha_start = self.house_alpha_start + house_alpha_end = self.house_alpha_end + house_fraction_start: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_start, Unset): + house_fraction_start = self.house_fraction_start.to_dict() + + house_fraction_end: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.house_fraction_end, Unset): + house_fraction_end = self.house_fraction_end.to_dict() + + inspection_district = self.inspection_district + inspection_district_prefix = self.inspection_district_prefix + is_primary = self.is_primary + level_start = self.level_start + level_end = self.level_end + level_prefix = self.level_prefix + location_type = self.location_type + neighborhood = self.neighborhood + neighborhood_prefix = self.neighborhood_prefix + postal_code = self.postal_code + secondary_street = self.secondary_street + secondary_street_number = self.secondary_street_number + state: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + street_address = self.street_address + street_end = self.street_end + street_name = self.street_name + street_name_start = self.street_name_start + street_name_end = self.street_name_end + street_prefix = self.street_prefix + street_start = self.street_start + street_suffix: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix, Unset): + street_suffix = self.street_suffix.to_dict() + + street_suffix_direction: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.street_suffix_direction, Unset): + street_suffix_direction = self.street_suffix_direction.to_dict() + + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + unit_start = self.unit_start + unit_end = self.unit_end + unit_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.unit_type, Unset): + unit_type = self.unit_type.to_dict() + + x_coordinate = self.x_coordinate + y_coordinate = self.y_coordinate + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line_1 is not UNSET: + field_dict["addressLine1"] = address_line_1 + if address_line_2 is not UNSET: + field_dict["addressLine2"] = address_line_2 + if address_type_flag is not UNSET: + field_dict["addressTypeFlag"] = address_type_flag + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if county is not UNSET: + field_dict["county"] = county + if cross_street_name_start is not UNSET: + field_dict["crossStreetNameStart"] = cross_street_name_start + if cross_street_name_end is not UNSET: + field_dict["crossStreetNameEnd"] = cross_street_name_end + if description is not UNSET: + field_dict["description"] = description + if direction is not UNSET: + field_dict["direction"] = direction + if distance is not UNSET: + field_dict["distance"] = distance + if house_alpha_start is not UNSET: + field_dict["houseAlphaStart"] = house_alpha_start + if house_alpha_end is not UNSET: + field_dict["houseAlphaEnd"] = house_alpha_end + if house_fraction_start is not UNSET: + field_dict["houseFractionStart"] = house_fraction_start + if house_fraction_end is not UNSET: + field_dict["houseFractionEnd"] = house_fraction_end + if inspection_district is not UNSET: + field_dict["inspectionDistrict"] = inspection_district + if inspection_district_prefix is not UNSET: + field_dict["inspectionDistrictPrefix"] = inspection_district_prefix + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if level_start is not UNSET: + field_dict["levelStart"] = level_start + if level_end is not UNSET: + field_dict["levelEnd"] = level_end + if level_prefix is not UNSET: + field_dict["levelPrefix"] = level_prefix + if location_type is not UNSET: + field_dict["locationType"] = location_type + if neighborhood is not UNSET: + field_dict["neighborhood"] = neighborhood + if neighborhood_prefix is not UNSET: + field_dict["neighborhoodPrefix"] = neighborhood_prefix + if postal_code is not UNSET: + field_dict["postalCode"] = postal_code + if secondary_street is not UNSET: + field_dict["secondaryStreet"] = secondary_street + if secondary_street_number is not UNSET: + field_dict["secondaryStreetNumber"] = secondary_street_number + if state is not UNSET: + field_dict["state"] = state + if status is not UNSET: + field_dict["status"] = status + if street_address is not UNSET: + field_dict["streetAddress"] = street_address + if street_end is not UNSET: + field_dict["streetEnd"] = street_end + if street_name is not UNSET: + field_dict["streetName"] = street_name + if street_name_start is not UNSET: + field_dict["streetNameStart"] = street_name_start + if street_name_end is not UNSET: + field_dict["streetNameEnd"] = street_name_end + if street_prefix is not UNSET: + field_dict["streetPrefix"] = street_prefix + if street_start is not UNSET: + field_dict["streetStart"] = street_start + if street_suffix is not UNSET: + field_dict["streetSuffix"] = street_suffix + if street_suffix_direction is not UNSET: + field_dict["streetSuffixDirection"] = street_suffix_direction + if type is not UNSET: + field_dict["type"] = type + if unit_start is not UNSET: + field_dict["unitStart"] = unit_start + if unit_end is not UNSET: + field_dict["unitEnd"] = unit_end + if unit_type is not UNSET: + field_dict["unitType"] = unit_type + if x_coordinate is not UNSET: + field_dict["xCoordinate"] = x_coordinate + if y_coordinate is not UNSET: + field_dict["yCoordinate"] = y_coordinate + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.request_record_address_model_address_type_flag import RequestRecordAddressModelAddressTypeFlag + from ..models.request_record_address_model_country import RequestRecordAddressModelCountry + from ..models.request_record_address_model_direction import RequestRecordAddressModelDirection + from ..models.request_record_address_model_house_fraction_end import RequestRecordAddressModelHouseFractionEnd + from ..models.request_record_address_model_house_fraction_start import ( + RequestRecordAddressModelHouseFractionStart, + ) + from ..models.request_record_address_model_state import RequestRecordAddressModelState + from ..models.request_record_address_model_status import RequestRecordAddressModelStatus + from ..models.request_record_address_model_street_suffix import RequestRecordAddressModelStreetSuffix + from ..models.request_record_address_model_street_suffix_direction import ( + RequestRecordAddressModelStreetSuffixDirection, + ) + from ..models.request_record_address_model_type import RequestRecordAddressModelType + from ..models.request_record_address_model_unit_type import RequestRecordAddressModelUnitType + + d = src_dict.copy() + address_line_1 = d.pop("addressLine1", UNSET) + + address_line_2 = d.pop("addressLine2", UNSET) + + _address_type_flag = d.pop("addressTypeFlag", UNSET) + address_type_flag: Union[Unset, RequestRecordAddressModelAddressTypeFlag] + if isinstance(_address_type_flag, Unset): + address_type_flag = UNSET + else: + address_type_flag = RequestRecordAddressModelAddressTypeFlag.from_dict(_address_type_flag) + + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, RequestRecordAddressModelCountry] + if isinstance(_country, Unset): + country = UNSET + else: + country = RequestRecordAddressModelCountry.from_dict(_country) + + county = d.pop("county", UNSET) + + cross_street_name_start = d.pop("crossStreetNameStart", UNSET) + + cross_street_name_end = d.pop("crossStreetNameEnd", UNSET) + + description = d.pop("description", UNSET) + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, RequestRecordAddressModelDirection] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = RequestRecordAddressModelDirection.from_dict(_direction) + + distance = d.pop("distance", UNSET) + + house_alpha_start = d.pop("houseAlphaStart", UNSET) + + house_alpha_end = d.pop("houseAlphaEnd", UNSET) + + _house_fraction_start = d.pop("houseFractionStart", UNSET) + house_fraction_start: Union[Unset, RequestRecordAddressModelHouseFractionStart] + if isinstance(_house_fraction_start, Unset): + house_fraction_start = UNSET + else: + house_fraction_start = RequestRecordAddressModelHouseFractionStart.from_dict(_house_fraction_start) + + _house_fraction_end = d.pop("houseFractionEnd", UNSET) + house_fraction_end: Union[Unset, RequestRecordAddressModelHouseFractionEnd] + if isinstance(_house_fraction_end, Unset): + house_fraction_end = UNSET + else: + house_fraction_end = RequestRecordAddressModelHouseFractionEnd.from_dict(_house_fraction_end) + + inspection_district = d.pop("inspectionDistrict", UNSET) + + inspection_district_prefix = d.pop("inspectionDistrictPrefix", UNSET) + + is_primary = d.pop("isPrimary", UNSET) + + level_start = d.pop("levelStart", UNSET) + + level_end = d.pop("levelEnd", UNSET) + + level_prefix = d.pop("levelPrefix", UNSET) + + location_type = d.pop("locationType", UNSET) + + neighborhood = d.pop("neighborhood", UNSET) + + neighborhood_prefix = d.pop("neighborhoodPrefix", UNSET) + + postal_code = d.pop("postalCode", UNSET) + + secondary_street = d.pop("secondaryStreet", UNSET) + + secondary_street_number = d.pop("secondaryStreetNumber", UNSET) + + _state = d.pop("state", UNSET) + state: Union[Unset, RequestRecordAddressModelState] + if isinstance(_state, Unset): + state = UNSET + else: + state = RequestRecordAddressModelState.from_dict(_state) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestRecordAddressModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestRecordAddressModelStatus.from_dict(_status) + + street_address = d.pop("streetAddress", UNSET) + + street_end = d.pop("streetEnd", UNSET) + + street_name = d.pop("streetName", UNSET) + + street_name_start = d.pop("streetNameStart", UNSET) + + street_name_end = d.pop("streetNameEnd", UNSET) + + street_prefix = d.pop("streetPrefix", UNSET) + + street_start = d.pop("streetStart", UNSET) + + _street_suffix = d.pop("streetSuffix", UNSET) + street_suffix: Union[Unset, RequestRecordAddressModelStreetSuffix] + if isinstance(_street_suffix, Unset): + street_suffix = UNSET + else: + street_suffix = RequestRecordAddressModelStreetSuffix.from_dict(_street_suffix) + + _street_suffix_direction = d.pop("streetSuffixDirection", UNSET) + street_suffix_direction: Union[Unset, RequestRecordAddressModelStreetSuffixDirection] + if isinstance(_street_suffix_direction, Unset): + street_suffix_direction = UNSET + else: + street_suffix_direction = RequestRecordAddressModelStreetSuffixDirection.from_dict(_street_suffix_direction) + + _type = d.pop("type", UNSET) + type: Union[Unset, RequestRecordAddressModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RequestRecordAddressModelType.from_dict(_type) + + unit_start = d.pop("unitStart", UNSET) + + unit_end = d.pop("unitEnd", UNSET) + + _unit_type = d.pop("unitType", UNSET) + unit_type: Union[Unset, RequestRecordAddressModelUnitType] + if isinstance(_unit_type, Unset): + unit_type = UNSET + else: + unit_type = RequestRecordAddressModelUnitType.from_dict(_unit_type) + + x_coordinate = d.pop("xCoordinate", UNSET) + + y_coordinate = d.pop("yCoordinate", UNSET) + + request_record_address_model = cls( + address_line_1=address_line_1, + address_line_2=address_line_2, + address_type_flag=address_type_flag, + city=city, + country=country, + county=county, + cross_street_name_start=cross_street_name_start, + cross_street_name_end=cross_street_name_end, + description=description, + direction=direction, + distance=distance, + house_alpha_start=house_alpha_start, + house_alpha_end=house_alpha_end, + house_fraction_start=house_fraction_start, + house_fraction_end=house_fraction_end, + inspection_district=inspection_district, + inspection_district_prefix=inspection_district_prefix, + is_primary=is_primary, + level_start=level_start, + level_end=level_end, + level_prefix=level_prefix, + location_type=location_type, + neighborhood=neighborhood, + neighborhood_prefix=neighborhood_prefix, + postal_code=postal_code, + secondary_street=secondary_street, + secondary_street_number=secondary_street_number, + state=state, + status=status, + street_address=street_address, + street_end=street_end, + street_name=street_name, + street_name_start=street_name_start, + street_name_end=street_name_end, + street_prefix=street_prefix, + street_start=street_start, + street_suffix=street_suffix, + street_suffix_direction=street_suffix_direction, + type=type, + unit_start=unit_start, + unit_end=unit_end, + unit_type=unit_type, + x_coordinate=x_coordinate, + y_coordinate=y_coordinate, + ) + + request_record_address_model.additional_properties = d + return request_record_address_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_address_type_flag.py b/accelapy/accelapy/records_client/models/request_record_address_model_address_type_flag.py new file mode 100644 index 0000000..8d3d5e5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_address_type_flag.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelAddressTypeFlag") + + +@_attrs_define +class RequestRecordAddressModelAddressTypeFlag: + """A code name or an abbreviation of the address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_address_type_flag = cls( + text=text, + value=value, + ) + + request_record_address_model_address_type_flag.additional_properties = d + return request_record_address_model_address_type_flag + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_country.py b/accelapy/accelapy/records_client/models/request_record_address_model_country.py new file mode 100644 index 0000000..90cb70a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_country.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelCountry") + + +@_attrs_define +class RequestRecordAddressModelCountry: + """The name of the country. See [Get All Address Countries](./api- + settings.html#operation/v4.get.settings.addresses.countries). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_country = cls( + text=text, + value=value, + ) + + request_record_address_model_country.additional_properties = d + return request_record_address_model_country + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_direction.py b/accelapy/accelapy/records_client/models/request_record_address_model_direction.py new file mode 100644 index 0000000..463163a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_direction.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelDirection") + + +@_attrs_define +class RequestRecordAddressModelDirection: + """The street direction of the primary address associated with the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_direction = cls( + text=text, + value=value, + ) + + request_record_address_model_direction.additional_properties = d + return request_record_address_model_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_end.py b/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_end.py new file mode 100644 index 0000000..6abfac8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_end.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelHouseFractionEnd") + + +@_attrs_define +class RequestRecordAddressModelHouseFractionEnd: + """Ending franction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_house_fraction_end = cls( + text=text, + value=value, + ) + + request_record_address_model_house_fraction_end.additional_properties = d + return request_record_address_model_house_fraction_end + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_start.py b/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_start.py new file mode 100644 index 0000000..12e610e --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_house_fraction_start.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelHouseFractionStart") + + +@_attrs_define +class RequestRecordAddressModelHouseFractionStart: + """Beginning fraction value used in combination with the Street number fields. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_house_fraction_start = cls( + text=text, + value=value, + ) + + request_record_address_model_house_fraction_start.additional_properties = d + return request_record_address_model_house_fraction_start + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_state.py b/accelapy/accelapy/records_client/models/request_record_address_model_state.py new file mode 100644 index 0000000..99e864f --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_state.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelState") + + +@_attrs_define +class RequestRecordAddressModelState: + """The name of the state. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_state = cls( + text=text, + value=value, + ) + + request_record_address_model_state.additional_properties = d + return request_record_address_model_state + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_status.py b/accelapy/accelapy/records_client/models/request_record_address_model_status.py new file mode 100644 index 0000000..61ec495 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelStatus") + + +@_attrs_define +class RequestRecordAddressModelStatus: + """The address status indicating whether the address is active or inactive. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_status = cls( + text=text, + value=value, + ) + + request_record_address_model_status.additional_properties = d + return request_record_address_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix.py b/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix.py new file mode 100644 index 0000000..f6d989c --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelStreetSuffix") + + +@_attrs_define +class RequestRecordAddressModelStreetSuffix: + """The type of street such as "Lane" or "Boulevard". + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_street_suffix = cls( + text=text, + value=value, + ) + + request_record_address_model_street_suffix.additional_properties = d + return request_record_address_model_street_suffix + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix_direction.py b/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix_direction.py new file mode 100644 index 0000000..fe4bf56 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_street_suffix_direction.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelStreetSuffixDirection") + + +@_attrs_define +class RequestRecordAddressModelStreetSuffixDirection: + """The direction appended to the street suffix. For example, if the address is 500 56th Avenue NW, "NW" is the street + suffix direction. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_street_suffix_direction = cls( + text=text, + value=value, + ) + + request_record_address_model_street_suffix_direction.additional_properties = d + return request_record_address_model_street_suffix_direction + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_type.py b/accelapy/accelapy/records_client/models/request_record_address_model_type.py new file mode 100644 index 0000000..c588e4f --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelType") + + +@_attrs_define +class RequestRecordAddressModelType: + """The address type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_type = cls( + text=text, + value=value, + ) + + request_record_address_model_type.additional_properties = d + return request_record_address_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_address_model_unit_type.py b/accelapy/accelapy/records_client/models/request_record_address_model_unit_type.py new file mode 100644 index 0000000..da482ad --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_address_model_unit_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordAddressModelUnitType") + + +@_attrs_define +class RequestRecordAddressModelUnitType: + """The unit type designation of the address. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_address_model_unit_type = cls( + text=text, + value=value, + ) + + request_record_address_model_unit_type.additional_properties = d + return request_record_address_model_unit_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model.py b/accelapy/accelapy/records_client/models/request_record_condition_model.py new file mode 100644 index 0000000..16659c2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model.py @@ -0,0 +1,490 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.request_record_condition_model_actionby_department import ( + RequestRecordConditionModelActionbyDepartment, + ) + from ..models.request_record_condition_model_actionby_user import RequestRecordConditionModelActionbyUser + from ..models.request_record_condition_model_active_status import RequestRecordConditionModelActiveStatus + from ..models.request_record_condition_model_appliedby_department import ( + RequestRecordConditionModelAppliedbyDepartment, + ) + from ..models.request_record_condition_model_appliedby_user import RequestRecordConditionModelAppliedbyUser + from ..models.request_record_condition_model_group import RequestRecordConditionModelGroup + from ..models.request_record_condition_model_inheritable import RequestRecordConditionModelInheritable + from ..models.request_record_condition_model_priority import RequestRecordConditionModelPriority + from ..models.request_record_condition_model_severity import RequestRecordConditionModelSeverity + from ..models.request_record_condition_model_status import RequestRecordConditionModelStatus + from ..models.request_record_condition_model_type import RequestRecordConditionModelType + + +T = TypeVar("T", bound="RequestRecordConditionModel") + + +@_attrs_define +class RequestRecordConditionModel: + """ + Attributes: + actionby_department (Union[Unset, RequestRecordConditionModelActionbyDepartment]): The department responsible + for the action. + actionby_user (Union[Unset, RequestRecordConditionModelActionbyUser]): The individual responsible for the + action. + active_status (Union[Unset, RequestRecordConditionModelActiveStatus]): Indicates whether or not the condition is + active. + additional_information (Union[Unset, str]): An unlimited text field to use if other fields are filled. + additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + applied_date (Union[Unset, datetime.datetime]): The date the standard condition was applied. + appliedby_department (Union[Unset, RequestRecordConditionModelAppliedbyDepartment]): The department responsible + for applying a condition. + appliedby_user (Union[Unset, RequestRecordConditionModelAppliedbyUser]): The staff member responsible for + applying a condition. + condition_number (Union[Unset, int]): The condition sequence number. + disp_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + display_notice_in_agency (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Automation when a condition to a record or parcel is applied. + display_notice_in_citizens (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access when a condition to a record or parcel is applied. + display_notice_in_citizens_fee (Union[Unset, bool]): Indicates whether or not to display the condition notice in + Accela Citizen Access Fee Estimate page when a condition to a record or parcel is applied. + display_order (Union[Unset, int]): The display order of the condition in a list. + effective_date (Union[Unset, datetime.datetime]): The date when you want the condition to become effective. + expiration_date (Union[Unset, datetime.datetime]): The date when the condition expires. + group (Union[Unset, RequestRecordConditionModelGroup]): The condition group is an attribute of a condition that + organizes condition types. Your agency defines these groups. + inheritable (Union[Unset, RequestRecordConditionModelInheritable]): This defines whether or not Accela + Automation checks for inheritable conditions when a user associates a child record with a parent record. + is_include_name_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition name in the + notice. + is_include_short_comments_in_notice (Union[Unset, bool]): Indicates whether or not to display the condition + comments in the notice. + long_comments (Union[Unset, str]): Narrative comments to help identify the purpose or uses of the standard + condition. + name (Union[Unset, str]): The name of the standard condition. + priority (Union[Unset, RequestRecordConditionModelPriority]): The priority level assigned to the condition. + public_display_message (Union[Unset, str]): Text entered into this field displays in the condition notice or + condition status bar for the Condition Name for the public user in Accela IVR (AIVR) and Accela Citizen Access + (ACA). + res_additional_information_plain_text (Union[Unset, str]): An unlimited text field to use if other fields are + filled. + resolution_action (Union[Unset, str]): he action performed in response to a condition. + service_provider_code (Union[Unset, str]): The unique agency identifier. + severity (Union[Unset, RequestRecordConditionModelSeverity]): The severity of the condition. + short_comments (Union[Unset, str]): A brief description of the condition name. For example, the text may + describe the situation that requires the system to apply the condition. You can set these short comments to + display when a user accesses an application with this condition applied to it + status (Union[Unset, RequestRecordConditionModelStatus]): The condition status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_type (Union[Unset, str]): The status type for a standard condition or an approval condition, applied or + not applied for example. + type (Union[Unset, RequestRecordConditionModelType]): The condition type. + """ + + actionby_department: Union[Unset, "RequestRecordConditionModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "RequestRecordConditionModelActionbyUser"] = UNSET + active_status: Union[Unset, "RequestRecordConditionModelActiveStatus"] = UNSET + additional_information: Union[Unset, str] = UNSET + additional_information_plain_text: Union[Unset, str] = UNSET + applied_date: Union[Unset, datetime.datetime] = UNSET + appliedby_department: Union[Unset, "RequestRecordConditionModelAppliedbyDepartment"] = UNSET + appliedby_user: Union[Unset, "RequestRecordConditionModelAppliedbyUser"] = UNSET + condition_number: Union[Unset, int] = UNSET + disp_additional_information_plain_text: Union[Unset, str] = UNSET + display_notice_in_agency: Union[Unset, bool] = UNSET + display_notice_in_citizens: Union[Unset, bool] = UNSET + display_notice_in_citizens_fee: Union[Unset, bool] = UNSET + display_order: Union[Unset, int] = UNSET + effective_date: Union[Unset, datetime.datetime] = UNSET + expiration_date: Union[Unset, datetime.datetime] = UNSET + group: Union[Unset, "RequestRecordConditionModelGroup"] = UNSET + inheritable: Union[Unset, "RequestRecordConditionModelInheritable"] = UNSET + is_include_name_in_notice: Union[Unset, bool] = UNSET + is_include_short_comments_in_notice: Union[Unset, bool] = UNSET + long_comments: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + priority: Union[Unset, "RequestRecordConditionModelPriority"] = UNSET + public_display_message: Union[Unset, str] = UNSET + res_additional_information_plain_text: Union[Unset, str] = UNSET + resolution_action: Union[Unset, str] = UNSET + service_provider_code: Union[Unset, str] = UNSET + severity: Union[Unset, "RequestRecordConditionModelSeverity"] = UNSET + short_comments: Union[Unset, str] = UNSET + status: Union[Unset, "RequestRecordConditionModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_type: Union[Unset, str] = UNSET + type: Union[Unset, "RequestRecordConditionModelType"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + active_status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.active_status, Unset): + active_status = self.active_status.to_dict() + + additional_information = self.additional_information + additional_information_plain_text = self.additional_information_plain_text + applied_date: Union[Unset, str] = UNSET + if not isinstance(self.applied_date, Unset): + applied_date = self.applied_date.isoformat() + + appliedby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_department, Unset): + appliedby_department = self.appliedby_department.to_dict() + + appliedby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.appliedby_user, Unset): + appliedby_user = self.appliedby_user.to_dict() + + condition_number = self.condition_number + disp_additional_information_plain_text = self.disp_additional_information_plain_text + display_notice_in_agency = self.display_notice_in_agency + display_notice_in_citizens = self.display_notice_in_citizens + display_notice_in_citizens_fee = self.display_notice_in_citizens_fee + display_order = self.display_order + effective_date: Union[Unset, str] = UNSET + if not isinstance(self.effective_date, Unset): + effective_date = self.effective_date.isoformat() + + expiration_date: Union[Unset, str] = UNSET + if not isinstance(self.expiration_date, Unset): + expiration_date = self.expiration_date.isoformat() + + group: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.group, Unset): + group = self.group.to_dict() + + inheritable: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.inheritable, Unset): + inheritable = self.inheritable.to_dict() + + is_include_name_in_notice = self.is_include_name_in_notice + is_include_short_comments_in_notice = self.is_include_short_comments_in_notice + long_comments = self.long_comments + name = self.name + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_display_message = self.public_display_message + res_additional_information_plain_text = self.res_additional_information_plain_text + resolution_action = self.resolution_action + service_provider_code = self.service_provider_code + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_comments = self.short_comments + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_type = self.status_type + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if active_status is not UNSET: + field_dict["activeStatus"] = active_status + if additional_information is not UNSET: + field_dict["additionalInformation"] = additional_information + if additional_information_plain_text is not UNSET: + field_dict["additionalInformationPlainText"] = additional_information_plain_text + if applied_date is not UNSET: + field_dict["appliedDate"] = applied_date + if appliedby_department is not UNSET: + field_dict["appliedbyDepartment"] = appliedby_department + if appliedby_user is not UNSET: + field_dict["appliedbyUser"] = appliedby_user + if condition_number is not UNSET: + field_dict["conditionNumber"] = condition_number + if disp_additional_information_plain_text is not UNSET: + field_dict["dispAdditionalInformationPlainText"] = disp_additional_information_plain_text + if display_notice_in_agency is not UNSET: + field_dict["displayNoticeInAgency"] = display_notice_in_agency + if display_notice_in_citizens is not UNSET: + field_dict["displayNoticeInCitizens"] = display_notice_in_citizens + if display_notice_in_citizens_fee is not UNSET: + field_dict["displayNoticeInCitizensFee"] = display_notice_in_citizens_fee + if display_order is not UNSET: + field_dict["displayOrder"] = display_order + if effective_date is not UNSET: + field_dict["effectiveDate"] = effective_date + if expiration_date is not UNSET: + field_dict["expirationDate"] = expiration_date + if group is not UNSET: + field_dict["group"] = group + if inheritable is not UNSET: + field_dict["inheritable"] = inheritable + if is_include_name_in_notice is not UNSET: + field_dict["isIncludeNameInNotice"] = is_include_name_in_notice + if is_include_short_comments_in_notice is not UNSET: + field_dict["isIncludeShortCommentsInNotice"] = is_include_short_comments_in_notice + if long_comments is not UNSET: + field_dict["longComments"] = long_comments + if name is not UNSET: + field_dict["name"] = name + if priority is not UNSET: + field_dict["priority"] = priority + if public_display_message is not UNSET: + field_dict["publicDisplayMessage"] = public_display_message + if res_additional_information_plain_text is not UNSET: + field_dict["resAdditionalInformationPlainText"] = res_additional_information_plain_text + if resolution_action is not UNSET: + field_dict["resolutionAction"] = resolution_action + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if severity is not UNSET: + field_dict["severity"] = severity + if short_comments is not UNSET: + field_dict["shortComments"] = short_comments + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_type is not UNSET: + field_dict["statusType"] = status_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.request_record_condition_model_actionby_department import ( + RequestRecordConditionModelActionbyDepartment, + ) + from ..models.request_record_condition_model_actionby_user import RequestRecordConditionModelActionbyUser + from ..models.request_record_condition_model_active_status import RequestRecordConditionModelActiveStatus + from ..models.request_record_condition_model_appliedby_department import ( + RequestRecordConditionModelAppliedbyDepartment, + ) + from ..models.request_record_condition_model_appliedby_user import RequestRecordConditionModelAppliedbyUser + from ..models.request_record_condition_model_group import RequestRecordConditionModelGroup + from ..models.request_record_condition_model_inheritable import RequestRecordConditionModelInheritable + from ..models.request_record_condition_model_priority import RequestRecordConditionModelPriority + from ..models.request_record_condition_model_severity import RequestRecordConditionModelSeverity + from ..models.request_record_condition_model_status import RequestRecordConditionModelStatus + from ..models.request_record_condition_model_type import RequestRecordConditionModelType + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, RequestRecordConditionModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = RequestRecordConditionModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, RequestRecordConditionModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = RequestRecordConditionModelActionbyUser.from_dict(_actionby_user) + + _active_status = d.pop("activeStatus", UNSET) + active_status: Union[Unset, RequestRecordConditionModelActiveStatus] + if isinstance(_active_status, Unset): + active_status = UNSET + else: + active_status = RequestRecordConditionModelActiveStatus.from_dict(_active_status) + + additional_information = d.pop("additionalInformation", UNSET) + + additional_information_plain_text = d.pop("additionalInformationPlainText", UNSET) + + _applied_date = d.pop("appliedDate", UNSET) + applied_date: Union[Unset, datetime.datetime] + if isinstance(_applied_date, Unset): + applied_date = UNSET + else: + applied_date = isoparse(_applied_date) + + _appliedby_department = d.pop("appliedbyDepartment", UNSET) + appliedby_department: Union[Unset, RequestRecordConditionModelAppliedbyDepartment] + if isinstance(_appliedby_department, Unset): + appliedby_department = UNSET + else: + appliedby_department = RequestRecordConditionModelAppliedbyDepartment.from_dict(_appliedby_department) + + _appliedby_user = d.pop("appliedbyUser", UNSET) + appliedby_user: Union[Unset, RequestRecordConditionModelAppliedbyUser] + if isinstance(_appliedby_user, Unset): + appliedby_user = UNSET + else: + appliedby_user = RequestRecordConditionModelAppliedbyUser.from_dict(_appliedby_user) + + condition_number = d.pop("conditionNumber", UNSET) + + disp_additional_information_plain_text = d.pop("dispAdditionalInformationPlainText", UNSET) + + display_notice_in_agency = d.pop("displayNoticeInAgency", UNSET) + + display_notice_in_citizens = d.pop("displayNoticeInCitizens", UNSET) + + display_notice_in_citizens_fee = d.pop("displayNoticeInCitizensFee", UNSET) + + display_order = d.pop("displayOrder", UNSET) + + _effective_date = d.pop("effectiveDate", UNSET) + effective_date: Union[Unset, datetime.datetime] + if isinstance(_effective_date, Unset): + effective_date = UNSET + else: + effective_date = isoparse(_effective_date) + + _expiration_date = d.pop("expirationDate", UNSET) + expiration_date: Union[Unset, datetime.datetime] + if isinstance(_expiration_date, Unset): + expiration_date = UNSET + else: + expiration_date = isoparse(_expiration_date) + + _group = d.pop("group", UNSET) + group: Union[Unset, RequestRecordConditionModelGroup] + if isinstance(_group, Unset): + group = UNSET + else: + group = RequestRecordConditionModelGroup.from_dict(_group) + + _inheritable = d.pop("inheritable", UNSET) + inheritable: Union[Unset, RequestRecordConditionModelInheritable] + if isinstance(_inheritable, Unset): + inheritable = UNSET + else: + inheritable = RequestRecordConditionModelInheritable.from_dict(_inheritable) + + is_include_name_in_notice = d.pop("isIncludeNameInNotice", UNSET) + + is_include_short_comments_in_notice = d.pop("isIncludeShortCommentsInNotice", UNSET) + + long_comments = d.pop("longComments", UNSET) + + name = d.pop("name", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestRecordConditionModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestRecordConditionModelPriority.from_dict(_priority) + + public_display_message = d.pop("publicDisplayMessage", UNSET) + + res_additional_information_plain_text = d.pop("resAdditionalInformationPlainText", UNSET) + + resolution_action = d.pop("resolutionAction", UNSET) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RequestRecordConditionModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RequestRecordConditionModelSeverity.from_dict(_severity) + + short_comments = d.pop("shortComments", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestRecordConditionModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestRecordConditionModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + status_type = d.pop("statusType", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RequestRecordConditionModelType] + if isinstance(_type, Unset): + type = UNSET + else: + type = RequestRecordConditionModelType.from_dict(_type) + + request_record_condition_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + active_status=active_status, + additional_information=additional_information, + additional_information_plain_text=additional_information_plain_text, + applied_date=applied_date, + appliedby_department=appliedby_department, + appliedby_user=appliedby_user, + condition_number=condition_number, + disp_additional_information_plain_text=disp_additional_information_plain_text, + display_notice_in_agency=display_notice_in_agency, + display_notice_in_citizens=display_notice_in_citizens, + display_notice_in_citizens_fee=display_notice_in_citizens_fee, + display_order=display_order, + effective_date=effective_date, + expiration_date=expiration_date, + group=group, + inheritable=inheritable, + is_include_name_in_notice=is_include_name_in_notice, + is_include_short_comments_in_notice=is_include_short_comments_in_notice, + long_comments=long_comments, + name=name, + priority=priority, + public_display_message=public_display_message, + res_additional_information_plain_text=res_additional_information_plain_text, + resolution_action=resolution_action, + service_provider_code=service_provider_code, + severity=severity, + short_comments=short_comments, + status=status, + status_date=status_date, + status_type=status_type, + type=type, + ) + + request_record_condition_model.additional_properties = d + return request_record_condition_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_department.py b/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_department.py new file mode 100644 index 0000000..46eccac --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelActionbyDepartment") + + +@_attrs_define +class RequestRecordConditionModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_actionby_department = cls( + text=text, + value=value, + ) + + request_record_condition_model_actionby_department.additional_properties = d + return request_record_condition_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_user.py b/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_user.py new file mode 100644 index 0000000..55807c8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelActionbyUser") + + +@_attrs_define +class RequestRecordConditionModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_actionby_user = cls( + text=text, + value=value, + ) + + request_record_condition_model_actionby_user.additional_properties = d + return request_record_condition_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_active_status.py b/accelapy/accelapy/records_client/models/request_record_condition_model_active_status.py new file mode 100644 index 0000000..4936966 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_active_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelActiveStatus") + + +@_attrs_define +class RequestRecordConditionModelActiveStatus: + """Indicates whether or not the condition is active. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_active_status = cls( + text=text, + value=value, + ) + + request_record_condition_model_active_status.additional_properties = d + return request_record_condition_model_active_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_department.py b/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_department.py new file mode 100644 index 0000000..de46b58 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelAppliedbyDepartment") + + +@_attrs_define +class RequestRecordConditionModelAppliedbyDepartment: + """The department responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_appliedby_department = cls( + text=text, + value=value, + ) + + request_record_condition_model_appliedby_department.additional_properties = d + return request_record_condition_model_appliedby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_user.py b/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_user.py new file mode 100644 index 0000000..36b2eb1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_appliedby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelAppliedbyUser") + + +@_attrs_define +class RequestRecordConditionModelAppliedbyUser: + """The staff member responsible for applying a condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_appliedby_user = cls( + text=text, + value=value, + ) + + request_record_condition_model_appliedby_user.additional_properties = d + return request_record_condition_model_appliedby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_group.py b/accelapy/accelapy/records_client/models/request_record_condition_model_group.py new file mode 100644 index 0000000..61c1fe5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_group.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelGroup") + + +@_attrs_define +class RequestRecordConditionModelGroup: + """The condition group is an attribute of a condition that organizes condition types. Your agency defines these groups. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_group = cls( + text=text, + value=value, + ) + + request_record_condition_model_group.additional_properties = d + return request_record_condition_model_group + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_inheritable.py b/accelapy/accelapy/records_client/models/request_record_condition_model_inheritable.py new file mode 100644 index 0000000..35423e3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_inheritable.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelInheritable") + + +@_attrs_define +class RequestRecordConditionModelInheritable: + """This defines whether or not Accela Automation checks for inheritable conditions when a user associates a child + record with a parent record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_inheritable = cls( + text=text, + value=value, + ) + + request_record_condition_model_inheritable.additional_properties = d + return request_record_condition_model_inheritable + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_priority.py b/accelapy/accelapy/records_client/models/request_record_condition_model_priority.py new file mode 100644 index 0000000..7b99a5d --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_priority.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelPriority") + + +@_attrs_define +class RequestRecordConditionModelPriority: + """The priority level assigned to the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_priority = cls( + text=text, + value=value, + ) + + request_record_condition_model_priority.additional_properties = d + return request_record_condition_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_severity.py b/accelapy/accelapy/records_client/models/request_record_condition_model_severity.py new file mode 100644 index 0000000..d9fbf37 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelSeverity") + + +@_attrs_define +class RequestRecordConditionModelSeverity: + """The severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_severity = cls( + text=text, + value=value, + ) + + request_record_condition_model_severity.additional_properties = d + return request_record_condition_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_status.py b/accelapy/accelapy/records_client/models/request_record_condition_model_status.py new file mode 100644 index 0000000..e8b4dfc --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelStatus") + + +@_attrs_define +class RequestRecordConditionModelStatus: + """The condition status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_status = cls( + text=text, + value=value, + ) + + request_record_condition_model_status.additional_properties = d + return request_record_condition_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_condition_model_type.py b/accelapy/accelapy/records_client/models/request_record_condition_model_type.py new file mode 100644 index 0000000..8db62b7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_condition_model_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordConditionModelType") + + +@_attrs_define +class RequestRecordConditionModelType: + """The condition type. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_condition_model_type = cls( + text=text, + value=value, + ) + + request_record_condition_model_type.additional_properties = d + return request_record_condition_model_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model.py b/accelapy/accelapy/records_client/models/request_record_model.py new file mode 100644 index 0000000..7d1d056 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model.py @@ -0,0 +1,843 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.request_record_model_created_by_cloning import RequestRecordModelCreatedByCloning +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_model import RecordContactModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.request_record_model_construction_type import RequestRecordModelConstructionType + from ..models.request_record_model_priority import RequestRecordModelPriority + from ..models.request_record_model_reported_channel import RequestRecordModelReportedChannel + from ..models.request_record_model_reported_type import RequestRecordModelReportedType + from ..models.request_record_model_severity import RequestRecordModelSeverity + from ..models.request_record_model_status import RequestRecordModelStatus + from ..models.request_record_model_status_reason import RequestRecordModelStatusReason + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="RequestRecordModel") + + +@_attrs_define +class RequestRecordModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + addresses (Union[Unset, List['RecordAddressModel']]): + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + construction_type (Union[Unset, RequestRecordModelConstructionType]): The US Census Bureau construction type + code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + contact (Union[Unset, RecordContactModel]): + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_by_cloning (Union[Unset, RequestRecordModelCreatedByCloning]): Indictes whether or not the record was + cloned. + custom_forms (Union[Unset, List['CustomAttributeModel']]): + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + custom_tables (Union[Unset, List['TableModel']]): + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + initiated_product (Union[Unset, str]): The product or app that created the record. If initiatedProduct is null + or not specified in the request, the default is "AV360" (Civic Platform application). + + Added in Civic Platform version: 9.2.0 + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + owner (Union[Unset, List['RefOwnerModel']]): + parcel (Union[Unset, List['ParcelModel1']]): + priority (Union[Unset, RequestRecordModelPriority]): The priority level assigned to the record. See [Get All + Priorities](./api-settings.html#operation/v4.get.settings.priorities). + professional (Union[Unset, List['LicenseProfessionalModel']]): + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RequestRecordModelReportedChannel]): The incoming channel through which the + applicant submitted the application. + reported_date (Union[Unset, datetime.datetime]): The date the complaint was reported. + reported_type (Union[Unset, RequestRecordModelReportedType]): The type of complaint or incident being reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RequestRecordModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RequestRecordModelStatus]): The record status. + status_reason (Union[Unset, RequestRecordModelStatusReason]): The reason for the status setting on the record. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + """ + + actual_production_unit: Union[Unset, float] = UNSET + addresses: Union[Unset, List["RecordAddressModel"]] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + construction_type: Union[Unset, "RequestRecordModelConstructionType"] = UNSET + contact: Union[Unset, "RecordContactModel"] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + created_by_cloning: Union[Unset, RequestRecordModelCreatedByCloning] = UNSET + custom_forms: Union[Unset, List["CustomAttributeModel"]] = UNSET + custom_id: Union[Unset, str] = UNSET + custom_tables: Union[Unset, List["TableModel"]] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + initiated_product: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + owner: Union[Unset, List["RefOwnerModel"]] = UNSET + parcel: Union[Unset, List["ParcelModel1"]] = UNSET + priority: Union[Unset, "RequestRecordModelPriority"] = UNSET + professional: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RequestRecordModelReportedChannel"] = UNSET + reported_date: Union[Unset, datetime.datetime] = UNSET + reported_type: Union[Unset, "RequestRecordModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RequestRecordModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RequestRecordModelStatus"] = UNSET + status_reason: Union[Unset, "RequestRecordModelStatusReason"] = UNSET + total_job_cost: Union[Unset, float] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + addresses: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.addresses, Unset): + addresses = [] + for addresses_item_data in self.addresses: + addresses_item = addresses_item_data.to_dict() + + addresses.append(addresses_item) + + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + contact: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.contact, Unset): + contact = self.contact.to_dict() + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + created_by_cloning: Union[Unset, str] = UNSET + if not isinstance(self.created_by_cloning, Unset): + created_by_cloning = self.created_by_cloning.value + + custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_forms, Unset): + custom_forms = [] + for custom_forms_item_data in self.custom_forms: + custom_forms_item = custom_forms_item_data.to_dict() + + custom_forms.append(custom_forms_item) + + custom_id = self.custom_id + custom_tables: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.custom_tables, Unset): + custom_tables = [] + for custom_tables_item_data in self.custom_tables: + custom_tables_item = custom_tables_item_data.to_dict() + + custom_tables.append(custom_tables_item) + + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + initiated_product = self.initiated_product + in_possession_time = self.in_possession_time + infraction = self.infraction + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + owner: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.owner, Unset): + owner = [] + for owner_item_data in self.owner: + owner_item = owner_item_data.to_dict() + + owner.append(owner_item) + + parcel: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.parcel, Unset): + parcel = [] + for parcel_item_data in self.parcel: + parcel_item = parcel_item_data.to_dict() + + parcel.append(parcel_item) + + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + professional: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.professional, Unset): + professional = [] + for professional_item_data in self.professional: + professional_item = professional_item_data.to_dict() + + professional.append(professional_item) + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_date: Union[Unset, str] = UNSET + if not isinstance(self.reported_date, Unset): + reported_date = self.reported_date.isoformat() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + total_job_cost = self.total_job_cost + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if addresses is not UNSET: + field_dict["addresses"] = addresses + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if contact is not UNSET: + field_dict["contact"] = contact + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_by_cloning is not UNSET: + field_dict["createdByCloning"] = created_by_cloning + if custom_forms is not UNSET: + field_dict["customForms"] = custom_forms + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if custom_tables is not UNSET: + field_dict["customTables"] = custom_tables + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if owner is not UNSET: + field_dict["owner"] = owner + if parcel is not UNSET: + field_dict["parcel"] = parcel + if priority is not UNSET: + field_dict["priority"] = priority + if professional is not UNSET: + field_dict["professional"] = professional + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_date is not UNSET: + field_dict["reportedDate"] = reported_date + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_attribute_model import CustomAttributeModel + from ..models.license_professional_model import LicenseProfessionalModel + from ..models.parcel_model_1 import ParcelModel1 + from ..models.record_address_model import RecordAddressModel + from ..models.record_contact_model import RecordContactModel + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.ref_owner_model import RefOwnerModel + from ..models.request_record_model_construction_type import RequestRecordModelConstructionType + from ..models.request_record_model_priority import RequestRecordModelPriority + from ..models.request_record_model_reported_channel import RequestRecordModelReportedChannel + from ..models.request_record_model_reported_type import RequestRecordModelReportedType + from ..models.request_record_model_severity import RequestRecordModelSeverity + from ..models.request_record_model_status import RequestRecordModelStatus + from ..models.request_record_model_status_reason import RequestRecordModelStatusReason + from ..models.table_model import TableModel + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + addresses = [] + _addresses = d.pop("addresses", UNSET) + for addresses_item_data in _addresses or []: + addresses_item = RecordAddressModel.from_dict(addresses_item_data) + + addresses.append(addresses_item) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, RequestRecordModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = RequestRecordModelConstructionType.from_dict(_construction_type) + + _contact = d.pop("contact", UNSET) + contact: Union[Unset, RecordContactModel] + if isinstance(_contact, Unset): + contact = UNSET + else: + contact = RecordContactModel.from_dict(_contact) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_by_cloning = d.pop("createdByCloning", UNSET) + created_by_cloning: Union[Unset, RequestRecordModelCreatedByCloning] + if isinstance(_created_by_cloning, Unset): + created_by_cloning = UNSET + else: + created_by_cloning = RequestRecordModelCreatedByCloning(_created_by_cloning) + + custom_forms = [] + _custom_forms = d.pop("customForms", UNSET) + for custom_forms_item_data in _custom_forms or []: + custom_forms_item = CustomAttributeModel.from_dict(custom_forms_item_data) + + custom_forms.append(custom_forms_item) + + custom_id = d.pop("customId", UNSET) + + custom_tables = [] + _custom_tables = d.pop("customTables", UNSET) + for custom_tables_item_data in _custom_tables or []: + custom_tables_item = TableModel.from_dict(custom_tables_item_data) + + custom_tables.append(custom_tables_item) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + owner = [] + _owner = d.pop("owner", UNSET) + for owner_item_data in _owner or []: + owner_item = RefOwnerModel.from_dict(owner_item_data) + + owner.append(owner_item) + + parcel = [] + _parcel = d.pop("parcel", UNSET) + for parcel_item_data in _parcel or []: + parcel_item = ParcelModel1.from_dict(parcel_item_data) + + parcel.append(parcel_item) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestRecordModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestRecordModelPriority.from_dict(_priority) + + professional = [] + _professional = d.pop("professional", UNSET) + for professional_item_data in _professional or []: + professional_item = LicenseProfessionalModel.from_dict(professional_item_data) + + professional.append(professional_item) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RequestRecordModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RequestRecordModelReportedChannel.from_dict(_reported_channel) + + _reported_date = d.pop("reportedDate", UNSET) + reported_date: Union[Unset, datetime.datetime] + if isinstance(_reported_date, Unset): + reported_date = UNSET + else: + reported_date = isoparse(_reported_date) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RequestRecordModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RequestRecordModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RequestRecordModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RequestRecordModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestRecordModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestRecordModelStatus.from_dict(_status) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RequestRecordModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RequestRecordModelStatusReason.from_dict(_status_reason) + + total_job_cost = d.pop("totalJobCost", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + request_record_model = cls( + actual_production_unit=actual_production_unit, + addresses=addresses, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + construction_type=construction_type, + contact=contact, + cost_per_unit=cost_per_unit, + created_by=created_by, + created_by_cloning=created_by_cloning, + custom_forms=custom_forms, + custom_id=custom_id, + custom_tables=custom_tables, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + initiated_product=initiated_product, + in_possession_time=in_possession_time, + infraction=infraction, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + owner=owner, + parcel=parcel, + priority=priority, + professional=professional, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_date=reported_date, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_reason=status_reason, + total_job_cost=total_job_cost, + type=type, + undistributed_cost=undistributed_cost, + ) + + request_record_model.additional_properties = d + return request_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_construction_type.py b/accelapy/accelapy/records_client/models/request_record_model_construction_type.py new file mode 100644 index 0000000..c19af95 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelConstructionType") + + +@_attrs_define +class RequestRecordModelConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_construction_type = cls( + text=text, + value=value, + ) + + request_record_model_construction_type.additional_properties = d + return request_record_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_created_by_cloning.py b/accelapy/accelapy/records_client/models/request_record_model_created_by_cloning.py new file mode 100644 index 0000000..970c573 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_created_by_cloning.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RequestRecordModelCreatedByCloning(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/request_record_model_priority.py b/accelapy/accelapy/records_client/models/request_record_model_priority.py new file mode 100644 index 0000000..40f1a45 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelPriority") + + +@_attrs_define +class RequestRecordModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_priority = cls( + text=text, + value=value, + ) + + request_record_model_priority.additional_properties = d + return request_record_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_reported_channel.py b/accelapy/accelapy/records_client/models/request_record_model_reported_channel.py new file mode 100644 index 0000000..1cd005c --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelReportedChannel") + + +@_attrs_define +class RequestRecordModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_reported_channel = cls( + text=text, + value=value, + ) + + request_record_model_reported_channel.additional_properties = d + return request_record_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_reported_type.py b/accelapy/accelapy/records_client/models/request_record_model_reported_type.py new file mode 100644 index 0000000..cfaffd4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelReportedType") + + +@_attrs_define +class RequestRecordModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_reported_type = cls( + text=text, + value=value, + ) + + request_record_model_reported_type.additional_properties = d + return request_record_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_severity.py b/accelapy/accelapy/records_client/models/request_record_model_severity.py new file mode 100644 index 0000000..64e428e --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelSeverity") + + +@_attrs_define +class RequestRecordModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_severity = cls( + text=text, + value=value, + ) + + request_record_model_severity.additional_properties = d + return request_record_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_status.py b/accelapy/accelapy/records_client/models/request_record_model_status.py new file mode 100644 index 0000000..9670221 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelStatus") + + +@_attrs_define +class RequestRecordModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_status = cls( + text=text, + value=value, + ) + + request_record_model_status.additional_properties = d + return request_record_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_record_model_status_reason.py b/accelapy/accelapy/records_client/models/request_record_model_status_reason.py new file mode 100644 index 0000000..679f332 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_record_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestRecordModelStatusReason") + + +@_attrs_define +class RequestRecordModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_record_model_status_reason = cls( + text=text, + value=value, + ) + + request_record_model_status_reason.additional_properties = d + return request_record_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model.py b/accelapy/accelapy/records_client/models/request_simple_record_model.py new file mode 100644 index 0000000..014a06b --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model.py @@ -0,0 +1,497 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_expiration_model import RecordExpirationModel + from ..models.request_simple_record_model_priority import RequestSimpleRecordModelPriority + from ..models.request_simple_record_model_reported_channel import RequestSimpleRecordModelReportedChannel + from ..models.request_simple_record_model_reported_type import RequestSimpleRecordModelReportedType + from ..models.request_simple_record_model_severity import RequestSimpleRecordModelSeverity + from ..models.request_simple_record_model_status import RequestSimpleRecordModelStatus + from ..models.request_simple_record_model_status_reason import RequestSimpleRecordModelStatusReason + + +T = TypeVar("T", bound="RequestSimpleRecordModel") + + +@_attrs_define +class RequestSimpleRecordModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + name (Union[Unset, str]): The name associated to the record. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + priority (Union[Unset, RequestSimpleRecordModelPriority]): The priority level assigned to the record. See [Get + All Priorities](./api-settings.html#operation/v4.get.settings.priorities). + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, RequestSimpleRecordModelReportedChannel]): The incoming channel through which the + applicant submitted the application. + reported_date (Union[Unset, datetime.datetime]): The date the complaint was reported. + reported_type (Union[Unset, RequestSimpleRecordModelReportedType]): The type of complaint or incident being + reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + severity (Union[Unset, RequestSimpleRecordModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, RequestSimpleRecordModelStatus]): The record status. + status_reason (Union[Unset, RequestSimpleRecordModelStatusReason]): The reason for the status setting on the + record. + total_fee (Union[Unset, float]): The total amount of the fees invoiced to the record. + total_pay (Union[Unset, float]): The total amount of pay. + """ + + actual_production_unit: Union[Unset, float] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + infraction: Union[Unset, bool] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + name: Union[Unset, str] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + priority: Union[Unset, "RequestSimpleRecordModelPriority"] = UNSET + public_owned: Union[Unset, bool] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "RequestSimpleRecordModelReportedChannel"] = UNSET + reported_date: Union[Unset, datetime.datetime] = UNSET + reported_type: Union[Unset, "RequestSimpleRecordModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + severity: Union[Unset, "RequestSimpleRecordModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "RequestSimpleRecordModelStatus"] = UNSET + status_reason: Union[Unset, "RequestSimpleRecordModelStatusReason"] = UNSET + total_fee: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + infraction = self.infraction + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + name = self.name + offense_witnessed = self.offense_witnessed + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_owned = self.public_owned + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_date: Union[Unset, str] = UNSET + if not isinstance(self.reported_date, Unset): + reported_date = self.reported_date.isoformat() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + total_fee = self.total_fee + total_pay = self.total_pay + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if infraction is not UNSET: + field_dict["infraction"] = infraction + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if name is not UNSET: + field_dict["name"] = name + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if priority is not UNSET: + field_dict["priority"] = priority + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_date is not UNSET: + field_dict["reportedDate"] = reported_date + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if total_fee is not UNSET: + field_dict["totalFee"] = total_fee + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_expiration_model import RecordExpirationModel + from ..models.request_simple_record_model_priority import RequestSimpleRecordModelPriority + from ..models.request_simple_record_model_reported_channel import RequestSimpleRecordModelReportedChannel + from ..models.request_simple_record_model_reported_type import RequestSimpleRecordModelReportedType + from ..models.request_simple_record_model_severity import RequestSimpleRecordModelSeverity + from ..models.request_simple_record_model_status import RequestSimpleRecordModelStatus + from ..models.request_simple_record_model_status_reason import RequestSimpleRecordModelStatusReason + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + infraction = d.pop("infraction", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + name = d.pop("name", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, RequestSimpleRecordModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = RequestSimpleRecordModelPriority.from_dict(_priority) + + public_owned = d.pop("publicOwned", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, RequestSimpleRecordModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = RequestSimpleRecordModelReportedChannel.from_dict(_reported_channel) + + _reported_date = d.pop("reportedDate", UNSET) + reported_date: Union[Unset, datetime.datetime] + if isinstance(_reported_date, Unset): + reported_date = UNSET + else: + reported_date = isoparse(_reported_date) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, RequestSimpleRecordModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = RequestSimpleRecordModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, RequestSimpleRecordModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = RequestSimpleRecordModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestSimpleRecordModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestSimpleRecordModelStatus.from_dict(_status) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, RequestSimpleRecordModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = RequestSimpleRecordModelStatusReason.from_dict(_status_reason) + + total_fee = d.pop("totalFee", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + request_simple_record_model = cls( + actual_production_unit=actual_production_unit, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + infraction=infraction, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + name=name, + offense_witnessed=offense_witnessed, + priority=priority, + public_owned=public_owned, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_date=reported_date, + reported_type=reported_type, + scheduled_date=scheduled_date, + severity=severity, + short_notes=short_notes, + status=status, + status_reason=status_reason, + total_fee=total_fee, + total_pay=total_pay, + ) + + request_simple_record_model.additional_properties = d + return request_simple_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_priority.py b/accelapy/accelapy/records_client/models/request_simple_record_model_priority.py new file mode 100644 index 0000000..bf42770 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelPriority") + + +@_attrs_define +class RequestSimpleRecordModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_priority = cls( + text=text, + value=value, + ) + + request_simple_record_model_priority.additional_properties = d + return request_simple_record_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_reported_channel.py b/accelapy/accelapy/records_client/models/request_simple_record_model_reported_channel.py new file mode 100644 index 0000000..f276a0f --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelReportedChannel") + + +@_attrs_define +class RequestSimpleRecordModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_reported_channel = cls( + text=text, + value=value, + ) + + request_simple_record_model_reported_channel.additional_properties = d + return request_simple_record_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_reported_type.py b/accelapy/accelapy/records_client/models/request_simple_record_model_reported_type.py new file mode 100644 index 0000000..7297c7e --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelReportedType") + + +@_attrs_define +class RequestSimpleRecordModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_reported_type = cls( + text=text, + value=value, + ) + + request_simple_record_model_reported_type.additional_properties = d + return request_simple_record_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_severity.py b/accelapy/accelapy/records_client/models/request_simple_record_model_severity.py new file mode 100644 index 0000000..f086527 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelSeverity") + + +@_attrs_define +class RequestSimpleRecordModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_severity = cls( + text=text, + value=value, + ) + + request_simple_record_model_severity.additional_properties = d + return request_simple_record_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_status.py b/accelapy/accelapy/records_client/models/request_simple_record_model_status.py new file mode 100644 index 0000000..d01b548 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelStatus") + + +@_attrs_define +class RequestSimpleRecordModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_status = cls( + text=text, + value=value, + ) + + request_simple_record_model_status.additional_properties = d + return request_simple_record_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_simple_record_model_status_reason.py b/accelapy/accelapy/records_client/models/request_simple_record_model_status_reason.py new file mode 100644 index 0000000..073744a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_simple_record_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestSimpleRecordModelStatusReason") + + +@_attrs_define +class RequestSimpleRecordModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_simple_record_model_status_reason = cls( + text=text, + value=value, + ) + + request_simple_record_model_status_reason.additional_properties = d + return request_simple_record_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_task_item_model.py b/accelapy/accelapy/records_client/models/request_task_item_model.py new file mode 100644 index 0000000..7483be9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_task_item_model.py @@ -0,0 +1,258 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.request_task_item_model_billable import RequestTaskItemModelBillable +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.request_task_item_model_actionby_department import RequestTaskItemModelActionbyDepartment + from ..models.request_task_item_model_actionby_user import RequestTaskItemModelActionbyUser + from ..models.request_task_item_model_status import RequestTaskItemModelStatus + + +T = TypeVar("T", bound="RequestTaskItemModel") + + +@_attrs_define +class RequestTaskItemModel: + """ + Attributes: + actionby_department (Union[Unset, RequestTaskItemModelActionbyDepartment]): The department responsible for the + action. + actionby_user (Union[Unset, RequestTaskItemModelActionbyUser]): The individual responsible for the action. + approval (Union[Unset, str]): Used to indicate supervisory approval of an adhoc task. + assign_email_display (Union[Unset, str]): Indicates whether or not to display the agency employee’s email + address in ACA. Public users can then click the e-mail hyperlink and send an e-mail to the agency employee. + “Y†: display the email address. “N†: hide the email address. + billable (Union[Unset, RequestTaskItemModelBillable]): Indicates whether or not the item is billable. + comment (Union[Unset, str]): Comments or notes about the current context. + comment_display (Union[Unset, str]): Indicates whether or not Accela Citizen Access users can view the + inspection results comments. + comment_public_visible (Union[Unset, List[str]]): Specifies the type of user who can view the inspection result + comments.
"All ACA Users" - Both registered and anonymous Accela Citizen Access users can view the comments + for inspection results.
"Record Creator Only" - the user who created the record can see the comments for + the inspection results.
"Record Creator and Licensed Professional" - The user who created the record and + the licensed professional associated with the record can see the comments for the inspection results. + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + end_time (Union[Unset, datetime.datetime]): The time the workflow task was completed. + hours_spent (Union[Unset, float]): Number of hours used for a workflow or workflow task. + over_time (Union[Unset, str]): A labor cost factor that indicates time worked beyond a worker's regular working + hours. + start_time (Union[Unset, datetime.datetime]): The time the workflow task started. + status (Union[Unset, RequestTaskItemModelStatus]): The workflow task status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + """ + + actionby_department: Union[Unset, "RequestTaskItemModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "RequestTaskItemModelActionbyUser"] = UNSET + approval: Union[Unset, str] = UNSET + assign_email_display: Union[Unset, str] = UNSET + billable: Union[Unset, RequestTaskItemModelBillable] = UNSET + comment: Union[Unset, str] = UNSET + comment_display: Union[Unset, str] = UNSET + comment_public_visible: Union[Unset, List[str]] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + end_time: Union[Unset, datetime.datetime] = UNSET + hours_spent: Union[Unset, float] = UNSET + over_time: Union[Unset, str] = UNSET + start_time: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "RequestTaskItemModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + approval = self.approval + assign_email_display = self.assign_email_display + billable: Union[Unset, str] = UNSET + if not isinstance(self.billable, Unset): + billable = self.billable.value + + comment = self.comment + comment_display = self.comment_display + comment_public_visible: Union[Unset, List[str]] = UNSET + if not isinstance(self.comment_public_visible, Unset): + comment_public_visible = self.comment_public_visible + + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + end_time: Union[Unset, str] = UNSET + if not isinstance(self.end_time, Unset): + end_time = self.end_time.isoformat() + + hours_spent = self.hours_spent + over_time = self.over_time + start_time: Union[Unset, str] = UNSET + if not isinstance(self.start_time, Unset): + start_time = self.start_time.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if approval is not UNSET: + field_dict["approval"] = approval + if assign_email_display is not UNSET: + field_dict["assignEmailDisplay"] = assign_email_display + if billable is not UNSET: + field_dict["billable"] = billable + if comment is not UNSET: + field_dict["comment"] = comment + if comment_display is not UNSET: + field_dict["commentDisplay"] = comment_display + if comment_public_visible is not UNSET: + field_dict["commentPublicVisible"] = comment_public_visible + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if end_time is not UNSET: + field_dict["endTime"] = end_time + if hours_spent is not UNSET: + field_dict["hoursSpent"] = hours_spent + if over_time is not UNSET: + field_dict["overTime"] = over_time + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.request_task_item_model_actionby_department import RequestTaskItemModelActionbyDepartment + from ..models.request_task_item_model_actionby_user import RequestTaskItemModelActionbyUser + from ..models.request_task_item_model_status import RequestTaskItemModelStatus + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, RequestTaskItemModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = RequestTaskItemModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, RequestTaskItemModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = RequestTaskItemModelActionbyUser.from_dict(_actionby_user) + + approval = d.pop("approval", UNSET) + + assign_email_display = d.pop("assignEmailDisplay", UNSET) + + _billable = d.pop("billable", UNSET) + billable: Union[Unset, RequestTaskItemModelBillable] + if isinstance(_billable, Unset): + billable = UNSET + else: + billable = RequestTaskItemModelBillable(_billable) + + comment = d.pop("comment", UNSET) + + comment_display = d.pop("commentDisplay", UNSET) + + comment_public_visible = cast(List[str], d.pop("commentPublicVisible", UNSET)) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + _end_time = d.pop("endTime", UNSET) + end_time: Union[Unset, datetime.datetime] + if isinstance(_end_time, Unset): + end_time = UNSET + else: + end_time = isoparse(_end_time) + + hours_spent = d.pop("hoursSpent", UNSET) + + over_time = d.pop("overTime", UNSET) + + _start_time = d.pop("startTime", UNSET) + start_time: Union[Unset, datetime.datetime] + if isinstance(_start_time, Unset): + start_time = UNSET + else: + start_time = isoparse(_start_time) + + _status = d.pop("status", UNSET) + status: Union[Unset, RequestTaskItemModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = RequestTaskItemModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + request_task_item_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + approval=approval, + assign_email_display=assign_email_display, + billable=billable, + comment=comment, + comment_display=comment_display, + comment_public_visible=comment_public_visible, + due_date=due_date, + end_time=end_time, + hours_spent=hours_spent, + over_time=over_time, + start_time=start_time, + status=status, + status_date=status_date, + ) + + request_task_item_model.additional_properties = d + return request_task_item_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_task_item_model_actionby_department.py b/accelapy/accelapy/records_client/models/request_task_item_model_actionby_department.py new file mode 100644 index 0000000..b48389a --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_task_item_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestTaskItemModelActionbyDepartment") + + +@_attrs_define +class RequestTaskItemModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_task_item_model_actionby_department = cls( + text=text, + value=value, + ) + + request_task_item_model_actionby_department.additional_properties = d + return request_task_item_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_task_item_model_actionby_user.py b/accelapy/accelapy/records_client/models/request_task_item_model_actionby_user.py new file mode 100644 index 0000000..06d8588 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_task_item_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestTaskItemModelActionbyUser") + + +@_attrs_define +class RequestTaskItemModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_task_item_model_actionby_user = cls( + text=text, + value=value, + ) + + request_task_item_model_actionby_user.additional_properties = d + return request_task_item_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/request_task_item_model_billable.py b/accelapy/accelapy/records_client/models/request_task_item_model_billable.py new file mode 100644 index 0000000..5e6f9ee --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_task_item_model_billable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class RequestTaskItemModelBillable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/request_task_item_model_status.py b/accelapy/accelapy/records_client/models/request_task_item_model_status.py new file mode 100644 index 0000000..7d6f5e9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/request_task_item_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RequestTaskItemModelStatus") + + +@_attrs_define +class RequestTaskItemModelStatus: + """The workflow task status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + request_task_item_model_status = cls( + text=text, + value=value, + ) + + request_task_item_model_status.additional_properties = d + return request_task_item_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_activity_model_array.py b/accelapy/accelapy/records_client/models/response_activity_model_array.py new file mode 100644 index 0000000..4b5b0c8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_activity_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.activity_model import ActivityModel + + +T = TypeVar("T", bound="ResponseActivityModelArray") + + +@_attrs_define +class ResponseActivityModelArray: + """ + Attributes: + result (Union[Unset, List['ActivityModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["ActivityModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.activity_model import ActivityModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = ActivityModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_activity_model_array = cls( + result=result, + status=status, + ) + + response_activity_model_array.additional_properties = d + return response_activity_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_apo_custom_forms.py b/accelapy/accelapy/records_client/models/response_apo_custom_forms.py new file mode 100644 index 0000000..51860dd --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_apo_custom_forms.py @@ -0,0 +1,87 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.apo_custom_form import ApoCustomForm + + +T = TypeVar("T", bound="ResponseApoCustomForms") + + +@_attrs_define +class ResponseApoCustomForms: + """APO custom forms response. + + Added in Civic Platform version: 9.2.0 + + Attributes: + apo_custom_forms (Union[Unset, List['ApoCustomForm']]): + status (Union[Unset, int]): The return status code. + """ + + apo_custom_forms: Union[Unset, List["ApoCustomForm"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + apo_custom_forms: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.apo_custom_forms, Unset): + apo_custom_forms = [] + for apo_custom_forms_item_data in self.apo_custom_forms: + apo_custom_forms_item = apo_custom_forms_item_data.to_dict() + + apo_custom_forms.append(apo_custom_forms_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if apo_custom_forms is not UNSET: + field_dict["apo_customForms"] = apo_custom_forms + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.apo_custom_form import ApoCustomForm + + d = src_dict.copy() + apo_custom_forms = [] + _apo_custom_forms = d.pop("apo_customForms", UNSET) + for apo_custom_forms_item_data in _apo_custom_forms or []: + apo_custom_forms_item = ApoCustomForm.from_dict(apo_custom_forms_item_data) + + apo_custom_forms.append(apo_custom_forms_item) + + status = d.pop("status", UNSET) + + response_apo_custom_forms = cls( + apo_custom_forms=apo_custom_forms, + status=status, + ) + + response_apo_custom_forms.additional_properties = d + return response_apo_custom_forms + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_apo_custom_forms_metadata.py b/accelapy/accelapy/records_client/models/response_apo_custom_forms_metadata.py new file mode 100644 index 0000000..ca8176d --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_apo_custom_forms_metadata.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.apo_custom_forms_metadata import ApoCustomFormsMetadata + + +T = TypeVar("T", bound="ResponseApoCustomFormsMetadata") + + +@_attrs_define +class ResponseApoCustomFormsMetadata: + """ + Attributes: + result (Union[Unset, List['ApoCustomFormsMetadata']]): + status (Union[Unset, int]): The return status code. + """ + + result: Union[Unset, List["ApoCustomFormsMetadata"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.apo_custom_forms_metadata import ApoCustomFormsMetadata + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = ApoCustomFormsMetadata.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_apo_custom_forms_metadata = cls( + result=result, + status=status, + ) + + response_apo_custom_forms_metadata.additional_properties = d + return response_apo_custom_forms_metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_asset_master_model_array.py b/accelapy/accelapy/records_client/models/response_asset_master_model_array.py new file mode 100644 index 0000000..e540e36 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_asset_master_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.asset_master_model import AssetMasterModel + + +T = TypeVar("T", bound="ResponseAssetMasterModelArray") + + +@_attrs_define +class ResponseAssetMasterModelArray: + """ + Attributes: + result (Union[Unset, List['AssetMasterModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["AssetMasterModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.asset_master_model import AssetMasterModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = AssetMasterModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_asset_master_model_array = cls( + result=result, + status=status, + ) + + response_asset_master_model_array.additional_properties = d + return response_asset_master_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_contact_address_array.py b/accelapy/accelapy/records_client/models/response_contact_address_array.py new file mode 100644 index 0000000..bea1a18 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_contact_address_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.contact_address import ContactAddress + + +T = TypeVar("T", bound="ResponseContactAddressArray") + + +@_attrs_define +class ResponseContactAddressArray: + """ + Attributes: + result (Union[Unset, List['ContactAddress']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["ContactAddress"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.contact_address import ContactAddress + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = ContactAddress.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_contact_address_array = cls( + result=result, + status=status, + ) + + response_contact_address_array.additional_properties = d + return response_contact_address_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_costing_model_array.py b/accelapy/accelapy/records_client/models/response_costing_model_array.py new file mode 100644 index 0000000..502a260 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_costing_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.costing_model import CostingModel + + +T = TypeVar("T", bound="ResponseCostingModelArray") + + +@_attrs_define +class ResponseCostingModelArray: + """ + Attributes: + result (Union[Unset, List['CostingModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["CostingModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.costing_model import CostingModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = CostingModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_costing_model_array = cls( + result=result, + status=status, + ) + + response_costing_model_array.additional_properties = d + return response_costing_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_custom_attribute_model_array.py b/accelapy/accelapy/records_client/models/response_custom_attribute_model_array.py new file mode 100644 index 0000000..fb4ca6c --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_custom_attribute_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_attribute_model import CustomAttributeModel + + +T = TypeVar("T", bound="ResponseCustomAttributeModelArray") + + +@_attrs_define +class ResponseCustomAttributeModelArray: + """ + Attributes: + result (Union[Unset, List['CustomAttributeModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["CustomAttributeModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_attribute_model import CustomAttributeModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = CustomAttributeModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_custom_attribute_model_array = cls( + result=result, + status=status, + ) + + response_custom_attribute_model_array.additional_properties = d + return response_custom_attribute_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_custom_form_metadata_model_array.py b/accelapy/accelapy/records_client/models/response_custom_form_metadata_model_array.py new file mode 100644 index 0000000..9b170b2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_custom_form_metadata_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_form_metadata_model import CustomFormMetadataModel + + +T = TypeVar("T", bound="ResponseCustomFormMetadataModelArray") + + +@_attrs_define +class ResponseCustomFormMetadataModelArray: + """ + Attributes: + result (Union[Unset, List['CustomFormMetadataModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["CustomFormMetadataModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_form_metadata_model import CustomFormMetadataModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = CustomFormMetadataModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_custom_form_metadata_model_array = cls( + result=result, + status=status, + ) + + response_custom_form_metadata_model_array.additional_properties = d + return response_custom_form_metadata_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_custom_form_subgroup_model_array.py b/accelapy/accelapy/records_client/models/response_custom_form_subgroup_model_array.py new file mode 100644 index 0000000..0386864 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_custom_form_subgroup_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_form_subgroup_model import CustomFormSubgroupModel + + +T = TypeVar("T", bound="ResponseCustomFormSubgroupModelArray") + + +@_attrs_define +class ResponseCustomFormSubgroupModelArray: + """ + Attributes: + result (Union[Unset, List['CustomFormSubgroupModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["CustomFormSubgroupModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_form_subgroup_model import CustomFormSubgroupModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = CustomFormSubgroupModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_custom_form_subgroup_model_array = cls( + result=result, + status=status, + ) + + response_custom_form_subgroup_model_array.additional_properties = d + return response_custom_form_subgroup_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_describe_record_model.py b/accelapy/accelapy/records_client/models/response_describe_record_model.py new file mode 100644 index 0000000..1ba5a64 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_describe_record_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.describe_record_model import DescribeRecordModel + + +T = TypeVar("T", bound="ResponseDescribeRecordModel") + + +@_attrs_define +class ResponseDescribeRecordModel: + """ + Attributes: + result (Union[Unset, DescribeRecordModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "DescribeRecordModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.describe_record_model import DescribeRecordModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, DescribeRecordModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = DescribeRecordModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_describe_record_model = cls( + result=result, + status=status, + ) + + response_describe_record_model.additional_properties = d + return response_describe_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_document_model_array.py b/accelapy/accelapy/records_client/models/response_document_model_array.py new file mode 100644 index 0000000..b0420b9 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_document_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.document_model import DocumentModel + + +T = TypeVar("T", bound="ResponseDocumentModelArray") + + +@_attrs_define +class ResponseDocumentModelArray: + """ + Attributes: + result (Union[Unset, List['DocumentModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["DocumentModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_model import DocumentModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = DocumentModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_document_model_array = cls( + result=result, + status=status, + ) + + response_document_model_array.additional_properties = d + return response_document_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_document_type_model_array.py b/accelapy/accelapy/records_client/models/response_document_type_model_array.py new file mode 100644 index 0000000..698da30 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_document_type_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.document_type_model import DocumentTypeModel + + +T = TypeVar("T", bound="ResponseDocumentTypeModelArray") + + +@_attrs_define +class ResponseDocumentTypeModelArray: + """ + Attributes: + result (Union[Unset, List['DocumentTypeModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["DocumentTypeModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.document_type_model import DocumentTypeModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = DocumentTypeModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_document_type_model_array = cls( + result=result, + status=status, + ) + + response_document_type_model_array.additional_properties = d + return response_document_type_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_estimate_fee_model.py b/accelapy/accelapy/records_client/models/response_estimate_fee_model.py new file mode 100644 index 0000000..8dea9ce --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_estimate_fee_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.estimate_fee_model import EstimateFeeModel + + +T = TypeVar("T", bound="ResponseEstimateFeeModel") + + +@_attrs_define +class ResponseEstimateFeeModel: + """ + Attributes: + result (Union[Unset, EstimateFeeModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "EstimateFeeModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.estimate_fee_model import EstimateFeeModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, EstimateFeeModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = EstimateFeeModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_estimate_fee_model = cls( + result=result, + status=status, + ) + + response_estimate_fee_model.additional_properties = d + return response_estimate_fee_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_fee_item_model_1_array.py b/accelapy/accelapy/records_client/models/response_fee_item_model_1_array.py new file mode 100644 index 0000000..1c08319 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_fee_item_model_1_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.fee_item_model_1 import FeeItemModel1 + + +T = TypeVar("T", bound="ResponseFeeItemModel1Array") + + +@_attrs_define +class ResponseFeeItemModel1Array: + """ + Attributes: + result (Union[Unset, List['FeeItemModel1']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["FeeItemModel1"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.fee_item_model_1 import FeeItemModel1 + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = FeeItemModel1.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_fee_item_model_1_array = cls( + result=result, + status=status, + ) + + response_fee_item_model_1_array.additional_properties = d + return response_fee_item_model_1_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_identifier_model_array.py b/accelapy/accelapy/records_client/models/response_identifier_model_array.py new file mode 100644 index 0000000..a07653e --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_identifier_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.identifier_model import IdentifierModel + + +T = TypeVar("T", bound="ResponseIdentifierModelArray") + + +@_attrs_define +class ResponseIdentifierModelArray: + """ + Attributes: + result (Union[Unset, List['IdentifierModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["IdentifierModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.identifier_model import IdentifierModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = IdentifierModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_identifier_model_array = cls( + result=result, + status=status, + ) + + response_identifier_model_array.additional_properties = d + return response_identifier_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_inspection_model_array.py b/accelapy/accelapy/records_client/models/response_inspection_model_array.py new file mode 100644 index 0000000..4389a61 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_inspection_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.inspection_model import InspectionModel + + +T = TypeVar("T", bound="ResponseInspectionModelArray") + + +@_attrs_define +class ResponseInspectionModelArray: + """ + Attributes: + result (Union[Unset, List['InspectionModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["InspectionModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.inspection_model import InspectionModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = InspectionModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_inspection_model_array = cls( + result=result, + status=status, + ) + + response_inspection_model_array.additional_properties = d + return response_inspection_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_invoice_model_array.py b/accelapy/accelapy/records_client/models/response_invoice_model_array.py new file mode 100644 index 0000000..4fe679c --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_invoice_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.invoice_model import InvoiceModel + + +T = TypeVar("T", bound="ResponseInvoiceModelArray") + + +@_attrs_define +class ResponseInvoiceModelArray: + """ + Attributes: + result (Union[Unset, List['InvoiceModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["InvoiceModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.invoice_model import InvoiceModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = InvoiceModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_invoice_model_array = cls( + result=result, + status=status, + ) + + response_invoice_model_array.additional_properties = d + return response_invoice_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_license_professional_model.py b/accelapy/accelapy/records_client/models/response_license_professional_model.py new file mode 100644 index 0000000..00d789b --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_license_professional_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.license_professional_model import LicenseProfessionalModel + + +T = TypeVar("T", bound="ResponseLicenseProfessionalModel") + + +@_attrs_define +class ResponseLicenseProfessionalModel: + """ + Attributes: + result (Union[Unset, LicenseProfessionalModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "LicenseProfessionalModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.license_professional_model import LicenseProfessionalModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, LicenseProfessionalModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = LicenseProfessionalModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_license_professional_model = cls( + result=result, + status=status, + ) + + response_license_professional_model.additional_properties = d + return response_license_professional_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_license_professional_model_array.py b/accelapy/accelapy/records_client/models/response_license_professional_model_array.py new file mode 100644 index 0000000..5615ccc --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_license_professional_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.license_professional_model import LicenseProfessionalModel + + +T = TypeVar("T", bound="ResponseLicenseProfessionalModelArray") + + +@_attrs_define +class ResponseLicenseProfessionalModelArray: + """ + Attributes: + result (Union[Unset, List['LicenseProfessionalModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["LicenseProfessionalModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.license_professional_model import LicenseProfessionalModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = LicenseProfessionalModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_license_professional_model_array = cls( + result=result, + status=status, + ) + + response_license_professional_model_array.additional_properties = d + return response_license_professional_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_part_transaction_model_array.py b/accelapy/accelapy/records_client/models/response_part_transaction_model_array.py new file mode 100644 index 0000000..2c94b4e --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_part_transaction_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.part_transaction_model import PartTransactionModel + + +T = TypeVar("T", bound="ResponsePartTransactionModelArray") + + +@_attrs_define +class ResponsePartTransactionModelArray: + """ + Attributes: + result (Union[Unset, List['PartTransactionModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["PartTransactionModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.part_transaction_model import PartTransactionModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = PartTransactionModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_part_transaction_model_array = cls( + result=result, + status=status, + ) + + response_part_transaction_model_array.additional_properties = d + return response_part_transaction_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_payment_model_array.py b/accelapy/accelapy/records_client/models/response_payment_model_array.py new file mode 100644 index 0000000..1ed8eb8 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_payment_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.payment_model import PaymentModel + + +T = TypeVar("T", bound="ResponsePaymentModelArray") + + +@_attrs_define +class ResponsePaymentModelArray: + """ + Attributes: + result (Union[Unset, List['PaymentModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["PaymentModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.payment_model import PaymentModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = PaymentModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_payment_model_array = cls( + result=result, + status=status, + ) + + response_payment_model_array.additional_properties = d + return response_payment_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_additional_model_array.py b/accelapy/accelapy/records_client/models/response_record_additional_model_array.py new file mode 100644 index 0000000..3d74168 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_additional_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_additional_model import RecordAdditionalModel + + +T = TypeVar("T", bound="ResponseRecordAdditionalModelArray") + + +@_attrs_define +class ResponseRecordAdditionalModelArray: + """ + Attributes: + result (Union[Unset, List['RecordAdditionalModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordAdditionalModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_additional_model import RecordAdditionalModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordAdditionalModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_additional_model_array = cls( + result=result, + status=status, + ) + + response_record_additional_model_array.additional_properties = d + return response_record_additional_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_address_model_array.py b/accelapy/accelapy/records_client/models/response_record_address_model_array.py new file mode 100644 index 0000000..762a0f7 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_address_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_address_model import RecordAddressModel + + +T = TypeVar("T", bound="ResponseRecordAddressModelArray") + + +@_attrs_define +class ResponseRecordAddressModelArray: + """ + Attributes: + result (Union[Unset, List['RecordAddressModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordAddressModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_address_model import RecordAddressModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordAddressModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_address_model_array = cls( + result=result, + status=status, + ) + + response_record_address_model_array.additional_properties = d + return response_record_address_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_comment_model.py b/accelapy/accelapy/records_client/models/response_record_comment_model.py new file mode 100644 index 0000000..ec397e1 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_comment_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_comment_model import RecordCommentModel + + +T = TypeVar("T", bound="ResponseRecordCommentModel") + + +@_attrs_define +class ResponseRecordCommentModel: + """ + Attributes: + result (Union[Unset, RecordCommentModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "RecordCommentModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_comment_model import RecordCommentModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, RecordCommentModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = RecordCommentModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_record_comment_model = cls( + result=result, + status=status, + ) + + response_record_comment_model.additional_properties = d + return response_record_comment_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_comment_model_array.py b/accelapy/accelapy/records_client/models/response_record_comment_model_array.py new file mode 100644 index 0000000..f10bbce --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_comment_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_comment_model import RecordCommentModel + + +T = TypeVar("T", bound="ResponseRecordCommentModelArray") + + +@_attrs_define +class ResponseRecordCommentModelArray: + """ + Attributes: + result (Union[Unset, List['RecordCommentModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordCommentModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_comment_model import RecordCommentModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordCommentModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_comment_model_array = cls( + result=result, + status=status, + ) + + response_record_comment_model_array.additional_properties = d + return response_record_comment_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_condition_model_array.py b/accelapy/accelapy/records_client/models/response_record_condition_model_array.py new file mode 100644 index 0000000..d423dd4 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_condition_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_condition_model import RecordConditionModel + + +T = TypeVar("T", bound="ResponseRecordConditionModelArray") + + +@_attrs_define +class ResponseRecordConditionModelArray: + """ + Attributes: + result (Union[Unset, List['RecordConditionModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordConditionModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_condition_model import RecordConditionModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordConditionModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_condition_model_array = cls( + result=result, + status=status, + ) + + response_record_condition_model_array.additional_properties = d + return response_record_condition_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_contact_simple_model_array.py b/accelapy/accelapy/records_client/models/response_record_contact_simple_model_array.py new file mode 100644 index 0000000..cacfddc --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_contact_simple_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_contact_simple_model import RecordContactSimpleModel + + +T = TypeVar("T", bound="ResponseRecordContactSimpleModelArray") + + +@_attrs_define +class ResponseRecordContactSimpleModelArray: + """ + Attributes: + result (Union[Unset, List['RecordContactSimpleModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordContactSimpleModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_contact_simple_model import RecordContactSimpleModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordContactSimpleModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_contact_simple_model_array = cls( + result=result, + status=status, + ) + + response_record_contact_simple_model_array.additional_properties = d + return response_record_contact_simple_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_ext_model_1_array.py b/accelapy/accelapy/records_client/models/response_record_ext_model_1_array.py new file mode 100644 index 0000000..1acd961 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_ext_model_1_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_ext_model_1 import RecordExtModel1 + + +T = TypeVar("T", bound="ResponseRecordExtModel1Array") + + +@_attrs_define +class ResponseRecordExtModel1Array: + """ + Attributes: + result (Union[Unset, List['RecordExtModel1']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordExtModel1"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_ext_model_1 import RecordExtModel1 + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordExtModel1.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_ext_model_1_array = cls( + result=result, + status=status, + ) + + response_record_ext_model_1_array.additional_properties = d + return response_record_ext_model_1_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_inspection_type_model_array.py b/accelapy/accelapy/records_client/models/response_record_inspection_type_model_array.py new file mode 100644 index 0000000..2b486ce --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_inspection_type_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_inspection_type_model import RecordInspectionTypeModel + + +T = TypeVar("T", bound="ResponseRecordInspectionTypeModelArray") + + +@_attrs_define +class ResponseRecordInspectionTypeModelArray: + """ + Attributes: + result (Union[Unset, List['RecordInspectionTypeModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordInspectionTypeModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_inspection_type_model import RecordInspectionTypeModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordInspectionTypeModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_inspection_type_model_array = cls( + result=result, + status=status, + ) + + response_record_inspection_type_model_array.additional_properties = d + return response_record_inspection_type_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_model_array.py b/accelapy/accelapy/records_client/models/response_record_model_array.py new file mode 100644 index 0000000..fd6d18c --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_apo_custom_forms_model import RecordAPOCustomFormsModel + + +T = TypeVar("T", bound="ResponseRecordModelArray") + + +@_attrs_define +class ResponseRecordModelArray: + """ + Attributes: + result (Union[Unset, List['RecordAPOCustomFormsModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordAPOCustomFormsModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_apo_custom_forms_model import RecordAPOCustomFormsModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordAPOCustomFormsModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_model_array = cls( + result=result, + status=status, + ) + + response_record_model_array.additional_properties = d + return response_record_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_parcel_model_array.py b/accelapy/accelapy/records_client/models/response_record_parcel_model_array.py new file mode 100644 index 0000000..3e2072d --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_parcel_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_parcel_model import RecordParcelModel + + +T = TypeVar("T", bound="ResponseRecordParcelModelArray") + + +@_attrs_define +class ResponseRecordParcelModelArray: + """ + Attributes: + result (Union[Unset, List['RecordParcelModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordParcelModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_parcel_model import RecordParcelModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordParcelModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_parcel_model_array = cls( + result=result, + status=status, + ) + + response_record_parcel_model_array.additional_properties = d + return response_record_parcel_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_record_related_model_array.py b/accelapy/accelapy/records_client/models/response_record_related_model_array.py new file mode 100644 index 0000000..22f8240 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_record_related_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_related_model import RecordRelatedModel + + +T = TypeVar("T", bound="ResponseRecordRelatedModelArray") + + +@_attrs_define +class ResponseRecordRelatedModelArray: + """ + Attributes: + result (Union[Unset, List['RecordRelatedModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RecordRelatedModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_related_model import RecordRelatedModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RecordRelatedModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_record_related_model_array = cls( + result=result, + status=status, + ) + + response_record_related_model_array.additional_properties = d + return response_record_related_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_ref_owner_model.py b/accelapy/accelapy/records_client/models/response_ref_owner_model.py new file mode 100644 index 0000000..0769036 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_ref_owner_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ref_owner_model import RefOwnerModel + + +T = TypeVar("T", bound="ResponseRefOwnerModel") + + +@_attrs_define +class ResponseRefOwnerModel: + """ + Attributes: + result (Union[Unset, RefOwnerModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "RefOwnerModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.ref_owner_model import RefOwnerModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, RefOwnerModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = RefOwnerModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_ref_owner_model = cls( + result=result, + status=status, + ) + + response_ref_owner_model.additional_properties = d + return response_ref_owner_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_ref_owner_model_array.py b/accelapy/accelapy/records_client/models/response_ref_owner_model_array.py new file mode 100644 index 0000000..d4ac16b --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_ref_owner_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ref_owner_model import RefOwnerModel + + +T = TypeVar("T", bound="ResponseRefOwnerModelArray") + + +@_attrs_define +class ResponseRefOwnerModelArray: + """ + Attributes: + result (Union[Unset, List['RefOwnerModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["RefOwnerModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.ref_owner_model import RefOwnerModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = RefOwnerModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_ref_owner_model_array = cls( + result=result, + status=status, + ) + + response_ref_owner_model_array.additional_properties = d + return response_ref_owner_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_result_model.py b/accelapy/accelapy/records_client/models/response_result_model.py new file mode 100644 index 0000000..672e044 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_result_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.result_model import ResultModel + + +T = TypeVar("T", bound="ResponseResultModel") + + +@_attrs_define +class ResponseResultModel: + """ + Attributes: + result (Union[Unset, ResultModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "ResultModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.result_model import ResultModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, ResultModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = ResultModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_result_model = cls( + result=result, + status=status, + ) + + response_result_model.additional_properties = d + return response_result_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_result_model_array.py b/accelapy/accelapy/records_client/models/response_result_model_array.py new file mode 100644 index 0000000..5c1ee4f --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_result_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.result_model import ResultModel + + +T = TypeVar("T", bound="ResponseResultModelArray") + + +@_attrs_define +class ResponseResultModelArray: + """ + Attributes: + result (Union[Unset, List['ResultModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["ResultModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.result_model import ResultModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = ResultModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_result_model_array = cls( + result=result, + status=status, + ) + + response_result_model_array.additional_properties = d + return response_result_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_simple_record_model.py b/accelapy/accelapy/records_client/models/response_simple_record_model.py new file mode 100644 index 0000000..2917fba --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_simple_record_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.simple_record_model import SimpleRecordModel + + +T = TypeVar("T", bound="ResponseSimpleRecordModel") + + +@_attrs_define +class ResponseSimpleRecordModel: + """ + Attributes: + result (Union[Unset, SimpleRecordModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "SimpleRecordModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.simple_record_model import SimpleRecordModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, SimpleRecordModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = SimpleRecordModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_simple_record_model = cls( + result=result, + status=status, + ) + + response_simple_record_model.additional_properties = d + return response_simple_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_simple_record_model_array.py b/accelapy/accelapy/records_client/models/response_simple_record_model_array.py new file mode 100644 index 0000000..a25d3ae --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_simple_record_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.simple_record_model import SimpleRecordModel + + +T = TypeVar("T", bound="ResponseSimpleRecordModelArray") + + +@_attrs_define +class ResponseSimpleRecordModelArray: + """ + Attributes: + result (Union[Unset, List['SimpleRecordModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["SimpleRecordModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.simple_record_model import SimpleRecordModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = SimpleRecordModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_simple_record_model_array = cls( + result=result, + status=status, + ) + + response_simple_record_model_array.additional_properties = d + return response_simple_record_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_table_model_array.py b/accelapy/accelapy/records_client/models/response_table_model_array.py new file mode 100644 index 0000000..d0eb510 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_table_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.table_model import TableModel + + +T = TypeVar("T", bound="ResponseTableModelArray") + + +@_attrs_define +class ResponseTableModelArray: + """ + Attributes: + result (Union[Unset, List['TableModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["TableModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.table_model import TableModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = TableModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_table_model_array = cls( + result=result, + status=status, + ) + + response_table_model_array.additional_properties = d + return response_table_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_task_item_action_model_array.py b/accelapy/accelapy/records_client/models/response_task_item_action_model_array.py new file mode 100644 index 0000000..530392b --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_task_item_action_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.task_item_action_model import TaskItemActionModel + + +T = TypeVar("T", bound="ResponseTaskItemActionModelArray") + + +@_attrs_define +class ResponseTaskItemActionModelArray: + """ + Attributes: + result (Union[Unset, List['TaskItemActionModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["TaskItemActionModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.task_item_action_model import TaskItemActionModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = TaskItemActionModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_task_item_action_model_array = cls( + result=result, + status=status, + ) + + response_task_item_action_model_array.additional_properties = d + return response_task_item_action_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_task_item_model.py b/accelapy/accelapy/records_client/models/response_task_item_model.py new file mode 100644 index 0000000..b4ac573 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_task_item_model.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.task_item_model import TaskItemModel + + +T = TypeVar("T", bound="ResponseTaskItemModel") + + +@_attrs_define +class ResponseTaskItemModel: + """ + Attributes: + result (Union[Unset, TaskItemModel]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "TaskItemModel"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.task_item_model import TaskItemModel + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, TaskItemModel] + if isinstance(_result, Unset): + result = UNSET + else: + result = TaskItemModel.from_dict(_result) + + status = d.pop("status", UNSET) + + response_task_item_model = cls( + result=result, + status=status, + ) + + response_task_item_model.additional_properties = d + return response_task_item_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_task_item_model_array.py b/accelapy/accelapy/records_client/models/response_task_item_model_array.py new file mode 100644 index 0000000..8d48a9a --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_task_item_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.task_item_model import TaskItemModel + + +T = TypeVar("T", bound="ResponseTaskItemModelArray") + + +@_attrs_define +class ResponseTaskItemModelArray: + """ + Attributes: + result (Union[Unset, List['TaskItemModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["TaskItemModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.task_item_model import TaskItemModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = TaskItemModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_task_item_model_array = cls( + result=result, + status=status, + ) + + response_task_item_model_array.additional_properties = d + return response_task_item_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_trust_account_model_array.py b/accelapy/accelapy/records_client/models/response_trust_account_model_array.py new file mode 100644 index 0000000..b58d2ac --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_trust_account_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.trust_account_model import TrustAccountModel + + +T = TypeVar("T", bound="ResponseTrustAccountModelArray") + + +@_attrs_define +class ResponseTrustAccountModelArray: + """ + Attributes: + result (Union[Unset, List['TrustAccountModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["TrustAccountModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.trust_account_model import TrustAccountModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = TrustAccountModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_trust_account_model_array = cls( + result=result, + status=status, + ) + + response_trust_account_model_array.additional_properties = d + return response_trust_account_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_vote_result.py b/accelapy/accelapy/records_client/models/response_vote_result.py new file mode 100644 index 0000000..45c453f --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_vote_result.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.vote_result import VoteResult + + +T = TypeVar("T", bound="ResponseVoteResult") + + +@_attrs_define +class ResponseVoteResult: + """ + Attributes: + result (Union[Unset, VoteResult]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "VoteResult"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.vote_result import VoteResult + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, VoteResult] + if isinstance(_result, Unset): + result = UNSET + else: + result = VoteResult.from_dict(_result) + + status = d.pop("status", UNSET) + + response_vote_result = cls( + result=result, + status=status, + ) + + response_vote_result.additional_properties = d + return response_vote_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_vote_summary.py b/accelapy/accelapy/records_client/models/response_vote_summary.py new file mode 100644 index 0000000..96e9e83 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_vote_summary.py @@ -0,0 +1,80 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.vote_summary import VoteSummary + + +T = TypeVar("T", bound="ResponseVoteSummary") + + +@_attrs_define +class ResponseVoteSummary: + """ + Attributes: + result (Union[Unset, VoteSummary]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, "VoteSummary"] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.result, Unset): + result = self.result.to_dict() + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.vote_summary import VoteSummary + + d = src_dict.copy() + _result = d.pop("result", UNSET) + result: Union[Unset, VoteSummary] + if isinstance(_result, Unset): + result = UNSET + else: + result = VoteSummary.from_dict(_result) + + status = d.pop("status", UNSET) + + response_vote_summary = cls( + result=result, + status=status, + ) + + response_vote_summary.additional_properties = d + return response_vote_summary + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/response_workflow_task_comment_model_array.py b/accelapy/accelapy/records_client/models/response_workflow_task_comment_model_array.py new file mode 100644 index 0000000..9e10359 --- /dev/null +++ b/accelapy/accelapy/records_client/models/response_workflow_task_comment_model_array.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workflow_task_comment_model import WorkflowTaskCommentModel + + +T = TypeVar("T", bound="ResponseWorkflowTaskCommentModelArray") + + +@_attrs_define +class ResponseWorkflowTaskCommentModelArray: + """ + Attributes: + result (Union[Unset, List['WorkflowTaskCommentModel']]): + status (Union[Unset, int]): The HTTP return status. + """ + + result: Union[Unset, List["WorkflowTaskCommentModel"]] = UNSET + status: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + result: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.result, Unset): + result = [] + for result_item_data in self.result: + result_item = result_item_data.to_dict() + + result.append(result_item) + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if result is not UNSET: + field_dict["result"] = result + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.workflow_task_comment_model import WorkflowTaskCommentModel + + d = src_dict.copy() + result = [] + _result = d.pop("result", UNSET) + for result_item_data in _result or []: + result_item = WorkflowTaskCommentModel.from_dict(result_item_data) + + result.append(result_item) + + status = d.pop("status", UNSET) + + response_workflow_task_comment_model_array = cls( + result=result, + status=status, + ) + + response_workflow_task_comment_model_array.additional_properties = d + return response_workflow_task_comment_model_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/result_model.py b/accelapy/accelapy/records_client/models/result_model.py new file mode 100644 index 0000000..479aab2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/result_model.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ResultModel") + + +@_attrs_define +class ResultModel: + """ + Attributes: + code (Union[Unset, str]): The error code, if an error is encountered. + id (Union[Unset, int]): The system id of the object in this operation. + is_success (Union[Unset, bool]): Indicates whether or not the operation on the object is successful. + message (Union[Unset, str]): The error message, if an error is encountered + """ + + code: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + is_success: Union[Unset, bool] = UNSET + message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + code = self.code + id = self.id + is_success = self.is_success + message = self.message + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if id is not UNSET: + field_dict["id"] = id + if is_success is not UNSET: + field_dict["isSuccess"] = is_success + if message is not UNSET: + field_dict["message"] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + code = d.pop("code", UNSET) + + id = d.pop("id", UNSET) + + is_success = d.pop("isSuccess", UNSET) + + message = d.pop("message", UNSET) + + result_model = cls( + code=code, + id=id, + is_success=is_success, + message=message, + ) + + result_model.additional_properties = d + return result_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/row_model.py b/accelapy/accelapy/records_client/models/row_model.py new file mode 100644 index 0000000..03cdac3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/row_model.py @@ -0,0 +1,105 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.row_model_action import RowModelAction +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_attribute_model import CustomAttributeModel + + +T = TypeVar("T", bound="RowModel") + + +@_attrs_define +class RowModel: + """ + Attributes: + action (Union[Unset, RowModelAction]): The requested operation on the row. + fields (Union[Unset, CustomAttributeModel]): Contains a custom form consisting of the custom form id and custom + field name and value pairs. For example in JSON, "My Custom Field": "My Custom Value". The custom field name and + its data type are defined in Civic Platform custom forms or custom tables:
**For a Text field**, the + maximum length is 256.
**For a Number field**, any numeric form is allowed, including negative numbers. +
**For a Date field**, the format is MM/dd/yyyy.
**For a Time field**, the format is hh:mm. +
**For a TextArea field**, the maximum length is 4000 characters, and allows line return characters. +
**For a DropdownList field**, the dropdown list values are in the options[] array.
**For a CheckBox + field**, the (case-sensitive) valid values are "UNCHECKED" and "CHECKED".
**For a Radio(Y/N) field**, the + (case-sensitive) valid values are "Yes" and "No". + id (Union[Unset, str]): The row id. + """ + + action: Union[Unset, RowModelAction] = UNSET + fields: Union[Unset, "CustomAttributeModel"] = UNSET + id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + action: Union[Unset, str] = UNSET + if not isinstance(self.action, Unset): + action = self.action.value + + fields: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.fields, Unset): + fields = self.fields.to_dict() + + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action is not UNSET: + field_dict["action"] = action + if fields is not UNSET: + field_dict["fields"] = fields + if id is not UNSET: + field_dict["id"] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_attribute_model import CustomAttributeModel + + d = src_dict.copy() + _action = d.pop("action", UNSET) + action: Union[Unset, RowModelAction] + if isinstance(_action, Unset): + action = UNSET + else: + action = RowModelAction(_action) + + _fields = d.pop("fields", UNSET) + fields: Union[Unset, CustomAttributeModel] + if isinstance(_fields, Unset): + fields = UNSET + else: + fields = CustomAttributeModel.from_dict(_fields) + + id = d.pop("id", UNSET) + + row_model = cls( + action=action, + fields=fields, + id=id, + ) + + row_model.additional_properties = d + return row_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/row_model_action.py b/accelapy/accelapy/records_client/models/row_model_action.py new file mode 100644 index 0000000..ac3e137 --- /dev/null +++ b/accelapy/accelapy/records_client/models/row_model_action.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class RowModelAction(str, Enum): + ADD = "add" + DELETE = "delete" + UPDATE = "update" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/simple_record_model.py b/accelapy/accelapy/records_client/models/simple_record_model.py new file mode 100644 index 0000000..14bbb23 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model.py @@ -0,0 +1,781 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.simple_record_model_created_by_cloning import SimpleRecordModelCreatedByCloning +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.simple_record_model_construction_type import SimpleRecordModelConstructionType + from ..models.simple_record_model_priority import SimpleRecordModelPriority + from ..models.simple_record_model_reported_channel import SimpleRecordModelReportedChannel + from ..models.simple_record_model_reported_type import SimpleRecordModelReportedType + from ..models.simple_record_model_severity import SimpleRecordModelSeverity + from ..models.simple_record_model_status import SimpleRecordModelStatus + from ..models.simple_record_model_status_reason import SimpleRecordModelStatusReason + + +T = TypeVar("T", bound="SimpleRecordModel") + + +@_attrs_define +class SimpleRecordModel: + """ + Attributes: + actual_production_unit (Union[Unset, float]): Estimated cost per production unit. + appearance_date (Union[Unset, datetime.datetime]): The date for a hearing appearance. + appearance_day_of_week (Union[Unset, str]): The day for a hearing appearance. + assigned_date (Union[Unset, datetime.datetime]): The date the application was assigned. + assigned_to_department (Union[Unset, str]): The department responsible for the action. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + assigned_user (Union[Unset, str]): The staff member responsible for the action. + balance (Union[Unset, float]): The amount due. + booking (Union[Unset, bool]): Indicates whether or not there was a booking in addition to a citation. + closed_by_department (Union[Unset, str]): The department responsible for closing the record. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + closed_by_user (Union[Unset, str]): The staff member responsible for closure. + closed_date (Union[Unset, datetime.datetime]): The date the application was closed. + complete_date (Union[Unset, datetime.datetime]): The date the application was completed. + completed_by_department (Union[Unset, str]): The department responsible for completion. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + completed_by_user (Union[Unset, str]): The staff member responsible for completion. + construction_type (Union[Unset, SimpleRecordModelConstructionType]): The US Census Bureau construction type + code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + cost_per_unit (Union[Unset, float]): The cost for one unit associated to the record. + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_by_cloning (Union[Unset, SimpleRecordModelCreatedByCloning]): Indictes whether or not the record was + cloned. + custom_id (Union[Unset, str]): An ID based on a different numbering convention from the numbering convention + used by the record ID (xxxxx-xx-xxxxx). Civic Platform auto-generates and applies an alternate ID value when you + submit a new application. + defendant_signature (Union[Unset, bool]): Indicates whether or not a defendant's signature has been obtained. + description (Union[Unset, str]): The description of the record or item. + enforce_department (Union[Unset, str]): The name of the department responsible for enforcement. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + enforce_user (Union[Unset, str]): Name of the enforcement officer. + enforce_user_id (Union[Unset, str]): ID number of the enforcement officer. + estimated_cost_per_unit (Union[Unset, float]): The estimated cost per unit. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_production_unit (Union[Unset, float]): The estimated number of production units. + estimated_total_job_cost (Union[Unset, float]): The estimated cost of the job. + first_issued_date (Union[Unset, datetime.datetime]): The first issued date for license + housing_units (Union[Unset, int]): The number of housing units. + id (Union[Unset, str]): The record system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + infraction (Union[Unset, bool]): Indicates whether or not an infraction occurred. + initiated_product (Union[Unset, str]): The Civic Platform product where the application is submitted: "AA" : + Classic Accela Automation. "ACA" : Accela Citizen Access. "AIVR" : Accela Integrated Voice Response. "AMO" : + Accela Mobile Office. "AV360" : Accela Asset Management, Accela Land Management. + inspector_department (Union[Unset, str]): The name of the department where the inspector works. See [Get All + Departments](./api-settings.html#operation/v4.get.settings.departments). + inspector_id (Union[Unset, str]): The ID number of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + inspector_name (Union[Unset, str]): The name of the inspector. See [Get All Inspectors](./api- + inspections.html#operation/v4.get.inspectors). + job_value (Union[Unset, float]): The value of the job. + misdemeanor (Union[Unset, bool]): Indicates whether or not a misdemeanor occurred. + module (Union[Unset, str]): The module the record belongs to. See [Get All Modules](./api- + settings.html#operation/v4.get.settings.modules). + name (Union[Unset, str]): The name associated to the record. + number_of_buildings (Union[Unset, int]): The number of buildings. + offense_witnessed (Union[Unset, bool]): Indicates whether or not there was a witness to the alleged offense. + opened_date (Union[Unset, datetime.datetime]): The date the application was opened. + overall_application_time (Union[Unset, float]): The amount of elapsed time from the time tracking start date to + the completion of the application. + priority (Union[Unset, SimpleRecordModelPriority]): The priority level assigned to the record. See [Get All + Priorities](./api-settings.html#operation/v4.get.settings.priorities). + public_owned (Union[Unset, bool]): Indicates whether or not the record is for the public. + record_class (Union[Unset, str]): General information about the record. + renewal_info (Union[Unset, RecordExpirationModel]): + reported_channel (Union[Unset, SimpleRecordModelReportedChannel]): The incoming channel through which the + applicant submitted the application. + reported_date (Union[Unset, datetime.datetime]): The date the complaint was reported. + reported_type (Union[Unset, SimpleRecordModelReportedType]): The type of complaint or incident being reported. + scheduled_date (Union[Unset, datetime.datetime]): The date when the inspection gets scheduled. + service_provider_code (Union[Unset, str]): The unique agency identifier, + severity (Union[Unset, SimpleRecordModelSeverity]): Indicates the severity of the condition. + short_notes (Union[Unset, str]): A brief note about the record subject. + status (Union[Unset, SimpleRecordModelStatus]): The record status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + status_reason (Union[Unset, SimpleRecordModelStatusReason]): The reason for the status setting on the record. + total_fee (Union[Unset, float]): The total amount of the fees invoiced to the record. + total_job_cost (Union[Unset, float]): The combination of work order assignments (labor) and costs. + total_pay (Union[Unset, float]): The total amount of pay. + tracking_id (Union[Unset, int]): The application tracking number (IVR tracking number). + type (Union[Unset, RecordTypeModel]): + undistributed_cost (Union[Unset, float]): The undistributed costs for this work order. + value (Union[Unset, str]): The record value. + """ + + actual_production_unit: Union[Unset, float] = UNSET + appearance_date: Union[Unset, datetime.datetime] = UNSET + appearance_day_of_week: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, str] = UNSET + assigned_user: Union[Unset, str] = UNSET + balance: Union[Unset, float] = UNSET + booking: Union[Unset, bool] = UNSET + closed_by_department: Union[Unset, str] = UNSET + closed_by_user: Union[Unset, str] = UNSET + closed_date: Union[Unset, datetime.datetime] = UNSET + complete_date: Union[Unset, datetime.datetime] = UNSET + completed_by_department: Union[Unset, str] = UNSET + completed_by_user: Union[Unset, str] = UNSET + construction_type: Union[Unset, "SimpleRecordModelConstructionType"] = UNSET + cost_per_unit: Union[Unset, float] = UNSET + created_by: Union[Unset, str] = UNSET + created_by_cloning: Union[Unset, SimpleRecordModelCreatedByCloning] = UNSET + custom_id: Union[Unset, str] = UNSET + defendant_signature: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + enforce_department: Union[Unset, str] = UNSET + enforce_user: Union[Unset, str] = UNSET + enforce_user_id: Union[Unset, str] = UNSET + estimated_cost_per_unit: Union[Unset, float] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_production_unit: Union[Unset, float] = UNSET + estimated_total_job_cost: Union[Unset, float] = UNSET + first_issued_date: Union[Unset, datetime.datetime] = UNSET + housing_units: Union[Unset, int] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + infraction: Union[Unset, bool] = UNSET + initiated_product: Union[Unset, str] = UNSET + inspector_department: Union[Unset, str] = UNSET + inspector_id: Union[Unset, str] = UNSET + inspector_name: Union[Unset, str] = UNSET + job_value: Union[Unset, float] = UNSET + misdemeanor: Union[Unset, bool] = UNSET + module: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + number_of_buildings: Union[Unset, int] = UNSET + offense_witnessed: Union[Unset, bool] = UNSET + opened_date: Union[Unset, datetime.datetime] = UNSET + overall_application_time: Union[Unset, float] = UNSET + priority: Union[Unset, "SimpleRecordModelPriority"] = UNSET + public_owned: Union[Unset, bool] = UNSET + record_class: Union[Unset, str] = UNSET + renewal_info: Union[Unset, "RecordExpirationModel"] = UNSET + reported_channel: Union[Unset, "SimpleRecordModelReportedChannel"] = UNSET + reported_date: Union[Unset, datetime.datetime] = UNSET + reported_type: Union[Unset, "SimpleRecordModelReportedType"] = UNSET + scheduled_date: Union[Unset, datetime.datetime] = UNSET + service_provider_code: Union[Unset, str] = UNSET + severity: Union[Unset, "SimpleRecordModelSeverity"] = UNSET + short_notes: Union[Unset, str] = UNSET + status: Union[Unset, "SimpleRecordModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + status_reason: Union[Unset, "SimpleRecordModelStatusReason"] = UNSET + total_fee: Union[Unset, float] = UNSET + total_job_cost: Union[Unset, float] = UNSET + total_pay: Union[Unset, float] = UNSET + tracking_id: Union[Unset, int] = UNSET + type: Union[Unset, "RecordTypeModel"] = UNSET + undistributed_cost: Union[Unset, float] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actual_production_unit = self.actual_production_unit + appearance_date: Union[Unset, str] = UNSET + if not isinstance(self.appearance_date, Unset): + appearance_date = self.appearance_date.isoformat() + + appearance_day_of_week = self.appearance_day_of_week + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department = self.assigned_to_department + assigned_user = self.assigned_user + balance = self.balance + booking = self.booking + closed_by_department = self.closed_by_department + closed_by_user = self.closed_by_user + closed_date: Union[Unset, str] = UNSET + if not isinstance(self.closed_date, Unset): + closed_date = self.closed_date.isoformat() + + complete_date: Union[Unset, str] = UNSET + if not isinstance(self.complete_date, Unset): + complete_date = self.complete_date.isoformat() + + completed_by_department = self.completed_by_department + completed_by_user = self.completed_by_user + construction_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.construction_type, Unset): + construction_type = self.construction_type.to_dict() + + cost_per_unit = self.cost_per_unit + created_by = self.created_by + created_by_cloning: Union[Unset, str] = UNSET + if not isinstance(self.created_by_cloning, Unset): + created_by_cloning = self.created_by_cloning.value + + custom_id = self.custom_id + defendant_signature = self.defendant_signature + description = self.description + enforce_department = self.enforce_department + enforce_user = self.enforce_user + enforce_user_id = self.enforce_user_id + estimated_cost_per_unit = self.estimated_cost_per_unit + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_production_unit = self.estimated_production_unit + estimated_total_job_cost = self.estimated_total_job_cost + first_issued_date: Union[Unset, str] = UNSET + if not isinstance(self.first_issued_date, Unset): + first_issued_date = self.first_issued_date.isoformat() + + housing_units = self.housing_units + id = self.id + in_possession_time = self.in_possession_time + infraction = self.infraction + initiated_product = self.initiated_product + inspector_department = self.inspector_department + inspector_id = self.inspector_id + inspector_name = self.inspector_name + job_value = self.job_value + misdemeanor = self.misdemeanor + module = self.module + name = self.name + number_of_buildings = self.number_of_buildings + offense_witnessed = self.offense_witnessed + opened_date: Union[Unset, str] = UNSET + if not isinstance(self.opened_date, Unset): + opened_date = self.opened_date.isoformat() + + overall_application_time = self.overall_application_time + priority: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority.to_dict() + + public_owned = self.public_owned + record_class = self.record_class + renewal_info: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.renewal_info, Unset): + renewal_info = self.renewal_info.to_dict() + + reported_channel: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_channel, Unset): + reported_channel = self.reported_channel.to_dict() + + reported_date: Union[Unset, str] = UNSET + if not isinstance(self.reported_date, Unset): + reported_date = self.reported_date.isoformat() + + reported_type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.reported_type, Unset): + reported_type = self.reported_type.to_dict() + + scheduled_date: Union[Unset, str] = UNSET + if not isinstance(self.scheduled_date, Unset): + scheduled_date = self.scheduled_date.isoformat() + + service_provider_code = self.service_provider_code + severity: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.severity, Unset): + severity = self.severity.to_dict() + + short_notes = self.short_notes + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + status_reason: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status_reason, Unset): + status_reason = self.status_reason.to_dict() + + total_fee = self.total_fee + total_job_cost = self.total_job_cost + total_pay = self.total_pay + tracking_id = self.tracking_id + type: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.type, Unset): + type = self.type.to_dict() + + undistributed_cost = self.undistributed_cost + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actual_production_unit is not UNSET: + field_dict["actualProductionUnit"] = actual_production_unit + if appearance_date is not UNSET: + field_dict["appearanceDate"] = appearance_date + if appearance_day_of_week is not UNSET: + field_dict["appearanceDayOfWeek"] = appearance_day_of_week + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if balance is not UNSET: + field_dict["balance"] = balance + if booking is not UNSET: + field_dict["booking"] = booking + if closed_by_department is not UNSET: + field_dict["closedByDepartment"] = closed_by_department + if closed_by_user is not UNSET: + field_dict["closedByUser"] = closed_by_user + if closed_date is not UNSET: + field_dict["closedDate"] = closed_date + if complete_date is not UNSET: + field_dict["completeDate"] = complete_date + if completed_by_department is not UNSET: + field_dict["completedByDepartment"] = completed_by_department + if completed_by_user is not UNSET: + field_dict["completedByUser"] = completed_by_user + if construction_type is not UNSET: + field_dict["constructionType"] = construction_type + if cost_per_unit is not UNSET: + field_dict["costPerUnit"] = cost_per_unit + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_by_cloning is not UNSET: + field_dict["createdByCloning"] = created_by_cloning + if custom_id is not UNSET: + field_dict["customId"] = custom_id + if defendant_signature is not UNSET: + field_dict["defendantSignature"] = defendant_signature + if description is not UNSET: + field_dict["description"] = description + if enforce_department is not UNSET: + field_dict["enforceDepartment"] = enforce_department + if enforce_user is not UNSET: + field_dict["enforceUser"] = enforce_user + if enforce_user_id is not UNSET: + field_dict["enforceUserId"] = enforce_user_id + if estimated_cost_per_unit is not UNSET: + field_dict["estimatedCostPerUnit"] = estimated_cost_per_unit + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_production_unit is not UNSET: + field_dict["estimatedProductionUnit"] = estimated_production_unit + if estimated_total_job_cost is not UNSET: + field_dict["estimatedTotalJobCost"] = estimated_total_job_cost + if first_issued_date is not UNSET: + field_dict["firstIssuedDate"] = first_issued_date + if housing_units is not UNSET: + field_dict["housingUnits"] = housing_units + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if infraction is not UNSET: + field_dict["infraction"] = infraction + if initiated_product is not UNSET: + field_dict["initiatedProduct"] = initiated_product + if inspector_department is not UNSET: + field_dict["inspectorDepartment"] = inspector_department + if inspector_id is not UNSET: + field_dict["inspectorId"] = inspector_id + if inspector_name is not UNSET: + field_dict["inspectorName"] = inspector_name + if job_value is not UNSET: + field_dict["jobValue"] = job_value + if misdemeanor is not UNSET: + field_dict["misdemeanor"] = misdemeanor + if module is not UNSET: + field_dict["module"] = module + if name is not UNSET: + field_dict["name"] = name + if number_of_buildings is not UNSET: + field_dict["numberOfBuildings"] = number_of_buildings + if offense_witnessed is not UNSET: + field_dict["offenseWitnessed"] = offense_witnessed + if opened_date is not UNSET: + field_dict["openedDate"] = opened_date + if overall_application_time is not UNSET: + field_dict["overallApplicationTime"] = overall_application_time + if priority is not UNSET: + field_dict["priority"] = priority + if public_owned is not UNSET: + field_dict["publicOwned"] = public_owned + if record_class is not UNSET: + field_dict["recordClass"] = record_class + if renewal_info is not UNSET: + field_dict["renewalInfo"] = renewal_info + if reported_channel is not UNSET: + field_dict["reportedChannel"] = reported_channel + if reported_date is not UNSET: + field_dict["reportedDate"] = reported_date + if reported_type is not UNSET: + field_dict["reportedType"] = reported_type + if scheduled_date is not UNSET: + field_dict["scheduledDate"] = scheduled_date + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if severity is not UNSET: + field_dict["severity"] = severity + if short_notes is not UNSET: + field_dict["shortNotes"] = short_notes + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if status_reason is not UNSET: + field_dict["statusReason"] = status_reason + if total_fee is not UNSET: + field_dict["totalFee"] = total_fee + if total_job_cost is not UNSET: + field_dict["totalJobCost"] = total_job_cost + if total_pay is not UNSET: + field_dict["totalPay"] = total_pay + if tracking_id is not UNSET: + field_dict["trackingId"] = tracking_id + if type is not UNSET: + field_dict["type"] = type + if undistributed_cost is not UNSET: + field_dict["undistributedCost"] = undistributed_cost + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_expiration_model import RecordExpirationModel + from ..models.record_type_model import RecordTypeModel + from ..models.simple_record_model_construction_type import SimpleRecordModelConstructionType + from ..models.simple_record_model_priority import SimpleRecordModelPriority + from ..models.simple_record_model_reported_channel import SimpleRecordModelReportedChannel + from ..models.simple_record_model_reported_type import SimpleRecordModelReportedType + from ..models.simple_record_model_severity import SimpleRecordModelSeverity + from ..models.simple_record_model_status import SimpleRecordModelStatus + from ..models.simple_record_model_status_reason import SimpleRecordModelStatusReason + + d = src_dict.copy() + actual_production_unit = d.pop("actualProductionUnit", UNSET) + + _appearance_date = d.pop("appearanceDate", UNSET) + appearance_date: Union[Unset, datetime.datetime] + if isinstance(_appearance_date, Unset): + appearance_date = UNSET + else: + appearance_date = isoparse(_appearance_date) + + appearance_day_of_week = d.pop("appearanceDayOfWeek", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + assigned_to_department = d.pop("assignedToDepartment", UNSET) + + assigned_user = d.pop("assignedUser", UNSET) + + balance = d.pop("balance", UNSET) + + booking = d.pop("booking", UNSET) + + closed_by_department = d.pop("closedByDepartment", UNSET) + + closed_by_user = d.pop("closedByUser", UNSET) + + _closed_date = d.pop("closedDate", UNSET) + closed_date: Union[Unset, datetime.datetime] + if isinstance(_closed_date, Unset): + closed_date = UNSET + else: + closed_date = isoparse(_closed_date) + + _complete_date = d.pop("completeDate", UNSET) + complete_date: Union[Unset, datetime.datetime] + if isinstance(_complete_date, Unset): + complete_date = UNSET + else: + complete_date = isoparse(_complete_date) + + completed_by_department = d.pop("completedByDepartment", UNSET) + + completed_by_user = d.pop("completedByUser", UNSET) + + _construction_type = d.pop("constructionType", UNSET) + construction_type: Union[Unset, SimpleRecordModelConstructionType] + if isinstance(_construction_type, Unset): + construction_type = UNSET + else: + construction_type = SimpleRecordModelConstructionType.from_dict(_construction_type) + + cost_per_unit = d.pop("costPerUnit", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_by_cloning = d.pop("createdByCloning", UNSET) + created_by_cloning: Union[Unset, SimpleRecordModelCreatedByCloning] + if isinstance(_created_by_cloning, Unset): + created_by_cloning = UNSET + else: + created_by_cloning = SimpleRecordModelCreatedByCloning(_created_by_cloning) + + custom_id = d.pop("customId", UNSET) + + defendant_signature = d.pop("defendantSignature", UNSET) + + description = d.pop("description", UNSET) + + enforce_department = d.pop("enforceDepartment", UNSET) + + enforce_user = d.pop("enforceUser", UNSET) + + enforce_user_id = d.pop("enforceUserId", UNSET) + + estimated_cost_per_unit = d.pop("estimatedCostPerUnit", UNSET) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_production_unit = d.pop("estimatedProductionUnit", UNSET) + + estimated_total_job_cost = d.pop("estimatedTotalJobCost", UNSET) + + _first_issued_date = d.pop("firstIssuedDate", UNSET) + first_issued_date: Union[Unset, datetime.datetime] + if isinstance(_first_issued_date, Unset): + first_issued_date = UNSET + else: + first_issued_date = isoparse(_first_issued_date) + + housing_units = d.pop("housingUnits", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + infraction = d.pop("infraction", UNSET) + + initiated_product = d.pop("initiatedProduct", UNSET) + + inspector_department = d.pop("inspectorDepartment", UNSET) + + inspector_id = d.pop("inspectorId", UNSET) + + inspector_name = d.pop("inspectorName", UNSET) + + job_value = d.pop("jobValue", UNSET) + + misdemeanor = d.pop("misdemeanor", UNSET) + + module = d.pop("module", UNSET) + + name = d.pop("name", UNSET) + + number_of_buildings = d.pop("numberOfBuildings", UNSET) + + offense_witnessed = d.pop("offenseWitnessed", UNSET) + + _opened_date = d.pop("openedDate", UNSET) + opened_date: Union[Unset, datetime.datetime] + if isinstance(_opened_date, Unset): + opened_date = UNSET + else: + opened_date = isoparse(_opened_date) + + overall_application_time = d.pop("overallApplicationTime", UNSET) + + _priority = d.pop("priority", UNSET) + priority: Union[Unset, SimpleRecordModelPriority] + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = SimpleRecordModelPriority.from_dict(_priority) + + public_owned = d.pop("publicOwned", UNSET) + + record_class = d.pop("recordClass", UNSET) + + _renewal_info = d.pop("renewalInfo", UNSET) + renewal_info: Union[Unset, RecordExpirationModel] + if isinstance(_renewal_info, Unset): + renewal_info = UNSET + else: + renewal_info = RecordExpirationModel.from_dict(_renewal_info) + + _reported_channel = d.pop("reportedChannel", UNSET) + reported_channel: Union[Unset, SimpleRecordModelReportedChannel] + if isinstance(_reported_channel, Unset): + reported_channel = UNSET + else: + reported_channel = SimpleRecordModelReportedChannel.from_dict(_reported_channel) + + _reported_date = d.pop("reportedDate", UNSET) + reported_date: Union[Unset, datetime.datetime] + if isinstance(_reported_date, Unset): + reported_date = UNSET + else: + reported_date = isoparse(_reported_date) + + _reported_type = d.pop("reportedType", UNSET) + reported_type: Union[Unset, SimpleRecordModelReportedType] + if isinstance(_reported_type, Unset): + reported_type = UNSET + else: + reported_type = SimpleRecordModelReportedType.from_dict(_reported_type) + + _scheduled_date = d.pop("scheduledDate", UNSET) + scheduled_date: Union[Unset, datetime.datetime] + if isinstance(_scheduled_date, Unset): + scheduled_date = UNSET + else: + scheduled_date = isoparse(_scheduled_date) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _severity = d.pop("severity", UNSET) + severity: Union[Unset, SimpleRecordModelSeverity] + if isinstance(_severity, Unset): + severity = UNSET + else: + severity = SimpleRecordModelSeverity.from_dict(_severity) + + short_notes = d.pop("shortNotes", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, SimpleRecordModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = SimpleRecordModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _status_reason = d.pop("statusReason", UNSET) + status_reason: Union[Unset, SimpleRecordModelStatusReason] + if isinstance(_status_reason, Unset): + status_reason = UNSET + else: + status_reason = SimpleRecordModelStatusReason.from_dict(_status_reason) + + total_fee = d.pop("totalFee", UNSET) + + total_job_cost = d.pop("totalJobCost", UNSET) + + total_pay = d.pop("totalPay", UNSET) + + tracking_id = d.pop("trackingId", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RecordTypeModel] + if isinstance(_type, Unset): + type = UNSET + else: + type = RecordTypeModel.from_dict(_type) + + undistributed_cost = d.pop("undistributedCost", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model = cls( + actual_production_unit=actual_production_unit, + appearance_date=appearance_date, + appearance_day_of_week=appearance_day_of_week, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + balance=balance, + booking=booking, + closed_by_department=closed_by_department, + closed_by_user=closed_by_user, + closed_date=closed_date, + complete_date=complete_date, + completed_by_department=completed_by_department, + completed_by_user=completed_by_user, + construction_type=construction_type, + cost_per_unit=cost_per_unit, + created_by=created_by, + created_by_cloning=created_by_cloning, + custom_id=custom_id, + defendant_signature=defendant_signature, + description=description, + enforce_department=enforce_department, + enforce_user=enforce_user, + enforce_user_id=enforce_user_id, + estimated_cost_per_unit=estimated_cost_per_unit, + estimated_due_date=estimated_due_date, + estimated_production_unit=estimated_production_unit, + estimated_total_job_cost=estimated_total_job_cost, + first_issued_date=first_issued_date, + housing_units=housing_units, + id=id, + in_possession_time=in_possession_time, + infraction=infraction, + initiated_product=initiated_product, + inspector_department=inspector_department, + inspector_id=inspector_id, + inspector_name=inspector_name, + job_value=job_value, + misdemeanor=misdemeanor, + module=module, + name=name, + number_of_buildings=number_of_buildings, + offense_witnessed=offense_witnessed, + opened_date=opened_date, + overall_application_time=overall_application_time, + priority=priority, + public_owned=public_owned, + record_class=record_class, + renewal_info=renewal_info, + reported_channel=reported_channel, + reported_date=reported_date, + reported_type=reported_type, + scheduled_date=scheduled_date, + service_provider_code=service_provider_code, + severity=severity, + short_notes=short_notes, + status=status, + status_date=status_date, + status_reason=status_reason, + total_fee=total_fee, + total_job_cost=total_job_cost, + total_pay=total_pay, + tracking_id=tracking_id, + type=type, + undistributed_cost=undistributed_cost, + value=value, + ) + + simple_record_model.additional_properties = d + return simple_record_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_construction_type.py b/accelapy/accelapy/records_client/models/simple_record_model_construction_type.py new file mode 100644 index 0000000..4bda256 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_construction_type.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelConstructionType") + + +@_attrs_define +class SimpleRecordModelConstructionType: + """The US Census Bureau construction type code. See [Get All Record Construction Types](./api- + settings.html#operation/v4.get.settings.records.constructionTypes). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_construction_type = cls( + text=text, + value=value, + ) + + simple_record_model_construction_type.additional_properties = d + return simple_record_model_construction_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_created_by_cloning.py b/accelapy/accelapy/records_client/models/simple_record_model_created_by_cloning.py new file mode 100644 index 0000000..2860099 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_created_by_cloning.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class SimpleRecordModelCreatedByCloning(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/simple_record_model_priority.py b/accelapy/accelapy/records_client/models/simple_record_model_priority.py new file mode 100644 index 0000000..9a210bb --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_priority.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelPriority") + + +@_attrs_define +class SimpleRecordModelPriority: + """The priority level assigned to the record. See [Get All Priorities](./api- + settings.html#operation/v4.get.settings.priorities). + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_priority = cls( + text=text, + value=value, + ) + + simple_record_model_priority.additional_properties = d + return simple_record_model_priority + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_reported_channel.py b/accelapy/accelapy/records_client/models/simple_record_model_reported_channel.py new file mode 100644 index 0000000..45f9807 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_reported_channel.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelReportedChannel") + + +@_attrs_define +class SimpleRecordModelReportedChannel: + """The incoming channel through which the applicant submitted the application. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_reported_channel = cls( + text=text, + value=value, + ) + + simple_record_model_reported_channel.additional_properties = d + return simple_record_model_reported_channel + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_reported_type.py b/accelapy/accelapy/records_client/models/simple_record_model_reported_type.py new file mode 100644 index 0000000..c407cff --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_reported_type.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelReportedType") + + +@_attrs_define +class SimpleRecordModelReportedType: + """The type of complaint or incident being reported. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_reported_type = cls( + text=text, + value=value, + ) + + simple_record_model_reported_type.additional_properties = d + return simple_record_model_reported_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_severity.py b/accelapy/accelapy/records_client/models/simple_record_model_severity.py new file mode 100644 index 0000000..31e0e92 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_severity.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelSeverity") + + +@_attrs_define +class SimpleRecordModelSeverity: + """Indicates the severity of the condition. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_severity = cls( + text=text, + value=value, + ) + + simple_record_model_severity.additional_properties = d + return simple_record_model_severity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_status.py b/accelapy/accelapy/records_client/models/simple_record_model_status.py new file mode 100644 index 0000000..d06b154 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelStatus") + + +@_attrs_define +class SimpleRecordModelStatus: + """The record status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_status = cls( + text=text, + value=value, + ) + + simple_record_model_status.additional_properties = d + return simple_record_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/simple_record_model_status_reason.py b/accelapy/accelapy/records_client/models/simple_record_model_status_reason.py new file mode 100644 index 0000000..987d735 --- /dev/null +++ b/accelapy/accelapy/records_client/models/simple_record_model_status_reason.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SimpleRecordModelStatusReason") + + +@_attrs_define +class SimpleRecordModelStatusReason: + """The reason for the status setting on the record. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + simple_record_model_status_reason = cls( + text=text, + value=value, + ) + + simple_record_model_status_reason.additional_properties = d + return simple_record_model_status_reason + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/table_model.py b/accelapy/accelapy/records_client/models/table_model.py new file mode 100644 index 0000000..ef5ed44 --- /dev/null +++ b/accelapy/accelapy/records_client/models/table_model.py @@ -0,0 +1,83 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.row_model import RowModel + + +T = TypeVar("T", bound="TableModel") + + +@_attrs_define +class TableModel: + """ + Attributes: + id (Union[Unset, str]): The custom table id. + rows (Union[Unset, List['RowModel']]): A table row containing custom fields. + """ + + id: Union[Unset, str] = UNSET + rows: Union[Unset, List["RowModel"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + rows: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.rows, Unset): + rows = [] + for rows_item_data in self.rows: + rows_item = rows_item_data.to_dict() + + rows.append(rows_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if rows is not UNSET: + field_dict["rows"] = rows + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.row_model import RowModel + + d = src_dict.copy() + id = d.pop("id", UNSET) + + rows = [] + _rows = d.pop("rows", UNSET) + for rows_item_data in _rows or []: + rows_item = RowModel.from_dict(rows_item_data) + + rows.append(rows_item) + + table_model = cls( + id=id, + rows=rows, + ) + + table_model.additional_properties = d + return table_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model.py b/accelapy/accelapy/records_client/models/task_item_action_model.py new file mode 100644 index 0000000..d83a79d --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model.py @@ -0,0 +1,508 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.task_item_action_model_billable import TaskItemActionModelBillable +from ..models.task_item_action_model_is_active import TaskItemActionModelIsActive +from ..models.task_item_action_model_is_completed import TaskItemActionModelIsCompleted +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + from ..models.task_item_action_model_actionby_department import TaskItemActionModelActionbyDepartment + from ..models.task_item_action_model_actionby_user import TaskItemActionModelActionbyUser + from ..models.task_item_action_model_assigned_to_department import TaskItemActionModelAssignedToDepartment + from ..models.task_item_action_model_assigned_user import TaskItemActionModelAssignedUser + from ..models.task_item_action_model_status import TaskItemActionModelStatus + + +T = TypeVar("T", bound="TaskItemActionModel") + + +@_attrs_define +class TaskItemActionModel: + """ + Attributes: + action (Union[Unset, str]): Audit trail action type like "payment allocation" + actionby_department (Union[Unset, TaskItemActionModelActionbyDepartment]): The department responsible for the + action. + actionby_user (Union[Unset, TaskItemActionModelActionbyUser]): The individual responsible for the action. + approval (Union[Unset, str]): Used to indicate supervisory approval of an adhoc task. + assign_email_display (Union[Unset, str]): Indicates whether or not to display the agency employee’s email + address in ACA. Public users can then click the e-mail hyperlink and send an e-mail to the agency employee. + “Y†: display the email address. “N†: hide the email address. + assigned_date (Union[Unset, datetime.datetime]): The date of the assigned action. + assigned_to_department (Union[Unset, TaskItemActionModelAssignedToDepartment]): The department responsible for + the action. + assigned_user (Union[Unset, TaskItemActionModelAssignedUser]): The staff member responsible for the action. + billable (Union[Unset, TaskItemActionModelBillable]): Indicates whether or not the item is billable. + comment (Union[Unset, str]): Comments or notes about the current context. + comment_display (Union[Unset, str]): Indicates whether or not Accela Citizen Access users can view the + inspection results comments. + comment_public_visible (Union[Unset, List[str]]): Specifies the type of user who can view the inspection result + comments.
"All ACA Users" - Both registered and anonymous Accela Citizen Access users can view the comments + for inspection results.
"Record Creator Only" - the user who created the record can see the comments for + the inspection results.
"Record Creator and Licensed Professional" - The user who created the record and + the licensed professional associated with the record can see the comments for the inspection results. + current_task_id (Union[Unset, str]): The ID of the current workflow task. + days_due (Union[Unset, int]): The amount of time to complete a task (measured in days). + description (Union[Unset, str]): The description of the record or item. + disposition_note (Union[Unset, str]): A note describing the disposition of the current task. + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + end_time (Union[Unset, datetime.datetime]): The time the workflow task was completed. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_hours (Union[Unset, float]): The estimated hours necessary to complete this task. + hours_spent (Union[Unset, float]): Number of hours used for a workflow or workflow task. + id (Union[Unset, str]): The workflow task system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + is_active (Union[Unset, TaskItemActionModelIsActive]): Indicates whether or not the workflow task is active. + is_completed (Union[Unset, TaskItemActionModelIsCompleted]): Indicates whether or not the workflow task is + completed. + last_modified_date (Union[Unset, datetime.datetime]): The date when the task item was last changed. + last_modified_date_string (Union[Unset, str]): A string represents the date when the task item was last changed. + next_task_id (Union[Unset, str]): The id of the next task in a workflow. + over_time (Union[Unset, str]): A labor cost factor that indicates time worked beyond a worker's regular working + hours. + process_code (Union[Unset, str]): The process code for the next task in a workflow. + record_id (Union[Unset, RecordIdModel]): + service_provider_code (Union[Unset, str]): The unique agency identifier. + start_time (Union[Unset, datetime.datetime]): The time the workflow task started. + status (Union[Unset, TaskItemActionModelStatus]): The workflow task status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + track_start_date (Union[Unset, datetime.datetime]): The date that time tracking is set to begin. + """ + + action: Union[Unset, str] = UNSET + actionby_department: Union[Unset, "TaskItemActionModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "TaskItemActionModelActionbyUser"] = UNSET + approval: Union[Unset, str] = UNSET + assign_email_display: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, "TaskItemActionModelAssignedToDepartment"] = UNSET + assigned_user: Union[Unset, "TaskItemActionModelAssignedUser"] = UNSET + billable: Union[Unset, TaskItemActionModelBillable] = UNSET + comment: Union[Unset, str] = UNSET + comment_display: Union[Unset, str] = UNSET + comment_public_visible: Union[Unset, List[str]] = UNSET + current_task_id: Union[Unset, str] = UNSET + days_due: Union[Unset, int] = UNSET + description: Union[Unset, str] = UNSET + disposition_note: Union[Unset, str] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + end_time: Union[Unset, datetime.datetime] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_hours: Union[Unset, float] = UNSET + hours_spent: Union[Unset, float] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + is_active: Union[Unset, TaskItemActionModelIsActive] = UNSET + is_completed: Union[Unset, TaskItemActionModelIsCompleted] = UNSET + last_modified_date: Union[Unset, datetime.datetime] = UNSET + last_modified_date_string: Union[Unset, str] = UNSET + next_task_id: Union[Unset, str] = UNSET + over_time: Union[Unset, str] = UNSET + process_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + start_time: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "TaskItemActionModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + track_start_date: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + action = self.action + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + approval = self.approval + assign_email_display = self.assign_email_display + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_to_department, Unset): + assigned_to_department = self.assigned_to_department.to_dict() + + assigned_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_user, Unset): + assigned_user = self.assigned_user.to_dict() + + billable: Union[Unset, str] = UNSET + if not isinstance(self.billable, Unset): + billable = self.billable.value + + comment = self.comment + comment_display = self.comment_display + comment_public_visible: Union[Unset, List[str]] = UNSET + if not isinstance(self.comment_public_visible, Unset): + comment_public_visible = self.comment_public_visible + + current_task_id = self.current_task_id + days_due = self.days_due + description = self.description + disposition_note = self.disposition_note + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + end_time: Union[Unset, str] = UNSET + if not isinstance(self.end_time, Unset): + end_time = self.end_time.isoformat() + + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_hours = self.estimated_hours + hours_spent = self.hours_spent + id = self.id + in_possession_time = self.in_possession_time + is_active: Union[Unset, str] = UNSET + if not isinstance(self.is_active, Unset): + is_active = self.is_active.value + + is_completed: Union[Unset, str] = UNSET + if not isinstance(self.is_completed, Unset): + is_completed = self.is_completed.value + + last_modified_date: Union[Unset, str] = UNSET + if not isinstance(self.last_modified_date, Unset): + last_modified_date = self.last_modified_date.isoformat() + + last_modified_date_string = self.last_modified_date_string + next_task_id = self.next_task_id + over_time = self.over_time + process_code = self.process_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + service_provider_code = self.service_provider_code + start_time: Union[Unset, str] = UNSET + if not isinstance(self.start_time, Unset): + start_time = self.start_time.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + track_start_date: Union[Unset, str] = UNSET + if not isinstance(self.track_start_date, Unset): + track_start_date = self.track_start_date.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action is not UNSET: + field_dict["action"] = action + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if approval is not UNSET: + field_dict["approval"] = approval + if assign_email_display is not UNSET: + field_dict["assignEmailDisplay"] = assign_email_display + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if billable is not UNSET: + field_dict["billable"] = billable + if comment is not UNSET: + field_dict["comment"] = comment + if comment_display is not UNSET: + field_dict["commentDisplay"] = comment_display + if comment_public_visible is not UNSET: + field_dict["commentPublicVisible"] = comment_public_visible + if current_task_id is not UNSET: + field_dict["currentTaskId"] = current_task_id + if days_due is not UNSET: + field_dict["daysDue"] = days_due + if description is not UNSET: + field_dict["description"] = description + if disposition_note is not UNSET: + field_dict["dispositionNote"] = disposition_note + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if end_time is not UNSET: + field_dict["endTime"] = end_time + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_hours is not UNSET: + field_dict["estimatedHours"] = estimated_hours + if hours_spent is not UNSET: + field_dict["hoursSpent"] = hours_spent + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if is_active is not UNSET: + field_dict["isActive"] = is_active + if is_completed is not UNSET: + field_dict["isCompleted"] = is_completed + if last_modified_date is not UNSET: + field_dict["lastModifiedDate"] = last_modified_date + if last_modified_date_string is not UNSET: + field_dict["lastModifiedDateString"] = last_modified_date_string + if next_task_id is not UNSET: + field_dict["nextTaskId"] = next_task_id + if over_time is not UNSET: + field_dict["overTime"] = over_time + if process_code is not UNSET: + field_dict["processCode"] = process_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if track_start_date is not UNSET: + field_dict["trackStartDate"] = track_start_date + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + from ..models.task_item_action_model_actionby_department import TaskItemActionModelActionbyDepartment + from ..models.task_item_action_model_actionby_user import TaskItemActionModelActionbyUser + from ..models.task_item_action_model_assigned_to_department import TaskItemActionModelAssignedToDepartment + from ..models.task_item_action_model_assigned_user import TaskItemActionModelAssignedUser + from ..models.task_item_action_model_status import TaskItemActionModelStatus + + d = src_dict.copy() + action = d.pop("action", UNSET) + + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, TaskItemActionModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = TaskItemActionModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, TaskItemActionModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = TaskItemActionModelActionbyUser.from_dict(_actionby_user) + + approval = d.pop("approval", UNSET) + + assign_email_display = d.pop("assignEmailDisplay", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + _assigned_to_department = d.pop("assignedToDepartment", UNSET) + assigned_to_department: Union[Unset, TaskItemActionModelAssignedToDepartment] + if isinstance(_assigned_to_department, Unset): + assigned_to_department = UNSET + else: + assigned_to_department = TaskItemActionModelAssignedToDepartment.from_dict(_assigned_to_department) + + _assigned_user = d.pop("assignedUser", UNSET) + assigned_user: Union[Unset, TaskItemActionModelAssignedUser] + if isinstance(_assigned_user, Unset): + assigned_user = UNSET + else: + assigned_user = TaskItemActionModelAssignedUser.from_dict(_assigned_user) + + _billable = d.pop("billable", UNSET) + billable: Union[Unset, TaskItemActionModelBillable] + if isinstance(_billable, Unset): + billable = UNSET + else: + billable = TaskItemActionModelBillable(_billable) + + comment = d.pop("comment", UNSET) + + comment_display = d.pop("commentDisplay", UNSET) + + comment_public_visible = cast(List[str], d.pop("commentPublicVisible", UNSET)) + + current_task_id = d.pop("currentTaskId", UNSET) + + days_due = d.pop("daysDue", UNSET) + + description = d.pop("description", UNSET) + + disposition_note = d.pop("dispositionNote", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + _end_time = d.pop("endTime", UNSET) + end_time: Union[Unset, datetime.datetime] + if isinstance(_end_time, Unset): + end_time = UNSET + else: + end_time = isoparse(_end_time) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_hours = d.pop("estimatedHours", UNSET) + + hours_spent = d.pop("hoursSpent", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + _is_active = d.pop("isActive", UNSET) + is_active: Union[Unset, TaskItemActionModelIsActive] + if isinstance(_is_active, Unset): + is_active = UNSET + else: + is_active = TaskItemActionModelIsActive(_is_active) + + _is_completed = d.pop("isCompleted", UNSET) + is_completed: Union[Unset, TaskItemActionModelIsCompleted] + if isinstance(_is_completed, Unset): + is_completed = UNSET + else: + is_completed = TaskItemActionModelIsCompleted(_is_completed) + + _last_modified_date = d.pop("lastModifiedDate", UNSET) + last_modified_date: Union[Unset, datetime.datetime] + if isinstance(_last_modified_date, Unset): + last_modified_date = UNSET + else: + last_modified_date = isoparse(_last_modified_date) + + last_modified_date_string = d.pop("lastModifiedDateString", UNSET) + + next_task_id = d.pop("nextTaskId", UNSET) + + over_time = d.pop("overTime", UNSET) + + process_code = d.pop("processCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _start_time = d.pop("startTime", UNSET) + start_time: Union[Unset, datetime.datetime] + if isinstance(_start_time, Unset): + start_time = UNSET + else: + start_time = isoparse(_start_time) + + _status = d.pop("status", UNSET) + status: Union[Unset, TaskItemActionModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = TaskItemActionModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _track_start_date = d.pop("trackStartDate", UNSET) + track_start_date: Union[Unset, datetime.datetime] + if isinstance(_track_start_date, Unset): + track_start_date = UNSET + else: + track_start_date = isoparse(_track_start_date) + + task_item_action_model = cls( + action=action, + actionby_department=actionby_department, + actionby_user=actionby_user, + approval=approval, + assign_email_display=assign_email_display, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + billable=billable, + comment=comment, + comment_display=comment_display, + comment_public_visible=comment_public_visible, + current_task_id=current_task_id, + days_due=days_due, + description=description, + disposition_note=disposition_note, + due_date=due_date, + end_time=end_time, + estimated_due_date=estimated_due_date, + estimated_hours=estimated_hours, + hours_spent=hours_spent, + id=id, + in_possession_time=in_possession_time, + is_active=is_active, + is_completed=is_completed, + last_modified_date=last_modified_date, + last_modified_date_string=last_modified_date_string, + next_task_id=next_task_id, + over_time=over_time, + process_code=process_code, + record_id=record_id, + service_provider_code=service_provider_code, + start_time=start_time, + status=status, + status_date=status_date, + track_start_date=track_start_date, + ) + + task_item_action_model.additional_properties = d + return task_item_action_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_actionby_department.py b/accelapy/accelapy/records_client/models/task_item_action_model_actionby_department.py new file mode 100644 index 0000000..5e6d407 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemActionModelActionbyDepartment") + + +@_attrs_define +class TaskItemActionModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_action_model_actionby_department = cls( + text=text, + value=value, + ) + + task_item_action_model_actionby_department.additional_properties = d + return task_item_action_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_actionby_user.py b/accelapy/accelapy/records_client/models/task_item_action_model_actionby_user.py new file mode 100644 index 0000000..2bba7b5 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemActionModelActionbyUser") + + +@_attrs_define +class TaskItemActionModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_action_model_actionby_user = cls( + text=text, + value=value, + ) + + task_item_action_model_actionby_user.additional_properties = d + return task_item_action_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_assigned_to_department.py b/accelapy/accelapy/records_client/models/task_item_action_model_assigned_to_department.py new file mode 100644 index 0000000..c9f6188 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_assigned_to_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemActionModelAssignedToDepartment") + + +@_attrs_define +class TaskItemActionModelAssignedToDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_action_model_assigned_to_department = cls( + text=text, + value=value, + ) + + task_item_action_model_assigned_to_department.additional_properties = d + return task_item_action_model_assigned_to_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_assigned_user.py b/accelapy/accelapy/records_client/models/task_item_action_model_assigned_user.py new file mode 100644 index 0000000..aeeee75 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_assigned_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemActionModelAssignedUser") + + +@_attrs_define +class TaskItemActionModelAssignedUser: + """The staff member responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_action_model_assigned_user = cls( + text=text, + value=value, + ) + + task_item_action_model_assigned_user.additional_properties = d + return task_item_action_model_assigned_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_billable.py b/accelapy/accelapy/records_client/models/task_item_action_model_billable.py new file mode 100644 index 0000000..a26a70c --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_billable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemActionModelBillable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_is_active.py b/accelapy/accelapy/records_client/models/task_item_action_model_is_active.py new file mode 100644 index 0000000..cc78c4d --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_is_active.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemActionModelIsActive(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_is_completed.py b/accelapy/accelapy/records_client/models/task_item_action_model_is_completed.py new file mode 100644 index 0000000..bd6f32b --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_is_completed.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemActionModelIsCompleted(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_action_model_status.py b/accelapy/accelapy/records_client/models/task_item_action_model_status.py new file mode 100644 index 0000000..6998369 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_action_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemActionModelStatus") + + +@_attrs_define +class TaskItemActionModelStatus: + """The workflow task status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_action_model_status = cls( + text=text, + value=value, + ) + + task_item_action_model_status.additional_properties = d + return task_item_action_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model.py b/accelapy/accelapy/records_client/models/task_item_model.py new file mode 100644 index 0000000..18be94f --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model.py @@ -0,0 +1,498 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.task_item_model_billable import TaskItemModelBillable +from ..models.task_item_model_is_active import TaskItemModelIsActive +from ..models.task_item_model_is_completed import TaskItemModelIsCompleted +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + from ..models.task_item_model_actionby_department import TaskItemModelActionbyDepartment + from ..models.task_item_model_actionby_user import TaskItemModelActionbyUser + from ..models.task_item_model_assigned_to_department import TaskItemModelAssignedToDepartment + from ..models.task_item_model_assigned_user import TaskItemModelAssignedUser + from ..models.task_item_model_status import TaskItemModelStatus + + +T = TypeVar("T", bound="TaskItemModel") + + +@_attrs_define +class TaskItemModel: + """ + Attributes: + actionby_department (Union[Unset, TaskItemModelActionbyDepartment]): The department responsible for the action. + actionby_user (Union[Unset, TaskItemModelActionbyUser]): The individual responsible for the action. + approval (Union[Unset, str]): Used to indicate supervisory approval of an adhoc task. + assign_email_display (Union[Unset, str]): Indicates whether or not to display the agency employee’s email + address in ACA. Public users can then click the e-mail hyperlink and send an e-mail to the agency employee. + “Y†: display the email address. “N†: hide the email address. + assigned_date (Union[Unset, datetime.datetime]): The date of the assigned action. + assigned_to_department (Union[Unset, TaskItemModelAssignedToDepartment]): The department responsible for the + action. + assigned_user (Union[Unset, TaskItemModelAssignedUser]): The staff member responsible for the action. + billable (Union[Unset, TaskItemModelBillable]): Indicates whether or not the item is billable. + comment (Union[Unset, str]): Comments or notes about the current context. + comment_display (Union[Unset, str]): Indicates whether or not Accela Citizen Access users can view the + inspection results comments. + comment_public_visible (Union[Unset, List[str]]): Specifies the type of user who can view the inspection result + comments.
"All ACA Users" - Both registered and anonymous Accela Citizen Access users can view the comments + for inspection results.
"Record Creator Only" - the user who created the record can see the comments for + the inspection results.
"Record Creator and Licensed Professional" - The user who created the record and + the licensed professional associated with the record can see the comments for the inspection results. + current_task_id (Union[Unset, str]): The ID of the current workflow task. + days_due (Union[Unset, int]): The amount of time to complete a task (measured in days). + description (Union[Unset, str]): The description of the record or item. + disposition_note (Union[Unset, str]): A note describing the disposition of the current task. + due_date (Union[Unset, datetime.datetime]): The desired completion date of the task. + end_time (Union[Unset, datetime.datetime]): The time the workflow task was completed. + estimated_due_date (Union[Unset, datetime.datetime]): The estimated date of completion. + estimated_hours (Union[Unset, float]): The estimated hours necessary to complete this task. + hours_spent (Union[Unset, float]): Number of hours used for a workflow or workflow task. + id (Union[Unset, str]): The workflow task system id assigned by the Civic Platform server. + in_possession_time (Union[Unset, float]): The application level in possession time of the time tracking feature. + is_active (Union[Unset, TaskItemModelIsActive]): Indicates whether or not the workflow task is active. + is_completed (Union[Unset, TaskItemModelIsCompleted]): Indicates whether or not the workflow task is completed. + last_modified_date (Union[Unset, datetime.datetime]): The date when the task item was last changed. + last_modified_date_string (Union[Unset, str]): A string represents the date when the task item was last changed. + next_task_id (Union[Unset, str]): The id of the next task in a workflow. + over_time (Union[Unset, str]): A labor cost factor that indicates time worked beyond a worker's regular working + hours. + process_code (Union[Unset, str]): The process code for the next task in a workflow. + record_id (Union[Unset, RecordIdModel]): + service_provider_code (Union[Unset, str]): The unique agency identifier. + start_time (Union[Unset, datetime.datetime]): The time the workflow task started. + status (Union[Unset, TaskItemModelStatus]): The workflow task status. + status_date (Union[Unset, datetime.datetime]): The date when the current status changed. + track_start_date (Union[Unset, datetime.datetime]): The date that time tracking is set to begin. + """ + + actionby_department: Union[Unset, "TaskItemModelActionbyDepartment"] = UNSET + actionby_user: Union[Unset, "TaskItemModelActionbyUser"] = UNSET + approval: Union[Unset, str] = UNSET + assign_email_display: Union[Unset, str] = UNSET + assigned_date: Union[Unset, datetime.datetime] = UNSET + assigned_to_department: Union[Unset, "TaskItemModelAssignedToDepartment"] = UNSET + assigned_user: Union[Unset, "TaskItemModelAssignedUser"] = UNSET + billable: Union[Unset, TaskItemModelBillable] = UNSET + comment: Union[Unset, str] = UNSET + comment_display: Union[Unset, str] = UNSET + comment_public_visible: Union[Unset, List[str]] = UNSET + current_task_id: Union[Unset, str] = UNSET + days_due: Union[Unset, int] = UNSET + description: Union[Unset, str] = UNSET + disposition_note: Union[Unset, str] = UNSET + due_date: Union[Unset, datetime.datetime] = UNSET + end_time: Union[Unset, datetime.datetime] = UNSET + estimated_due_date: Union[Unset, datetime.datetime] = UNSET + estimated_hours: Union[Unset, float] = UNSET + hours_spent: Union[Unset, float] = UNSET + id: Union[Unset, str] = UNSET + in_possession_time: Union[Unset, float] = UNSET + is_active: Union[Unset, TaskItemModelIsActive] = UNSET + is_completed: Union[Unset, TaskItemModelIsCompleted] = UNSET + last_modified_date: Union[Unset, datetime.datetime] = UNSET + last_modified_date_string: Union[Unset, str] = UNSET + next_task_id: Union[Unset, str] = UNSET + over_time: Union[Unset, str] = UNSET + process_code: Union[Unset, str] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + start_time: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, "TaskItemModelStatus"] = UNSET + status_date: Union[Unset, datetime.datetime] = UNSET + track_start_date: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + actionby_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_department, Unset): + actionby_department = self.actionby_department.to_dict() + + actionby_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.actionby_user, Unset): + actionby_user = self.actionby_user.to_dict() + + approval = self.approval + assign_email_display = self.assign_email_display + assigned_date: Union[Unset, str] = UNSET + if not isinstance(self.assigned_date, Unset): + assigned_date = self.assigned_date.isoformat() + + assigned_to_department: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_to_department, Unset): + assigned_to_department = self.assigned_to_department.to_dict() + + assigned_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.assigned_user, Unset): + assigned_user = self.assigned_user.to_dict() + + billable: Union[Unset, str] = UNSET + if not isinstance(self.billable, Unset): + billable = self.billable.value + + comment = self.comment + comment_display = self.comment_display + comment_public_visible: Union[Unset, List[str]] = UNSET + if not isinstance(self.comment_public_visible, Unset): + comment_public_visible = self.comment_public_visible + + current_task_id = self.current_task_id + days_due = self.days_due + description = self.description + disposition_note = self.disposition_note + due_date: Union[Unset, str] = UNSET + if not isinstance(self.due_date, Unset): + due_date = self.due_date.isoformat() + + end_time: Union[Unset, str] = UNSET + if not isinstance(self.end_time, Unset): + end_time = self.end_time.isoformat() + + estimated_due_date: Union[Unset, str] = UNSET + if not isinstance(self.estimated_due_date, Unset): + estimated_due_date = self.estimated_due_date.isoformat() + + estimated_hours = self.estimated_hours + hours_spent = self.hours_spent + id = self.id + in_possession_time = self.in_possession_time + is_active: Union[Unset, str] = UNSET + if not isinstance(self.is_active, Unset): + is_active = self.is_active.value + + is_completed: Union[Unset, str] = UNSET + if not isinstance(self.is_completed, Unset): + is_completed = self.is_completed.value + + last_modified_date: Union[Unset, str] = UNSET + if not isinstance(self.last_modified_date, Unset): + last_modified_date = self.last_modified_date.isoformat() + + last_modified_date_string = self.last_modified_date_string + next_task_id = self.next_task_id + over_time = self.over_time + process_code = self.process_code + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + service_provider_code = self.service_provider_code + start_time: Union[Unset, str] = UNSET + if not isinstance(self.start_time, Unset): + start_time = self.start_time.isoformat() + + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + status_date: Union[Unset, str] = UNSET + if not isinstance(self.status_date, Unset): + status_date = self.status_date.isoformat() + + track_start_date: Union[Unset, str] = UNSET + if not isinstance(self.track_start_date, Unset): + track_start_date = self.track_start_date.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if actionby_department is not UNSET: + field_dict["actionbyDepartment"] = actionby_department + if actionby_user is not UNSET: + field_dict["actionbyUser"] = actionby_user + if approval is not UNSET: + field_dict["approval"] = approval + if assign_email_display is not UNSET: + field_dict["assignEmailDisplay"] = assign_email_display + if assigned_date is not UNSET: + field_dict["assignedDate"] = assigned_date + if assigned_to_department is not UNSET: + field_dict["assignedToDepartment"] = assigned_to_department + if assigned_user is not UNSET: + field_dict["assignedUser"] = assigned_user + if billable is not UNSET: + field_dict["billable"] = billable + if comment is not UNSET: + field_dict["comment"] = comment + if comment_display is not UNSET: + field_dict["commentDisplay"] = comment_display + if comment_public_visible is not UNSET: + field_dict["commentPublicVisible"] = comment_public_visible + if current_task_id is not UNSET: + field_dict["currentTaskId"] = current_task_id + if days_due is not UNSET: + field_dict["daysDue"] = days_due + if description is not UNSET: + field_dict["description"] = description + if disposition_note is not UNSET: + field_dict["dispositionNote"] = disposition_note + if due_date is not UNSET: + field_dict["dueDate"] = due_date + if end_time is not UNSET: + field_dict["endTime"] = end_time + if estimated_due_date is not UNSET: + field_dict["estimatedDueDate"] = estimated_due_date + if estimated_hours is not UNSET: + field_dict["estimatedHours"] = estimated_hours + if hours_spent is not UNSET: + field_dict["hoursSpent"] = hours_spent + if id is not UNSET: + field_dict["id"] = id + if in_possession_time is not UNSET: + field_dict["inPossessionTime"] = in_possession_time + if is_active is not UNSET: + field_dict["isActive"] = is_active + if is_completed is not UNSET: + field_dict["isCompleted"] = is_completed + if last_modified_date is not UNSET: + field_dict["lastModifiedDate"] = last_modified_date + if last_modified_date_string is not UNSET: + field_dict["lastModifiedDateString"] = last_modified_date_string + if next_task_id is not UNSET: + field_dict["nextTaskId"] = next_task_id + if over_time is not UNSET: + field_dict["overTime"] = over_time + if process_code is not UNSET: + field_dict["processCode"] = process_code + if record_id is not UNSET: + field_dict["recordId"] = record_id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if start_time is not UNSET: + field_dict["startTime"] = start_time + if status is not UNSET: + field_dict["status"] = status + if status_date is not UNSET: + field_dict["statusDate"] = status_date + if track_start_date is not UNSET: + field_dict["trackStartDate"] = track_start_date + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + from ..models.task_item_model_actionby_department import TaskItemModelActionbyDepartment + from ..models.task_item_model_actionby_user import TaskItemModelActionbyUser + from ..models.task_item_model_assigned_to_department import TaskItemModelAssignedToDepartment + from ..models.task_item_model_assigned_user import TaskItemModelAssignedUser + from ..models.task_item_model_status import TaskItemModelStatus + + d = src_dict.copy() + _actionby_department = d.pop("actionbyDepartment", UNSET) + actionby_department: Union[Unset, TaskItemModelActionbyDepartment] + if isinstance(_actionby_department, Unset): + actionby_department = UNSET + else: + actionby_department = TaskItemModelActionbyDepartment.from_dict(_actionby_department) + + _actionby_user = d.pop("actionbyUser", UNSET) + actionby_user: Union[Unset, TaskItemModelActionbyUser] + if isinstance(_actionby_user, Unset): + actionby_user = UNSET + else: + actionby_user = TaskItemModelActionbyUser.from_dict(_actionby_user) + + approval = d.pop("approval", UNSET) + + assign_email_display = d.pop("assignEmailDisplay", UNSET) + + _assigned_date = d.pop("assignedDate", UNSET) + assigned_date: Union[Unset, datetime.datetime] + if isinstance(_assigned_date, Unset): + assigned_date = UNSET + else: + assigned_date = isoparse(_assigned_date) + + _assigned_to_department = d.pop("assignedToDepartment", UNSET) + assigned_to_department: Union[Unset, TaskItemModelAssignedToDepartment] + if isinstance(_assigned_to_department, Unset): + assigned_to_department = UNSET + else: + assigned_to_department = TaskItemModelAssignedToDepartment.from_dict(_assigned_to_department) + + _assigned_user = d.pop("assignedUser", UNSET) + assigned_user: Union[Unset, TaskItemModelAssignedUser] + if isinstance(_assigned_user, Unset): + assigned_user = UNSET + else: + assigned_user = TaskItemModelAssignedUser.from_dict(_assigned_user) + + _billable = d.pop("billable", UNSET) + billable: Union[Unset, TaskItemModelBillable] + if isinstance(_billable, Unset): + billable = UNSET + else: + billable = TaskItemModelBillable(_billable) + + comment = d.pop("comment", UNSET) + + comment_display = d.pop("commentDisplay", UNSET) + + comment_public_visible = cast(List[str], d.pop("commentPublicVisible", UNSET)) + + current_task_id = d.pop("currentTaskId", UNSET) + + days_due = d.pop("daysDue", UNSET) + + description = d.pop("description", UNSET) + + disposition_note = d.pop("dispositionNote", UNSET) + + _due_date = d.pop("dueDate", UNSET) + due_date: Union[Unset, datetime.datetime] + if isinstance(_due_date, Unset): + due_date = UNSET + else: + due_date = isoparse(_due_date) + + _end_time = d.pop("endTime", UNSET) + end_time: Union[Unset, datetime.datetime] + if isinstance(_end_time, Unset): + end_time = UNSET + else: + end_time = isoparse(_end_time) + + _estimated_due_date = d.pop("estimatedDueDate", UNSET) + estimated_due_date: Union[Unset, datetime.datetime] + if isinstance(_estimated_due_date, Unset): + estimated_due_date = UNSET + else: + estimated_due_date = isoparse(_estimated_due_date) + + estimated_hours = d.pop("estimatedHours", UNSET) + + hours_spent = d.pop("hoursSpent", UNSET) + + id = d.pop("id", UNSET) + + in_possession_time = d.pop("inPossessionTime", UNSET) + + _is_active = d.pop("isActive", UNSET) + is_active: Union[Unset, TaskItemModelIsActive] + if isinstance(_is_active, Unset): + is_active = UNSET + else: + is_active = TaskItemModelIsActive(_is_active) + + _is_completed = d.pop("isCompleted", UNSET) + is_completed: Union[Unset, TaskItemModelIsCompleted] + if isinstance(_is_completed, Unset): + is_completed = UNSET + else: + is_completed = TaskItemModelIsCompleted(_is_completed) + + _last_modified_date = d.pop("lastModifiedDate", UNSET) + last_modified_date: Union[Unset, datetime.datetime] + if isinstance(_last_modified_date, Unset): + last_modified_date = UNSET + else: + last_modified_date = isoparse(_last_modified_date) + + last_modified_date_string = d.pop("lastModifiedDateString", UNSET) + + next_task_id = d.pop("nextTaskId", UNSET) + + over_time = d.pop("overTime", UNSET) + + process_code = d.pop("processCode", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _start_time = d.pop("startTime", UNSET) + start_time: Union[Unset, datetime.datetime] + if isinstance(_start_time, Unset): + start_time = UNSET + else: + start_time = isoparse(_start_time) + + _status = d.pop("status", UNSET) + status: Union[Unset, TaskItemModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = TaskItemModelStatus.from_dict(_status) + + _status_date = d.pop("statusDate", UNSET) + status_date: Union[Unset, datetime.datetime] + if isinstance(_status_date, Unset): + status_date = UNSET + else: + status_date = isoparse(_status_date) + + _track_start_date = d.pop("trackStartDate", UNSET) + track_start_date: Union[Unset, datetime.datetime] + if isinstance(_track_start_date, Unset): + track_start_date = UNSET + else: + track_start_date = isoparse(_track_start_date) + + task_item_model = cls( + actionby_department=actionby_department, + actionby_user=actionby_user, + approval=approval, + assign_email_display=assign_email_display, + assigned_date=assigned_date, + assigned_to_department=assigned_to_department, + assigned_user=assigned_user, + billable=billable, + comment=comment, + comment_display=comment_display, + comment_public_visible=comment_public_visible, + current_task_id=current_task_id, + days_due=days_due, + description=description, + disposition_note=disposition_note, + due_date=due_date, + end_time=end_time, + estimated_due_date=estimated_due_date, + estimated_hours=estimated_hours, + hours_spent=hours_spent, + id=id, + in_possession_time=in_possession_time, + is_active=is_active, + is_completed=is_completed, + last_modified_date=last_modified_date, + last_modified_date_string=last_modified_date_string, + next_task_id=next_task_id, + over_time=over_time, + process_code=process_code, + record_id=record_id, + service_provider_code=service_provider_code, + start_time=start_time, + status=status, + status_date=status_date, + track_start_date=track_start_date, + ) + + task_item_model.additional_properties = d + return task_item_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model_actionby_department.py b/accelapy/accelapy/records_client/models/task_item_model_actionby_department.py new file mode 100644 index 0000000..81c2496 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_actionby_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemModelActionbyDepartment") + + +@_attrs_define +class TaskItemModelActionbyDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_model_actionby_department = cls( + text=text, + value=value, + ) + + task_item_model_actionby_department.additional_properties = d + return task_item_model_actionby_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model_actionby_user.py b/accelapy/accelapy/records_client/models/task_item_model_actionby_user.py new file mode 100644 index 0000000..314d005 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_actionby_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemModelActionbyUser") + + +@_attrs_define +class TaskItemModelActionbyUser: + """The individual responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_model_actionby_user = cls( + text=text, + value=value, + ) + + task_item_model_actionby_user.additional_properties = d + return task_item_model_actionby_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model_assigned_to_department.py b/accelapy/accelapy/records_client/models/task_item_model_assigned_to_department.py new file mode 100644 index 0000000..3d99b96 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_assigned_to_department.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemModelAssignedToDepartment") + + +@_attrs_define +class TaskItemModelAssignedToDepartment: + """The department responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_model_assigned_to_department = cls( + text=text, + value=value, + ) + + task_item_model_assigned_to_department.additional_properties = d + return task_item_model_assigned_to_department + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model_assigned_user.py b/accelapy/accelapy/records_client/models/task_item_model_assigned_user.py new file mode 100644 index 0000000..c8b84ca --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_assigned_user.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemModelAssignedUser") + + +@_attrs_define +class TaskItemModelAssignedUser: + """The staff member responsible for the action. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_model_assigned_user = cls( + text=text, + value=value, + ) + + task_item_model_assigned_user.additional_properties = d + return task_item_model_assigned_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/task_item_model_billable.py b/accelapy/accelapy/records_client/models/task_item_model_billable.py new file mode 100644 index 0000000..12915c3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_billable.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemModelBillable(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_model_is_active.py b/accelapy/accelapy/records_client/models/task_item_model_is_active.py new file mode 100644 index 0000000..8a254c2 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_is_active.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemModelIsActive(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_model_is_completed.py b/accelapy/accelapy/records_client/models/task_item_model_is_completed.py new file mode 100644 index 0000000..5133647 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_is_completed.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TaskItemModelIsCompleted(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/task_item_model_status.py b/accelapy/accelapy/records_client/models/task_item_model_status.py new file mode 100644 index 0000000..cf40c79 --- /dev/null +++ b/accelapy/accelapy/records_client/models/task_item_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TaskItemModelStatus") + + +@_attrs_define +class TaskItemModelStatus: + """The workflow task status. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + task_item_model_status = cls( + text=text, + value=value, + ) + + task_item_model_status.additional_properties = d + return task_item_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/trust_account_model.py b/accelapy/accelapy/records_client/models/trust_account_model.py new file mode 100644 index 0000000..7cd7859 --- /dev/null +++ b/accelapy/accelapy/records_client/models/trust_account_model.py @@ -0,0 +1,209 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.trust_account_model_is_primary import TrustAccountModelIsPrimary +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + from ..models.trust_account_model_associations import TrustAccountModelAssociations + from ..models.trust_account_model_overdraft import TrustAccountModelOverdraft + from ..models.trust_account_model_status import TrustAccountModelStatus + + +T = TypeVar("T", bound="TrustAccountModel") + + +@_attrs_define +class TrustAccountModel: + """ + Attributes: + account (Union[Unset, str]): The account ID number for the trust account. + associations (Union[Unset, TrustAccountModelAssociations]): The trust account associations. + balance (Union[Unset, float]): The balance of the trust account in dollars. + description (Union[Unset, str]): The description of the trust account. + id (Union[Unset, int]): The trust account system id assigned by the Civic Platform server. + is_primary (Union[Unset, TrustAccountModelIsPrimary]): Indicates whether or not to designate the trust account + as the primary source. + ledger_account (Union[Unset, str]): The ledger account of the trust account. + overdraft (Union[Unset, TrustAccountModelOverdraft]): Indicates whether or not the trust account can use the + overdraft option. + overdraft_limit (Union[Unset, float]): The overdraft limit amount, in dollars, for the trust account. + record_id (Union[Unset, RecordIdModel]): + service_provider_code (Union[Unset, str]): The unique agency identifier. + status (Union[Unset, TrustAccountModelStatus]): The status of the trust account. + threshold_amount (Union[Unset, float]): The minimum amount required in a trust account. + """ + + account: Union[Unset, str] = UNSET + associations: Union[Unset, "TrustAccountModelAssociations"] = UNSET + balance: Union[Unset, float] = UNSET + description: Union[Unset, str] = UNSET + id: Union[Unset, int] = UNSET + is_primary: Union[Unset, TrustAccountModelIsPrimary] = UNSET + ledger_account: Union[Unset, str] = UNSET + overdraft: Union[Unset, "TrustAccountModelOverdraft"] = UNSET + overdraft_limit: Union[Unset, float] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + service_provider_code: Union[Unset, str] = UNSET + status: Union[Unset, "TrustAccountModelStatus"] = UNSET + threshold_amount: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + account = self.account + associations: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.associations, Unset): + associations = self.associations.to_dict() + + balance = self.balance + description = self.description + id = self.id + is_primary: Union[Unset, str] = UNSET + if not isinstance(self.is_primary, Unset): + is_primary = self.is_primary.value + + ledger_account = self.ledger_account + overdraft: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.overdraft, Unset): + overdraft = self.overdraft.to_dict() + + overdraft_limit = self.overdraft_limit + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + service_provider_code = self.service_provider_code + status: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.status, Unset): + status = self.status.to_dict() + + threshold_amount = self.threshold_amount + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if account is not UNSET: + field_dict["account"] = account + if associations is not UNSET: + field_dict["associations"] = associations + if balance is not UNSET: + field_dict["balance"] = balance + if description is not UNSET: + field_dict["description"] = description + if id is not UNSET: + field_dict["id"] = id + if is_primary is not UNSET: + field_dict["isPrimary"] = is_primary + if ledger_account is not UNSET: + field_dict["ledgerAccount"] = ledger_account + if overdraft is not UNSET: + field_dict["overdraft"] = overdraft + if overdraft_limit is not UNSET: + field_dict["overdraftLimit"] = overdraft_limit + if record_id is not UNSET: + field_dict["recordId"] = record_id + if service_provider_code is not UNSET: + field_dict["serviceProviderCode"] = service_provider_code + if status is not UNSET: + field_dict["status"] = status + if threshold_amount is not UNSET: + field_dict["thresholdAmount"] = threshold_amount + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + from ..models.trust_account_model_associations import TrustAccountModelAssociations + from ..models.trust_account_model_overdraft import TrustAccountModelOverdraft + from ..models.trust_account_model_status import TrustAccountModelStatus + + d = src_dict.copy() + account = d.pop("account", UNSET) + + _associations = d.pop("associations", UNSET) + associations: Union[Unset, TrustAccountModelAssociations] + if isinstance(_associations, Unset): + associations = UNSET + else: + associations = TrustAccountModelAssociations.from_dict(_associations) + + balance = d.pop("balance", UNSET) + + description = d.pop("description", UNSET) + + id = d.pop("id", UNSET) + + _is_primary = d.pop("isPrimary", UNSET) + is_primary: Union[Unset, TrustAccountModelIsPrimary] + if isinstance(_is_primary, Unset): + is_primary = UNSET + else: + is_primary = TrustAccountModelIsPrimary(_is_primary) + + ledger_account = d.pop("ledgerAccount", UNSET) + + _overdraft = d.pop("overdraft", UNSET) + overdraft: Union[Unset, TrustAccountModelOverdraft] + if isinstance(_overdraft, Unset): + overdraft = UNSET + else: + overdraft = TrustAccountModelOverdraft.from_dict(_overdraft) + + overdraft_limit = d.pop("overdraftLimit", UNSET) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + service_provider_code = d.pop("serviceProviderCode", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, TrustAccountModelStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = TrustAccountModelStatus.from_dict(_status) + + threshold_amount = d.pop("thresholdAmount", UNSET) + + trust_account_model = cls( + account=account, + associations=associations, + balance=balance, + description=description, + id=id, + is_primary=is_primary, + ledger_account=ledger_account, + overdraft=overdraft, + overdraft_limit=overdraft_limit, + record_id=record_id, + service_provider_code=service_provider_code, + status=status, + threshold_amount=threshold_amount, + ) + + trust_account_model.additional_properties = d + return trust_account_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/trust_account_model_associations.py b/accelapy/accelapy/records_client/models/trust_account_model_associations.py new file mode 100644 index 0000000..b1e410f --- /dev/null +++ b/accelapy/accelapy/records_client/models/trust_account_model_associations.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrustAccountModelAssociations") + + +@_attrs_define +class TrustAccountModelAssociations: + """The trust account associations. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + trust_account_model_associations = cls( + text=text, + value=value, + ) + + trust_account_model_associations.additional_properties = d + return trust_account_model_associations + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/trust_account_model_is_primary.py b/accelapy/accelapy/records_client/models/trust_account_model_is_primary.py new file mode 100644 index 0000000..d22d758 --- /dev/null +++ b/accelapy/accelapy/records_client/models/trust_account_model_is_primary.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class TrustAccountModelIsPrimary(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/trust_account_model_overdraft.py b/accelapy/accelapy/records_client/models/trust_account_model_overdraft.py new file mode 100644 index 0000000..05ce9cc --- /dev/null +++ b/accelapy/accelapy/records_client/models/trust_account_model_overdraft.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrustAccountModelOverdraft") + + +@_attrs_define +class TrustAccountModelOverdraft: + """Indicates whether or not the trust account can use the overdraft option. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + trust_account_model_overdraft = cls( + text=text, + value=value, + ) + + trust_account_model_overdraft.additional_properties = d + return trust_account_model_overdraft + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/trust_account_model_status.py b/accelapy/accelapy/records_client/models/trust_account_model_status.py new file mode 100644 index 0000000..a36cdac --- /dev/null +++ b/accelapy/accelapy/records_client/models/trust_account_model_status.py @@ -0,0 +1,67 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TrustAccountModelStatus") + + +@_attrs_define +class TrustAccountModelStatus: + """The status of the trust account. + + Attributes: + text (Union[Unset, str]): The localized display value. + value (Union[Unset, str]): The data value. + """ + + text: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + text = self.text + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if text is not UNSET: + field_dict["text"] = text + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + text = d.pop("text", UNSET) + + value = d.pop("value", UNSET) + + trust_account_model_status = cls( + text=text, + value=value, + ) + + trust_account_model_status.additional_properties = d + return trust_account_model_status + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/user_role_privilege_model.py b/accelapy/accelapy/records_client/models/user_role_privilege_model.py new file mode 100644 index 0000000..8d7d598 --- /dev/null +++ b/accelapy/accelapy/records_client/models/user_role_privilege_model.py @@ -0,0 +1,138 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UserRolePrivilegeModel") + + +@_attrs_define +class UserRolePrivilegeModel: + """ + Attributes: + contact_allowed (Union[Unset, bool]): Indicates whether or not the permission is given to a contact. + delete_allowed (Union[Unset, bool]): Indicates whether or not the permission to delete a document is allowed. + download_allowed (Union[Unset, bool]): Indicates whether or not the permission to download a document is + allowed. + license_type_rules (Union[Unset, List[str]]): + licensend_professional_allowed (Union[Unset, bool]): Indicates whether or not the permission is given to a + licensed professional. + owner_allowed (Union[Unset, bool]): Indicates whether or not the permission is given to an owner. + record_creator_allowed (Union[Unset, bool]): Indicates whether or not the permission is given to a record + creator. + registered_user_allowed (Union[Unset, bool]): Indicates whether or not the permission is given to a registered + public user. + title_view_allowed (Union[Unset, bool]): Indicates whether or not the permission to view a document name is + allowed. + upload_allowed (Union[Unset, bool]): Indicates whether or not the permission to upload a document is allowed. + """ + + contact_allowed: Union[Unset, bool] = UNSET + delete_allowed: Union[Unset, bool] = UNSET + download_allowed: Union[Unset, bool] = UNSET + license_type_rules: Union[Unset, List[str]] = UNSET + licensend_professional_allowed: Union[Unset, bool] = UNSET + owner_allowed: Union[Unset, bool] = UNSET + record_creator_allowed: Union[Unset, bool] = UNSET + registered_user_allowed: Union[Unset, bool] = UNSET + title_view_allowed: Union[Unset, bool] = UNSET + upload_allowed: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + contact_allowed = self.contact_allowed + delete_allowed = self.delete_allowed + download_allowed = self.download_allowed + license_type_rules: Union[Unset, List[str]] = UNSET + if not isinstance(self.license_type_rules, Unset): + license_type_rules = self.license_type_rules + + licensend_professional_allowed = self.licensend_professional_allowed + owner_allowed = self.owner_allowed + record_creator_allowed = self.record_creator_allowed + registered_user_allowed = self.registered_user_allowed + title_view_allowed = self.title_view_allowed + upload_allowed = self.upload_allowed + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contact_allowed is not UNSET: + field_dict["contactAllowed"] = contact_allowed + if delete_allowed is not UNSET: + field_dict["deleteAllowed"] = delete_allowed + if download_allowed is not UNSET: + field_dict["downloadAllowed"] = download_allowed + if license_type_rules is not UNSET: + field_dict["licenseTypeRules"] = license_type_rules + if licensend_professional_allowed is not UNSET: + field_dict["licensendProfessionalAllowed"] = licensend_professional_allowed + if owner_allowed is not UNSET: + field_dict["ownerAllowed"] = owner_allowed + if record_creator_allowed is not UNSET: + field_dict["recordCreatorAllowed"] = record_creator_allowed + if registered_user_allowed is not UNSET: + field_dict["registeredUserAllowed"] = registered_user_allowed + if title_view_allowed is not UNSET: + field_dict["titleViewAllowed"] = title_view_allowed + if upload_allowed is not UNSET: + field_dict["uploadAllowed"] = upload_allowed + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + contact_allowed = d.pop("contactAllowed", UNSET) + + delete_allowed = d.pop("deleteAllowed", UNSET) + + download_allowed = d.pop("downloadAllowed", UNSET) + + license_type_rules = cast(List[str], d.pop("licenseTypeRules", UNSET)) + + licensend_professional_allowed = d.pop("licensendProfessionalAllowed", UNSET) + + owner_allowed = d.pop("ownerAllowed", UNSET) + + record_creator_allowed = d.pop("recordCreatorAllowed", UNSET) + + registered_user_allowed = d.pop("registeredUserAllowed", UNSET) + + title_view_allowed = d.pop("titleViewAllowed", UNSET) + + upload_allowed = d.pop("uploadAllowed", UNSET) + + user_role_privilege_model = cls( + contact_allowed=contact_allowed, + delete_allowed=delete_allowed, + download_allowed=download_allowed, + license_type_rules=license_type_rules, + licensend_professional_allowed=licensend_professional_allowed, + owner_allowed=owner_allowed, + record_creator_allowed=record_creator_allowed, + registered_user_allowed=registered_user_allowed, + title_view_allowed=title_view_allowed, + upload_allowed=upload_allowed, + ) + + user_role_privilege_model.additional_properties = d + return user_role_privilege_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/v4_get_records_ids_expand.py b/accelapy/accelapy/records_client/models/v4_get_records_ids_expand.py new file mode 100644 index 0000000..b5af808 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_ids_expand.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class V4GetRecordsIdsExpand(str, Enum): + ADDRESSES = "addresses" + ASSETS = "assets" + CONTACTS = "contacts" + CUSTOMFORMS = "customForms" + CUSTOMTABLES = "customTables" + OWNERS = "owners" + PARCELS = "parcels" + PROFESSIONALS = "professionals" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_ids_expand_custom_forms.py b/accelapy/accelapy/records_client/models/v4_get_records_ids_expand_custom_forms.py new file mode 100644 index 0000000..a36f72f --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_ids_expand_custom_forms.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class V4GetRecordsIdsExpandCustomForms(str, Enum): + ADDRESSES = "addresses" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_mine_expand.py b/accelapy/accelapy/records_client/models/v4_get_records_mine_expand.py new file mode 100644 index 0000000..0ed2516 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_mine_expand.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class V4GetRecordsMineExpand(str, Enum): + ADDRESSES = "addresses" + CONTACTS = "contacts" + CUSTOMFORMS = "customForms" + CUSTOMTABLES = "customTables" + OWNERS = "owners" + PARCELS = "parcels" + PROFESSIONALS = "professionals" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_mine_expand_custom_forms.py b/accelapy/accelapy/records_client/models/v4_get_records_mine_expand_custom_forms.py new file mode 100644 index 0000000..ce3ae48 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_mine_expand_custom_forms.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class V4GetRecordsMineExpandCustomForms(str, Enum): + ADDRESSES = "addresses" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_record_id_fees_status.py b/accelapy/accelapy/records_client/models/v4_get_records_record_id_fees_status.py new file mode 100644 index 0000000..ba52576 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_record_id_fees_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class V4GetRecordsRecordIdFeesStatus(str, Enum): + PAID = "paid" + UNPAID = "unpaid" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_record_id_payments_payment_status.py b/accelapy/accelapy/records_client/models/v4_get_records_record_id_payments_payment_status.py new file mode 100644 index 0000000..9981bb3 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_record_id_payments_payment_status.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class V4GetRecordsRecordIdPaymentsPaymentStatus(str, Enum): + N = "N" + Y = "Y" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_get_records_record_id_related_relationship.py b/accelapy/accelapy/records_client/models/v4_get_records_record_id_related_relationship.py new file mode 100644 index 0000000..0f49d53 --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_get_records_record_id_related_relationship.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class V4GetRecordsRecordIdRelatedRelationship(str, Enum): + CHILD = "child" + PARENT = "parent" + RENEWAL = "renewal" + + def __str__(self) -> str: + return str(self.value) diff --git a/accelapy/accelapy/records_client/models/v4_post_records_record_id_documents_multipart_data.py b/accelapy/accelapy/records_client/models/v4_post_records_record_id_documents_multipart_data.py new file mode 100644 index 0000000..c8c8c2d --- /dev/null +++ b/accelapy/accelapy/records_client/models/v4_post_records_record_id_documents_multipart_data.py @@ -0,0 +1,90 @@ +from io import BytesIO +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import File, Unset + +T = TypeVar("T", bound="V4PostRecordsRecordIdDocumentsMultipartData") + + +@_attrs_define +class V4PostRecordsRecordIdDocumentsMultipartData: + """ + Attributes: + uploaded_file (File): Specify the filename parameter with the file to be uploaded. See example for details. + file_info (str): A string array containing the file metadata for each specified filename. See example for + details. + """ + + uploaded_file: File + file_info: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + uploaded_file = self.uploaded_file.to_tuple() + + file_info = self.file_info + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "uploadedFile": uploaded_file, + "fileInfo": file_info, + } + ) + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + uploaded_file = self.uploaded_file.to_tuple() + + file_info = ( + self.file_info if isinstance(self.file_info, Unset) else (None, str(self.file_info).encode(), "text/plain") + ) + + field_dict: Dict[str, Any] = {} + field_dict.update( + {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()} + ) + field_dict.update( + { + "uploadedFile": uploaded_file, + "fileInfo": file_info, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + uploaded_file = File(payload=BytesIO(d.pop("uploadedFile"))) + + file_info = d.pop("fileInfo") + + v4_post_records_record_id_documents_multipart_data = cls( + uploaded_file=uploaded_file, + file_info=file_info, + ) + + v4_post_records_record_id_documents_multipart_data.additional_properties = d + return v4_post_records_record_id_documents_multipart_data + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/vote_request.py b/accelapy/accelapy/records_client/models/vote_request.py new file mode 100644 index 0000000..2a0f6be --- /dev/null +++ b/accelapy/accelapy/records_client/models/vote_request.py @@ -0,0 +1,59 @@ +from typing import Any, Dict, List, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="VoteRequest") + + +@_attrs_define +class VoteRequest: + """ + Attributes: + vote (bool): The vote on a record (agenda item in a hearing, for example). A value of true is a "yea" vote and a + value of false indicates a "nay" vote. + """ + + vote: bool + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + vote = self.vote + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "vote": vote, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + vote = d.pop("vote") + + vote_request = cls( + vote=vote, + ) + + vote_request.additional_properties = d + return vote_request + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/vote_result.py b/accelapy/accelapy/records_client/models/vote_result.py new file mode 100644 index 0000000..37a2e78 --- /dev/null +++ b/accelapy/accelapy/records_client/models/vote_result.py @@ -0,0 +1,59 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="VoteResult") + + +@_attrs_define +class VoteResult: + """ + Attributes: + vote (Union[Unset, bool]): The result of a vote on a record (agenda item in a hearing, for example). A value of + true is a "yea" vote and a value of false indicates a "nay" vote. + """ + + vote: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + vote = self.vote + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if vote is not UNSET: + field_dict["vote"] = vote + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + vote = d.pop("vote", UNSET) + + vote_result = cls( + vote=vote, + ) + + vote_result.additional_properties = d + return vote_result + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/vote_summary.py b/accelapy/accelapy/records_client/models/vote_summary.py new file mode 100644 index 0000000..4889e33 --- /dev/null +++ b/accelapy/accelapy/records_client/models/vote_summary.py @@ -0,0 +1,66 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="VoteSummary") + + +@_attrs_define +class VoteSummary: + """ + Attributes: + down_count (Union[Unset, int]): The number of votes that disapprove the specified record. + up_count (Union[Unset, int]): The number of votes that approve the specified record. + """ + + down_count: Union[Unset, int] = UNSET + up_count: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + down_count = self.down_count + up_count = self.up_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if down_count is not UNSET: + field_dict["downCount"] = down_count + if up_count is not UNSET: + field_dict["upCount"] = up_count + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + down_count = d.pop("downCount", UNSET) + + up_count = d.pop("upCount", UNSET) + + vote_summary = cls( + down_count=down_count, + up_count=up_count, + ) + + vote_summary.additional_properties = d + return vote_summary + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/models/workflow_task_comment_model.py b/accelapy/accelapy/records_client/models/workflow_task_comment_model.py new file mode 100644 index 0000000..2a8731e --- /dev/null +++ b/accelapy/accelapy/records_client/models/workflow_task_comment_model.py @@ -0,0 +1,122 @@ +import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.record_id_model import RecordIdModel + + +T = TypeVar("T", bound="WorkflowTaskCommentModel") + + +@_attrs_define +class WorkflowTaskCommentModel: + """ + Attributes: + action (Union[Unset, str]): Audit trail action type like 'payment allocation' + created_by (Union[Unset, str]): The unique user id of the individual that created the entry. + created_date (Union[Unset, datetime.datetime]): The date the entry was created. + record_id (Union[Unset, RecordIdModel]): + text (Union[Unset, str]): The comment text. + workflow_task_id (Union[Unset, str]): The id of the workflow task. + """ + + action: Union[Unset, str] = UNSET + created_by: Union[Unset, str] = UNSET + created_date: Union[Unset, datetime.datetime] = UNSET + record_id: Union[Unset, "RecordIdModel"] = UNSET + text: Union[Unset, str] = UNSET + workflow_task_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + action = self.action + created_by = self.created_by + created_date: Union[Unset, str] = UNSET + if not isinstance(self.created_date, Unset): + created_date = self.created_date.isoformat() + + record_id: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.record_id, Unset): + record_id = self.record_id.to_dict() + + text = self.text + workflow_task_id = self.workflow_task_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action is not UNSET: + field_dict["action"] = action + if created_by is not UNSET: + field_dict["createdBy"] = created_by + if created_date is not UNSET: + field_dict["createdDate"] = created_date + if record_id is not UNSET: + field_dict["recordId"] = record_id + if text is not UNSET: + field_dict["text"] = text + if workflow_task_id is not UNSET: + field_dict["workflowTaskId"] = workflow_task_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.record_id_model import RecordIdModel + + d = src_dict.copy() + action = d.pop("action", UNSET) + + created_by = d.pop("createdBy", UNSET) + + _created_date = d.pop("createdDate", UNSET) + created_date: Union[Unset, datetime.datetime] + if isinstance(_created_date, Unset): + created_date = UNSET + else: + created_date = isoparse(_created_date) + + _record_id = d.pop("recordId", UNSET) + record_id: Union[Unset, RecordIdModel] + if isinstance(_record_id, Unset): + record_id = UNSET + else: + record_id = RecordIdModel.from_dict(_record_id) + + text = d.pop("text", UNSET) + + workflow_task_id = d.pop("workflowTaskId", UNSET) + + workflow_task_comment_model = cls( + action=action, + created_by=created_by, + created_date=created_date, + record_id=record_id, + text=text, + workflow_task_id=workflow_task_id, + ) + + workflow_task_comment_model.additional_properties = d + return workflow_task_comment_model + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/accelapy/accelapy/records_client/py.typed b/accelapy/accelapy/records_client/py.typed new file mode 100644 index 0000000..1aad327 --- /dev/null +++ b/accelapy/accelapy/records_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/accelapy/accelapy/records_client/types.py b/accelapy/accelapy/records_client/types.py new file mode 100644 index 0000000..15700b8 --- /dev/null +++ b/accelapy/accelapy/records_client/types.py @@ -0,0 +1,44 @@ +""" Contains some shared types for properties """ +from http import HTTPStatus +from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar + +from attrs import define + + +class Unset: + def __bool__(self) -> Literal[False]: + return False + + +UNSET: Unset = Unset() + +FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] + + +@define +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: Optional[str] = None + mime_type: Optional[str] = None + + def to_tuple(self) -> FileJsonType: + """Return a tuple representation that httpx will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@define +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: HTTPStatus + content: bytes + headers: MutableMapping[str, str] + parsed: Optional[T] + + +__all__ = ["File", "Response", "FileJsonType"] diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..af513e5 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +package = [] + +[metadata] +lock-version = "2.0" +python-versions = "^3.10" +content-hash = "53f2eabc9c26446fbcc00d348c47878e118afc2054778c3c803a0a8028af27d9" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c255669 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[tool.poetry] +name = "accelapy" +version = "0.1.0" +description = "" +authors = ["MichaelAChrisco "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.10" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a3e8121 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +httpx +attrs +requests +python-dateutil diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29