diff --git a/.gitignore b/.gitignore index 040ae1d..5bcf111 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,8 @@ venv/ .venv/ .python-version .pytest_cache +test.py +config.json # Translations *.mo diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9154b47..6156b12 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,19 +3,24 @@ .travis.yml MergeATSClient/__init__.py MergeATSClient/api/__init__.py +MergeATSClient/api/account_details_api.py MergeATSClient/api/account_token_api.py MergeATSClient/api/activities_api.py MergeATSClient/api/applications_api.py MergeATSClient/api/attachments_api.py MergeATSClient/api/available_actions_api.py MergeATSClient/api/candidates_api.py +MergeATSClient/api/delete_account_api.py MergeATSClient/api/departments_api.py MergeATSClient/api/eeocs_api.py +MergeATSClient/api/force_resync_api.py MergeATSClient/api/generate_key_api.py MergeATSClient/api/interviews_api.py +MergeATSClient/api/issues_api.py MergeATSClient/api/job_interview_stages_api.py MergeATSClient/api/jobs_api.py MergeATSClient/api/link_token_api.py +MergeATSClient/api/linked_accounts_api.py MergeATSClient/api/offers_api.py MergeATSClient/api/offices_api.py MergeATSClient/api/passthrough_api.py @@ -31,18 +36,30 @@ MergeATSClient/configuration.py MergeATSClient/exceptions.py MergeATSClient/model/__init__.py MergeATSClient/model/access_role_enum.py +MergeATSClient/model/account_details.py +MergeATSClient/model/account_details_and_actions.py +MergeATSClient/model/account_details_and_actions_integration.py +MergeATSClient/model/account_details_and_actions_status_enum.py MergeATSClient/model/account_integration.py MergeATSClient/model/account_token.py MergeATSClient/model/activity.py MergeATSClient/model/activity_type_enum.py MergeATSClient/model/application.py +MergeATSClient/model/application_endpoint_request.py MergeATSClient/model/application_request.py +MergeATSClient/model/application_response.py MergeATSClient/model/attachment.py +MergeATSClient/model/attachment_endpoint_request.py MergeATSClient/model/attachment_request.py +MergeATSClient/model/attachment_response.py MergeATSClient/model/attachment_type_enum.py MergeATSClient/model/available_actions.py MergeATSClient/model/candidate.py +MergeATSClient/model/candidate_endpoint_request.py MergeATSClient/model/candidate_request.py +MergeATSClient/model/candidate_response.py +MergeATSClient/model/categories_enum.py +MergeATSClient/model/category_enum.py MergeATSClient/model/data_passthrough_request.py MergeATSClient/model/department.py MergeATSClient/model/disability_status_enum.py @@ -51,24 +68,31 @@ MergeATSClient/model/email_address.py MergeATSClient/model/email_address_request.py MergeATSClient/model/email_address_type_enum.py MergeATSClient/model/end_user_details_request.py +MergeATSClient/model/error_validation_problem.py MergeATSClient/model/gender_enum.py MergeATSClient/model/generate_remote_key_request.py +MergeATSClient/model/issue.py +MergeATSClient/model/issue_status_enum.py MergeATSClient/model/job.py MergeATSClient/model/job_interview_stage.py MergeATSClient/model/job_status_enum.py MergeATSClient/model/link_token.py +MergeATSClient/model/linked_account_status.py +MergeATSClient/model/meta_response.py MergeATSClient/model/method_enum.py MergeATSClient/model/model_operation.py MergeATSClient/model/offer.py MergeATSClient/model/offer_status_enum.py MergeATSClient/model/office.py MergeATSClient/model/overall_recommendation_enum.py +MergeATSClient/model/paginated_account_details_and_actions_list.py MergeATSClient/model/paginated_activity_list.py MergeATSClient/model/paginated_application_list.py MergeATSClient/model/paginated_attachment_list.py MergeATSClient/model/paginated_candidate_list.py MergeATSClient/model/paginated_department_list.py MergeATSClient/model/paginated_eeoc_list.py +MergeATSClient/model/paginated_issue_list.py MergeATSClient/model/paginated_job_interview_stage_list.py MergeATSClient/model/paginated_job_list.py MergeATSClient/model/paginated_offer_list.py @@ -90,25 +114,30 @@ MergeATSClient/model/remote_key.py MergeATSClient/model/remote_key_for_regeneration_request.py MergeATSClient/model/remote_response.py MergeATSClient/model/remote_user.py -MergeATSClient/model/remote_user_request.py +MergeATSClient/model/request_format_enum.py MergeATSClient/model/scheduled_interview.py -MergeATSClient/model/scheduled_interview_request.py MergeATSClient/model/scheduled_interview_status_enum.py MergeATSClient/model/scorecard.py -MergeATSClient/model/scorecard_request.py MergeATSClient/model/sync_status.py MergeATSClient/model/sync_status_status_enum.py MergeATSClient/model/tag.py MergeATSClient/model/url.py MergeATSClient/model/url_request.py MergeATSClient/model/url_type_enum.py +MergeATSClient/model/validation_problem_source.py MergeATSClient/model/veteran_status_enum.py MergeATSClient/model/visibility_enum.py +MergeATSClient/model/warning_validation_problem.py MergeATSClient/model_utils.py MergeATSClient/models/__init__.py MergeATSClient/rest.py README.md docs/AccessRoleEnum.md +docs/AccountDetails.md +docs/AccountDetailsAndActions.md +docs/AccountDetailsAndActionsIntegration.md +docs/AccountDetailsAndActionsStatusEnum.md +docs/AccountDetailsApi.md docs/AccountIntegration.md docs/AccountToken.md docs/AccountTokenApi.md @@ -116,18 +145,27 @@ docs/ActivitiesApi.md docs/Activity.md docs/ActivityTypeEnum.md docs/Application.md +docs/ApplicationEndpointRequest.md docs/ApplicationRequest.md +docs/ApplicationResponse.md docs/ApplicationsApi.md docs/Attachment.md +docs/AttachmentEndpointRequest.md docs/AttachmentRequest.md +docs/AttachmentResponse.md docs/AttachmentTypeEnum.md docs/AttachmentsApi.md docs/AvailableActions.md docs/AvailableActionsApi.md docs/Candidate.md +docs/CandidateEndpointRequest.md docs/CandidateRequest.md +docs/CandidateResponse.md docs/CandidatesApi.md +docs/CategoriesEnum.md +docs/CategoryEnum.md docs/DataPassthroughRequest.md +docs/DeleteAccountApi.md docs/Department.md docs/DepartmentsApi.md docs/DisabilityStatusEnum.md @@ -137,10 +175,15 @@ docs/EmailAddress.md docs/EmailAddressRequest.md docs/EmailAddressTypeEnum.md docs/EndUserDetailsRequest.md +docs/ErrorValidationProblem.md +docs/ForceResyncApi.md docs/GenderEnum.md docs/GenerateKeyApi.md docs/GenerateRemoteKeyRequest.md docs/InterviewsApi.md +docs/Issue.md +docs/IssueStatusEnum.md +docs/IssuesApi.md docs/Job.md docs/JobInterviewStage.md docs/JobInterviewStagesApi.md @@ -148,6 +191,9 @@ docs/JobStatusEnum.md docs/JobsApi.md docs/LinkToken.md docs/LinkTokenApi.md +docs/LinkedAccountStatus.md +docs/LinkedAccountsApi.md +docs/MetaResponse.md docs/MethodEnum.md docs/ModelOperation.md docs/Offer.md @@ -156,12 +202,14 @@ docs/OffersApi.md docs/Office.md docs/OfficesApi.md docs/OverallRecommendationEnum.md +docs/PaginatedAccountDetailsAndActionsList.md docs/PaginatedActivityList.md docs/PaginatedApplicationList.md docs/PaginatedAttachmentList.md docs/PaginatedCandidateList.md docs/PaginatedDepartmentList.md docs/PaginatedEEOCList.md +docs/PaginatedIssueList.md docs/PaginatedJobInterviewStageList.md docs/PaginatedJobList.md docs/PaginatedOfferList.md @@ -186,12 +234,10 @@ docs/RemoteKey.md docs/RemoteKeyForRegenerationRequest.md docs/RemoteResponse.md docs/RemoteUser.md -docs/RemoteUserRequest.md +docs/RequestFormatEnum.md docs/ScheduledInterview.md -docs/ScheduledInterviewRequest.md docs/ScheduledInterviewStatusEnum.md docs/Scorecard.md -docs/ScorecardRequest.md docs/ScorecardsApi.md docs/SyncStatus.md docs/SyncStatusApi.md @@ -202,8 +248,10 @@ docs/Url.md docs/UrlRequest.md docs/UrlTypeEnum.md docs/UsersApi.md +docs/ValidationProblemSource.md docs/VeteranStatusEnum.md docs/VisibilityEnum.md +docs/WarningValidationProblem.md git_push.sh requirements.txt setup.cfg diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3bff059..e230c83 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.1 \ No newline at end of file +5.3.0 \ No newline at end of file diff --git a/MergeATSClient/__init__.py b/MergeATSClient/__init__.py index ee67dea..ccd6f29 100644 --- a/MergeATSClient/__init__.py +++ b/MergeATSClient/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "1.2.0" +__version__ = "1.0.0" # import ApiClient from MergeATSClient.api_client import ApiClient diff --git a/MergeATSClient/api/account_details_api.py b/MergeATSClient/api/account_details_api.py index a0006b7..80fe07f 100644 --- a/MergeATSClient/api/account_details_api.py +++ b/MergeATSClient/api/account_details_api.py @@ -36,69 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __account_details_retrieve( - self, - **kwargs - ): - """account_details_retrieve # noqa: E501 - - Get details for a linked account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_details_retrieve(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - return self.call_with_http_info(**kwargs) - - self.account_details_retrieve = _Endpoint( + self.account_details_retrieve_endpoint = _Endpoint( settings={ 'response_type': (AccountDetails,), 'auth': [ @@ -140,6 +78,67 @@ def __account_details_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__account_details_retrieve + api_client=api_client + ) + + def account_details_retrieve( + self, + **kwargs + ): + """account_details_retrieve # noqa: E501 + + Get details for a linked account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.account_details_retrieve(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AccountDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.account_details_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/account_token_api.py b/MergeATSClient/api/account_token_api.py index 433cc25..ea51d61 100644 --- a/MergeATSClient/api/account_token_api.py +++ b/MergeATSClient/api/account_token_api.py @@ -36,74 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __account_token_retrieve( - self, - public_token, - **kwargs - ): - """account_token_retrieve # noqa: E501 - - Returns the account token for the end user with the provided public token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.account_token_retrieve(public_token, async_req=True) - >>> result = thread.get() - - Args: - public_token (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AccountToken - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['public_token'] = \ - public_token - return self.call_with_http_info(**kwargs) - - self.account_token_retrieve = _Endpoint( + self.account_token_retrieve_endpoint = _Endpoint( settings={ 'response_type': (AccountToken,), 'auth': [ @@ -152,6 +85,72 @@ def __account_token_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__account_token_retrieve + api_client=api_client + ) + + def account_token_retrieve( + self, + public_token, + **kwargs + ): + """account_token_retrieve # noqa: E501 + + Returns the account token for the end user with the provided public token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.account_token_retrieve(public_token, async_req=True) + >>> result = thread.get() + + Args: + public_token (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AccountToken + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['public_token'] = \ + public_token + return self.account_token_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/activities_api.py b/MergeATSClient/api/activities_api.py index 837a088..6acb23d 100644 --- a/MergeATSClient/api/activities_api.py +++ b/MergeATSClient/api/activities_api.py @@ -37,84 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __activities_list( - self, - x_account_token, - **kwargs - ): - """activities_list # noqa: E501 - - Returns a list of `Activity` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.activities_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "user" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - user_id (str): If provided, will only return activities done by this user.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedActivityList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.activities_list = _Endpoint( + self.activities_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedActivityList,), 'auth': [ @@ -132,6 +55,7 @@ def __activities_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -171,6 +95,8 @@ def __activities_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -190,6 +116,7 @@ def __activities_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -203,6 +130,7 @@ def __activities_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -219,83 +147,9 @@ def __activities_list( ], 'content_type': [], }, - api_client=api_client, - callable=__activities_list + api_client=api_client ) - - def __activities_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """activities_retrieve # noqa: E501 - - Returns an `Activity` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.activities_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "user" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Activity - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.activities_retrieve = _Endpoint( + self.activities_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Activity,), 'auth': [ @@ -365,6 +219,155 @@ def __activities_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__activities_retrieve + api_client=api_client + ) + + def activities_list( + self, + x_account_token, + **kwargs + ): + """activities_list # noqa: E501 + + Returns a list of `Activity` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.activities_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "user" + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + user_id (str): If provided, will only return activities done by this user.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedActivityList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.activities_list_endpoint.call_with_http_info(**kwargs) + + def activities_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """activities_retrieve # noqa: E501 + + Returns an `Activity` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.activities_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "user" + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Activity + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.activities_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/applications_api.py b/MergeATSClient/api/applications_api.py index 67d38f2..6138822 100644 --- a/MergeATSClient/api/applications_api.py +++ b/MergeATSClient/api/applications_api.py @@ -25,6 +25,7 @@ from MergeATSClient.model.application import Application from MergeATSClient.model.application_endpoint_request import ApplicationEndpointRequest from MergeATSClient.model.application_response import ApplicationResponse +from MergeATSClient.model.meta_response import MetaResponse from MergeATSClient.model.paginated_application_list import PaginatedApplicationList @@ -39,79 +40,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __applications_create( - self, - x_account_token, - application_endpoint_request, - **kwargs - ): - """applications_create # noqa: E501 - - Creates an `Application` object with the given values. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.applications_create(x_account_token, application_endpoint_request, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - application_endpoint_request (ApplicationEndpointRequest): - - Keyword Args: - run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ApplicationResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['application_endpoint_request'] = \ - application_endpoint_request - return self.call_with_http_info(**kwargs) - - self.applications_create = _Endpoint( + self.applications_create_endpoint = _Endpoint( settings={ 'response_type': (ApplicationResponse,), 'auth': [ @@ -174,91 +103,9 @@ def __applications_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__applications_create + api_client=api_client ) - - def __applications_list( - self, - x_account_token, - **kwargs - ): - """applications_list # noqa: E501 - - Returns a list of `Application` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.applications_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - candidate_id (str): If provided, will only return applications for this candidate.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - credited_to_id (str): If provided, will only return applications credited to this user.. [optional] - current_stage_id (str): If provided, will only return applications at this interview stage.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - job_id (str): If provided, will only return applications for this job.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - reject_reason_id (str): If provided, will only return applications with this reject reason.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedApplicationList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.applications_list = _Endpoint( + self.applications_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedApplicationList,), 'auth': [ @@ -279,6 +126,7 @@ def __applications_list( 'current_stage_id', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'job_id', 'modified_after', @@ -355,6 +203,8 @@ def __applications_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'job_id': @@ -379,6 +229,7 @@ def __applications_list( 'current_stage_id': 'current_stage_id', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'job_id': 'job_id', 'modified_after': 'modified_after', @@ -396,6 +247,7 @@ def __applications_list( 'current_stage_id': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'job_id': 'query', 'modified_after': 'query', @@ -413,83 +265,65 @@ def __applications_list( ], 'content_type': [], }, - api_client=api_client, - callable=__applications_list + api_client=api_client ) - - def __applications_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """applications_retrieve # noqa: E501 - - Returns an `Application` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.applications_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Application - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.applications_retrieve = _Endpoint( + self.applications_post_meta_retrieve_endpoint = _Endpoint( + settings={ + 'response_type': (MetaResponse,), + 'auth': [ + 'tokenAuth' + ], + 'endpoint_path': '/applications/post/meta', + 'operation_id': 'applications_post_meta_retrieve', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'x_account_token', + 'application_template_id', + ], + 'required': [ + 'x_account_token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'x_account_token': + (str,), + 'application_template_id': + (str,), + }, + 'attribute_map': { + 'x_account_token': 'X-Account-Token', + 'application_template_id': 'application_template_id', + }, + 'location_map': { + 'x_account_token': 'header', + 'application_template_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.applications_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Application,), 'auth': [ @@ -589,6 +423,297 @@ def __applications_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__applications_retrieve + api_client=api_client + ) + + def applications_create( + self, + x_account_token, + application_endpoint_request, + **kwargs + ): + """applications_create # noqa: E501 + + Creates an `Application` object with the given values. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.applications_create(x_account_token, application_endpoint_request, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + application_endpoint_request (ApplicationEndpointRequest): + + Keyword Args: + run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ApplicationResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['application_endpoint_request'] = \ + application_endpoint_request + return self.applications_create_endpoint.call_with_http_info(**kwargs) + + def applications_list( + self, + x_account_token, + **kwargs + ): + """applications_list # noqa: E501 + + Returns a list of `Application` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.applications_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + candidate_id (str): If provided, will only return applications for this candidate.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + credited_to_id (str): If provided, will only return applications credited to this user.. [optional] + current_stage_id (str): If provided, will only return applications at this interview stage.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + job_id (str): If provided, will only return applications for this job.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + reject_reason_id (str): If provided, will only return applications with this reject reason.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedApplicationList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.applications_list_endpoint.call_with_http_info(**kwargs) + + def applications_post_meta_retrieve( + self, + x_account_token, + **kwargs + ): + """applications_post_meta_retrieve # noqa: E501 + + Returns metadata for `Application` POSTs. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.applications_post_meta_retrieve(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + application_template_id (str): The template ID associated with the nested application in the request.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MetaResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.applications_post_meta_retrieve_endpoint.call_with_http_info(**kwargs) + + def applications_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """applications_retrieve # noqa: E501 + + Returns an `Application` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.applications_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Application + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.applications_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/attachments_api.py b/MergeATSClient/api/attachments_api.py index b6f0043..00235a4 100644 --- a/MergeATSClient/api/attachments_api.py +++ b/MergeATSClient/api/attachments_api.py @@ -25,6 +25,7 @@ from MergeATSClient.model.attachment import Attachment from MergeATSClient.model.attachment_endpoint_request import AttachmentEndpointRequest from MergeATSClient.model.attachment_response import AttachmentResponse +from MergeATSClient.model.meta_response import MetaResponse from MergeATSClient.model.paginated_attachment_list import PaginatedAttachmentList @@ -39,79 +40,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __attachments_create( - self, - x_account_token, - attachment_endpoint_request, - **kwargs - ): - """attachments_create # noqa: E501 - - Creates an `Attachment` object with the given values. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.attachments_create(x_account_token, attachment_endpoint_request, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - attachment_endpoint_request (AttachmentEndpointRequest): - - Keyword Args: - run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AttachmentResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['attachment_endpoint_request'] = \ - attachment_endpoint_request - return self.call_with_http_info(**kwargs) - - self.attachments_create = _Endpoint( + self.attachments_create_endpoint = _Endpoint( settings={ 'response_type': (AttachmentResponse,), 'auth': [ @@ -174,87 +103,9 @@ def __attachments_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__attachments_create + api_client=api_client ) - - def __attachments_list( - self, - x_account_token, - **kwargs - ): - """attachments_list # noqa: E501 - - Returns a list of `Attachment` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.attachments_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - candidate_id (str): If provided, will only return attachments for this candidate.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedAttachmentList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.attachments_list = _Endpoint( + self.attachments_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedAttachmentList,), 'auth': [ @@ -273,6 +124,7 @@ def __attachments_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -313,6 +165,8 @@ def __attachments_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -331,6 +185,7 @@ def __attachments_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -344,6 +199,7 @@ def __attachments_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -359,83 +215,60 @@ def __attachments_list( ], 'content_type': [], }, - api_client=api_client, - callable=__attachments_list + api_client=api_client ) - - def __attachments_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """attachments_retrieve # noqa: E501 - - Returns an `Attachment` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.attachments_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Attachment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.attachments_retrieve = _Endpoint( + self.attachments_post_meta_retrieve_endpoint = _Endpoint( + settings={ + 'response_type': (MetaResponse,), + 'auth': [ + 'tokenAuth' + ], + 'endpoint_path': '/attachments/post/meta', + 'operation_id': 'attachments_post_meta_retrieve', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'x_account_token', + ], + 'required': [ + 'x_account_token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'x_account_token': + (str,), + }, + 'attribute_map': { + 'x_account_token': 'X-Account-Token', + }, + 'location_map': { + 'x_account_token': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.attachments_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Attachment,), 'auth': [ @@ -505,6 +338,292 @@ def __attachments_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__attachments_retrieve + api_client=api_client + ) + + def attachments_create( + self, + x_account_token, + attachment_endpoint_request, + **kwargs + ): + """attachments_create # noqa: E501 + + Creates an `Attachment` object with the given values. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attachments_create(x_account_token, attachment_endpoint_request, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + attachment_endpoint_request (AttachmentEndpointRequest): + + Keyword Args: + run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AttachmentResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['attachment_endpoint_request'] = \ + attachment_endpoint_request + return self.attachments_create_endpoint.call_with_http_info(**kwargs) + + def attachments_list( + self, + x_account_token, + **kwargs + ): + """attachments_list # noqa: E501 + + Returns a list of `Attachment` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attachments_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + candidate_id (str): If provided, will only return attachments for this candidate.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedAttachmentList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.attachments_list_endpoint.call_with_http_info(**kwargs) + + def attachments_post_meta_retrieve( + self, + x_account_token, + **kwargs + ): + """attachments_post_meta_retrieve # noqa: E501 + + Returns metadata for `Attachment` POSTs. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attachments_post_meta_retrieve(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MetaResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.attachments_post_meta_retrieve_endpoint.call_with_http_info(**kwargs) + + def attachments_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """attachments_retrieve # noqa: E501 + + Returns an `Attachment` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attachments_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Attachment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.attachments_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/available_actions_api.py b/MergeATSClient/api/available_actions_api.py index 03ff014..de393a4 100644 --- a/MergeATSClient/api/available_actions_api.py +++ b/MergeATSClient/api/available_actions_api.py @@ -36,74 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __available_actions_retrieve( - self, - x_account_token, - **kwargs - ): - """available_actions_retrieve # noqa: E501 - - Returns a list of models and actions available for an account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.available_actions_retrieve(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - AvailableActions - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.available_actions_retrieve = _Endpoint( + self.available_actions_retrieve_endpoint = _Endpoint( settings={ 'response_type': (AvailableActions,), 'auth': [ @@ -152,6 +85,72 @@ def __available_actions_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__available_actions_retrieve + api_client=api_client + ) + + def available_actions_retrieve( + self, + x_account_token, + **kwargs + ): + """available_actions_retrieve # noqa: E501 + + Returns a list of models and actions available for an account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.available_actions_retrieve(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AvailableActions + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.available_actions_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/candidates_api.py b/MergeATSClient/api/candidates_api.py index abd197e..06f172d 100644 --- a/MergeATSClient/api/candidates_api.py +++ b/MergeATSClient/api/candidates_api.py @@ -25,6 +25,7 @@ from MergeATSClient.model.candidate import Candidate from MergeATSClient.model.candidate_endpoint_request import CandidateEndpointRequest from MergeATSClient.model.candidate_response import CandidateResponse +from MergeATSClient.model.meta_response import MetaResponse from MergeATSClient.model.paginated_candidate_list import PaginatedCandidateList @@ -39,79 +40,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __candidates_create( - self, - x_account_token, - candidate_endpoint_request, - **kwargs - ): - """candidates_create # noqa: E501 - - Creates a `Candidate` object with the given values. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.candidates_create(x_account_token, candidate_endpoint_request, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - candidate_endpoint_request (CandidateEndpointRequest): - - Keyword Args: - run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - CandidateResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['candidate_endpoint_request'] = \ - candidate_endpoint_request - return self.call_with_http_info(**kwargs) - - self.candidates_create = _Endpoint( + self.candidates_create_endpoint = _Endpoint( settings={ 'response_type': (CandidateResponse,), 'auth': [ @@ -174,88 +103,9 @@ def __candidates_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__candidates_create + api_client=api_client ) - - def __candidates_list( - self, - x_account_token, - **kwargs - ): - """candidates_list # noqa: E501 - - Returns a list of `Candidate` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.candidates_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - first_name (str, none_type): If provided, will only return candidates with this first name.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - last_name (str, none_type): If provided, will only return candidates with this last name.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedCandidateList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.candidates_list = _Endpoint( + self.candidates_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedCandidateList,), 'auth': [ @@ -274,6 +124,7 @@ def __candidates_list( 'cursor', 'expand', 'first_name', + 'include_deleted_data', 'include_remote_data', 'last_name', 'modified_after', @@ -319,6 +170,8 @@ def __candidates_list( (str,), 'first_name': (str, none_type,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'last_name': @@ -339,6 +192,7 @@ def __candidates_list( 'cursor': 'cursor', 'expand': 'expand', 'first_name': 'first_name', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'last_name': 'last_name', 'modified_after': 'modified_after', @@ -353,6 +207,7 @@ def __candidates_list( 'cursor': 'query', 'expand': 'query', 'first_name': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'last_name': 'query', 'modified_after': 'query', @@ -369,83 +224,60 @@ def __candidates_list( ], 'content_type': [], }, - api_client=api_client, - callable=__candidates_list + api_client=api_client ) - - def __candidates_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """candidates_retrieve # noqa: E501 - - Returns a `Candidate` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.candidates_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Candidate - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.candidates_retrieve = _Endpoint( + self.candidates_post_meta_retrieve_endpoint = _Endpoint( + settings={ + 'response_type': (MetaResponse,), + 'auth': [ + 'tokenAuth' + ], + 'endpoint_path': '/candidates/post/meta', + 'operation_id': 'candidates_post_meta_retrieve', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'x_account_token', + ], + 'required': [ + 'x_account_token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'x_account_token': + (str,), + }, + 'attribute_map': { + 'x_account_token': 'X-Account-Token', + }, + 'location_map': { + 'x_account_token': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.candidates_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Candidate,), 'auth': [ @@ -517,6 +349,293 @@ def __candidates_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__candidates_retrieve + api_client=api_client + ) + + def candidates_create( + self, + x_account_token, + candidate_endpoint_request, + **kwargs + ): + """candidates_create # noqa: E501 + + Creates a `Candidate` object with the given values. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.candidates_create(x_account_token, candidate_endpoint_request, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + candidate_endpoint_request (CandidateEndpointRequest): + + Keyword Args: + run_async (bool): Whether or not third-party updates should be run asynchronously.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CandidateResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['candidate_endpoint_request'] = \ + candidate_endpoint_request + return self.candidates_create_endpoint.call_with_http_info(**kwargs) + + def candidates_list( + self, + x_account_token, + **kwargs + ): + """candidates_list # noqa: E501 + + Returns a list of `Candidate` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.candidates_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + first_name (str, none_type): If provided, will only return candidates with this first name.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + last_name (str, none_type): If provided, will only return candidates with this last name.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedCandidateList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.candidates_list_endpoint.call_with_http_info(**kwargs) + + def candidates_post_meta_retrieve( + self, + x_account_token, + **kwargs + ): + """candidates_post_meta_retrieve # noqa: E501 + + Returns metadata for `Candidate` POSTs. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.candidates_post_meta_retrieve(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MetaResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.candidates_post_meta_retrieve_endpoint.call_with_http_info(**kwargs) + + def candidates_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """candidates_retrieve # noqa: E501 + + Returns a `Candidate` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.candidates_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Candidate + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.candidates_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/delete_account_api.py b/MergeATSClient/api/delete_account_api.py index 923cc0f..2271123 100644 --- a/MergeATSClient/api/delete_account_api.py +++ b/MergeATSClient/api/delete_account_api.py @@ -35,74 +35,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __delete_account_create( - self, - x_account_token, - **kwargs - ): - """delete_account_create # noqa: E501 - - Delete a linked account. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_account_create(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.delete_account_create = _Endpoint( + self.delete_account_create_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [ @@ -149,6 +82,72 @@ def __delete_account_create( 'accept': [], 'content_type': [], }, - api_client=api_client, - callable=__delete_account_create + api_client=api_client + ) + + def delete_account_create( + self, + x_account_token, + **kwargs + ): + """delete_account_create # noqa: E501 + + Delete a linked account. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_account_create(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.delete_account_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/departments_api.py b/MergeATSClient/api/departments_api.py index c16b521..9dd4f5c 100644 --- a/MergeATSClient/api/departments_api.py +++ b/MergeATSClient/api/departments_api.py @@ -37,82 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __departments_list( - self, - x_account_token, - **kwargs - ): - """departments_list # noqa: E501 - - Returns a list of `Department` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.departments_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedDepartmentList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.departments_list = _Endpoint( + self.departments_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedDepartmentList,), 'auth': [ @@ -129,6 +54,7 @@ def __departments_list( 'created_after', 'created_before', 'cursor', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -160,6 +86,8 @@ def __departments_list( (datetime,), 'cursor': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -176,6 +104,7 @@ def __departments_list( 'created_after': 'created_after', 'created_before': 'created_before', 'cursor': 'cursor', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -187,6 +116,7 @@ def __departments_list( 'created_after': 'query', 'created_before': 'query', 'cursor': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -202,82 +132,9 @@ def __departments_list( ], 'content_type': [], }, - api_client=api_client, - callable=__departments_list + api_client=api_client ) - - def __departments_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """departments_retrieve # noqa: E501 - - Returns a `Department` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.departments_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Department - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.departments_retrieve = _Endpoint( + self.departments_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Department,), 'auth': [ @@ -337,6 +194,152 @@ def __departments_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__departments_retrieve + api_client=api_client + ) + + def departments_list( + self, + x_account_token, + **kwargs + ): + """departments_list # noqa: E501 + + Returns a list of `Department` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.departments_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedDepartmentList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.departments_list_endpoint.call_with_http_info(**kwargs) + + def departments_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """departments_retrieve # noqa: E501 + + Returns a `Department` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.departments_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Department + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.departments_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/eeocs_api.py b/MergeATSClient/api/eeocs_api.py index c4275f3..b078d3d 100644 --- a/MergeATSClient/api/eeocs_api.py +++ b/MergeATSClient/api/eeocs_api.py @@ -37,84 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __eeocs_list( - self, - x_account_token, - **kwargs - ): - """eeocs_list # noqa: E501 - - Returns a list of `EEOC` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.eeocs_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - candidate_id (str): If provided, will only return EEOC info for this candidate.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedEEOCList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.eeocs_list = _Endpoint( + self.eeocs_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedEEOCList,), 'auth': [ @@ -133,6 +56,7 @@ def __eeocs_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -173,6 +97,8 @@ def __eeocs_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -191,6 +117,7 @@ def __eeocs_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -204,6 +131,7 @@ def __eeocs_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -219,83 +147,9 @@ def __eeocs_list( ], 'content_type': [], }, - api_client=api_client, - callable=__eeocs_list + api_client=api_client ) - - def __eeocs_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """eeocs_retrieve # noqa: E501 - - Returns an `EEOC` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.eeocs_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - EEOC - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.eeocs_retrieve = _Endpoint( + self.eeocs_retrieve_endpoint = _Endpoint( settings={ 'response_type': (EEOC,), 'auth': [ @@ -365,6 +219,155 @@ def __eeocs_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__eeocs_retrieve + api_client=api_client + ) + + def eeocs_list( + self, + x_account_token, + **kwargs + ): + """eeocs_list # noqa: E501 + + Returns a list of `EEOC` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.eeocs_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + candidate_id (str): If provided, will only return EEOC info for this candidate.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedEEOCList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.eeocs_list_endpoint.call_with_http_info(**kwargs) + + def eeocs_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """eeocs_retrieve # noqa: E501 + + Returns an `EEOC` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.eeocs_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] if omitted the server will use the default value of "candidate" + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + EEOC + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.eeocs_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/force_resync_api.py b/MergeATSClient/api/force_resync_api.py new file mode 100644 index 0000000..28ec898 --- /dev/null +++ b/MergeATSClient/api/force_resync_api.py @@ -0,0 +1,156 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.api_client import ApiClient, Endpoint as _Endpoint +from MergeATSClient.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from MergeATSClient.model.sync_status import SyncStatus + + +class ForceResyncApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.sync_status_resync_create_endpoint = _Endpoint( + settings={ + 'response_type': (SyncStatus,), + 'auth': [ + 'tokenAuth' + ], + 'endpoint_path': '/sync-status/resync', + 'operation_id': 'sync_status_resync_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'x_account_token', + ], + 'required': [ + 'x_account_token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'x_account_token': + (str,), + }, + 'attribute_map': { + 'x_account_token': 'X-Account-Token', + }, + 'location_map': { + 'x_account_token': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def sync_status_resync_create( + self, + x_account_token, + **kwargs + ): + """sync_status_resync_create # noqa: E501 + + Force re-sync of all models. This is only available for organizations on Merge's Grow and Expand plans. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_status_resync_create(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SyncStatus + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.sync_status_resync_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/generate_key_api.py b/MergeATSClient/api/generate_key_api.py index 1926351..0895b32 100644 --- a/MergeATSClient/api/generate_key_api.py +++ b/MergeATSClient/api/generate_key_api.py @@ -37,74 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __generate_key_create( - self, - generate_remote_key_request, - **kwargs - ): - """generate_key_create # noqa: E501 - - Create a remote key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.generate_key_create(generate_remote_key_request, async_req=True) - >>> result = thread.get() - - Args: - generate_remote_key_request (GenerateRemoteKeyRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - RemoteKey - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['generate_remote_key_request'] = \ - generate_remote_key_request - return self.call_with_http_info(**kwargs) - - self.generate_key_create = _Endpoint( + self.generate_key_create_endpoint = _Endpoint( settings={ 'response_type': (RemoteKey,), 'auth': [ @@ -156,6 +89,72 @@ def __generate_key_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__generate_key_create + api_client=api_client + ) + + def generate_key_create( + self, + generate_remote_key_request, + **kwargs + ): + """generate_key_create # noqa: E501 + + Create a remote key. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.generate_key_create(generate_remote_key_request, async_req=True) + >>> result = thread.get() + + Args: + generate_remote_key_request (GenerateRemoteKeyRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RemoteKey + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['generate_remote_key_request'] = \ + generate_remote_key_request + return self.generate_key_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/interviews_api.py b/MergeATSClient/api/interviews_api.py index b136de8..1358ed1 100644 --- a/MergeATSClient/api/interviews_api.py +++ b/MergeATSClient/api/interviews_api.py @@ -37,86 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __interviews_list( - self, - x_account_token, - **kwargs - ): - """interviews_list # noqa: E501 - - Returns a list of `ScheduledInterview` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.interviews_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - application_id (str): If provided, will only return interviews for this application.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - job_interview_stage_id (str): If provided, will only return interviews at this stage.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - organizer_id (str): If provided, will only return interviews organized by this user.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedScheduledInterviewList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.interviews_list = _Endpoint( + self.interviews_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedScheduledInterviewList,), 'auth': [ @@ -135,6 +56,7 @@ def __interviews_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'job_interview_stage_id', 'modified_after', @@ -191,6 +113,8 @@ def __interviews_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'job_interview_stage_id': @@ -213,6 +137,7 @@ def __interviews_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'job_interview_stage_id': 'job_interview_stage_id', 'modified_after': 'modified_after', @@ -228,6 +153,7 @@ def __interviews_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'job_interview_stage_id': 'query', 'modified_after': 'query', @@ -245,83 +171,9 @@ def __interviews_list( ], 'content_type': [], }, - api_client=api_client, - callable=__interviews_list + api_client=api_client ) - - def __interviews_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """interviews_retrieve # noqa: E501 - - Returns a `ScheduledInterview` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.interviews_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - ScheduledInterview - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.interviews_retrieve = _Endpoint( + self.interviews_retrieve_endpoint = _Endpoint( settings={ 'response_type': (ScheduledInterview,), 'auth': [ @@ -405,6 +257,157 @@ def __interviews_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__interviews_retrieve + api_client=api_client + ) + + def interviews_list( + self, + x_account_token, + **kwargs + ): + """interviews_list # noqa: E501 + + Returns a list of `ScheduledInterview` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.interviews_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + application_id (str): If provided, will only return interviews for this application.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + job_interview_stage_id (str): If provided, will only return interviews at this stage.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + organizer_id (str): If provided, will only return interviews organized by this user.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedScheduledInterviewList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.interviews_list_endpoint.call_with_http_info(**kwargs) + + def interviews_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """interviews_retrieve # noqa: E501 + + Returns a `ScheduledInterview` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.interviews_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ScheduledInterview + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.interviews_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/issues_api.py b/MergeATSClient/api/issues_api.py index 3f04c65..46a41f3 100644 --- a/MergeATSClient/api/issues_api.py +++ b/MergeATSClient/api/issues_api.py @@ -37,78 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __issues_list( - self, - **kwargs - ): - """issues_list # noqa: E501 - - Gets issues. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.issues_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_token (str): [optional] - cursor (str): The pagination cursor value.. [optional] - end_date (str): If included, will only include issues whose most recent action occurred before this time. [optional] - end_user_organization_name (str): [optional] - include_muted (str): If True, will include muted issues. [optional] - integration_name (str): [optional] - page_size (int): Number of results to return per page.. [optional] - start_date (str): If included, will only include issues whose most recent action occurred after this time. [optional] - status (str): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedIssueList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - return self.call_with_http_info(**kwargs) - - self.issues_list = _Endpoint( + self.issues_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedIssueList,), 'auth': [ @@ -201,77 +130,9 @@ def __issues_list( ], 'content_type': [], }, - api_client=api_client, - callable=__issues_list + api_client=api_client ) - - def __issues_retrieve( - self, - id, - **kwargs - ): - """issues_retrieve # noqa: E501 - - Get a specific issue. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.issues_retrieve(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Issue - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.issues_retrieve = _Endpoint( + self.issues_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Issue,), 'auth': [ @@ -320,6 +181,142 @@ def __issues_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__issues_retrieve + api_client=api_client ) + + def issues_list( + self, + **kwargs + ): + """issues_list # noqa: E501 + + Gets issues. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.issues_list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + account_token (str): [optional] + cursor (str): The pagination cursor value.. [optional] + end_date (str): If included, will only include issues whose most recent action occurred before this time. [optional] + end_user_organization_name (str): [optional] + include_muted (str): If True, will include muted issues. [optional] + integration_name (str): [optional] + page_size (int): Number of results to return per page.. [optional] + start_date (str): If included, will only include issues whose most recent action occurred after this time. [optional] + status (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedIssueList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.issues_list_endpoint.call_with_http_info(**kwargs) + + def issues_retrieve( + self, + id, + **kwargs + ): + """issues_retrieve # noqa: E501 + + Get a specific issue. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.issues_retrieve(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Issue + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.issues_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/job_interview_stages_api.py b/MergeATSClient/api/job_interview_stages_api.py index f963186..a925499 100644 --- a/MergeATSClient/api/job_interview_stages_api.py +++ b/MergeATSClient/api/job_interview_stages_api.py @@ -37,84 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __job_interview_stages_list( - self, - x_account_token, - **kwargs - ): - """job_interview_stages_list # noqa: E501 - - Returns a list of `JobInterviewStage` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.job_interview_stages_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - job_id (str): If provided, will only return interview stages for this job.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedJobInterviewStageList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.job_interview_stages_list = _Endpoint( + self.job_interview_stages_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedJobInterviewStageList,), 'auth': [ @@ -132,6 +55,7 @@ def __job_interview_stages_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'job_id', 'modified_after', @@ -177,6 +101,8 @@ def __job_interview_stages_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'job_id': @@ -196,6 +122,7 @@ def __job_interview_stages_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'job_id': 'job_id', 'modified_after': 'modified_after', @@ -209,6 +136,7 @@ def __job_interview_stages_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'job_id': 'query', 'modified_after': 'query', @@ -225,83 +153,9 @@ def __job_interview_stages_list( ], 'content_type': [], }, - api_client=api_client, - callable=__job_interview_stages_list + api_client=api_client ) - - def __job_interview_stages_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """job_interview_stages_retrieve # noqa: E501 - - Returns a `JobInterviewStage` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.job_interview_stages_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - JobInterviewStage - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.job_interview_stages_retrieve = _Endpoint( + self.job_interview_stages_retrieve_endpoint = _Endpoint( settings={ 'response_type': (JobInterviewStage,), 'auth': [ @@ -377,6 +231,155 @@ def __job_interview_stages_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__job_interview_stages_retrieve + api_client=api_client + ) + + def job_interview_stages_list( + self, + x_account_token, + **kwargs + ): + """job_interview_stages_list # noqa: E501 + + Returns a list of `JobInterviewStage` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.job_interview_stages_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + job_id (str): If provided, will only return interview stages for this job.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedJobInterviewStageList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.job_interview_stages_list_endpoint.call_with_http_info(**kwargs) + + def job_interview_stages_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """job_interview_stages_retrieve # noqa: E501 + + Returns a `JobInterviewStage` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.job_interview_stages_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JobInterviewStage + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.job_interview_stages_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/jobs_api.py b/MergeATSClient/api/jobs_api.py index a2271da..f971d5c 100644 --- a/MergeATSClient/api/jobs_api.py +++ b/MergeATSClient/api/jobs_api.py @@ -37,85 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __jobs_list( - self, - x_account_token, - **kwargs - ): - """jobs_list # noqa: E501 - - Returns a list of `Job` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.jobs_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - code (str, none_type): If provided, will only return jobs with this code.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - status (str, none_type): If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING'). [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedJobList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.jobs_list = _Endpoint( + self.jobs_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedJobList,), 'auth': [ @@ -134,6 +56,7 @@ def __jobs_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -172,11 +95,9 @@ def __jobs_list( }, ('status',): { 'None': None, - "EMPTY": "", "ARCHIVED": "ARCHIVED", "CLOSED": "CLOSED", "DRAFT": "DRAFT", - "NULL": "null", "OPEN": "OPEN", "PENDING": "PENDING" }, @@ -194,6 +115,8 @@ def __jobs_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -214,6 +137,7 @@ def __jobs_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -228,6 +152,7 @@ def __jobs_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -244,83 +169,9 @@ def __jobs_list( ], 'content_type': [], }, - api_client=api_client, - callable=__jobs_list + api_client=api_client ) - - def __jobs_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """jobs_retrieve # noqa: E501 - - Returns a `Job` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.jobs_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Job - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.jobs_retrieve = _Endpoint( + self.jobs_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Job,), 'auth': [ @@ -396,6 +247,156 @@ def __jobs_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__jobs_retrieve + api_client=api_client + ) + + def jobs_list( + self, + x_account_token, + **kwargs + ): + """jobs_list # noqa: E501 + + Returns a list of `Job` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.jobs_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + code (str, none_type): If provided, will only return jobs with this code.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + status (str, none_type): If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedJobList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.jobs_list_endpoint.call_with_http_info(**kwargs) + + def jobs_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """jobs_retrieve # noqa: E501 + + Returns a `Job` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.jobs_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Job + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.jobs_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/link_token_api.py b/MergeATSClient/api/link_token_api.py index ba1ec2d..70ff364 100644 --- a/MergeATSClient/api/link_token_api.py +++ b/MergeATSClient/api/link_token_api.py @@ -37,74 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __link_token_create( - self, - end_user_details_request, - **kwargs - ): - """link_token_create # noqa: E501 - - Creates a link token to be used when linking a new end user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.link_token_create(end_user_details_request, async_req=True) - >>> result = thread.get() - - Args: - end_user_details_request (EndUserDetailsRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - LinkToken - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['end_user_details_request'] = \ - end_user_details_request - return self.call_with_http_info(**kwargs) - - self.link_token_create = _Endpoint( + self.link_token_create_endpoint = _Endpoint( settings={ 'response_type': (LinkToken,), 'auth': [ @@ -156,6 +89,72 @@ def __link_token_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__link_token_create + api_client=api_client + ) + + def link_token_create( + self, + end_user_details_request, + **kwargs + ): + """link_token_create # noqa: E501 + + Creates a link token to be used when linking a new end user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_token_create(end_user_details_request, async_req=True) + >>> result = thread.get() + + Args: + end_user_details_request (EndUserDetailsRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LinkToken + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['end_user_details_request'] = \ + end_user_details_request + return self.link_token_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/linked_accounts_api.py b/MergeATSClient/api/linked_accounts_api.py index b284064..581dbde 100644 --- a/MergeATSClient/api/linked_accounts_api.py +++ b/MergeATSClient/api/linked_accounts_api.py @@ -36,81 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __linked_accounts_list( - self, - **kwargs - ): - """linked_accounts_list # noqa: E501 - - List linked accounts for your organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.linked_accounts_list(async_req=True) - >>> result = thread.get() - - - Keyword Args: - category (str, none_type): [optional] - cursor (str): The pagination cursor value.. [optional] - end_user_email_address (str): [optional] - end_user_organization_name (str): [optional] - end_user_origin_id (str): [optional] - end_user_origin_ids (str): Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. [optional] - id (str): [optional] - ids (str): Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. [optional] - integration_name (str): [optional] - is_test_account (str): If included, will only include test linked accounts. If not included, will only include non-test linked accounts. [optional] - page_size (int): Number of results to return per page.. [optional] - status (str): Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedAccountDetailsAndActionsList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - return self.call_with_http_info(**kwargs) - - self.linked_accounts_list = _Endpoint( + self.linked_accounts_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedAccountDetailsAndActionsList,), 'auth': [ @@ -220,6 +146,79 @@ def __linked_accounts_list( ], 'content_type': [], }, - api_client=api_client, - callable=__linked_accounts_list + api_client=api_client + ) + + def linked_accounts_list( + self, + **kwargs + ): + """linked_accounts_list # noqa: E501 + + List linked accounts for your organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.linked_accounts_list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + category (str, none_type): [optional] + cursor (str): The pagination cursor value.. [optional] + end_user_email_address (str): [optional] + end_user_organization_name (str): [optional] + end_user_origin_id (str): [optional] + end_user_origin_ids (str): Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. [optional] + id (str): [optional] + ids (str): Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. [optional] + integration_name (str): [optional] + is_test_account (str): If included, will only include test linked accounts. If not included, will only include non-test linked accounts. [optional] + page_size (int): Number of results to return per page.. [optional] + status (str): Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedAccountDetailsAndActionsList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.linked_accounts_list_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/offers_api.py b/MergeATSClient/api/offers_api.py index 4a8a53d..5d01672 100644 --- a/MergeATSClient/api/offers_api.py +++ b/MergeATSClient/api/offers_api.py @@ -37,85 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __offers_list( - self, - x_account_token, - **kwargs - ): - """offers_list # noqa: E501 - - Returns a list of `Offer` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.offers_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - application_id (str): If provided, will only return offers for this application.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - creator_id (str): If provided, will only return offers created by this user.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedOfferList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.offers_list = _Endpoint( + self.offers_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedOfferList,), 'auth': [ @@ -135,6 +57,7 @@ def __offers_list( 'creator_id', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -179,6 +102,8 @@ def __offers_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -198,6 +123,7 @@ def __offers_list( 'creator_id': 'creator_id', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -212,6 +138,7 @@ def __offers_list( 'creator_id': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -227,83 +154,9 @@ def __offers_list( ], 'content_type': [], }, - api_client=api_client, - callable=__offers_list + api_client=api_client ) - - def __offers_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """offers_retrieve # noqa: E501 - - Returns an `Offer` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.offers_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Offer - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.offers_retrieve = _Endpoint( + self.offers_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Offer,), 'auth': [ @@ -375,6 +228,156 @@ def __offers_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__offers_retrieve + api_client=api_client + ) + + def offers_list( + self, + x_account_token, + **kwargs + ): + """offers_list # noqa: E501 + + Returns a list of `Offer` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.offers_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + application_id (str): If provided, will only return offers for this application.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + creator_id (str): If provided, will only return offers created by this user.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedOfferList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.offers_list_endpoint.call_with_http_info(**kwargs) + + def offers_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """offers_retrieve # noqa: E501 + + Returns an `Offer` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.offers_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Offer + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.offers_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/offices_api.py b/MergeATSClient/api/offices_api.py index c934098..b9b956e 100644 --- a/MergeATSClient/api/offices_api.py +++ b/MergeATSClient/api/offices_api.py @@ -37,82 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __offices_list( - self, - x_account_token, - **kwargs - ): - """offices_list # noqa: E501 - - Returns a list of `Office` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.offices_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedOfficeList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.offices_list = _Endpoint( + self.offices_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedOfficeList,), 'auth': [ @@ -129,6 +54,7 @@ def __offices_list( 'created_after', 'created_before', 'cursor', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -160,6 +86,8 @@ def __offices_list( (datetime,), 'cursor': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -176,6 +104,7 @@ def __offices_list( 'created_after': 'created_after', 'created_before': 'created_before', 'cursor': 'cursor', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -187,6 +116,7 @@ def __offices_list( 'created_after': 'query', 'created_before': 'query', 'cursor': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -202,82 +132,9 @@ def __offices_list( ], 'content_type': [], }, - api_client=api_client, - callable=__offices_list + api_client=api_client ) - - def __offices_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """offices_retrieve # noqa: E501 - - Returns an `Office` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.offices_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Office - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.offices_retrieve = _Endpoint( + self.offices_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Office,), 'auth': [ @@ -337,6 +194,152 @@ def __offices_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__offices_retrieve + api_client=api_client + ) + + def offices_list( + self, + x_account_token, + **kwargs + ): + """offices_list # noqa: E501 + + Returns a list of `Office` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.offices_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedOfficeList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.offices_list_endpoint.call_with_http_info(**kwargs) + + def offices_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """offices_retrieve # noqa: E501 + + Returns an `Office` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.offices_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Office + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.offices_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/passthrough_api.py b/MergeATSClient/api/passthrough_api.py index 430f206..800245c 100644 --- a/MergeATSClient/api/passthrough_api.py +++ b/MergeATSClient/api/passthrough_api.py @@ -37,78 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __passthrough_create( - self, - x_account_token, - data_passthrough_request, - **kwargs - ): - """passthrough_create # noqa: E501 - - Pull data from an endpoint not currently supported by Merge. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.passthrough_create(x_account_token, data_passthrough_request, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - data_passthrough_request (DataPassthroughRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - RemoteResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['data_passthrough_request'] = \ - data_passthrough_request - return self.call_with_http_info(**kwargs) - - self.passthrough_create = _Endpoint( + self.passthrough_create_endpoint = _Endpoint( settings={ 'response_type': (RemoteResponse,), 'auth': [ @@ -166,6 +95,76 @@ def __passthrough_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__passthrough_create + api_client=api_client + ) + + def passthrough_create( + self, + x_account_token, + data_passthrough_request, + **kwargs + ): + """passthrough_create # noqa: E501 + + Pull data from an endpoint not currently supported by Merge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.passthrough_create(x_account_token, data_passthrough_request, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + data_passthrough_request (DataPassthroughRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RemoteResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['data_passthrough_request'] = \ + data_passthrough_request + return self.passthrough_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/regenerate_key_api.py b/MergeATSClient/api/regenerate_key_api.py index 4861595..56ae3d1 100644 --- a/MergeATSClient/api/regenerate_key_api.py +++ b/MergeATSClient/api/regenerate_key_api.py @@ -37,74 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __regenerate_key_create( - self, - remote_key_for_regeneration_request, - **kwargs - ): - """regenerate_key_create # noqa: E501 - - Exchange remote keys. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.regenerate_key_create(remote_key_for_regeneration_request, async_req=True) - >>> result = thread.get() - - Args: - remote_key_for_regeneration_request (RemoteKeyForRegenerationRequest): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - RemoteKey - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['remote_key_for_regeneration_request'] = \ - remote_key_for_regeneration_request - return self.call_with_http_info(**kwargs) - - self.regenerate_key_create = _Endpoint( + self.regenerate_key_create_endpoint = _Endpoint( settings={ 'response_type': (RemoteKey,), 'auth': [ @@ -156,6 +89,72 @@ def __regenerate_key_create( 'multipart/form-data' ] }, - api_client=api_client, - callable=__regenerate_key_create + api_client=api_client + ) + + def regenerate_key_create( + self, + remote_key_for_regeneration_request, + **kwargs + ): + """regenerate_key_create # noqa: E501 + + Exchange remote keys. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.regenerate_key_create(remote_key_for_regeneration_request, async_req=True) + >>> result = thread.get() + + Args: + remote_key_for_regeneration_request (RemoteKeyForRegenerationRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RemoteKey + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['remote_key_for_regeneration_request'] = \ + remote_key_for_regeneration_request + return self.regenerate_key_create_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/reject_reasons_api.py b/MergeATSClient/api/reject_reasons_api.py index 7b4ef07..ee53e4f 100644 --- a/MergeATSClient/api/reject_reasons_api.py +++ b/MergeATSClient/api/reject_reasons_api.py @@ -37,82 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __reject_reasons_list( - self, - x_account_token, - **kwargs - ): - """reject_reasons_list # noqa: E501 - - Returns a list of `RejectReason` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reject_reasons_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedRejectReasonList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.reject_reasons_list = _Endpoint( + self.reject_reasons_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedRejectReasonList,), 'auth': [ @@ -129,6 +54,7 @@ def __reject_reasons_list( 'created_after', 'created_before', 'cursor', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -160,6 +86,8 @@ def __reject_reasons_list( (datetime,), 'cursor': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -176,6 +104,7 @@ def __reject_reasons_list( 'created_after': 'created_after', 'created_before': 'created_before', 'cursor': 'cursor', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -187,6 +116,7 @@ def __reject_reasons_list( 'created_after': 'query', 'created_before': 'query', 'cursor': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -202,82 +132,9 @@ def __reject_reasons_list( ], 'content_type': [], }, - api_client=api_client, - callable=__reject_reasons_list + api_client=api_client ) - - def __reject_reasons_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """reject_reasons_retrieve # noqa: E501 - - Returns a `RejectReason` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reject_reasons_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - RejectReason - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.reject_reasons_retrieve = _Endpoint( + self.reject_reasons_retrieve_endpoint = _Endpoint( settings={ 'response_type': (RejectReason,), 'auth': [ @@ -337,6 +194,152 @@ def __reject_reasons_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__reject_reasons_retrieve + api_client=api_client + ) + + def reject_reasons_list( + self, + x_account_token, + **kwargs + ): + """reject_reasons_list # noqa: E501 + + Returns a list of `RejectReason` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reject_reasons_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedRejectReasonList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.reject_reasons_list_endpoint.call_with_http_info(**kwargs) + + def reject_reasons_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """reject_reasons_retrieve # noqa: E501 + + Returns a `RejectReason` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reject_reasons_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RejectReason + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.reject_reasons_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/scorecards_api.py b/MergeATSClient/api/scorecards_api.py index 7c174bb..d4589e3 100644 --- a/MergeATSClient/api/scorecards_api.py +++ b/MergeATSClient/api/scorecards_api.py @@ -37,86 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __scorecards_list( - self, - x_account_token, - **kwargs - ): - """scorecards_list # noqa: E501 - - Returns a list of `Scorecard` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.scorecards_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - application_id (str): If provided, will only return scorecards for this application.. [optional] - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - interview_id (str): If provided, will only return scorecards for this interview.. [optional] - interviewer_id (str): If provided, will only return scorecards for this interviewer.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedScorecardList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.scorecards_list = _Endpoint( + self.scorecards_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedScorecardList,), 'auth': [ @@ -135,6 +56,7 @@ def __scorecards_list( 'created_before', 'cursor', 'expand', + 'include_deleted_data', 'include_remote_data', 'interview_id', 'interviewer_id', @@ -183,6 +105,8 @@ def __scorecards_list( (str,), 'expand': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'interview_id': @@ -205,6 +129,7 @@ def __scorecards_list( 'created_before': 'created_before', 'cursor': 'cursor', 'expand': 'expand', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'interview_id': 'interview_id', 'interviewer_id': 'interviewer_id', @@ -220,6 +145,7 @@ def __scorecards_list( 'created_before': 'query', 'cursor': 'query', 'expand': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'interview_id': 'query', 'interviewer_id': 'query', @@ -237,83 +163,9 @@ def __scorecards_list( ], 'content_type': [], }, - api_client=api_client, - callable=__scorecards_list + api_client=api_client ) - - def __scorecards_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """scorecards_retrieve # noqa: E501 - - Returns a `Scorecard` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.scorecards_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - Scorecard - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.scorecards_retrieve = _Endpoint( + self.scorecards_retrieve_endpoint = _Endpoint( settings={ 'response_type': (Scorecard,), 'auth': [ @@ -389,6 +241,157 @@ def __scorecards_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__scorecards_retrieve + api_client=api_client + ) + + def scorecards_list( + self, + x_account_token, + **kwargs + ): + """scorecards_list # noqa: E501 + + Returns a list of `Scorecard` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.scorecards_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + application_id (str): If provided, will only return scorecards for this application.. [optional] + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + interview_id (str): If provided, will only return scorecards for this interview.. [optional] + interviewer_id (str): If provided, will only return scorecards for this interviewer.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedScorecardList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.scorecards_list_endpoint.call_with_http_info(**kwargs) + + def scorecards_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """scorecards_retrieve # noqa: E501 + + Returns a `Scorecard` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.scorecards_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + expand (str): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Scorecard + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.scorecards_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/sync_status_api.py b/MergeATSClient/api/sync_status_api.py index 7885044..1a948ad 100644 --- a/MergeATSClient/api/sync_status_api.py +++ b/MergeATSClient/api/sync_status_api.py @@ -23,7 +23,6 @@ validate_and_convert_types ) from MergeATSClient.model.paginated_sync_status_list import PaginatedSyncStatusList -from MergeATSClient.model.sync_status import SyncStatus class SyncStatusApi(object): @@ -37,76 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __sync_status_list( - self, - x_account_token, - **kwargs - ): - """sync_status_list # noqa: E501 - - Get syncing status. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sync_status_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - cursor (str): The pagination cursor value.. [optional] - page_size (int): Number of results to return per page.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedSyncStatusList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.sync_status_list = _Endpoint( + self.sync_status_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedSyncStatusList,), 'auth': [ @@ -165,125 +95,74 @@ def __sync_status_list( ], 'content_type': [], }, - api_client=api_client, - callable=__sync_status_list + api_client=api_client ) - def __sync_status_resync_create( - self, - x_account_token, - **kwargs - ): - """sync_status_resync_create # noqa: E501 - - Force re-sync of all models. This is only available for organizations on Merge's Grow and Expand plans. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sync_status_resync_create(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - SyncStatus - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.sync_status_resync_create = _Endpoint( - settings={ - 'response_type': (SyncStatus,), - 'auth': [ - 'tokenAuth' - ], - 'endpoint_path': '/sync-status/resync', - 'operation_id': 'sync_status_resync_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'x_account_token', - ], - 'required': [ - 'x_account_token', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'x_account_token': - (str,), - }, - 'attribute_map': { - 'x_account_token': 'X-Account-Token', - }, - 'location_map': { - 'x_account_token': 'header', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client, - callable=__sync_status_resync_create + def sync_status_list( + self, + x_account_token, + **kwargs + ): + """sync_status_list # noqa: E501 + + Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `SYNCING` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_status_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + cursor (str): The pagination cursor value.. [optional] + page_size (int): Number of results to return per page.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedSyncStatusList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.sync_status_list_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/tags_api.py b/MergeATSClient/api/tags_api.py index 47ec014..6fd3225 100644 --- a/MergeATSClient/api/tags_api.py +++ b/MergeATSClient/api/tags_api.py @@ -36,82 +36,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __tags_list( - self, - x_account_token, - **kwargs - ): - """tags_list # noqa: E501 - - Returns a list of `Tag` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.tags_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedTagList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.tags_list = _Endpoint( + self.tags_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedTagList,), 'auth': [ @@ -128,6 +53,7 @@ def __tags_list( 'created_after', 'created_before', 'cursor', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -159,6 +85,8 @@ def __tags_list( (datetime,), 'cursor': (str,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -175,6 +103,7 @@ def __tags_list( 'created_after': 'created_after', 'created_before': 'created_before', 'cursor': 'cursor', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -186,6 +115,7 @@ def __tags_list( 'created_after': 'query', 'created_before': 'query', 'cursor': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -201,6 +131,81 @@ def __tags_list( ], 'content_type': [], }, - api_client=api_client, - callable=__tags_list + api_client=api_client + ) + + def tags_list( + self, + x_account_token, + **kwargs + ): + """tags_list # noqa: E501 + + Returns a list of `Tag` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.tags_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedTagList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.tags_list_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api/users_api.py b/MergeATSClient/api/users_api.py index c7f1a7b..f721581 100644 --- a/MergeATSClient/api/users_api.py +++ b/MergeATSClient/api/users_api.py @@ -37,83 +37,7 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - - def __users_list( - self, - x_account_token, - **kwargs - ): - """users_list # noqa: E501 - - Returns a list of `RemoteUser` objects. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.users_list(x_account_token, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - - Keyword Args: - created_after (datetime): If provided, will only return objects created after this datetime.. [optional] - created_before (datetime): If provided, will only return objects created before this datetime.. [optional] - cursor (str): The pagination cursor value.. [optional] - email (str, none_type): If provided, will only return remote users with the given email address. [optional] - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] - modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] - page_size (int): Number of results to return per page.. [optional] - remote_id (str, none_type): The API provider's ID for the given object.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - PaginatedRemoteUserList - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - return self.call_with_http_info(**kwargs) - - self.users_list = _Endpoint( + self.users_list_endpoint = _Endpoint( settings={ 'response_type': (PaginatedRemoteUserList,), 'auth': [ @@ -131,6 +55,7 @@ def __users_list( 'created_before', 'cursor', 'email', + 'include_deleted_data', 'include_remote_data', 'modified_after', 'modified_before', @@ -165,6 +90,8 @@ def __users_list( (str,), 'email': (str, none_type,), + 'include_deleted_data': + (bool,), 'include_remote_data': (bool,), 'modified_after': @@ -182,6 +109,7 @@ def __users_list( 'created_before': 'created_before', 'cursor': 'cursor', 'email': 'email', + 'include_deleted_data': 'include_deleted_data', 'include_remote_data': 'include_remote_data', 'modified_after': 'modified_after', 'modified_before': 'modified_before', @@ -194,6 +122,7 @@ def __users_list( 'created_before': 'query', 'cursor': 'query', 'email': 'query', + 'include_deleted_data': 'query', 'include_remote_data': 'query', 'modified_after': 'query', 'modified_before': 'query', @@ -209,82 +138,9 @@ def __users_list( ], 'content_type': [], }, - api_client=api_client, - callable=__users_list + api_client=api_client ) - - def __users_retrieve( - self, - x_account_token, - id, - **kwargs - ): - """users_retrieve # noqa: E501 - - Returns a `RemoteUser` object with the given `id`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.users_retrieve(x_account_token, id, async_req=True) - >>> result = thread.get() - - Args: - x_account_token (str): Token identifying the end user. - id (str): - - Keyword Args: - include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (float/tuple): timeout setting for this request. If one - number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - async_req (bool): execute request asynchronously - - Returns: - RemoteUser - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['x_account_token'] = \ - x_account_token - kwargs['id'] = \ - id - return self.call_with_http_info(**kwargs) - - self.users_retrieve = _Endpoint( + self.users_retrieve_endpoint = _Endpoint( settings={ 'response_type': (RemoteUser,), 'auth': [ @@ -344,6 +200,153 @@ def __users_retrieve( ], 'content_type': [], }, - api_client=api_client, - callable=__users_retrieve + api_client=api_client + ) + + def users_list( + self, + x_account_token, + **kwargs + ): + """users_list # noqa: E501 + + Returns a list of `RemoteUser` objects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.users_list(x_account_token, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + + Keyword Args: + created_after (datetime): If provided, will only return objects created after this datetime.. [optional] + created_before (datetime): If provided, will only return objects created before this datetime.. [optional] + cursor (str): The pagination cursor value.. [optional] + email (str, none_type): If provided, will only return remote users with the given email address. [optional] + include_deleted_data (bool): Whether to include data that was deleted in the third-party service.. [optional] + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + modified_after (datetime): If provided, will only return objects modified after this datetime.. [optional] + modified_before (datetime): If provided, will only return objects modified before this datetime.. [optional] + page_size (int): Number of results to return per page.. [optional] + remote_id (str, none_type): The API provider's ID for the given object.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PaginatedRemoteUserList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + return self.users_list_endpoint.call_with_http_info(**kwargs) + + def users_retrieve( + self, + x_account_token, + id, + **kwargs + ): + """users_retrieve # noqa: E501 + + Returns a `RemoteUser` object with the given `id`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.users_retrieve(x_account_token, id, async_req=True) + >>> result = thread.get() + + Args: + x_account_token (str): Token identifying the end user. + id (str): + + Keyword Args: + include_remote_data (bool): Whether to include the original data Merge fetched from the third-party to produce these models.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RemoteUser + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['x_account_token'] = \ + x_account_token + kwargs['id'] = \ + id + return self.users_retrieve_endpoint.call_with_http_info(**kwargs) + diff --git a/MergeATSClient/api_client.py b/MergeATSClient/api_client.py index ccdeb87..97aa26f 100644 --- a/MergeATSClient/api_client.py +++ b/MergeATSClient/api_client.py @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.2.0/python' + self.user_agent = 'OpenAPI-Generator/1.0.0/python' def __enter__(self): return self @@ -130,7 +130,7 @@ def __call_api( _return_http_data_only: typing.Optional[bool] = None, collection_formats: typing.Optional[typing.Dict[str, str]] = None, _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None ): @@ -348,7 +348,7 @@ def call_api( _return_http_data_only: typing.Optional[bool] = None, collection_formats: typing.Optional[typing.Dict[str, str]] = None, _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None ): @@ -589,12 +589,12 @@ def select_header_content_type(self, content_types): else: return content_types[0] - def update_params_for_auth(self, headers, querys, auth_settings, + def update_params_for_auth(self, headers, queries, auth_settings, resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. :param resource_path: A string representation of the HTTP request resource path. :param method: A string representation of the HTTP request method. @@ -613,7 +613,7 @@ def update_params_for_auth(self, headers, querys, auth_settings, if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) + queries.append((auth_setting['key'], auth_setting['value'])) else: raise ApiValueError( 'Authentication token must be in `query` or `header`' @@ -675,7 +675,7 @@ def __init__(self, settings=None, params_map=None, root_map=None, 'async_req': (bool,), '_host_index': (none_type, int), '_preload_content': (bool,), - '_request_timeout': (none_type, int, (int,), [int]), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), '_return_http_data_only': (bool,), '_check_input_type': (bool,), '_check_return_type': (bool,) @@ -827,9 +827,10 @@ def call_with_http_info(self, **kwargs): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/MergeATSClient/apis/__init__.py b/MergeATSClient/apis/__init__.py index 0b5294f..643d51b 100644 --- a/MergeATSClient/apis/__init__.py +++ b/MergeATSClient/apis/__init__.py @@ -24,6 +24,7 @@ from MergeATSClient.api.delete_account_api import DeleteAccountApi from MergeATSClient.api.departments_api import DepartmentsApi from MergeATSClient.api.eeocs_api import EeocsApi +from MergeATSClient.api.force_resync_api import ForceResyncApi from MergeATSClient.api.generate_key_api import GenerateKeyApi from MergeATSClient.api.interviews_api import InterviewsApi from MergeATSClient.api.issues_api import IssuesApi diff --git a/MergeATSClient/configuration.py b/MergeATSClient/configuration.py index 20b1a74..be9184b 100644 --- a/MergeATSClient/configuration.py +++ b/MergeATSClient/configuration.py @@ -74,7 +74,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format :Example: @@ -407,7 +407,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0\n"\ - "SDK Package Version: 1.2.0".\ + "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/MergeATSClient/model/access_role_enum.py b/MergeATSClient/model/access_role_enum.py index 93a5ceb..df4bba2 100644 --- a/MergeATSClient/model/access_role_enum.py +++ b/MergeATSClient/model/access_role_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class AccessRoleEnum(ModelSimple): @@ -86,6 +89,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -185,3 +190,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AccessRoleEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["SUPER_ADMIN", "ADMIN", "TEAM_MEMBER", "LIMITED_TEAM_MEMBER", "INTERVIEWER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["SUPER_ADMIN", "ADMIN", "TEAM_MEMBER", "LIMITED_TEAM_MEMBER", "INTERVIEWER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/account_details.py b/MergeATSClient/model/account_details.py index d5e8a6d..509eaa1 100644 --- a/MergeATSClient/model/account_details.py +++ b/MergeATSClient/model/account_details.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class AccountDetails(ModelNormal): @@ -58,7 +61,13 @@ class AccountDetails(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -75,7 +84,7 @@ def openapi_types(): return { 'id': (str,), # noqa: E501 'integration': (str,), # noqa: E501 - 'category': (object, none_type,), # noqa: E501 + 'category': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'end_user_origin_id': (str,), # noqa: E501 'end_user_organization_name': (str,), # noqa: E501 'end_user_email_address': (str,), # noqa: E501 @@ -97,8 +106,97 @@ def discriminator(): 'status': 'status', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'integration', # noqa: E501 + 'end_user_origin_id', # noqa: E501 + 'end_user_organization_name', # noqa: E501 + 'end_user_email_address', # noqa: E501 + 'status', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AccountDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + integration (str): [optional] # noqa: E501 + category (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + end_user_origin_id (str): [optional] # noqa: E501 + end_user_organization_name (str): [optional] # noqa: E501 + end_user_email_address (str): [optional] # noqa: E501 + status (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -145,7 +243,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) id (str): [optional] # noqa: E501 integration (str): [optional] # noqa: E501 - category (object, none_type): [optional] # noqa: E501 + category (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 end_user_origin_id (str): [optional] # noqa: E501 end_user_organization_name (str): [optional] # noqa: E501 end_user_email_address (str): [optional] # noqa: E501 @@ -183,3 +281,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/account_details_and_actions.py b/MergeATSClient/model/account_details_and_actions.py index 39987b7..85db0c6 100644 --- a/MergeATSClient/model/account_details_and_actions.py +++ b/MergeATSClient/model/account_details_and_actions.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.account_details_and_actions_integration import AccountDetailsAndActionsIntegration @@ -62,7 +65,14 @@ class AccountDetailsAndActions(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -79,10 +89,10 @@ def openapi_types(): lazy_import() return { 'id': (str,), # noqa: E501 - 'status': (object,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'end_user_organization_name': (str,), # noqa: E501 'end_user_email_address': (str,), # noqa: E501 - 'category': (object,), # noqa: E501 + 'category': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'status_detail': (str,), # noqa: E501 'end_user_origin_id': (str,), # noqa: E501 'integration': (AccountDetailsAndActionsIntegration,), # noqa: E501 @@ -104,8 +114,98 @@ def discriminator(): 'integration': 'integration', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, status, end_user_organization_name, end_user_email_address, *args, **kwargs): # noqa: E501 + """AccountDetailsAndActions - a model defined in OpenAPI + + Args: + id (str): + status (bool, date, datetime, dict, float, int, list, str, none_type): + end_user_organization_name (str): + end_user_email_address (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + category (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + status_detail (str): [optional] # noqa: E501 + end_user_origin_id (str): [optional] # noqa: E501 + integration (AccountDetailsAndActionsIntegration): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.status = status + self.end_user_organization_name = end_user_organization_name + self.end_user_email_address = end_user_email_address + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -121,7 +221,7 @@ def __init__(self, id, status, end_user_organization_name, end_user_email_addres Args: id (str): - status (object): + status (bool, date, datetime, dict, float, int, list, str, none_type): end_user_organization_name (str): end_user_email_address (str): @@ -156,7 +256,7 @@ def __init__(self, id, status, end_user_organization_name, end_user_email_addres Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - category (object): [optional] # noqa: E501 + category (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 status_detail (str): [optional] # noqa: E501 end_user_origin_id (str): [optional] # noqa: E501 integration (AccountDetailsAndActionsIntegration): [optional] # noqa: E501 @@ -197,3 +297,6 @@ def __init__(self, id, status, end_user_organization_name, end_user_email_addres # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/account_details_and_actions_integration.py b/MergeATSClient/model/account_details_and_actions_integration.py index 7f936e4..f9f5112 100644 --- a/MergeATSClient/model/account_details_and_actions_integration.py +++ b/MergeATSClient/model/account_details_and_actions_integration.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.categories_enum import CategoriesEnum @@ -64,7 +67,14 @@ class AccountDetailsAndActionsIntegration(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -106,8 +116,99 @@ def discriminator(): 'available_model_operations': 'available_model_operations', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, categories, color, slug, passthrough_available, *args, **kwargs): # noqa: E501 + """AccountDetailsAndActionsIntegration - a model defined in OpenAPI + + Args: + name (str): + categories ([CategoriesEnum]): + color (str): + slug (str): + passthrough_available (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + image (str): [optional] # noqa: E501 + square_image (str): [optional] # noqa: E501 + available_model_operations ([ModelOperation]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.categories = categories + self.color = color + self.slug = slug + self.passthrough_available = passthrough_available + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -200,3 +301,6 @@ def __init__(self, name, categories, color, slug, passthrough_available, *args, # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/account_details_and_actions_status_enum.py b/MergeATSClient/model/account_details_and_actions_status_enum.py index 141e191..1cfbef8 100644 --- a/MergeATSClient/model/account_details_and_actions_status_enum.py +++ b/MergeATSClient/model/account_details_and_actions_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class AccountDetailsAndActionsStatusEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AccountDetailsAndActionsStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/account_integration.py b/MergeATSClient/model/account_integration.py index d056983..5183189 100644 --- a/MergeATSClient/model/account_integration.py +++ b/MergeATSClient/model/account_integration.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.categories_enum import CategoriesEnum @@ -68,7 +71,14 @@ class AccountIntegration(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -106,8 +116,94 @@ def discriminator(): 'slug': 'slug', # noqa: E501 } + read_only_vars = { + 'slug', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """AccountIntegration - a model defined in OpenAPI + + Args: + name (str): Company name. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + categories ([CategoriesEnum]): Category or categories this integration belongs to. Multiple categories should be comma separated.

Example: For [ats, hris], enter ats,hris. [optional] # noqa: E501 + image (str, none_type): Company logo in rectangular shape. Upload an image with a clear background.. [optional] # noqa: E501 + square_image (str, none_type): Company logo in square shape. Upload an image with a white background.. [optional] # noqa: E501 + color (str): The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.. [optional] # noqa: E501 + slug (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -194,3 +290,6 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/account_token.py b/MergeATSClient/model/account_token.py index 3d67688..fbb7eab 100644 --- a/MergeATSClient/model/account_token.py +++ b/MergeATSClient/model/account_token.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.account_integration import AccountIntegration @@ -62,7 +65,14 @@ class AccountToken(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,8 +102,90 @@ def discriminator(): 'integration': 'integration', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, account_token, integration, *args, **kwargs): # noqa: E501 + """AccountToken - a model defined in OpenAPI + + Args: + account_token (str): + integration (AccountIntegration): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_token = account_token + self.integration = integration + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -177,3 +269,6 @@ def __init__(self, account_token, integration, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/activity.py b/MergeATSClient/model/activity.py index 3857633..b84e1e1 100644 --- a/MergeATSClient/model/activity.py +++ b/MergeATSClient/model/activity.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Activity(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -82,10 +92,10 @@ def openapi_types(): 'remote_id': (str, none_type,), # noqa: E501 'user': (str, none_type,), # noqa: E501 'remote_created_at': (datetime, none_type,), # noqa: E501 - 'activity_type': (object, none_type,), # noqa: E501 + 'activity_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'subject': (str, none_type,), # noqa: E501 'body': (str, none_type,), # noqa: E501 - 'visibility': (object, none_type,), # noqa: E501 + 'visibility': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -106,8 +116,95 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Activity - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + user (str, none_type): The user the performed the action.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's activity was created.. [optional] # noqa: E501 + activity_type (bool, date, datetime, dict, float, int, list, str, none_type): The activity's type.. [optional] # noqa: E501 + subject (str, none_type): The activity's subject.. [optional] # noqa: E501 + body (str, none_type): The activity's body.. [optional] # noqa: E501 + visibility (bool, date, datetime, dict, float, int, list, str, none_type): The activity's visibility.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -156,10 +253,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 user (str, none_type): The user the performed the action.. [optional] # noqa: E501 remote_created_at (datetime, none_type): When the third party's activity was created.. [optional] # noqa: E501 - activity_type (object, none_type): The activity's type.. [optional] # noqa: E501 + activity_type (bool, date, datetime, dict, float, int, list, str, none_type): The activity's type.. [optional] # noqa: E501 subject (str, none_type): The activity's subject.. [optional] # noqa: E501 body (str, none_type): The activity's body.. [optional] # noqa: E501 - visibility (object, none_type): The activity's visibility.. [optional] # noqa: E501 + visibility (bool, date, datetime, dict, float, int, list, str, none_type): The activity's visibility.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -194,3 +291,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/activity_type_enum.py b/MergeATSClient/model/activity_type_enum.py index c89fce3..9d257bb 100644 --- a/MergeATSClient/model/activity_type_enum.py +++ b/MergeATSClient/model/activity_type_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class ActivityTypeEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ActivityTypeEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["NOTE", "EMAIL", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["NOTE", "EMAIL", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/application.py b/MergeATSClient/model/application.py index f72706f..d464303 100644 --- a/MergeATSClient/model/application.py +++ b/MergeATSClient/model/application.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Application(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -112,8 +122,98 @@ def discriminator(): 'custom_fields': 'custom_fields', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Application - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + candidate (str, none_type): The candidate applying.. [optional] # noqa: E501 + job (str, none_type): The job being applied for.. [optional] # noqa: E501 + applied_at (datetime, none_type): When the application was submitted.. [optional] # noqa: E501 + rejected_at (datetime, none_type): When the application was rejected.. [optional] # noqa: E501 + source (str, none_type): The application's source.. [optional] # noqa: E501 + credited_to (str, none_type): The user credited for this application.. [optional] # noqa: E501 + current_stage (str, none_type): The application's current stage.. [optional] # noqa: E501 + reject_reason (str, none_type): The application's reason for rejection.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -203,3 +303,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/application_endpoint_request.py b/MergeATSClient/model/application_endpoint_request.py index 8e737b7..55e7c0d 100644 --- a/MergeATSClient/model/application_endpoint_request.py +++ b/MergeATSClient/model/application_endpoint_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.application_request import ApplicationRequest @@ -62,7 +65,14 @@ class ApplicationEndpointRequest(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,8 +102,90 @@ def discriminator(): 'remote_user_id': 'remote_user_id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, remote_user_id, *args, **kwargs): # noqa: E501 + """ApplicationEndpointRequest - a model defined in OpenAPI + + Args: + model (ApplicationRequest): + remote_user_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.remote_user_id = remote_user_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -177,3 +269,6 @@ def __init__(self, model, remote_user_id, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/application_request.py b/MergeATSClient/model/application_request.py index f81c855..897ea45 100644 --- a/MergeATSClient/model/application_request.py +++ b/MergeATSClient/model/application_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class ApplicationRequest(ModelNormal): @@ -56,9 +59,18 @@ class ApplicationRequest(ModelNormal): } validations = { + ('remote_template_id',): { + 'min_length': 1, + }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -83,6 +95,9 @@ def openapi_types(): 'current_stage': (str, none_type,), # noqa: E501 'reject_reason': (str, none_type,), # noqa: E501 'custom_fields': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'remote_template_id': (str, none_type,), # noqa: E501 + 'integration_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'linked_account_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -101,10 +116,102 @@ def discriminator(): 'current_stage': 'current_stage', # noqa: E501 'reject_reason': 'reject_reason', # noqa: E501 'custom_fields': 'custom_fields', # noqa: E501 + 'remote_template_id': 'remote_template_id', # noqa: E501 + 'integration_params': 'integration_params', # noqa: E501 + 'linked_account_params': 'linked_account_params', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplicationRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + candidate (str, none_type): The candidate applying.. [optional] # noqa: E501 + job (str, none_type): The job being applied for.. [optional] # noqa: E501 + applied_at (datetime, none_type): When the application was submitted.. [optional] # noqa: E501 + rejected_at (datetime, none_type): When the application was rejected.. [optional] # noqa: E501 + source (str, none_type): The application's source.. [optional] # noqa: E501 + credited_to (str, none_type): The user credited for this application.. [optional] # noqa: E501 + current_stage (str, none_type): The application's current stage.. [optional] # noqa: E501 + reject_reason (str, none_type): The application's reason for rejection.. [optional] # noqa: E501 + custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + remote_template_id (str, none_type): [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -159,6 +266,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 current_stage (str, none_type): The application's current stage.. [optional] # noqa: E501 reject_reason (str, none_type): The application's reason for rejection.. [optional] # noqa: E501 custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + remote_template_id (str, none_type): [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -192,3 +302,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/application_response.py b/MergeATSClient/model/application_response.py index 84ed142..23f935f 100644 --- a/MergeATSClient/model/application_response.py +++ b/MergeATSClient/model/application_response.py @@ -26,12 +26,17 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.application import Application - from MergeATSClient.model.validation_problem import ValidationProblem + from MergeATSClient.model.error_validation_problem import ErrorValidationProblem + from MergeATSClient.model.warning_validation_problem import WarningValidationProblem globals()['Application'] = Application - globals()['ValidationProblem'] = ValidationProblem + globals()['ErrorValidationProblem'] = ErrorValidationProblem + globals()['WarningValidationProblem'] = WarningValidationProblem class ApplicationResponse(ModelNormal): @@ -64,7 +69,14 @@ class ApplicationResponse(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -80,9 +92,9 @@ def openapi_types(): """ lazy_import() return { - 'errors': ([ValidationProblem],), # noqa: E501 - 'warnings': ([ValidationProblem],), # noqa: E501 'model': (Application,), # noqa: E501 + 'warnings': ([WarningValidationProblem],), # noqa: E501 + 'errors': ([ErrorValidationProblem],), # noqa: E501 } @cached_property @@ -91,13 +103,97 @@ def discriminator(): attribute_map = { - 'errors': 'errors', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 'model': 'model', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, warnings, errors, *args, **kwargs): # noqa: E501 + """ApplicationResponse - a model defined in OpenAPI + + Args: + model (Application): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.warnings = warnings + self.errors = errors + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -108,13 +204,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 + def __init__(self, model, warnings, errors, *args, **kwargs): # noqa: E501 """ApplicationResponse - a model defined in OpenAPI Args: - errors ([ValidationProblem]): - warnings ([ValidationProblem]): model (Application): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -172,9 +268,9 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.errors = errors - self.warnings = warnings self.model = model + self.warnings = warnings + self.errors = errors for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -183,3 +279,6 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/attachment.py b/MergeATSClient/model/attachment.py index e7f010f..4ac6e9c 100644 --- a/MergeATSClient/model/attachment.py +++ b/MergeATSClient/model/attachment.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -65,7 +68,14 @@ class Attachment(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -86,7 +96,7 @@ def openapi_types(): 'file_name': (str, none_type,), # noqa: E501 'file_url': (str, none_type,), # noqa: E501 'candidate': (str, none_type,), # noqa: E501 - 'attachment_type': (object, none_type,), # noqa: E501 + 'attachment_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -105,8 +115,93 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Attachment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + file_name (str, none_type): The attachment's name.. [optional] # noqa: E501 + file_url (str, none_type): The attachment's url.. [optional] # noqa: E501 + candidate (str, none_type): [optional] # noqa: E501 + attachment_type (bool, date, datetime, dict, float, int, list, str, none_type): The attachment's type.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -156,7 +251,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 file_name (str, none_type): The attachment's name.. [optional] # noqa: E501 file_url (str, none_type): The attachment's url.. [optional] # noqa: E501 candidate (str, none_type): [optional] # noqa: E501 - attachment_type (object, none_type): The attachment's type.. [optional] # noqa: E501 + attachment_type (bool, date, datetime, dict, float, int, list, str, none_type): The attachment's type.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -191,3 +286,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/attachment_endpoint_request.py b/MergeATSClient/model/attachment_endpoint_request.py index fec4b8e..a2863d4 100644 --- a/MergeATSClient/model/attachment_endpoint_request.py +++ b/MergeATSClient/model/attachment_endpoint_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.attachment_request import AttachmentRequest @@ -62,7 +65,14 @@ class AttachmentEndpointRequest(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,8 +102,90 @@ def discriminator(): 'remote_user_id': 'remote_user_id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, remote_user_id, *args, **kwargs): # noqa: E501 + """AttachmentEndpointRequest - a model defined in OpenAPI + + Args: + model (AttachmentRequest): + remote_user_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.remote_user_id = remote_user_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -177,3 +269,6 @@ def __init__(self, model, remote_user_id, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/attachment_request.py b/MergeATSClient/model/attachment_request.py index 30e5ad7..2f6ac42 100644 --- a/MergeATSClient/model/attachment_request.py +++ b/MergeATSClient/model/attachment_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class AttachmentRequest(ModelNormal): @@ -61,7 +64,13 @@ class AttachmentRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -80,7 +89,9 @@ def openapi_types(): 'file_name': (str, none_type,), # noqa: E501 'file_url': (str, none_type,), # noqa: E501 'candidate': (str, none_type,), # noqa: E501 - 'attachment_type': (object, none_type,), # noqa: E501 + 'attachment_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'integration_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'linked_account_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -94,10 +105,95 @@ def discriminator(): 'file_url': 'file_url', # noqa: E501 'candidate': 'candidate', # noqa: E501 'attachment_type': 'attachment_type', # noqa: E501 + 'integration_params': 'integration_params', # noqa: E501 + 'linked_account_params': 'linked_account_params', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttachmentRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + file_name (str, none_type): The attachment's name.. [optional] # noqa: E501 + file_url (str, none_type): The attachment's url.. [optional] # noqa: E501 + candidate (str, none_type): [optional] # noqa: E501 + attachment_type (bool, date, datetime, dict, float, int, list, str, none_type): The attachment's type.. [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -146,7 +242,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 file_name (str, none_type): The attachment's name.. [optional] # noqa: E501 file_url (str, none_type): The attachment's url.. [optional] # noqa: E501 candidate (str, none_type): [optional] # noqa: E501 - attachment_type (object, none_type): The attachment's type.. [optional] # noqa: E501 + attachment_type (bool, date, datetime, dict, float, int, list, str, none_type): The attachment's type.. [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -180,3 +278,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/attachment_response.py b/MergeATSClient/model/attachment_response.py index 6c87000..3c7bd2f 100644 --- a/MergeATSClient/model/attachment_response.py +++ b/MergeATSClient/model/attachment_response.py @@ -26,12 +26,17 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.attachment import Attachment - from MergeATSClient.model.validation_problem import ValidationProblem + from MergeATSClient.model.error_validation_problem import ErrorValidationProblem + from MergeATSClient.model.warning_validation_problem import WarningValidationProblem globals()['Attachment'] = Attachment - globals()['ValidationProblem'] = ValidationProblem + globals()['ErrorValidationProblem'] = ErrorValidationProblem + globals()['WarningValidationProblem'] = WarningValidationProblem class AttachmentResponse(ModelNormal): @@ -64,7 +69,14 @@ class AttachmentResponse(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -80,9 +92,9 @@ def openapi_types(): """ lazy_import() return { - 'errors': ([ValidationProblem],), # noqa: E501 - 'warnings': ([ValidationProblem],), # noqa: E501 'model': (Attachment,), # noqa: E501 + 'warnings': ([WarningValidationProblem],), # noqa: E501 + 'errors': ([ErrorValidationProblem],), # noqa: E501 } @cached_property @@ -91,13 +103,97 @@ def discriminator(): attribute_map = { - 'errors': 'errors', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 'model': 'model', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, warnings, errors, *args, **kwargs): # noqa: E501 + """AttachmentResponse - a model defined in OpenAPI + + Args: + model (Attachment): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.warnings = warnings + self.errors = errors + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -108,13 +204,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 + def __init__(self, model, warnings, errors, *args, **kwargs): # noqa: E501 """AttachmentResponse - a model defined in OpenAPI Args: - errors ([ValidationProblem]): - warnings ([ValidationProblem]): model (Attachment): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -172,9 +268,9 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.errors = errors - self.warnings = warnings self.model = model + self.warnings = warnings + self.errors = errors for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -183,3 +279,6 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/attachment_type_enum.py b/MergeATSClient/model/attachment_type_enum.py index 12328fc..caf8599 100644 --- a/MergeATSClient/model/attachment_type_enum.py +++ b/MergeATSClient/model/attachment_type_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class AttachmentTypeEnum(ModelSimple): @@ -85,6 +88,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -184,3 +189,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AttachmentTypeEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["RESUME", "COVER_LETTER", "OFFER_LETTER", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["RESUME", "COVER_LETTER", "OFFER_LETTER", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/available_actions.py b/MergeATSClient/model/available_actions.py index 56e3d31..6b87312 100644 --- a/MergeATSClient/model/available_actions.py +++ b/MergeATSClient/model/available_actions.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.account_integration import AccountIntegration @@ -64,7 +67,14 @@ class AvailableActions(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,8 +106,91 @@ def discriminator(): 'available_model_operations': 'available_model_operations', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, integration, passthrough_available, *args, **kwargs): # noqa: E501 + """AvailableActions - a model defined in OpenAPI + + Args: + integration (AccountIntegration): + passthrough_available (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + available_model_operations ([ModelOperation]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.integration = integration + self.passthrough_available = passthrough_available + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -182,3 +275,6 @@ def __init__(self, integration, passthrough_available, *args, **kwargs): # noqa # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/candidate.py b/MergeATSClient/model/candidate.py index 84d4cf9..5ca4a6e 100644 --- a/MergeATSClient/model/candidate.py +++ b/MergeATSClient/model/candidate.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.email_address import EmailAddress @@ -68,7 +71,14 @@ class Candidate(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -134,8 +144,106 @@ def discriminator(): 'custom_fields': 'custom_fields', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Candidate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + first_name (str, none_type): The candidate's first name.. [optional] # noqa: E501 + last_name (str, none_type): The candidate's last name.. [optional] # noqa: E501 + company (str, none_type): The candidate's current company.. [optional] # noqa: E501 + title (str, none_type): The candidate's current title.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's candidate was created.. [optional] # noqa: E501 + remote_updated_at (datetime, none_type): When the third party's candidate was updated.. [optional] # noqa: E501 + last_interaction_at (datetime, none_type): When the most recent candidate interaction occurred.. [optional] # noqa: E501 + is_private (bool, none_type): Whether or not the candidate is private.. [optional] # noqa: E501 + can_email (bool, none_type): Whether or not the candidate can be emailed.. [optional] # noqa: E501 + locations ([str, none_type], none_type): The candidate's locations.. [optional] # noqa: E501 + phone_numbers ([PhoneNumber]): [optional] # noqa: E501 + email_addresses ([EmailAddress]): [optional] # noqa: E501 + urls ([Url]): [optional] # noqa: E501 + tags ([str]): Array of `Tag` names as strings.. [optional] # noqa: E501 + applications ([str]): Array of `Application` object IDs.. [optional] # noqa: E501 + attachments ([str]): Array of `Attachment` object IDs.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -233,3 +341,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/candidate_endpoint_request.py b/MergeATSClient/model/candidate_endpoint_request.py index 940474b..9781d70 100644 --- a/MergeATSClient/model/candidate_endpoint_request.py +++ b/MergeATSClient/model/candidate_endpoint_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.candidate_request import CandidateRequest @@ -62,7 +65,14 @@ class CandidateEndpointRequest(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,8 +102,90 @@ def discriminator(): 'remote_user_id': 'remote_user_id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, remote_user_id, *args, **kwargs): # noqa: E501 + """CandidateEndpointRequest - a model defined in OpenAPI + + Args: + model (CandidateRequest): + remote_user_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.remote_user_id = remote_user_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -177,3 +269,6 @@ def __init__(self, model, remote_user_id, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/candidate_request.py b/MergeATSClient/model/candidate_request.py index f7c7f2a..1c44cc4 100644 --- a/MergeATSClient/model/candidate_request.py +++ b/MergeATSClient/model/candidate_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.email_address_request import EmailAddressRequest @@ -64,9 +67,19 @@ class CandidateRequest(ModelNormal): } validations = { + ('remote_template_id',): { + 'min_length': 1, + }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -100,6 +113,9 @@ def openapi_types(): 'applications': ([str],), # noqa: E501 'attachments': ([str],), # noqa: E501 'custom_fields': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'remote_template_id': (str, none_type,), # noqa: E501 + 'integration_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'linked_account_params': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property @@ -126,10 +142,110 @@ def discriminator(): 'applications': 'applications', # noqa: E501 'attachments': 'attachments', # noqa: E501 'custom_fields': 'custom_fields', # noqa: E501 + 'remote_template_id': 'remote_template_id', # noqa: E501 + 'integration_params': 'integration_params', # noqa: E501 + 'linked_account_params': 'linked_account_params', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CandidateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + first_name (str, none_type): The candidate's first name.. [optional] # noqa: E501 + last_name (str, none_type): The candidate's last name.. [optional] # noqa: E501 + company (str, none_type): The candidate's current company.. [optional] # noqa: E501 + title (str, none_type): The candidate's current title.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's candidate was created.. [optional] # noqa: E501 + remote_updated_at (datetime, none_type): When the third party's candidate was updated.. [optional] # noqa: E501 + last_interaction_at (datetime, none_type): When the most recent candidate interaction occurred.. [optional] # noqa: E501 + is_private (bool, none_type): Whether or not the candidate is private.. [optional] # noqa: E501 + can_email (bool, none_type): Whether or not the candidate can be emailed.. [optional] # noqa: E501 + locations ([str, none_type], none_type): The candidate's locations.. [optional] # noqa: E501 + phone_numbers ([PhoneNumberRequest]): [optional] # noqa: E501 + email_addresses ([EmailAddressRequest]): [optional] # noqa: E501 + urls ([UrlRequest]): [optional] # noqa: E501 + tags ([str]): Array of `Tag` names as strings.. [optional] # noqa: E501 + applications ([str]): Array of `Application` object IDs.. [optional] # noqa: E501 + attachments ([str]): Array of `Attachment` object IDs.. [optional] # noqa: E501 + custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + remote_template_id (str, none_type): [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -192,6 +308,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 applications ([str]): Array of `Application` object IDs.. [optional] # noqa: E501 attachments ([str]): Array of `Attachment` object IDs.. [optional] # noqa: E501 custom_fields ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Custom fields configured for a given model.. [optional] # noqa: E501 + remote_template_id (str, none_type): [optional] # noqa: E501 + integration_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + linked_account_params ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -225,3 +344,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/candidate_response.py b/MergeATSClient/model/candidate_response.py index 96dcd25..2378f59 100644 --- a/MergeATSClient/model/candidate_response.py +++ b/MergeATSClient/model/candidate_response.py @@ -26,12 +26,17 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.candidate import Candidate - from MergeATSClient.model.validation_problem import ValidationProblem + from MergeATSClient.model.error_validation_problem import ErrorValidationProblem + from MergeATSClient.model.warning_validation_problem import WarningValidationProblem globals()['Candidate'] = Candidate - globals()['ValidationProblem'] = ValidationProblem + globals()['ErrorValidationProblem'] = ErrorValidationProblem + globals()['WarningValidationProblem'] = WarningValidationProblem class CandidateResponse(ModelNormal): @@ -64,7 +69,14 @@ class CandidateResponse(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -80,9 +92,9 @@ def openapi_types(): """ lazy_import() return { - 'errors': ([ValidationProblem],), # noqa: E501 - 'warnings': ([ValidationProblem],), # noqa: E501 'model': (Candidate,), # noqa: E501 + 'warnings': ([WarningValidationProblem],), # noqa: E501 + 'errors': ([ErrorValidationProblem],), # noqa: E501 } @cached_property @@ -91,13 +103,97 @@ def discriminator(): attribute_map = { - 'errors': 'errors', # noqa: E501 - 'warnings': 'warnings', # noqa: E501 'model': 'model', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { } _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model, warnings, errors, *args, **kwargs): # noqa: E501 + """CandidateResponse - a model defined in OpenAPI + + Args: + model (Candidate): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model = model + self.warnings = warnings + self.errors = errors + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -108,13 +204,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 + def __init__(self, model, warnings, errors, *args, **kwargs): # noqa: E501 """CandidateResponse - a model defined in OpenAPI Args: - errors ([ValidationProblem]): - warnings ([ValidationProblem]): model (Candidate): + warnings ([WarningValidationProblem]): + errors ([ErrorValidationProblem]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -172,9 +268,9 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.errors = errors - self.warnings = warnings self.model = model + self.warnings = warnings + self.errors = errors for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -183,3 +279,6 @@ def __init__(self, errors, warnings, model, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/categories_enum.py b/MergeATSClient/model/categories_enum.py index 8ea09c5..0caa975 100644 --- a/MergeATSClient/model/categories_enum.py +++ b/MergeATSClient/model/categories_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class CategoriesEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CategoriesEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["hris", "ats", "accounting", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["hris", "ats", "accounting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/category_enum.py b/MergeATSClient/model/category_enum.py index 781441b..10d5dda 100644 --- a/MergeATSClient/model/category_enum.py +++ b/MergeATSClient/model/category_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class CategoryEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CategoryEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["hris", "ats", "accounting", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["hris", "ats", "accounting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/data_passthrough_request.py b/MergeATSClient/model/data_passthrough_request.py index 77bff56..1c145a9 100644 --- a/MergeATSClient/model/data_passthrough_request.py +++ b/MergeATSClient/model/data_passthrough_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class DataPassthroughRequest(ModelNormal): @@ -67,7 +70,13 @@ class DataPassthroughRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -82,12 +91,12 @@ def openapi_types(): and the value is attribute type. """ return { - 'method': (object,), # noqa: E501 + 'method': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'path': (str,), # noqa: E501 'base_url_override': (str, none_type,), # noqa: E501 'data': (str, none_type,), # noqa: E501 'headers': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'request_format': (object, none_type,), # noqa: E501 + 'request_format': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -104,8 +113,94 @@ def discriminator(): 'request_format': 'request_format', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, method, path, *args, **kwargs): # noqa: E501 + """DataPassthroughRequest - a model defined in OpenAPI + + Args: + method (bool, date, datetime, dict, float, int, list, str, none_type): + path (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + base_url_override (str, none_type): [optional] # noqa: E501 + data (str, none_type): [optional] # noqa: E501 + headers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + request_format (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.method = method + self.path = path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -120,7 +215,7 @@ def __init__(self, method, path, *args, **kwargs): # noqa: E501 """DataPassthroughRequest - a model defined in OpenAPI Args: - method (object): + method (bool, date, datetime, dict, float, int, list, str, none_type): path (str): Keyword Args: @@ -157,7 +252,7 @@ def __init__(self, method, path, *args, **kwargs): # noqa: E501 base_url_override (str, none_type): [optional] # noqa: E501 data (str, none_type): [optional] # noqa: E501 headers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 - request_format (object, none_type): [optional] # noqa: E501 + request_format (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -193,3 +288,6 @@ def __init__(self, method, path, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/department.py b/MergeATSClient/model/department.py index a4cad35..5b068ed 100644 --- a/MergeATSClient/model/department.py +++ b/MergeATSClient/model/department.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Department(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,8 +106,90 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Department - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The department's name.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -179,3 +271,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/disability_status_enum.py b/MergeATSClient/model/disability_status_enum.py index 554c005..fcba83e 100644 --- a/MergeATSClient/model/disability_status_enum.py +++ b/MergeATSClient/model/disability_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class DisabilityStatusEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DisabilityStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY", "NO_I_DONT_HAVE_A_DISABILITY", "I_DONT_WISH_TO_ANSWER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY", "NO_I_DONT_HAVE_A_DISABILITY", "I_DONT_WISH_TO_ANSWER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/eeoc.py b/MergeATSClient/model/eeoc.py index aaba69b..054567c 100644 --- a/MergeATSClient/model/eeoc.py +++ b/MergeATSClient/model/eeoc.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class EEOC(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -82,10 +92,10 @@ def openapi_types(): 'remote_id': (str, none_type,), # noqa: E501 'candidate': (str, none_type,), # noqa: E501 'submitted_at': (datetime, none_type,), # noqa: E501 - 'race': (object, none_type,), # noqa: E501 - 'gender': (object, none_type,), # noqa: E501 - 'veteran_status': (object, none_type,), # noqa: E501 - 'disability_status': (object, none_type,), # noqa: E501 + 'race': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'gender': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'veteran_status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'disability_status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -106,8 +116,95 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EEOC - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + candidate (str, none_type): The candidate being represented.. [optional] # noqa: E501 + submitted_at (datetime, none_type): When the information was submitted.. [optional] # noqa: E501 + race (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's race.. [optional] # noqa: E501 + gender (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's gender.. [optional] # noqa: E501 + veteran_status (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's veteran status.. [optional] # noqa: E501 + disability_status (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's disability status.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -156,10 +253,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 candidate (str, none_type): The candidate being represented.. [optional] # noqa: E501 submitted_at (datetime, none_type): When the information was submitted.. [optional] # noqa: E501 - race (object, none_type): The candidate's race.. [optional] # noqa: E501 - gender (object, none_type): The candidate's gender.. [optional] # noqa: E501 - veteran_status (object, none_type): The candidate's veteran status.. [optional] # noqa: E501 - disability_status (object, none_type): The candidate's disability status.. [optional] # noqa: E501 + race (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's race.. [optional] # noqa: E501 + gender (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's gender.. [optional] # noqa: E501 + veteran_status (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's veteran status.. [optional] # noqa: E501 + disability_status (bool, date, datetime, dict, float, int, list, str, none_type): The candidate's disability status.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -194,3 +291,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/email_address.py b/MergeATSClient/model/email_address.py index 6b23c45..2dfaf91 100644 --- a/MergeATSClient/model/email_address.py +++ b/MergeATSClient/model/email_address.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class EmailAddress(ModelNormal): @@ -61,7 +64,13 @@ class EmailAddress(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -77,7 +86,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'email_address_type': (object, none_type,), # noqa: E501 + 'email_address_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -90,8 +99,86 @@ def discriminator(): 'email_address_type': 'email_address_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EmailAddress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The email address.. [optional] # noqa: E501 + email_address_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -137,7 +224,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The email address.. [optional] # noqa: E501 - email_address_type (object, none_type): The type of email address.. [optional] # noqa: E501 + email_address_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of email address.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/email_address_request.py b/MergeATSClient/model/email_address_request.py index 42a9f5b..25fde00 100644 --- a/MergeATSClient/model/email_address_request.py +++ b/MergeATSClient/model/email_address_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class EmailAddressRequest(ModelNormal): @@ -61,7 +64,13 @@ class EmailAddressRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -77,7 +86,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'email_address_type': (object, none_type,), # noqa: E501 + 'email_address_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -90,8 +99,86 @@ def discriminator(): 'email_address_type': 'email_address_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EmailAddressRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The email address.. [optional] # noqa: E501 + email_address_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -137,7 +224,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The email address.. [optional] # noqa: E501 - email_address_type (object, none_type): The type of email address.. [optional] # noqa: E501 + email_address_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of email address.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/email_address_type_enum.py b/MergeATSClient/model/email_address_type_enum.py index 619d3d6..d19079c 100644 --- a/MergeATSClient/model/email_address_type_enum.py +++ b/MergeATSClient/model/email_address_type_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class EmailAddressTypeEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """EmailAddressTypeEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["PERSONAL", "WORK", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["PERSONAL", "WORK", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/end_user_details_request.py b/MergeATSClient/model/end_user_details_request.py index b1d7ae9..86d3e12 100644 --- a/MergeATSClient/model/end_user_details_request.py +++ b/MergeATSClient/model/end_user_details_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.categories_enum import CategoriesEnum @@ -74,7 +77,14 @@ class EndUserDetailsRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -110,8 +120,94 @@ def discriminator(): 'integration': 'integration', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, end_user_email_address, end_user_organization_name, end_user_origin_id, *args, **kwargs): # noqa: E501 + """EndUserDetailsRequest - a model defined in OpenAPI + + Args: + end_user_email_address (str): + end_user_organization_name (str): + end_user_origin_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + categories ([CategoriesEnum]): [optional] # noqa: E501 + integration (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.end_user_email_address = end_user_email_address + self.end_user_organization_name = end_user_organization_name + self.end_user_origin_id = end_user_origin_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -199,3 +295,6 @@ def __init__(self, end_user_email_address, end_user_organization_name, end_user_ # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/error_validation_problem.py b/MergeATSClient/model/error_validation_problem.py new file mode 100644 index 0000000..02e4b92 --- /dev/null +++ b/MergeATSClient/model/error_validation_problem.py @@ -0,0 +1,284 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + + +def lazy_import(): + from MergeATSClient.model.validation_problem_source import ValidationProblemSource + globals()['ValidationProblemSource'] = ValidationProblemSource + + +class ErrorValidationProblem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'detail': (str,), # noqa: E501 + 'problem_type': (str,), # noqa: E501 + 'source': (ValidationProblemSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'detail': 'detail', # noqa: E501 + 'problem_type': 'problem_type', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title, detail, problem_type, *args, **kwargs): # noqa: E501 + """ErrorValidationProblem - a model defined in OpenAPI + + Args: + title (str): + detail (str): + problem_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + source (ValidationProblemSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.detail = detail + self.problem_type = problem_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title, detail, problem_type, *args, **kwargs): # noqa: E501 + """ErrorValidationProblem - a model defined in OpenAPI + + Args: + title (str): + detail (str): + problem_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + source (ValidationProblemSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.detail = detail + self.problem_type = problem_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/gender_enum.py b/MergeATSClient/model/gender_enum.py index 85c1e2a..35e64bf 100644 --- a/MergeATSClient/model/gender_enum.py +++ b/MergeATSClient/model/gender_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class GenderEnum(ModelSimple): @@ -86,6 +89,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -185,3 +190,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """GenderEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["MALE", "FEMALE", "NON-BINARY", "OTHER", "DECLINE_TO_SELF_IDENTIFY", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["MALE", "FEMALE", "NON-BINARY", "OTHER", "DECLINE_TO_SELF_IDENTIFY", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/generate_remote_key_request.py b/MergeATSClient/model/generate_remote_key_request.py index 15404ce..621e060 100644 --- a/MergeATSClient/model/generate_remote_key_request.py +++ b/MergeATSClient/model/generate_remote_key_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class GenerateRemoteKeyRequest(ModelNormal): @@ -61,7 +64,13 @@ class GenerateRemoteKeyRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,8 +97,88 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """GenerateRemoteKeyRequest - a model defined in OpenAPI + + Args: + name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -171,3 +260,6 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/issue.py b/MergeATSClient/model/issue.py index b9ff0f9..6e21a80 100644 --- a/MergeATSClient/model/issue.py +++ b/MergeATSClient/model/issue.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.issue_status_enum import IssueStatusEnum @@ -62,7 +65,14 @@ class Issue(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -102,8 +112,97 @@ def discriminator(): 'is_muted': 'is_muted', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'end_user', # noqa: E501 + 'is_muted', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, error_description, *args, **kwargs): # noqa: E501 + """Issue - a model defined in OpenAPI + + Args: + error_description (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + status (IssueStatusEnum): [optional] # noqa: E501 + end_user ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + first_incident_time (datetime, none_type): [optional] # noqa: E501 + last_incident_time (datetime, none_type): [optional] # noqa: E501 + is_muted (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.error_description = error_description + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -191,3 +290,6 @@ def __init__(self, error_description, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/issue_status_enum.py b/MergeATSClient/model/issue_status_enum.py index fbc88c5..f55fbb7 100644 --- a/MergeATSClient/model/issue_status_enum.py +++ b/MergeATSClient/model/issue_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class IssueStatusEnum(ModelSimple): @@ -83,6 +86,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -182,3 +187,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """IssueStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ONGOING", "RESOLVED", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ONGOING", "RESOLVED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/job.py b/MergeATSClient/model/job.py index 160f9b2..a5f9881 100644 --- a/MergeATSClient/model/job.py +++ b/MergeATSClient/model/job.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Job(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -83,7 +93,7 @@ def openapi_types(): 'name': (str, none_type,), # noqa: E501 'description': (str, none_type,), # noqa: E501 'code': (str, none_type,), # noqa: E501 - 'status': (object, none_type,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_created_at': (datetime, none_type,), # noqa: E501 'remote_updated_at': (datetime, none_type,), # noqa: E501 'confidential': (bool, none_type,), # noqa: E501 @@ -114,8 +124,99 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Job - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The job's name.. [optional] # noqa: E501 + description (str, none_type): The job's description.. [optional] # noqa: E501 + code (str, none_type): The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The job's status.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's job was created.. [optional] # noqa: E501 + remote_updated_at (datetime, none_type): When the third party's job was updated.. [optional] # noqa: E501 + confidential (bool, none_type): Whether the job is confidential.. [optional] # noqa: E501 + departments ([str]): IDs of `Department` objects for this `Job`.. [optional] # noqa: E501 + offices ([str]): IDs of `Office` objects for this `Job`.. [optional] # noqa: E501 + hiring_managers ([str]): IDs of `RemoteUser` objects that serve as hiring managers for this `Job`.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -165,7 +266,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 name (str, none_type): The job's name.. [optional] # noqa: E501 description (str, none_type): The job's description.. [optional] # noqa: E501 code (str, none_type): The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS.. [optional] # noqa: E501 - status (object, none_type): The job's status.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The job's status.. [optional] # noqa: E501 remote_created_at (datetime, none_type): When the third party's job was created.. [optional] # noqa: E501 remote_updated_at (datetime, none_type): When the third party's job was updated.. [optional] # noqa: E501 confidential (bool, none_type): Whether the job is confidential.. [optional] # noqa: E501 @@ -206,3 +307,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/job_interview_stage.py b/MergeATSClient/model/job_interview_stage.py index ae2504d..530bac6 100644 --- a/MergeATSClient/model/job_interview_stage.py +++ b/MergeATSClient/model/job_interview_stage.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class JobInterviewStage(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -98,8 +108,91 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JobInterviewStage - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The stage's name.. [optional] # noqa: E501 + job (str, none_type): If stages are specific to a job, this is the job that this stage belongs to.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -182,3 +275,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/job_status_enum.py b/MergeATSClient/model/job_status_enum.py index 0134c67..7410dc4 100644 --- a/MergeATSClient/model/job_status_enum.py +++ b/MergeATSClient/model/job_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class JobStatusEnum(ModelSimple): @@ -86,6 +89,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -185,3 +190,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JobStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["OPEN", "CLOSED", "DRAFT", "ARCHIVED", "PENDING", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["OPEN", "CLOSED", "DRAFT", "ARCHIVED", "PENDING", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/link_token.py b/MergeATSClient/model/link_token.py index e3cd9e3..e9b3f67 100644 --- a/MergeATSClient/model/link_token.py +++ b/MergeATSClient/model/link_token.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class LinkToken(ModelNormal): @@ -58,7 +61,13 @@ class LinkToken(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -87,8 +96,90 @@ def discriminator(): 'integration_name': 'integration_name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, link_token, integration_name, *args, **kwargs): # noqa: E501 + """LinkToken - a model defined in OpenAPI + + Args: + link_token (str): + integration_name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.link_token = link_token + self.integration_name = integration_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -172,3 +263,6 @@ def __init__(self, link_token, integration_name, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/linked_account_status.py b/MergeATSClient/model/linked_account_status.py new file mode 100644 index 0000000..f7c9086 --- /dev/null +++ b/MergeATSClient/model/linked_account_status.py @@ -0,0 +1,268 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + + + +class LinkedAccountStatus(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'linked_account_status': (str,), # noqa: E501 + 'can_make_request': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'linked_account_status': 'linked_account_status', # noqa: E501 + 'can_make_request': 'can_make_request', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, linked_account_status, can_make_request, *args, **kwargs): # noqa: E501 + """LinkedAccountStatus - a model defined in OpenAPI + + Args: + linked_account_status (str): + can_make_request (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.linked_account_status = linked_account_status + self.can_make_request = can_make_request + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, linked_account_status, can_make_request, *args, **kwargs): # noqa: E501 + """LinkedAccountStatus - a model defined in OpenAPI + + Args: + linked_account_status (str): + can_make_request (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.linked_account_status = linked_account_status + self.can_make_request = can_make_request + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/meta_response.py b/MergeATSClient/model/meta_response.py new file mode 100644 index 0000000..83ee146 --- /dev/null +++ b/MergeATSClient/model/meta_response.py @@ -0,0 +1,278 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + + +def lazy_import(): + from MergeATSClient.model.linked_account_status import LinkedAccountStatus + globals()['LinkedAccountStatus'] = LinkedAccountStatus + + +class MetaResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'request_schema': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'has_conditional_fields': (bool,), # noqa: E501 + 'status': (LinkedAccountStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'request_schema': 'request_schema', # noqa: E501 + 'has_conditional_fields': 'has_conditional_fields', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, request_schema, has_conditional_fields, *args, **kwargs): # noqa: E501 + """MetaResponse - a model defined in OpenAPI + + Args: + request_schema ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + has_conditional_fields (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + status (LinkedAccountStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.request_schema = request_schema + self.has_conditional_fields = has_conditional_fields + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, request_schema, has_conditional_fields, *args, **kwargs): # noqa: E501 + """MetaResponse - a model defined in OpenAPI + + Args: + request_schema ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + has_conditional_fields (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + status (LinkedAccountStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.request_schema = request_schema + self.has_conditional_fields = has_conditional_fields + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/method_enum.py b/MergeATSClient/model/method_enum.py index 69f1f94..9f06295 100644 --- a/MergeATSClient/model/method_enum.py +++ b/MergeATSClient/model/method_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class MethodEnum(ModelSimple): @@ -88,6 +91,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -187,3 +192,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MethodEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/model_operation.py b/MergeATSClient/model/model_operation.py index 095594d..fd19c31 100644 --- a/MergeATSClient/model/model_operation.py +++ b/MergeATSClient/model/model_operation.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class ModelOperation(ModelNormal): @@ -58,7 +61,13 @@ class ModelOperation(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -91,8 +100,94 @@ def discriminator(): 'supported_fields': 'supported_fields', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model_name, available_operations, required_post_parameters, supported_fields, *args, **kwargs): # noqa: E501 + """ModelOperation - a model defined in OpenAPI + + Args: + model_name (str): + available_operations ([str]): + required_post_parameters ([str]): + supported_fields ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model_name = model_name + self.available_operations = available_operations + self.required_post_parameters = required_post_parameters + self.supported_fields = supported_fields + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -180,3 +275,6 @@ def __init__(self, model_name, available_operations, required_post_parameters, s # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/offer.py b/MergeATSClient/model/offer.py index 11506a0..79f27fd 100644 --- a/MergeATSClient/model/offer.py +++ b/MergeATSClient/model/offer.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Offer(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -86,7 +96,7 @@ def openapi_types(): 'closed_at': (datetime, none_type,), # noqa: E501 'sent_at': (datetime, none_type,), # noqa: E501 'start_date': (datetime, none_type,), # noqa: E501 - 'status': (object, none_type,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -108,8 +118,96 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Offer - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + application (str, none_type): The application who is receiving the offer.. [optional] # noqa: E501 + creator (str, none_type): The user who created the offer.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's offer was created.. [optional] # noqa: E501 + closed_at (datetime, none_type): When the offer was closed.. [optional] # noqa: E501 + sent_at (datetime, none_type): When the offer was sent.. [optional] # noqa: E501 + start_date (datetime, none_type): The employment start date on the offer.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The offer's status.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -162,7 +260,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 closed_at (datetime, none_type): When the offer was closed.. [optional] # noqa: E501 sent_at (datetime, none_type): When the offer was sent.. [optional] # noqa: E501 start_date (datetime, none_type): The employment start date on the offer.. [optional] # noqa: E501 - status (object, none_type): The offer's status.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The offer's status.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -197,3 +295,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/offer_status_enum.py b/MergeATSClient/model/offer_status_enum.py index 45bbe0e..502da00 100644 --- a/MergeATSClient/model/offer_status_enum.py +++ b/MergeATSClient/model/offer_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class OfferStatusEnum(ModelSimple): @@ -90,6 +93,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -189,3 +194,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """OfferStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["DRAFT", "APPROVAL-SENT", "APPROVED", "SENT", "SENT-MANUALLY", "OPENED", "DENIED", "SIGNED", "DEPRECATED", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["DRAFT", "APPROVAL-SENT", "APPROVED", "SENT", "SENT-MANUALLY", "OPENED", "DENIED", "SIGNED", "DEPRECATED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/office.py b/MergeATSClient/model/office.py index 18d6752..db7be13 100644 --- a/MergeATSClient/model/office.py +++ b/MergeATSClient/model/office.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Office(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -98,8 +108,91 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Office - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The office's name.. [optional] # noqa: E501 + location (str, none_type): The office's location.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -182,3 +275,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/overall_recommendation_enum.py b/MergeATSClient/model/overall_recommendation_enum.py index 164e8ee..80b879f 100644 --- a/MergeATSClient/model/overall_recommendation_enum.py +++ b/MergeATSClient/model/overall_recommendation_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class OverallRecommendationEnum(ModelSimple): @@ -86,6 +89,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -185,3 +190,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """OverallRecommendationEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["DEFINITELY_NO", "NO", "YES", "STRONG_YES", "NO_DECISION", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["DEFINITELY_NO", "NO", "YES", "STRONG_YES", "NO_DECISION", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/paginated_account_details_and_actions_list.py b/MergeATSClient/model/paginated_account_details_and_actions_list.py index a2218e1..dee5a7a 100644 --- a/MergeATSClient/model/paginated_account_details_and_actions_list.py +++ b/MergeATSClient/model/paginated_account_details_and_actions_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.account_details_and_actions import AccountDetailsAndActions @@ -62,7 +65,14 @@ class PaginatedAccountDetailsAndActionsList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedAccountDetailsAndActionsList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([AccountDetailsAndActions]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_activity_list.py b/MergeATSClient/model/paginated_activity_list.py index ba898dc..72c0ff5 100644 --- a/MergeATSClient/model/paginated_activity_list.py +++ b/MergeATSClient/model/paginated_activity_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.activity import Activity @@ -62,7 +65,14 @@ class PaginatedActivityList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedActivityList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Activity]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_application_list.py b/MergeATSClient/model/paginated_application_list.py index ea574d4..c90a99e 100644 --- a/MergeATSClient/model/paginated_application_list.py +++ b/MergeATSClient/model/paginated_application_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.application import Application @@ -62,7 +65,14 @@ class PaginatedApplicationList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedApplicationList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Application]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_attachment_list.py b/MergeATSClient/model/paginated_attachment_list.py index 18f235d..2454628 100644 --- a/MergeATSClient/model/paginated_attachment_list.py +++ b/MergeATSClient/model/paginated_attachment_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.attachment import Attachment @@ -62,7 +65,14 @@ class PaginatedAttachmentList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedAttachmentList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Attachment]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_candidate_list.py b/MergeATSClient/model/paginated_candidate_list.py index 059f22f..8354b82 100644 --- a/MergeATSClient/model/paginated_candidate_list.py +++ b/MergeATSClient/model/paginated_candidate_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.candidate import Candidate @@ -62,7 +65,14 @@ class PaginatedCandidateList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedCandidateList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Candidate]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_department_list.py b/MergeATSClient/model/paginated_department_list.py index c964066..fb16f98 100644 --- a/MergeATSClient/model/paginated_department_list.py +++ b/MergeATSClient/model/paginated_department_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.department import Department @@ -62,7 +65,14 @@ class PaginatedDepartmentList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedDepartmentList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Department]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_eeoc_list.py b/MergeATSClient/model/paginated_eeoc_list.py index 037f68b..89ebae2 100644 --- a/MergeATSClient/model/paginated_eeoc_list.py +++ b/MergeATSClient/model/paginated_eeoc_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.eeoc import EEOC @@ -62,7 +65,14 @@ class PaginatedEEOCList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedEEOCList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([EEOC]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_issue_list.py b/MergeATSClient/model/paginated_issue_list.py index 552c42b..40b1e83 100644 --- a/MergeATSClient/model/paginated_issue_list.py +++ b/MergeATSClient/model/paginated_issue_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.issue import Issue @@ -62,7 +65,14 @@ class PaginatedIssueList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedIssueList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Issue]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_job_interview_stage_list.py b/MergeATSClient/model/paginated_job_interview_stage_list.py index 9f79e6d..fd40554 100644 --- a/MergeATSClient/model/paginated_job_interview_stage_list.py +++ b/MergeATSClient/model/paginated_job_interview_stage_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.job_interview_stage import JobInterviewStage @@ -62,7 +65,14 @@ class PaginatedJobInterviewStageList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedJobInterviewStageList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([JobInterviewStage]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_job_list.py b/MergeATSClient/model/paginated_job_list.py index 4675c56..3d38c14 100644 --- a/MergeATSClient/model/paginated_job_list.py +++ b/MergeATSClient/model/paginated_job_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.job import Job @@ -62,7 +65,14 @@ class PaginatedJobList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedJobList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Job]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_offer_list.py b/MergeATSClient/model/paginated_offer_list.py index 0af4802..3b31bec 100644 --- a/MergeATSClient/model/paginated_offer_list.py +++ b/MergeATSClient/model/paginated_offer_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.offer import Offer @@ -62,7 +65,14 @@ class PaginatedOfferList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedOfferList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Offer]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_office_list.py b/MergeATSClient/model/paginated_office_list.py index f4d7c5d..3f2caf2 100644 --- a/MergeATSClient/model/paginated_office_list.py +++ b/MergeATSClient/model/paginated_office_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.office import Office @@ -62,7 +65,14 @@ class PaginatedOfficeList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedOfficeList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Office]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_reject_reason_list.py b/MergeATSClient/model/paginated_reject_reason_list.py index 03a5864..2071a8e 100644 --- a/MergeATSClient/model/paginated_reject_reason_list.py +++ b/MergeATSClient/model/paginated_reject_reason_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.reject_reason import RejectReason @@ -62,7 +65,14 @@ class PaginatedRejectReasonList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedRejectReasonList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([RejectReason]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_remote_user_list.py b/MergeATSClient/model/paginated_remote_user_list.py index 939a22c..3325cb8 100644 --- a/MergeATSClient/model/paginated_remote_user_list.py +++ b/MergeATSClient/model/paginated_remote_user_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_user import RemoteUser @@ -62,7 +65,14 @@ class PaginatedRemoteUserList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedRemoteUserList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([RemoteUser]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_scheduled_interview_list.py b/MergeATSClient/model/paginated_scheduled_interview_list.py index 51a3bce..83ace05 100644 --- a/MergeATSClient/model/paginated_scheduled_interview_list.py +++ b/MergeATSClient/model/paginated_scheduled_interview_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.scheduled_interview import ScheduledInterview @@ -62,7 +65,14 @@ class PaginatedScheduledInterviewList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedScheduledInterviewList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([ScheduledInterview]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_scorecard_list.py b/MergeATSClient/model/paginated_scorecard_list.py index ea7c0ac..6d050f9 100644 --- a/MergeATSClient/model/paginated_scorecard_list.py +++ b/MergeATSClient/model/paginated_scorecard_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.scorecard import Scorecard @@ -62,7 +65,14 @@ class PaginatedScorecardList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedScorecardList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Scorecard]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_sync_status_list.py b/MergeATSClient/model/paginated_sync_status_list.py index 8f603b6..9d05910 100644 --- a/MergeATSClient/model/paginated_sync_status_list.py +++ b/MergeATSClient/model/paginated_sync_status_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.sync_status import SyncStatus @@ -62,7 +65,14 @@ class PaginatedSyncStatusList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedSyncStatusList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([SyncStatus]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/paginated_tag_list.py b/MergeATSClient/model/paginated_tag_list.py index a19b43c..8bb0533 100644 --- a/MergeATSClient/model/paginated_tag_list.py +++ b/MergeATSClient/model/paginated_tag_list.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.tag import Tag @@ -62,7 +65,14 @@ class PaginatedTagList(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -94,8 +104,87 @@ def discriminator(): 'results': 'results', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaginatedTagList - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next (str, none_type): [optional] # noqa: E501 + previous (str, none_type): [optional] # noqa: E501 + results ([Tag]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -176,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/phone_number.py b/MergeATSClient/model/phone_number.py index 45ea54f..a85ad01 100644 --- a/MergeATSClient/model/phone_number.py +++ b/MergeATSClient/model/phone_number.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class PhoneNumber(ModelNormal): @@ -58,7 +61,13 @@ class PhoneNumber(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -74,7 +83,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'phone_number_type': (object, none_type,), # noqa: E501 + 'phone_number_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -87,8 +96,86 @@ def discriminator(): 'phone_number_type': 'phone_number_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PhoneNumber - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The phone number.. [optional] # noqa: E501 + phone_number_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of phone number.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -134,7 +221,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The phone number.. [optional] # noqa: E501 - phone_number_type (object, none_type): The type of phone number.. [optional] # noqa: E501 + phone_number_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of phone number.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -168,3 +255,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/phone_number_request.py b/MergeATSClient/model/phone_number_request.py index 3820c59..9dd5d35 100644 --- a/MergeATSClient/model/phone_number_request.py +++ b/MergeATSClient/model/phone_number_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class PhoneNumberRequest(ModelNormal): @@ -58,7 +61,13 @@ class PhoneNumberRequest(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -74,7 +83,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'phone_number_type': (object, none_type,), # noqa: E501 + 'phone_number_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -87,8 +96,86 @@ def discriminator(): 'phone_number_type': 'phone_number_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PhoneNumberRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The phone number.. [optional] # noqa: E501 + phone_number_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of phone number.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -134,7 +221,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The phone number.. [optional] # noqa: E501 - phone_number_type (object, none_type): The type of phone number.. [optional] # noqa: E501 + phone_number_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of phone number.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -168,3 +255,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/phone_number_type_enum.py b/MergeATSClient/model/phone_number_type_enum.py index 81da568..c888d63 100644 --- a/MergeATSClient/model/phone_number_type_enum.py +++ b/MergeATSClient/model/phone_number_type_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class PhoneNumberTypeEnum(ModelSimple): @@ -86,6 +89,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -185,3 +190,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PhoneNumberTypeEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["HOME", "WORK", "MOBILE", "SKYPE", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["HOME", "WORK", "MOBILE", "SKYPE", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/race_enum.py b/MergeATSClient/model/race_enum.py index 7bdc62f..d1dee15 100644 --- a/MergeATSClient/model/race_enum.py +++ b/MergeATSClient/model/race_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RaceEnum(ModelSimple): @@ -89,6 +92,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -188,3 +193,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """RaceEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["AMERICAN_INDIAN_OR_ALASKAN_NATIVE", "ASIAN", "BLACK_OR_AFRICAN_AMERICAN", "HISPANIC_OR_LATINO", "WHITE", "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER", "TWO_OR_MORE_RACES", "DECLINE_TO_SELF_IDENTIFY", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["AMERICAN_INDIAN_OR_ALASKAN_NATIVE", "ASIAN", "BLACK_OR_AFRICAN_AMERICAN", "HISPANIC_OR_LATINO", "WHITE", "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER", "TWO_OR_MORE_RACES", "DECLINE_TO_SELF_IDENTIFY", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/reject_reason.py b/MergeATSClient/model/reject_reason.py index 3793c2a..ade5dc5 100644 --- a/MergeATSClient/model/reject_reason.py +++ b/MergeATSClient/model/reject_reason.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class RejectReason(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,8 +106,90 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RejectReason - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The rejection reason’s name.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -179,3 +271,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_data.py b/MergeATSClient/model/remote_data.py index 5716f1e..9ea03d0 100644 --- a/MergeATSClient/model/remote_data.py +++ b/MergeATSClient/model/remote_data.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RemoteData(ModelNormal): @@ -58,7 +61,13 @@ class RemoteData(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -87,8 +96,89 @@ def discriminator(): 'data': 'data', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, path, *args, **kwargs): # noqa: E501 + """RemoteData - a model defined in OpenAPI + + Args: + path (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.path = path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -171,3 +261,6 @@ def __init__(self, path, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_data_request.py b/MergeATSClient/model/remote_data_request.py index 92243a1..1c01241 100644 --- a/MergeATSClient/model/remote_data_request.py +++ b/MergeATSClient/model/remote_data_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RemoteDataRequest(ModelNormal): @@ -61,7 +64,13 @@ class RemoteDataRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -90,8 +99,89 @@ def discriminator(): 'data': 'data', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, path, *args, **kwargs): # noqa: E501 + """RemoteDataRequest - a model defined in OpenAPI + + Args: + path (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.path = path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -174,3 +264,6 @@ def __init__(self, path, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_key.py b/MergeATSClient/model/remote_key.py index 9dd3d7d..1258745 100644 --- a/MergeATSClient/model/remote_key.py +++ b/MergeATSClient/model/remote_key.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RemoteKey(ModelNormal): @@ -58,7 +61,13 @@ class RemoteKey(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -87,8 +96,90 @@ def discriminator(): 'key': 'key', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, key, *args, **kwargs): # noqa: E501 + """RemoteKey - a model defined in OpenAPI + + Args: + name (str): + key (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.key = key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -172,3 +263,6 @@ def __init__(self, name, key, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_key_for_regeneration_request.py b/MergeATSClient/model/remote_key_for_regeneration_request.py index f0b8a5d..9afbf0b 100644 --- a/MergeATSClient/model/remote_key_for_regeneration_request.py +++ b/MergeATSClient/model/remote_key_for_regeneration_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RemoteKeyForRegenerationRequest(ModelNormal): @@ -61,7 +64,13 @@ class RemoteKeyForRegenerationRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,8 +97,88 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """RemoteKeyForRegenerationRequest - a model defined in OpenAPI + + Args: + name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -171,3 +260,6 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_response.py b/MergeATSClient/model/remote_response.py index 63892f5..540550e 100644 --- a/MergeATSClient/model/remote_response.py +++ b/MergeATSClient/model/remote_response.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RemoteResponse(ModelNormal): @@ -58,7 +61,13 @@ class RemoteResponse(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -93,8 +102,95 @@ def discriminator(): 'headers': 'headers', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, method, path, status, response, *args, **kwargs): # noqa: E501 + """RemoteResponse - a model defined in OpenAPI + + Args: + method (str): + path (str): + status (int): + response ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + headers ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.method = method + self.path = path + self.status = status + self.response = response + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -183,3 +279,6 @@ def __init__(self, method, path, status, response, *args, **kwargs): # noqa: E5 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/remote_user.py b/MergeATSClient/model/remote_user.py index 2ba57bd..426bec5 100644 --- a/MergeATSClient/model/remote_user.py +++ b/MergeATSClient/model/remote_user.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -65,7 +68,14 @@ class RemoteUser(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,7 +98,7 @@ def openapi_types(): 'email': (str, none_type,), # noqa: E501 'disabled': (bool, none_type,), # noqa: E501 'remote_created_at': (datetime, none_type,), # noqa: E501 - 'access_role': (object, none_type,), # noqa: E501 + 'access_role': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -109,8 +119,95 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RemoteUser - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + first_name (str, none_type): The user's first name.. [optional] # noqa: E501 + last_name (str, none_type): The user's last name.. [optional] # noqa: E501 + email (str, none_type): The user's email.. [optional] # noqa: E501 + disabled (bool, none_type): Whether the user's account had been disabled.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's user was created.. [optional] # noqa: E501 + access_role (bool, date, datetime, dict, float, int, list, str, none_type): The user's role.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -162,7 +259,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 email (str, none_type): The user's email.. [optional] # noqa: E501 disabled (bool, none_type): Whether the user's account had been disabled.. [optional] # noqa: E501 remote_created_at (datetime, none_type): When the third party's user was created.. [optional] # noqa: E501 - access_role (object, none_type): The user's role.. [optional] # noqa: E501 + access_role (bool, date, datetime, dict, float, int, list, str, none_type): The user's role.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -197,3 +294,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/request_format_enum.py b/MergeATSClient/model/request_format_enum.py index ccc77ef..05696f0 100644 --- a/MergeATSClient/model/request_format_enum.py +++ b/MergeATSClient/model/request_format_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class RequestFormatEnum(ModelSimple): @@ -52,6 +55,7 @@ class RequestFormatEnum(ModelSimple): ('value',): { 'JSON': "JSON", 'XML': "XML", + 'MULTIPART': "MULTIPART", }, } @@ -83,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -101,10 +107,100 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["JSON", "XML", ] # noqa: E501 + args[0] (str):, must be one of ["JSON", "XML", "MULTIPART", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["JSON", "XML", "MULTIPART", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """RequestFormatEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["JSON", "XML", "MULTIPART", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["JSON", "XML", ] # noqa: E501 + value (str):, must be one of ["JSON", "XML", "MULTIPART", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -139,6 +235,8 @@ def __init__(self, *args, **kwargs): # required up here when default value is not given _path_to_item = kwargs.pop('_path_to_item', ()) + self = super(OpenApiModel, cls).__new__(cls) + if 'value' in kwargs: value = kwargs.pop('value') elif args: @@ -182,3 +280,5 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + return self diff --git a/MergeATSClient/model/scheduled_interview.py b/MergeATSClient/model/scheduled_interview.py index f7c2df1..0aa25f1 100644 --- a/MergeATSClient/model/scheduled_interview.py +++ b/MergeATSClient/model/scheduled_interview.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class ScheduledInterview(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -89,7 +99,7 @@ def openapi_types(): 'end_at': (datetime, none_type,), # noqa: E501 'remote_created_at': (datetime, none_type,), # noqa: E501 'remote_updated_at': (datetime, none_type,), # noqa: E501 - 'status': (object, none_type,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -114,8 +124,99 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScheduledInterview - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + application (str, none_type): The application being interviewed.. [optional] # noqa: E501 + job_interview_stage (str, none_type): The stage of the interview.. [optional] # noqa: E501 + organizer (str, none_type): The user organizing the interview.. [optional] # noqa: E501 + interviewers ([str]): Array of `RemoteUser` IDs.. [optional] # noqa: E501 + location (str, none_type): The interview's location.. [optional] # noqa: E501 + start_at (datetime, none_type): When the interview was started.. [optional] # noqa: E501 + end_at (datetime, none_type): When the interview was ended.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's interview was created.. [optional] # noqa: E501 + remote_updated_at (datetime, none_type): When the third party's interview was updated.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The interview's status.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -171,7 +272,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 end_at (datetime, none_type): When the interview was ended.. [optional] # noqa: E501 remote_created_at (datetime, none_type): When the third party's interview was created.. [optional] # noqa: E501 remote_updated_at (datetime, none_type): When the third party's interview was updated.. [optional] # noqa: E501 - status (object, none_type): The interview's status.. [optional] # noqa: E501 + status (bool, date, datetime, dict, float, int, list, str, none_type): The interview's status.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -206,3 +307,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/scheduled_interview_status_enum.py b/MergeATSClient/model/scheduled_interview_status_enum.py index c78b66c..e72a991 100644 --- a/MergeATSClient/model/scheduled_interview_status_enum.py +++ b/MergeATSClient/model/scheduled_interview_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class ScheduledInterviewStatusEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScheduledInterviewStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["SCHEDULED", "AWAITING_FEEDBACK", "COMPLETE", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["SCHEDULED", "AWAITING_FEEDBACK", "COMPLETE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/scorecard.py b/MergeATSClient/model/scorecard.py index 6cb683c..cd887c2 100644 --- a/MergeATSClient/model/scorecard.py +++ b/MergeATSClient/model/scorecard.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + def lazy_import(): from MergeATSClient.model.remote_data import RemoteData @@ -62,7 +65,14 @@ class Scorecard(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -85,7 +95,7 @@ def openapi_types(): 'interviewer': (str, none_type,), # noqa: E501 'remote_created_at': (datetime, none_type,), # noqa: E501 'submitted_at': (datetime, none_type,), # noqa: E501 - 'overall_recommendation': (object, none_type,), # noqa: E501 + 'overall_recommendation': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'remote_data': ([RemoteData], none_type,), # noqa: E501 } @@ -106,8 +116,95 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + 'id', # noqa: E501 + 'remote_data', # noqa: E501 + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Scorecard - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + application (str, none_type): The application being scored.. [optional] # noqa: E501 + interview (str, none_type): The interview being scored.. [optional] # noqa: E501 + interviewer (str, none_type): The interviewer doing the scoring.. [optional] # noqa: E501 + remote_created_at (datetime, none_type): When the third party's scorecard was created.. [optional] # noqa: E501 + submitted_at (datetime, none_type): When the scorecard was submitted.. [optional] # noqa: E501 + overall_recommendation (bool, date, datetime, dict, float, int, list, str, none_type): The inteviewer's recommendation.. [optional] # noqa: E501 + remote_data ([RemoteData], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -159,7 +256,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 interviewer (str, none_type): The interviewer doing the scoring.. [optional] # noqa: E501 remote_created_at (datetime, none_type): When the third party's scorecard was created.. [optional] # noqa: E501 submitted_at (datetime, none_type): When the scorecard was submitted.. [optional] # noqa: E501 - overall_recommendation (object, none_type): The inteviewer's recommendation.. [optional] # noqa: E501 + overall_recommendation (bool, date, datetime, dict, float, int, list, str, none_type): The inteviewer's recommendation.. [optional] # noqa: E501 remote_data ([RemoteData], none_type): [optional] # noqa: E501 """ @@ -194,3 +291,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/sync_status.py b/MergeATSClient/model/sync_status.py index c31e754..f963e7f 100644 --- a/MergeATSClient/model/sync_status.py +++ b/MergeATSClient/model/sync_status.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class SyncStatus(ModelNormal): @@ -58,7 +61,13 @@ class SyncStatus(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -77,7 +86,7 @@ def openapi_types(): 'model_id': (str,), # noqa: E501 'last_sync_start': (datetime,), # noqa: E501 'next_sync_start': (datetime,), # noqa: E501 - 'status': (object,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'is_initial_sync': (bool,), # noqa: E501 } @@ -95,8 +104,98 @@ def discriminator(): 'is_initial_sync': 'is_initial_sync', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model_name, model_id, last_sync_start, next_sync_start, status, is_initial_sync, *args, **kwargs): # noqa: E501 + """SyncStatus - a model defined in OpenAPI + + Args: + model_name (str): + model_id (str): + last_sync_start (datetime): + next_sync_start (datetime): + status (bool, date, datetime, dict, float, int, list, str, none_type): + is_initial_sync (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.model_name = model_name + self.model_id = model_id + self.last_sync_start = last_sync_start + self.next_sync_start = next_sync_start + self.status = status + self.is_initial_sync = is_initial_sync + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -115,7 +214,7 @@ def __init__(self, model_name, model_id, last_sync_start, next_sync_start, statu model_id (str): last_sync_start (datetime): next_sync_start (datetime): - status (object): + status (bool, date, datetime, dict, float, int, list, str, none_type): is_initial_sync (bool): Keyword Args: @@ -188,3 +287,6 @@ def __init__(self, model_name, model_id, last_sync_start, next_sync_start, statu # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/sync_status_status_enum.py b/MergeATSClient/model/sync_status_status_enum.py index 99ab3b2..c727bfb 100644 --- a/MergeATSClient/model/sync_status_status_enum.py +++ b/MergeATSClient/model/sync_status_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class SyncStatusStatusEnum(ModelSimple): @@ -53,6 +56,7 @@ class SyncStatusStatusEnum(ModelSimple): 'SYNCING': "SYNCING", 'DONE': "DONE", 'FAILED': "FAILED", + 'DISABLED': "DISABLED", }, } @@ -84,6 +88,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -102,10 +108,100 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str):, must be one of ["SYNCING", "DONE", "FAILED", ] # noqa: E501 + args[0] (str):, must be one of ["SYNCING", "DONE", "FAILED", "DISABLED", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["SYNCING", "DONE", "FAILED", "DISABLED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SyncStatusStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["SYNCING", "DONE", "FAILED", "DISABLED", ] # noqa: E501 Keyword Args: - value (str):, must be one of ["SYNCING", "DONE", "FAILED", ] # noqa: E501 + value (str):, must be one of ["SYNCING", "DONE", "FAILED", "DISABLED", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -140,6 +236,8 @@ def __init__(self, *args, **kwargs): # required up here when default value is not given _path_to_item = kwargs.pop('_path_to_item', ()) + self = super(OpenApiModel, cls).__new__(cls) + if 'value' in kwargs: value = kwargs.pop('value') elif args: @@ -183,3 +281,5 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + return self diff --git a/MergeATSClient/model/tag.py b/MergeATSClient/model/tag.py index 6be592f..2f741ee 100644 --- a/MergeATSClient/model/tag.py +++ b/MergeATSClient/model/tag.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class Tag(ModelNormal): @@ -58,7 +61,13 @@ class Tag(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -89,8 +98,87 @@ def discriminator(): 'remote_data': 'remote_data', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Tag - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + remote_id (str, none_type): The third-party API ID of the matching object.. [optional] # noqa: E501 + name (str, none_type): The tag's name.. [optional] # noqa: E501 + remote_data ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -171,3 +259,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/url.py b/MergeATSClient/model/url.py index 6007119..8718541 100644 --- a/MergeATSClient/model/url.py +++ b/MergeATSClient/model/url.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class Url(ModelNormal): @@ -61,7 +64,13 @@ class Url(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -77,7 +86,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'url_type': (object, none_type,), # noqa: E501 + 'url_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -90,8 +99,86 @@ def discriminator(): 'url_type': 'url_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Url - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The site's url.. [optional] # noqa: E501 + url_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of site.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -137,7 +224,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The site's url.. [optional] # noqa: E501 - url_type (object, none_type): The type of site.. [optional] # noqa: E501 + url_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of site.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/url_request.py b/MergeATSClient/model/url_request.py index c716082..5cf0b97 100644 --- a/MergeATSClient/model/url_request.py +++ b/MergeATSClient/model/url_request.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class UrlRequest(ModelNormal): @@ -61,7 +64,13 @@ class UrlRequest(ModelNormal): }, } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -77,7 +86,7 @@ def openapi_types(): """ return { 'value': (str, none_type,), # noqa: E501 - 'url_type': (object, none_type,), # noqa: E501 + 'url_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property @@ -90,8 +99,86 @@ def discriminator(): 'url_type': 'url_type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UrlRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str, none_type): The site's url.. [optional] # noqa: E501 + url_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of site.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + required_properties = set([ '_data_store', '_check_type', @@ -137,7 +224,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) value (str, none_type): The site's url.. [optional] # noqa: E501 - url_type (object, none_type): The type of site.. [optional] # noqa: E501 + url_type (bool, date, datetime, dict, float, int, list, str, none_type): The type of site.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # discard variable. continue setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/url_type_enum.py b/MergeATSClient/model/url_type_enum.py index 676a81a..b5b2ab7 100644 --- a/MergeATSClient/model/url_type_enum.py +++ b/MergeATSClient/model/url_type_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class UrlTypeEnum(ModelSimple): @@ -87,6 +90,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -186,3 +191,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """UrlTypeEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["PERSONAL", "COMPANY", "PORTFOLIO", "BLOG", "SOCIAL_MEDIA", "OTHER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["PERSONAL", "COMPANY", "PORTFOLIO", "BLOG", "SOCIAL_MEDIA", "OTHER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/validation_problem_source.py b/MergeATSClient/model/validation_problem_source.py new file mode 100644 index 0000000..a9d20d2 --- /dev/null +++ b/MergeATSClient/model/validation_problem_source.py @@ -0,0 +1,262 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + + + +class ValidationProblemSource(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pointer': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pointer': 'pointer', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pointer, *args, **kwargs): # noqa: E501 + """ValidationProblemSource - a model defined in OpenAPI + + Args: + pointer (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pointer = pointer + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pointer, *args, **kwargs): # noqa: E501 + """ValidationProblemSource - a model defined in OpenAPI + + Args: + pointer (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pointer = pointer + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/model/veteran_status_enum.py b/MergeATSClient/model/veteran_status_enum.py index e1372be..d527c58 100644 --- a/MergeATSClient/model/veteran_status_enum.py +++ b/MergeATSClient/model/veteran_status_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class VeteranStatusEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """VeteranStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["I_AM_NOT_A_PROTECTED_VETERAN", "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN", "I_DONT_WISH_TO_ANSWER", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["I_AM_NOT_A_PROTECTED_VETERAN", "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN", "I_DONT_WISH_TO_ANSWER", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/visibility_enum.py b/MergeATSClient/model/visibility_enum.py index fdc75aa..347375d 100644 --- a/MergeATSClient/model/visibility_enum.py +++ b/MergeATSClient/model/visibility_enum.py @@ -26,6 +26,9 @@ none_type, validate_get_composed_info, ) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + class VisibilityEnum(ModelSimple): @@ -84,6 +87,8 @@ def discriminator(): attribute_map = {} + read_only_vars = set() + _composed_schemas = None required_properties = set([ @@ -183,3 +188,97 @@ def __init__(self, *args, **kwargs): path_to_item=_path_to_item, valid_classes=(self.__class__,), ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """VisibilityEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["ADMIN_ONLY", "PUBLIC", "PRIVATE", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["ADMIN_ONLY", "PUBLIC", "PRIVATE", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/MergeATSClient/model/warning_validation_problem.py b/MergeATSClient/model/warning_validation_problem.py new file mode 100644 index 0000000..8a2ddf5 --- /dev/null +++ b/MergeATSClient/model/warning_validation_problem.py @@ -0,0 +1,284 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from MergeATSClient.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from MergeATSClient.exceptions import ApiAttributeError + + +def lazy_import(): + from MergeATSClient.model.validation_problem_source import ValidationProblemSource + globals()['ValidationProblemSource'] = ValidationProblemSource + + +class WarningValidationProblem(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'detail': (str,), # noqa: E501 + 'problem_type': (str,), # noqa: E501 + 'source': (ValidationProblemSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'detail': 'detail', # noqa: E501 + 'problem_type': 'problem_type', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title, detail, problem_type, *args, **kwargs): # noqa: E501 + """WarningValidationProblem - a model defined in OpenAPI + + Args: + title (str): + detail (str): + problem_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + source (ValidationProblemSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.detail = detail + self.problem_type = problem_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title, detail, problem_type, *args, **kwargs): # noqa: E501 + """WarningValidationProblem - a model defined in OpenAPI + + Args: + title (str): + detail (str): + problem_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + source (ValidationProblemSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.detail = detail + self.problem_type = problem_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/MergeATSClient/models/__init__.py b/MergeATSClient/models/__init__.py index afa6ab6..f992cd1 100644 --- a/MergeATSClient/models/__init__.py +++ b/MergeATSClient/models/__init__.py @@ -42,6 +42,7 @@ from MergeATSClient.model.email_address_request import EmailAddressRequest from MergeATSClient.model.email_address_type_enum import EmailAddressTypeEnum from MergeATSClient.model.end_user_details_request import EndUserDetailsRequest +from MergeATSClient.model.error_validation_problem import ErrorValidationProblem from MergeATSClient.model.gender_enum import GenderEnum from MergeATSClient.model.generate_remote_key_request import GenerateRemoteKeyRequest from MergeATSClient.model.issue import Issue @@ -50,6 +51,8 @@ from MergeATSClient.model.job_interview_stage import JobInterviewStage from MergeATSClient.model.job_status_enum import JobStatusEnum from MergeATSClient.model.link_token import LinkToken +from MergeATSClient.model.linked_account_status import LinkedAccountStatus +from MergeATSClient.model.meta_response import MetaResponse from MergeATSClient.model.method_enum import MethodEnum from MergeATSClient.model.model_operation import ModelOperation from MergeATSClient.model.offer import Offer @@ -95,6 +98,7 @@ from MergeATSClient.model.url import Url from MergeATSClient.model.url_request import UrlRequest from MergeATSClient.model.url_type_enum import UrlTypeEnum -from MergeATSClient.model.validation_problem import ValidationProblem +from MergeATSClient.model.validation_problem_source import ValidationProblemSource from MergeATSClient.model.veteran_status_enum import VeteranStatusEnum from MergeATSClient.model.visibility_enum import VisibilityEnum +from MergeATSClient.model.warning_validation_problem import WarningValidationProblem diff --git a/MergeATSClient/rest.py b/MergeATSClient/rest.py index ab0a06e..73df6b9 100644 --- a/MergeATSClient/rest.py +++ b/MergeATSClient/rest.py @@ -138,15 +138,15 @@ def request(self, method, url, query_params=None, headers=None, timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' if query_params: url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) diff --git a/README.md b/README.md index 638c244..ffa8670 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The unified API for building rich integrations with multiple Applicant Tracking This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0 -- Package version: 1.2.0 +- Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.merge.dev/](https://www.merge.dev/) @@ -94,19 +94,23 @@ Class | Method | HTTP request | Description *ActivitiesApi* | [**activities_retrieve**](docs/ActivitiesApi.md#activities_retrieve) | **GET** /activities/{id} | *ApplicationsApi* | [**applications_create**](docs/ApplicationsApi.md#applications_create) | **POST** /applications | *ApplicationsApi* | [**applications_list**](docs/ApplicationsApi.md#applications_list) | **GET** /applications | +*ApplicationsApi* | [**applications_post_meta_retrieve**](docs/ApplicationsApi.md#applications_post_meta_retrieve) | **GET** /applications/post/meta | *ApplicationsApi* | [**applications_retrieve**](docs/ApplicationsApi.md#applications_retrieve) | **GET** /applications/{id} | *AttachmentsApi* | [**attachments_create**](docs/AttachmentsApi.md#attachments_create) | **POST** /attachments | *AttachmentsApi* | [**attachments_list**](docs/AttachmentsApi.md#attachments_list) | **GET** /attachments | +*AttachmentsApi* | [**attachments_post_meta_retrieve**](docs/AttachmentsApi.md#attachments_post_meta_retrieve) | **GET** /attachments/post/meta | *AttachmentsApi* | [**attachments_retrieve**](docs/AttachmentsApi.md#attachments_retrieve) | **GET** /attachments/{id} | *AvailableActionsApi* | [**available_actions_retrieve**](docs/AvailableActionsApi.md#available_actions_retrieve) | **GET** /available-actions | *CandidatesApi* | [**candidates_create**](docs/CandidatesApi.md#candidates_create) | **POST** /candidates | *CandidatesApi* | [**candidates_list**](docs/CandidatesApi.md#candidates_list) | **GET** /candidates | +*CandidatesApi* | [**candidates_post_meta_retrieve**](docs/CandidatesApi.md#candidates_post_meta_retrieve) | **GET** /candidates/post/meta | *CandidatesApi* | [**candidates_retrieve**](docs/CandidatesApi.md#candidates_retrieve) | **GET** /candidates/{id} | *DeleteAccountApi* | [**delete_account_create**](docs/DeleteAccountApi.md#delete_account_create) | **POST** /delete-account | *DepartmentsApi* | [**departments_list**](docs/DepartmentsApi.md#departments_list) | **GET** /departments | *DepartmentsApi* | [**departments_retrieve**](docs/DepartmentsApi.md#departments_retrieve) | **GET** /departments/{id} | *EeocsApi* | [**eeocs_list**](docs/EeocsApi.md#eeocs_list) | **GET** /eeocs | *EeocsApi* | [**eeocs_retrieve**](docs/EeocsApi.md#eeocs_retrieve) | **GET** /eeocs/{id} | +*ForceResyncApi* | [**sync_status_resync_create**](docs/ForceResyncApi.md#sync_status_resync_create) | **POST** /sync-status/resync | *GenerateKeyApi* | [**generate_key_create**](docs/GenerateKeyApi.md#generate_key_create) | **POST** /generate-key | *InterviewsApi* | [**interviews_list**](docs/InterviewsApi.md#interviews_list) | **GET** /interviews | *InterviewsApi* | [**interviews_retrieve**](docs/InterviewsApi.md#interviews_retrieve) | **GET** /interviews/{id} | @@ -129,7 +133,6 @@ Class | Method | HTTP request | Description *ScorecardsApi* | [**scorecards_list**](docs/ScorecardsApi.md#scorecards_list) | **GET** /scorecards | *ScorecardsApi* | [**scorecards_retrieve**](docs/ScorecardsApi.md#scorecards_retrieve) | **GET** /scorecards/{id} | *SyncStatusApi* | [**sync_status_list**](docs/SyncStatusApi.md#sync_status_list) | **GET** /sync-status | -*SyncStatusApi* | [**sync_status_resync_create**](docs/SyncStatusApi.md#sync_status_resync_create) | **POST** /sync-status/resync | *TagsApi* | [**tags_list**](docs/TagsApi.md#tags_list) | **GET** /tags | *UsersApi* | [**users_list**](docs/UsersApi.md#users_list) | **GET** /users | *UsersApi* | [**users_retrieve**](docs/UsersApi.md#users_retrieve) | **GET** /users/{id} | @@ -170,6 +173,7 @@ Class | Method | HTTP request | Description - [EmailAddressRequest](docs/EmailAddressRequest.md) - [EmailAddressTypeEnum](docs/EmailAddressTypeEnum.md) - [EndUserDetailsRequest](docs/EndUserDetailsRequest.md) + - [ErrorValidationProblem](docs/ErrorValidationProblem.md) - [GenderEnum](docs/GenderEnum.md) - [GenerateRemoteKeyRequest](docs/GenerateRemoteKeyRequest.md) - [Issue](docs/Issue.md) @@ -178,6 +182,8 @@ Class | Method | HTTP request | Description - [JobInterviewStage](docs/JobInterviewStage.md) - [JobStatusEnum](docs/JobStatusEnum.md) - [LinkToken](docs/LinkToken.md) + - [LinkedAccountStatus](docs/LinkedAccountStatus.md) + - [MetaResponse](docs/MetaResponse.md) - [MethodEnum](docs/MethodEnum.md) - [ModelOperation](docs/ModelOperation.md) - [Offer](docs/Offer.md) @@ -223,9 +229,10 @@ Class | Method | HTTP request | Description - [Url](docs/Url.md) - [UrlRequest](docs/UrlRequest.md) - [UrlTypeEnum](docs/UrlTypeEnum.md) - - [ValidationProblem](docs/ValidationProblem.md) + - [ValidationProblemSource](docs/ValidationProblemSource.md) - [VeteranStatusEnum](docs/VeteranStatusEnum.md) - [VisibilityEnum](docs/VisibilityEnum.md) + - [WarningValidationProblem](docs/WarningValidationProblem.md) ## Documentation For Authorization diff --git a/docs/AccountDetails.md b/docs/AccountDetails.md index 6ec351e..e94afe5 100644 --- a/docs/AccountDetails.md +++ b/docs/AccountDetails.md @@ -6,11 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] [readonly] **integration** | **str** | | [optional] [readonly] -**category** | **object, none_type** | | [optional] +**category** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **end_user_origin_id** | **str** | | [optional] [readonly] **end_user_organization_name** | **str** | | [optional] [readonly] **end_user_email_address** | **str** | | [optional] [readonly] **status** | **str** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetailsAndActions.md b/docs/AccountDetailsAndActions.md index 6274a7a..3d58654 100644 --- a/docs/AccountDetailsAndActions.md +++ b/docs/AccountDetailsAndActions.md @@ -6,13 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | -**status** | **object** | | +**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | **end_user_organization_name** | **str** | | **end_user_email_address** | **str** | | -**category** | **object** | | [optional] +**category** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] **status_detail** | **str** | | [optional] **end_user_origin_id** | **str** | | [optional] **integration** | [**AccountDetailsAndActionsIntegration**](AccountDetailsAndActionsIntegration.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetailsAndActionsIntegration.md b/docs/AccountDetailsAndActionsIntegration.md index 0247461..821a098 100644 --- a/docs/AccountDetailsAndActionsIntegration.md +++ b/docs/AccountDetailsAndActionsIntegration.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **image** | **str** | | [optional] **square_image** | **str** | | [optional] **available_model_operations** | [**[ModelOperation]**](ModelOperation.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountDetailsApi.md b/docs/AccountDetailsApi.md index c986faf..11d8902 100644 --- a/docs/AccountDetailsApi.md +++ b/docs/AccountDetailsApi.md @@ -17,6 +17,7 @@ Get details for a linked account. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -72,6 +73,7 @@ This endpoint does not need any parameter. ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/AccountIntegration.md b/docs/AccountIntegration.md index 84c60ee..c9d2aa8 100644 --- a/docs/AccountIntegration.md +++ b/docs/AccountIntegration.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **square_image** | **str, none_type** | Company logo in square shape. <b>Upload an image with a white background.</b> | [optional] **color** | **str** | The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b> | [optional] **slug** | **str** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountToken.md b/docs/AccountToken.md index 56e7a3c..4c88c51 100644 --- a/docs/AccountToken.md +++ b/docs/AccountToken.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_token** | **str** | | **integration** | [**AccountIntegration**](AccountIntegration.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccountTokenApi.md b/docs/AccountTokenApi.md index 713606a..b2ae65a 100644 --- a/docs/AccountTokenApi.md +++ b/docs/AccountTokenApi.md @@ -17,6 +17,7 @@ Returns the account token for the end user with the provided public token. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -76,6 +77,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/ActivitiesApi.md b/docs/ActivitiesApi.md index bae8e1c..60da0fc 100644 --- a/docs/ActivitiesApi.md +++ b/docs/ActivitiesApi.md @@ -18,6 +18,7 @@ Returns a list of `Activity` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -50,6 +51,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "user" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) if omitted the server will use the default value of "user" + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -67,7 +69,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.activities_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id, user_id=user_id) + api_response = api_instance.activities_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id, user_id=user_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling ActivitiesApi->activities_list: %s\n" % e) @@ -83,6 +85,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] if omitted the server will use the default value of "user" + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -105,6 +108,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -121,6 +125,7 @@ Returns an `Activity` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -194,6 +199,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Activity.md b/docs/Activity.md index 33c0af0..272b20a 100644 --- a/docs/Activity.md +++ b/docs/Activity.md @@ -1,6 +1,6 @@ # Activity -# The Activity Object ### Description The `Activity` object is used to represent an activity performed by a user. ### Usage Example Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. +# The Activity Object ### Description The `Activity` object is used to represent an activity performed by a user. ### Usage Example Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. ## Properties Name | Type | Description | Notes @@ -9,11 +9,12 @@ Name | Type | Description | Notes **remote_id** | **str, none_type** | The third-party API ID of the matching object. | [optional] **user** | **str, none_type** | The user the performed the action. | [optional] **remote_created_at** | **datetime, none_type** | When the third party's activity was created. | [optional] -**activity_type** | **object, none_type** | The activity's type. | [optional] +**activity_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The activity's type. | [optional] **subject** | **str, none_type** | The activity's subject. | [optional] **body** | **str, none_type** | The activity's body. | [optional] -**visibility** | **object, none_type** | The activity's visibility. | [optional] +**visibility** | **bool, date, datetime, dict, float, int, list, str, none_type** | The activity's visibility. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Application.md b/docs/Application.md index ac4d55a..23b30dc 100644 --- a/docs/Application.md +++ b/docs/Application.md @@ -1,6 +1,6 @@ # Application -# The Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. +# The Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. ## Properties Name | Type | Description | Notes @@ -17,6 +17,7 @@ Name | Type | Description | Notes **reject_reason** | **str, none_type** | The application's reason for rejection. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] **custom_fields** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Custom fields configured for a given model. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationEndpointRequest.md b/docs/ApplicationEndpointRequest.md index bbad908..5d0627a 100644 --- a/docs/ApplicationEndpointRequest.md +++ b/docs/ApplicationEndpointRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | [**ApplicationRequest**](ApplicationRequest.md) | | **remote_user_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationRequest.md b/docs/ApplicationRequest.md index b900ea0..938ce55 100644 --- a/docs/ApplicationRequest.md +++ b/docs/ApplicationRequest.md @@ -1,6 +1,6 @@ # ApplicationRequest -# The Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. +# The Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. ## Properties Name | Type | Description | Notes @@ -15,6 +15,10 @@ Name | Type | Description | Notes **current_stage** | **str, none_type** | The application's current stage. | [optional] **reject_reason** | **str, none_type** | The application's reason for rejection. | [optional] **custom_fields** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Custom fields configured for a given model. | [optional] +**remote_template_id** | **str, none_type** | | [optional] +**integration_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**linked_account_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationResponse.md b/docs/ApplicationResponse.md index e383f9c..00190d0 100644 --- a/docs/ApplicationResponse.md +++ b/docs/ApplicationResponse.md @@ -4,9 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[ValidationProblem]**](ValidationProblem.md) | | -**warnings** | [**[ValidationProblem]**](ValidationProblem.md) | | **model** | [**Application**](Application.md) | | +**warnings** | [**[WarningValidationProblem]**](WarningValidationProblem.md) | | +**errors** | [**[ErrorValidationProblem]**](ErrorValidationProblem.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationsApi.md b/docs/ApplicationsApi.md index 5a68456..232ffda 100644 --- a/docs/ApplicationsApi.md +++ b/docs/ApplicationsApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**applications_create**](ApplicationsApi.md#applications_create) | **POST** /applications | [**applications_list**](ApplicationsApi.md#applications_list) | **GET** /applications | +[**applications_post_meta_retrieve**](ApplicationsApi.md#applications_post_meta_retrieve) | **GET** /applications/post/meta | [**applications_retrieve**](ApplicationsApi.md#applications_retrieve) | **GET** /applications/{id} | @@ -19,6 +20,7 @@ Creates an `Application` object with the given values. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -62,6 +64,13 @@ with MergeATSClient.ApiClient(configuration) as api_client: custom_fields={ "key": None, }, + remote_template_id="92830948203", + integration_params={ + "key": None, + }, + linked_account_params={ + "key": None, + }, ), remote_user_id="remote_user_id_example", ) # ApplicationEndpointRequest | @@ -107,6 +116,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | | - | @@ -123,6 +133,7 @@ Returns a list of `Application` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -158,6 +169,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: current_stage_id = "current_stage_id_example" # str | If provided, will only return applications at this interview stage. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "candidate,job,credited_to,current_stage,reject_reason" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) job_id = "job_id_example" # str | If provided, will only return applications for this job. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) @@ -176,7 +188,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.applications_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, credited_to_id=credited_to_id, current_stage_id=current_stage_id, cursor=cursor, expand=expand, include_remote_data=include_remote_data, job_id=job_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, reject_reason_id=reject_reason_id, remote_id=remote_id) + api_response = api_instance.applications_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, credited_to_id=credited_to_id, current_stage_id=current_stage_id, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, job_id=job_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, reject_reason_id=reject_reason_id, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling ApplicationsApi->applications_list: %s\n" % e) @@ -195,6 +207,7 @@ Name | Type | Description | Notes **current_stage_id** | **str**| If provided, will only return applications at this interview stage. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **job_id** | **str**| If provided, will only return applications for this job. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] @@ -218,6 +231,94 @@ Name | Type | Description | Notes ### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **applications_post_meta_retrieve** +> MetaResponse applications_post_meta_retrieve(x_account_token) + + + +Returns metadata for `Application` POSTs. + +### Example + +* Api Key Authentication (tokenAuth): + +```python +import time +import MergeATSClient +from MergeATSClient.api import applications_api +from MergeATSClient.model.meta_response import MetaResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.merge.dev/api/ats/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = MergeATSClient.Configuration( + host = "https://api.merge.dev/api/ats/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: tokenAuth +configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['tokenAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with MergeATSClient.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = applications_api.ApplicationsApi(api_client) + x_account_token = "X-Account-Token_example" # str | Token identifying the end user. + application_template_id = "application_template_id_example" # str | The template ID associated with the nested application in the request. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.applications_post_meta_retrieve(x_account_token) + pprint(api_response) + except MergeATSClient.ApiException as e: + print("Exception when calling ApplicationsApi->applications_post_meta_retrieve: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.applications_post_meta_retrieve(x_account_token, application_template_id=application_template_id) + pprint(api_response) + except MergeATSClient.ApiException as e: + print("Exception when calling ApplicationsApi->applications_post_meta_retrieve: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_account_token** | **str**| Token identifying the end user. | + **application_template_id** | **str**| The template ID associated with the nested application in the request. | [optional] + +### Return type + +[**MetaResponse**](MetaResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -234,6 +335,7 @@ Returns an `Application` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -307,6 +409,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Attachment.md b/docs/Attachment.md index 1a36793..14c722c 100644 --- a/docs/Attachment.md +++ b/docs/Attachment.md @@ -1,6 +1,6 @@ # Attachment -# The Attachment Object ### Description The `Attachment` object is used to represent a attachment for a candidate. ### Usage Example Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. +# The Attachment Object ### Description The `Attachment` object is used to represent a attachment for a candidate. ### Usage Example Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. ## Properties Name | Type | Description | Notes @@ -10,8 +10,9 @@ Name | Type | Description | Notes **file_name** | **str, none_type** | The attachment's name. | [optional] **file_url** | **str, none_type** | The attachment's url. | [optional] **candidate** | **str, none_type** | | [optional] -**attachment_type** | **object, none_type** | The attachment's type. | [optional] +**attachment_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The attachment's type. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AttachmentEndpointRequest.md b/docs/AttachmentEndpointRequest.md index 38e20da..4e473fc 100644 --- a/docs/AttachmentEndpointRequest.md +++ b/docs/AttachmentEndpointRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | [**AttachmentRequest**](AttachmentRequest.md) | | **remote_user_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AttachmentRequest.md b/docs/AttachmentRequest.md index 986e632..b9d0190 100644 --- a/docs/AttachmentRequest.md +++ b/docs/AttachmentRequest.md @@ -1,6 +1,6 @@ # AttachmentRequest -# The Attachment Object ### Description The `Attachment` object is used to represent a attachment for a candidate. ### Usage Example Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. +# The Attachment Object ### Description The `Attachment` object is used to represent a attachment for a candidate. ### Usage Example Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. ## Properties Name | Type | Description | Notes @@ -9,7 +9,10 @@ Name | Type | Description | Notes **file_name** | **str, none_type** | The attachment's name. | [optional] **file_url** | **str, none_type** | The attachment's url. | [optional] **candidate** | **str, none_type** | | [optional] -**attachment_type** | **object, none_type** | The attachment's type. | [optional] +**attachment_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The attachment's type. | [optional] +**integration_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**linked_account_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AttachmentResponse.md b/docs/AttachmentResponse.md index 4070b03..950846b 100644 --- a/docs/AttachmentResponse.md +++ b/docs/AttachmentResponse.md @@ -4,9 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[ValidationProblem]**](ValidationProblem.md) | | -**warnings** | [**[ValidationProblem]**](ValidationProblem.md) | | **model** | [**Attachment**](Attachment.md) | | +**warnings** | [**[WarningValidationProblem]**](WarningValidationProblem.md) | | +**errors** | [**[ErrorValidationProblem]**](ErrorValidationProblem.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AttachmentsApi.md b/docs/AttachmentsApi.md index d613089..9abf41a 100644 --- a/docs/AttachmentsApi.md +++ b/docs/AttachmentsApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**attachments_create**](AttachmentsApi.md#attachments_create) | **POST** /attachments | [**attachments_list**](AttachmentsApi.md#attachments_list) | **GET** /attachments | +[**attachments_post_meta_retrieve**](AttachmentsApi.md#attachments_post_meta_retrieve) | **GET** /attachments/post/meta | [**attachments_retrieve**](AttachmentsApi.md#attachments_retrieve) | **GET** /attachments/{id} | @@ -19,6 +20,7 @@ Creates an `Attachment` object with the given values. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -54,7 +56,13 @@ with MergeATSClient.ApiClient(configuration) as api_client: file_name="Candidate Resume", file_url="http://alturl.com/p749b", candidate="2872ba14-4084-492b-be96-e5eee6fc33ef", - attachment_type=, + attachment_type=None, + integration_params={ + "key": None, + }, + linked_account_params={ + "key": None, + }, ), remote_user_id="remote_user_id_example", ) # AttachmentEndpointRequest | @@ -100,6 +108,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | | - | @@ -116,6 +125,7 @@ Returns a list of `Attachment` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -149,6 +159,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "candidate" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) if omitted the server will use the default value of "candidate" + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -165,7 +176,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.attachments_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.attachments_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling AttachmentsApi->attachments_list: %s\n" % e) @@ -182,6 +193,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] if omitted the server will use the default value of "candidate" + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -203,6 +215,84 @@ Name | Type | Description | Notes ### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **attachments_post_meta_retrieve** +> MetaResponse attachments_post_meta_retrieve(x_account_token) + + + +Returns metadata for `Attachment` POSTs. + +### Example + +* Api Key Authentication (tokenAuth): + +```python +import time +import MergeATSClient +from MergeATSClient.api import attachments_api +from MergeATSClient.model.meta_response import MetaResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.merge.dev/api/ats/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = MergeATSClient.Configuration( + host = "https://api.merge.dev/api/ats/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: tokenAuth +configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['tokenAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with MergeATSClient.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = attachments_api.AttachmentsApi(api_client) + x_account_token = "X-Account-Token_example" # str | Token identifying the end user. + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.attachments_post_meta_retrieve(x_account_token) + pprint(api_response) + except MergeATSClient.ApiException as e: + print("Exception when calling AttachmentsApi->attachments_post_meta_retrieve: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_account_token** | **str**| Token identifying the end user. | + +### Return type + +[**MetaResponse**](MetaResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -219,6 +309,7 @@ Returns an `Attachment` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -292,6 +383,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/AvailableActions.md b/docs/AvailableActions.md index 9fa200f..19059a5 100644 --- a/docs/AvailableActions.md +++ b/docs/AvailableActions.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **integration** | [**AccountIntegration**](AccountIntegration.md) | | **passthrough_available** | **bool** | | **available_model_operations** | [**[ModelOperation]**](ModelOperation.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AvailableActionsApi.md b/docs/AvailableActionsApi.md index edfff5b..790ab06 100644 --- a/docs/AvailableActionsApi.md +++ b/docs/AvailableActionsApi.md @@ -17,6 +17,7 @@ Returns a list of models and actions available for an account. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -76,6 +77,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Candidate.md b/docs/Candidate.md index 3d1e796..e7c6984 100644 --- a/docs/Candidate.md +++ b/docs/Candidate.md @@ -1,6 +1,6 @@ # Candidate -# The Candidate Object ### Description The `Candidate` object is used to represent a Candidate for various positions. ### Usage Example Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. +# The Candidate Object ### Description The `Candidate` object is used to represent a Candidate for various positions. ### Usage Example Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. ## Properties Name | Type | Description | Notes @@ -25,6 +25,7 @@ Name | Type | Description | Notes **attachments** | **[str]** | Array of `Attachment` object IDs. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] **custom_fields** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Custom fields configured for a given model. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CandidateEndpointRequest.md b/docs/CandidateEndpointRequest.md index 68091f3..492c97a 100644 --- a/docs/CandidateEndpointRequest.md +++ b/docs/CandidateEndpointRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | [**CandidateRequest**](CandidateRequest.md) | | **remote_user_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CandidateRequest.md b/docs/CandidateRequest.md index 4688df3..ba3c222 100644 --- a/docs/CandidateRequest.md +++ b/docs/CandidateRequest.md @@ -1,6 +1,6 @@ # CandidateRequest -# The Candidate Object ### Description The `Candidate` object is used to represent a Candidate for various positions. ### Usage Example Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. +# The Candidate Object ### Description The `Candidate` object is used to represent a Candidate for various positions. ### Usage Example Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. ## Properties Name | Type | Description | Notes @@ -23,6 +23,10 @@ Name | Type | Description | Notes **applications** | **[str]** | Array of `Application` object IDs. | [optional] **attachments** | **[str]** | Array of `Attachment` object IDs. | [optional] **custom_fields** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Custom fields configured for a given model. | [optional] +**remote_template_id** | **str, none_type** | | [optional] +**integration_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**linked_account_params** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CandidateResponse.md b/docs/CandidateResponse.md index 6115dc2..2d23314 100644 --- a/docs/CandidateResponse.md +++ b/docs/CandidateResponse.md @@ -4,9 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | [**[ValidationProblem]**](ValidationProblem.md) | | -**warnings** | [**[ValidationProblem]**](ValidationProblem.md) | | **model** | [**Candidate**](Candidate.md) | | +**warnings** | [**[WarningValidationProblem]**](WarningValidationProblem.md) | | +**errors** | [**[ErrorValidationProblem]**](ErrorValidationProblem.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CandidatesApi.md b/docs/CandidatesApi.md index 03cc86d..a80eaa6 100644 --- a/docs/CandidatesApi.md +++ b/docs/CandidatesApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**candidates_create**](CandidatesApi.md#candidates_create) | **POST** /candidates | [**candidates_list**](CandidatesApi.md#candidates_list) | **GET** /candidates | +[**candidates_post_meta_retrieve**](CandidatesApi.md#candidates_post_meta_retrieve) | **GET** /candidates/post/meta | [**candidates_retrieve**](CandidatesApi.md#candidates_retrieve) | **GET** /candidates/{id} | @@ -19,6 +20,7 @@ Creates a `Candidate` object with the given values. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -64,19 +66,19 @@ with MergeATSClient.ApiClient(configuration) as api_client: phone_numbers=[ PhoneNumberRequest( value="+3198675309", - phone_number_type=, + phone_number_type=None, ), ], email_addresses=[ EmailAddressRequest( value="merge_is_hiring@merge.dev", - email_address_type=, + email_address_type=None, ), ], urls=[ UrlRequest( value="http://alturl.com/p749b", - url_type=, + url_type=None, ), ], tags=["High-Priority"], @@ -85,6 +87,13 @@ with MergeATSClient.ApiClient(configuration) as api_client: custom_fields={ "key": None, }, + remote_template_id="92830948203", + integration_params={ + "key": None, + }, + linked_account_params={ + "key": None, + }, ), remote_user_id="remote_user_id_example", ) # CandidateEndpointRequest | @@ -130,6 +139,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | | - | @@ -146,6 +156,7 @@ Returns a list of `Candidate` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -179,6 +190,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "applications,attachments" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) first_name = "first_name_example" # str, none_type | If provided, will only return candidates with this first name. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) last_name = "last_name_example" # str, none_type | If provided, will only return candidates with this last name. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) @@ -196,7 +208,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.candidates_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, first_name=first_name, include_remote_data=include_remote_data, last_name=last_name, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.candidates_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, first_name=first_name, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, last_name=last_name, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling CandidatesApi->candidates_list: %s\n" % e) @@ -213,6 +225,7 @@ Name | Type | Description | Notes **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] **first_name** | **str, none_type**| If provided, will only return candidates with this first name. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **last_name** | **str, none_type**| If provided, will only return candidates with this last name. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] @@ -235,6 +248,84 @@ Name | Type | Description | Notes ### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **candidates_post_meta_retrieve** +> MetaResponse candidates_post_meta_retrieve(x_account_token) + + + +Returns metadata for `Candidate` POSTs. + +### Example + +* Api Key Authentication (tokenAuth): + +```python +import time +import MergeATSClient +from MergeATSClient.api import candidates_api +from MergeATSClient.model.meta_response import MetaResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.merge.dev/api/ats/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = MergeATSClient.Configuration( + host = "https://api.merge.dev/api/ats/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: tokenAuth +configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['tokenAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with MergeATSClient.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = candidates_api.CandidatesApi(api_client) + x_account_token = "X-Account-Token_example" # str | Token identifying the end user. + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.candidates_post_meta_retrieve(x_account_token) + pprint(api_response) + except MergeATSClient.ApiException as e: + print("Exception when calling CandidatesApi->candidates_post_meta_retrieve: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_account_token** | **str**| Token identifying the end user. | + +### Return type + +[**MetaResponse**](MetaResponse.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -251,6 +342,7 @@ Returns a `Candidate` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -324,6 +416,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/DataPassthroughRequest.md b/docs/DataPassthroughRequest.md index 8d250b7..ceb5b8a 100644 --- a/docs/DataPassthroughRequest.md +++ b/docs/DataPassthroughRequest.md @@ -5,12 +5,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**method** | **object** | | +**method** | **bool, date, datetime, dict, float, int, list, str, none_type** | | **path** | **str** | | **base_url_override** | **str, none_type** | | [optional] **data** | **str, none_type** | | [optional] **headers** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] -**request_format** | **object, none_type** | | [optional] +**request_format** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteAccountApi.md b/docs/DeleteAccountApi.md index b038de6..9b5e931 100644 --- a/docs/DeleteAccountApi.md +++ b/docs/DeleteAccountApi.md @@ -17,6 +17,7 @@ Delete a linked account. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -74,6 +75,7 @@ void (empty response body) ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | No response body | - | diff --git a/docs/Department.md b/docs/Department.md index c5f11b4..e2a8d8e 100644 --- a/docs/Department.md +++ b/docs/Department.md @@ -1,6 +1,6 @@ # Department -# The Department Object ### Description The `Department` object is used to represent a department within a company. ### Usage Example Fetch from the `LIST Departments` endpoint and view the departments within a company. +# The Department Object ### Description The `Department` object is used to represent a department within a company. ### Usage Example Fetch from the `LIST Departments` endpoint and view the departments within a company. ## Properties Name | Type | Description | Notes @@ -9,6 +9,7 @@ Name | Type | Description | Notes **remote_id** | **str, none_type** | The third-party API ID of the matching object. | [optional] **name** | **str, none_type** | The department's name. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DepartmentsApi.md b/docs/DepartmentsApi.md index 1fcaff1..9e1ee6a 100644 --- a/docs/DepartmentsApi.md +++ b/docs/DepartmentsApi.md @@ -18,6 +18,7 @@ Returns a list of `Department` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -49,6 +50,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional) created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -65,7 +67,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.departments_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.departments_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling DepartmentsApi->departments_list: %s\n" % e) @@ -80,6 +82,7 @@ Name | Type | Description | Notes **created_after** | **datetime**| If provided, will only return objects created after this datetime. | [optional] **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -101,6 +104,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -117,6 +121,7 @@ Returns a `Department` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -188,6 +193,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/EEOC.md b/docs/EEOC.md index 6ea9375..c1bd8e6 100644 --- a/docs/EEOC.md +++ b/docs/EEOC.md @@ -1,6 +1,6 @@ # EEOC -# The EEOC Object ### Description The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate. ### Usage Example Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. +# The EEOC Object ### Description The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate. ### Usage Example Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. ## Properties Name | Type | Description | Notes @@ -9,11 +9,12 @@ Name | Type | Description | Notes **remote_id** | **str, none_type** | The third-party API ID of the matching object. | [optional] **candidate** | **str, none_type** | The candidate being represented. | [optional] **submitted_at** | **datetime, none_type** | When the information was submitted. | [optional] -**race** | **object, none_type** | The candidate's race. | [optional] -**gender** | **object, none_type** | The candidate's gender. | [optional] -**veteran_status** | **object, none_type** | The candidate's veteran status. | [optional] -**disability_status** | **object, none_type** | The candidate's disability status. | [optional] +**race** | **bool, date, datetime, dict, float, int, list, str, none_type** | The candidate's race. | [optional] +**gender** | **bool, date, datetime, dict, float, int, list, str, none_type** | The candidate's gender. | [optional] +**veteran_status** | **bool, date, datetime, dict, float, int, list, str, none_type** | The candidate's veteran status. | [optional] +**disability_status** | **bool, date, datetime, dict, float, int, list, str, none_type** | The candidate's disability status. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EeocsApi.md b/docs/EeocsApi.md index 5d21fd1..73a0dc6 100644 --- a/docs/EeocsApi.md +++ b/docs/EeocsApi.md @@ -18,6 +18,7 @@ Returns a list of `EEOC` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -51,6 +52,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "candidate" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) if omitted the server will use the default value of "candidate" + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -67,7 +69,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.eeocs_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.eeocs_list(x_account_token, candidate_id=candidate_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling EeocsApi->eeocs_list: %s\n" % e) @@ -84,6 +86,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] if omitted the server will use the default value of "candidate" + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -105,6 +108,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -121,6 +125,7 @@ Returns an `EEOC` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -194,6 +199,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/EmailAddress.md b/docs/EmailAddress.md index 5885a09..9110eac 100644 --- a/docs/EmailAddress.md +++ b/docs/EmailAddress.md @@ -1,12 +1,13 @@ # EmailAddress -# The EmailAddress Object ### Description The `EmailAddress` object is used to represent a candidate's email address. ### Usage Example Fetch from the `GET Candidate` endpoint and view their email addresses. +# The EmailAddress Object ### Description The `EmailAddress` object is used to represent a candidate's email address. ### Usage Example Fetch from the `GET Candidate` endpoint and view their email addresses. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The email address. | [optional] -**email_address_type** | **object, none_type** | The type of email address. | [optional] +**email_address_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of email address. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EmailAddressRequest.md b/docs/EmailAddressRequest.md index 3f4fd3b..67f593d 100644 --- a/docs/EmailAddressRequest.md +++ b/docs/EmailAddressRequest.md @@ -1,12 +1,13 @@ # EmailAddressRequest -# The EmailAddress Object ### Description The `EmailAddress` object is used to represent a candidate's email address. ### Usage Example Fetch from the `GET Candidate` endpoint and view their email addresses. +# The EmailAddress Object ### Description The `EmailAddress` object is used to represent a candidate's email address. ### Usage Example Fetch from the `GET Candidate` endpoint and view their email addresses. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The email address. | [optional] -**email_address_type** | **object, none_type** | The type of email address. | [optional] +**email_address_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of email address. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EndUserDetailsRequest.md b/docs/EndUserDetailsRequest.md index 2b3c56b..6acd5d6 100644 --- a/docs/EndUserDetailsRequest.md +++ b/docs/EndUserDetailsRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **end_user_origin_id** | **str** | | **categories** | [**[CategoriesEnum]**](CategoriesEnum.md) | | [optional] **integration** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorValidationProblem.md b/docs/ErrorValidationProblem.md new file mode 100644 index 0000000..275cb2c --- /dev/null +++ b/docs/ErrorValidationProblem.md @@ -0,0 +1,15 @@ +# ErrorValidationProblem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | +**detail** | **str** | | +**problem_type** | **str** | | +**source** | [**ValidationProblemSource**](ValidationProblemSource.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ForceResyncApi.md b/docs/ForceResyncApi.md new file mode 100644 index 0000000..a8af517 --- /dev/null +++ b/docs/ForceResyncApi.md @@ -0,0 +1,86 @@ +# MergeATSClient.ForceResyncApi + +All URIs are relative to *https://api.merge.dev/api/ats/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sync_status_resync_create**](ForceResyncApi.md#sync_status_resync_create) | **POST** /sync-status/resync | + + +# **sync_status_resync_create** +> SyncStatus sync_status_resync_create(x_account_token) + + + +Force re-sync of all models. This is only available for organizations on Merge's Grow and Expand plans. + +### Example + +* Api Key Authentication (tokenAuth): + +```python +import time +import MergeATSClient +from MergeATSClient.api import force_resync_api +from MergeATSClient.model.sync_status import SyncStatus +from pprint import pprint +# Defining the host is optional and defaults to https://api.merge.dev/api/ats/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = MergeATSClient.Configuration( + host = "https://api.merge.dev/api/ats/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: tokenAuth +configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['tokenAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with MergeATSClient.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = force_resync_api.ForceResyncApi(api_client) + x_account_token = "X-Account-Token_example" # str | Token identifying the end user. + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.sync_status_resync_create(x_account_token) + pprint(api_response) + except MergeATSClient.ApiException as e: + print("Exception when calling ForceResyncApi->sync_status_resync_create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_account_token** | **str**| Token identifying the end user. | + +### Return type + +[**SyncStatus**](SyncStatus.md) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GenerateKeyApi.md b/docs/GenerateKeyApi.md index 2d44dfc..b570db2 100644 --- a/docs/GenerateKeyApi.md +++ b/docs/GenerateKeyApi.md @@ -17,6 +17,7 @@ Create a remote key. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -79,6 +80,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/GenerateRemoteKeyRequest.md b/docs/GenerateRemoteKeyRequest.md index 8735d31..dedc9b4 100644 --- a/docs/GenerateRemoteKeyRequest.md +++ b/docs/GenerateRemoteKeyRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InterviewsApi.md b/docs/InterviewsApi.md index 6dcae62..fbe7ffc 100644 --- a/docs/InterviewsApi.md +++ b/docs/InterviewsApi.md @@ -18,6 +18,7 @@ Returns a list of `ScheduledInterview` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -51,6 +52,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "interviewers,organizer,application,job_interview_stage" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) job_interview_stage_id = "job_interview_stage_id_example" # str | If provided, will only return interviews at this stage. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) @@ -69,7 +71,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.interviews_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, job_interview_stage_id=job_interview_stage_id, modified_after=modified_after, modified_before=modified_before, organizer_id=organizer_id, page_size=page_size, remote_id=remote_id) + api_response = api_instance.interviews_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, job_interview_stage_id=job_interview_stage_id, modified_after=modified_after, modified_before=modified_before, organizer_id=organizer_id, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling InterviewsApi->interviews_list: %s\n" % e) @@ -86,6 +88,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **job_interview_stage_id** | **str**| If provided, will only return interviews at this stage. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] @@ -109,6 +112,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -125,6 +129,7 @@ Returns a `ScheduledInterview` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -198,6 +203,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Issue.md b/docs/Issue.md index d533246..823b707 100644 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **first_incident_time** | **datetime, none_type** | | [optional] **last_incident_time** | **datetime, none_type** | | [optional] **is_muted** | **bool** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssuesApi.md b/docs/IssuesApi.md index dfb851c..e40425d 100644 --- a/docs/IssuesApi.md +++ b/docs/IssuesApi.md @@ -18,6 +18,7 @@ Gets issues. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -94,6 +95,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -110,6 +112,7 @@ Get a specific issue. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -169,6 +172,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Job.md b/docs/Job.md index c063061..3a15722 100644 --- a/docs/Job.md +++ b/docs/Job.md @@ -1,6 +1,6 @@ # Job -# The Job Object ### Description The `Job` object is used to represent a Job offering at a company. ### Usage Example Fetch from the `LIST Jobs` endpoint to show all job postings. +# The Job Object ### Description The `Job` object is used to represent a Job offering at a company. ### Usage Example Fetch from the `LIST Jobs` endpoint to show all job postings. ## Properties Name | Type | Description | Notes @@ -10,7 +10,7 @@ Name | Type | Description | Notes **name** | **str, none_type** | The job's name. | [optional] **description** | **str, none_type** | The job's description. | [optional] **code** | **str, none_type** | The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS. | [optional] -**status** | **object, none_type** | The job's status. | [optional] +**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | The job's status. | [optional] **remote_created_at** | **datetime, none_type** | When the third party's job was created. | [optional] **remote_updated_at** | **datetime, none_type** | When the third party's job was updated. | [optional] **confidential** | **bool, none_type** | Whether the job is confidential. | [optional] @@ -18,6 +18,7 @@ Name | Type | Description | Notes **offices** | **[str]** | IDs of `Office` objects for this `Job`. | [optional] **hiring_managers** | **[str]** | IDs of `RemoteUser` objects that serve as hiring managers for this `Job`. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/JobInterviewStage.md b/docs/JobInterviewStage.md index fdff1d1..05d97e7 100644 --- a/docs/JobInterviewStage.md +++ b/docs/JobInterviewStage.md @@ -1,6 +1,6 @@ # JobInterviewStage -# The JobInterviewStage Object ### Description The `JobInterviewStage` object is used to represent the stage of an interview ### Usage Example Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. +# The JobInterviewStage Object ### Description The `JobInterviewStage` object is used to represent the stage of an interview ### Usage Example Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. ## Properties Name | Type | Description | Notes @@ -10,6 +10,7 @@ Name | Type | Description | Notes **name** | **str, none_type** | The stage's name. | [optional] **job** | **str, none_type** | If stages are specific to a job, this is the job that this stage belongs to. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/JobInterviewStagesApi.md b/docs/JobInterviewStagesApi.md index 465714f..be978d0 100644 --- a/docs/JobInterviewStagesApi.md +++ b/docs/JobInterviewStagesApi.md @@ -18,6 +18,7 @@ Returns a list of `JobInterviewStage` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -50,6 +51,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "departments,offices,job" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) job_id = "job_id_example" # str | If provided, will only return interview stages for this job. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) @@ -67,7 +69,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.job_interview_stages_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, job_id=job_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.job_interview_stages_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, job_id=job_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling JobInterviewStagesApi->job_interview_stages_list: %s\n" % e) @@ -83,6 +85,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **job_id** | **str**| If provided, will only return interview stages for this job. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] @@ -105,6 +108,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -121,6 +125,7 @@ Returns a `JobInterviewStage` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -194,6 +199,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 03a10dd..46e912c 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -18,6 +18,7 @@ Returns a list of `Job` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -51,12 +52,13 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "departments,offices,hiring_managers" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) page_size = 1 # int | Number of results to return per page. (optional) remote_id = "remote_id_example" # str, none_type | The API provider's ID for the given object. (optional) - status = "" # str, none_type | If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') (optional) + status = "ARCHIVED" # str, none_type | If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') (optional) # example passing only required values which don't have defaults set try: @@ -68,7 +70,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.jobs_list(x_account_token, code=code, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id, status=status) + api_response = api_instance.jobs_list(x_account_token, code=code, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id, status=status) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling JobsApi->jobs_list: %s\n" % e) @@ -85,6 +87,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -107,6 +110,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -123,6 +127,7 @@ Returns a `Job` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -196,6 +201,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/LinkToken.md b/docs/LinkToken.md index bacbf4f..08bb98f 100644 --- a/docs/LinkToken.md +++ b/docs/LinkToken.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **link_token** | **str** | | **integration_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LinkTokenApi.md b/docs/LinkTokenApi.md index 8bf9af3..b110c2a 100644 --- a/docs/LinkTokenApi.md +++ b/docs/LinkTokenApi.md @@ -17,6 +17,7 @@ Creates a link token to be used when linking a new end user. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -85,6 +86,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/LinkedAccountStatus.md b/docs/LinkedAccountStatus.md new file mode 100644 index 0000000..1b82821 --- /dev/null +++ b/docs/LinkedAccountStatus.md @@ -0,0 +1,13 @@ +# LinkedAccountStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**linked_account_status** | **str** | | +**can_make_request** | **bool** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LinkedAccountsApi.md b/docs/LinkedAccountsApi.md index a39a79d..4d11fd7 100644 --- a/docs/LinkedAccountsApi.md +++ b/docs/LinkedAccountsApi.md @@ -17,6 +17,7 @@ List linked accounts for your organization. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -99,6 +100,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/MetaResponse.md b/docs/MetaResponse.md new file mode 100644 index 0000000..f1c3f05 --- /dev/null +++ b/docs/MetaResponse.md @@ -0,0 +1,14 @@ +# MetaResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_schema** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**has_conditional_fields** | **bool** | | +**status** | [**LinkedAccountStatus**](LinkedAccountStatus.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelOperation.md b/docs/ModelOperation.md index d451788..e146d4a 100644 --- a/docs/ModelOperation.md +++ b/docs/ModelOperation.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **available_operations** | **[str]** | | **required_post_parameters** | **[str]** | | **supported_fields** | **[str]** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Offer.md b/docs/Offer.md index c6fc4c3..60442f6 100644 --- a/docs/Offer.md +++ b/docs/Offer.md @@ -1,6 +1,6 @@ # Offer -# The Offer Object ### Description The `Offer` object is used to represent an offer for an application. ### Usage Example Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. +# The Offer Object ### Description The `Offer` object is used to represent an offer for an application. ### Usage Example Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. ## Properties Name | Type | Description | Notes @@ -13,8 +13,9 @@ Name | Type | Description | Notes **closed_at** | **datetime, none_type** | When the offer was closed. | [optional] **sent_at** | **datetime, none_type** | When the offer was sent. | [optional] **start_date** | **datetime, none_type** | The employment start date on the offer. | [optional] -**status** | **object, none_type** | The offer's status. | [optional] +**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | The offer's status. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OffersApi.md b/docs/OffersApi.md index bc65841..7d89e86 100644 --- a/docs/OffersApi.md +++ b/docs/OffersApi.md @@ -18,6 +18,7 @@ Returns a list of `Offer` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -52,6 +53,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: creator_id = "creator_id_example" # str | If provided, will only return offers created by this user. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "application,creator" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -68,7 +70,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.offers_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, creator_id=creator_id, cursor=cursor, expand=expand, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.offers_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, creator_id=creator_id, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling OffersApi->offers_list: %s\n" % e) @@ -86,6 +88,7 @@ Name | Type | Description | Notes **creator_id** | **str**| If provided, will only return offers created by this user. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -107,6 +110,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -123,6 +127,7 @@ Returns an `Offer` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -196,6 +201,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Office.md b/docs/Office.md index 137c676..1b80d1d 100644 --- a/docs/Office.md +++ b/docs/Office.md @@ -1,6 +1,6 @@ # Office -# The Office Object ### Description The `Office` object is used to represent an office within a company. ### Usage Example Fetch from the `LIST Offices` endpoint and view the offices within a company. +# The Office Object ### Description The `Office` object is used to represent an office within a company. ### Usage Example Fetch from the `LIST Offices` endpoint and view the offices within a company. ## Properties Name | Type | Description | Notes @@ -10,6 +10,7 @@ Name | Type | Description | Notes **name** | **str, none_type** | The office's name. | [optional] **location** | **str, none_type** | The office's location. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OfficesApi.md b/docs/OfficesApi.md index a6bd591..ef852a8 100644 --- a/docs/OfficesApi.md +++ b/docs/OfficesApi.md @@ -18,6 +18,7 @@ Returns a list of `Office` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -49,6 +50,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional) created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -65,7 +67,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.offices_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.offices_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling OfficesApi->offices_list: %s\n" % e) @@ -80,6 +82,7 @@ Name | Type | Description | Notes **created_after** | **datetime**| If provided, will only return objects created after this datetime. | [optional] **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -101,6 +104,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -117,6 +121,7 @@ Returns an `Office` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -188,6 +193,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/PaginatedAccountDetailsAndActionsList.md b/docs/PaginatedAccountDetailsAndActionsList.md index de9432e..268b699 100644 --- a/docs/PaginatedAccountDetailsAndActionsList.md +++ b/docs/PaginatedAccountDetailsAndActionsList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[AccountDetailsAndActions]**](AccountDetailsAndActions.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedActivityList.md b/docs/PaginatedActivityList.md index c18b400..de4edc4 100644 --- a/docs/PaginatedActivityList.md +++ b/docs/PaginatedActivityList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Activity]**](Activity.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedApplicationList.md b/docs/PaginatedApplicationList.md index a13bfcf..0b99f1e 100644 --- a/docs/PaginatedApplicationList.md +++ b/docs/PaginatedApplicationList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Application]**](Application.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedAttachmentList.md b/docs/PaginatedAttachmentList.md index d019cb2..3a8d66b 100644 --- a/docs/PaginatedAttachmentList.md +++ b/docs/PaginatedAttachmentList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Attachment]**](Attachment.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedCandidateList.md b/docs/PaginatedCandidateList.md index 819a7bd..883a8a0 100644 --- a/docs/PaginatedCandidateList.md +++ b/docs/PaginatedCandidateList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Candidate]**](Candidate.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedDepartmentList.md b/docs/PaginatedDepartmentList.md index 0cfdb51..1174253 100644 --- a/docs/PaginatedDepartmentList.md +++ b/docs/PaginatedDepartmentList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Department]**](Department.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedEEOCList.md b/docs/PaginatedEEOCList.md index 62c75da..699033f 100644 --- a/docs/PaginatedEEOCList.md +++ b/docs/PaginatedEEOCList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[EEOC]**](EEOC.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedIssueList.md b/docs/PaginatedIssueList.md index a00734a..796c5cc 100644 --- a/docs/PaginatedIssueList.md +++ b/docs/PaginatedIssueList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Issue]**](Issue.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedJobInterviewStageList.md b/docs/PaginatedJobInterviewStageList.md index de178be..1c698b2 100644 --- a/docs/PaginatedJobInterviewStageList.md +++ b/docs/PaginatedJobInterviewStageList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[JobInterviewStage]**](JobInterviewStage.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedJobList.md b/docs/PaginatedJobList.md index 1d3a0df..0433a7c 100644 --- a/docs/PaginatedJobList.md +++ b/docs/PaginatedJobList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Job]**](Job.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedOfferList.md b/docs/PaginatedOfferList.md index c1848c8..fec8cac 100644 --- a/docs/PaginatedOfferList.md +++ b/docs/PaginatedOfferList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Offer]**](Offer.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedOfficeList.md b/docs/PaginatedOfficeList.md index 52423e8..0cc8658 100644 --- a/docs/PaginatedOfficeList.md +++ b/docs/PaginatedOfficeList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Office]**](Office.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedRejectReasonList.md b/docs/PaginatedRejectReasonList.md index 93cb103..dad7415 100644 --- a/docs/PaginatedRejectReasonList.md +++ b/docs/PaginatedRejectReasonList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[RejectReason]**](RejectReason.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedRemoteUserList.md b/docs/PaginatedRemoteUserList.md index d0ab2a2..a1cc7be 100644 --- a/docs/PaginatedRemoteUserList.md +++ b/docs/PaginatedRemoteUserList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[RemoteUser]**](RemoteUser.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedScheduledInterviewList.md b/docs/PaginatedScheduledInterviewList.md index 3fab695..44df52b 100644 --- a/docs/PaginatedScheduledInterviewList.md +++ b/docs/PaginatedScheduledInterviewList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[ScheduledInterview]**](ScheduledInterview.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedScorecardList.md b/docs/PaginatedScorecardList.md index 7dabaa5..b81112c 100644 --- a/docs/PaginatedScorecardList.md +++ b/docs/PaginatedScorecardList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Scorecard]**](Scorecard.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedSyncStatusList.md b/docs/PaginatedSyncStatusList.md index 93a6f10..03f2a15 100644 --- a/docs/PaginatedSyncStatusList.md +++ b/docs/PaginatedSyncStatusList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[SyncStatus]**](SyncStatus.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedTagList.md b/docs/PaginatedTagList.md index 8be1b05..9c667c6 100644 --- a/docs/PaginatedTagList.md +++ b/docs/PaginatedTagList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **next** | **str, none_type** | | [optional] **previous** | **str, none_type** | | [optional] **results** | [**[Tag]**](Tag.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PassthroughApi.md b/docs/PassthroughApi.md index 60cd17a..51c5c7f 100644 --- a/docs/PassthroughApi.md +++ b/docs/PassthroughApi.md @@ -17,6 +17,7 @@ Pull data from an endpoint not currently supported by Merge. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -47,14 +48,14 @@ with MergeATSClient.ApiClient(configuration) as api_client: api_instance = passthrough_api.PassthroughApi(api_client) x_account_token = "X-Account-Token_example" # str | Token identifying the end user. data_passthrough_request = DataPassthroughRequest( - method=, + method=None, path="/scooters", base_url_override="base_url_override_example", data="{"company": "Lime", "model": "Gen 2.5"}", headers={ "key": None, }, - request_format=, + request_format=None, ) # DataPassthroughRequest | # example passing only required values which don't have defaults set @@ -88,6 +89,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/PhoneNumber.md b/docs/PhoneNumber.md index 6d39661..078a709 100644 --- a/docs/PhoneNumber.md +++ b/docs/PhoneNumber.md @@ -1,12 +1,13 @@ # PhoneNumber -# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent a candidate's phone number. ### Usage Example Fetch from the `GET Candidate` endpoint and view their phone numbers. +# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent a candidate's phone number. ### Usage Example Fetch from the `GET Candidate` endpoint and view their phone numbers. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The phone number. | [optional] -**phone_number_type** | **object, none_type** | The type of phone number. | [optional] +**phone_number_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of phone number. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PhoneNumberRequest.md b/docs/PhoneNumberRequest.md index f3276bd..af0224f 100644 --- a/docs/PhoneNumberRequest.md +++ b/docs/PhoneNumberRequest.md @@ -1,12 +1,13 @@ # PhoneNumberRequest -# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent a candidate's phone number. ### Usage Example Fetch from the `GET Candidate` endpoint and view their phone numbers. +# The PhoneNumber Object ### Description The `PhoneNumber` object is used to represent a candidate's phone number. ### Usage Example Fetch from the `GET Candidate` endpoint and view their phone numbers. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The phone number. | [optional] -**phone_number_type** | **object, none_type** | The type of phone number. | [optional] +**phone_number_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of phone number. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RegenerateKeyApi.md b/docs/RegenerateKeyApi.md index 2569b55..00b137a 100644 --- a/docs/RegenerateKeyApi.md +++ b/docs/RegenerateKeyApi.md @@ -17,6 +17,7 @@ Exchange remote keys. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -79,6 +80,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/RejectReason.md b/docs/RejectReason.md index 2eca22f..11e33a1 100644 --- a/docs/RejectReason.md +++ b/docs/RejectReason.md @@ -1,6 +1,6 @@ # RejectReason -# The RejectReason Object ### Description The `RejectReason` object is used to represent a reason for rejecting an application. ### Usage Example Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. +# The RejectReason Object ### Description The `RejectReason` object is used to represent a reason for rejecting an application. ### Usage Example Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. ## Properties Name | Type | Description | Notes @@ -9,6 +9,7 @@ Name | Type | Description | Notes **remote_id** | **str, none_type** | The third-party API ID of the matching object. | [optional] **name** | **str, none_type** | The rejection reason’s name. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RejectReasonsApi.md b/docs/RejectReasonsApi.md index c93e4d3..43a0d4e 100644 --- a/docs/RejectReasonsApi.md +++ b/docs/RejectReasonsApi.md @@ -18,6 +18,7 @@ Returns a list of `RejectReason` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -49,6 +50,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional) created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -65,7 +67,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.reject_reasons_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.reject_reasons_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling RejectReasonsApi->reject_reasons_list: %s\n" % e) @@ -80,6 +82,7 @@ Name | Type | Description | Notes **created_after** | **datetime**| If provided, will only return objects created after this datetime. | [optional] **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -101,6 +104,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -117,6 +121,7 @@ Returns a `RejectReason` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -188,6 +193,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/RemoteData.md b/docs/RemoteData.md index 14d484b..e696cb6 100644 --- a/docs/RemoteData.md +++ b/docs/RemoteData.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **path** | **str** | | **data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoteDataRequest.md b/docs/RemoteDataRequest.md index c151d8e..2523d14 100644 --- a/docs/RemoteDataRequest.md +++ b/docs/RemoteDataRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **path** | **str** | | **data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoteKey.md b/docs/RemoteKey.md index 0646409..ecc8449 100644 --- a/docs/RemoteKey.md +++ b/docs/RemoteKey.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | **key** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoteKeyForRegenerationRequest.md b/docs/RemoteKeyForRegenerationRequest.md index 97cc1dc..11e0f65 100644 --- a/docs/RemoteKeyForRegenerationRequest.md +++ b/docs/RemoteKeyForRegenerationRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoteResponse.md b/docs/RemoteResponse.md index c46b04a..9e7f42d 100644 --- a/docs/RemoteResponse.md +++ b/docs/RemoteResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **status** | **int** | | **response** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | **headers** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoteUser.md b/docs/RemoteUser.md index b59a268..69cc5b4 100644 --- a/docs/RemoteUser.md +++ b/docs/RemoteUser.md @@ -1,6 +1,6 @@ # RemoteUser -# The RemoteUser Object ### Description The `RemoteUser` object is used to represent a third party user. ### Usage Example Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. +# The RemoteUser Object ### Description The `RemoteUser` object is used to represent a third party user. ### Usage Example Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. ## Properties Name | Type | Description | Notes @@ -12,8 +12,9 @@ Name | Type | Description | Notes **email** | **str, none_type** | The user's email. | [optional] **disabled** | **bool, none_type** | Whether the user's account had been disabled. | [optional] **remote_created_at** | **datetime, none_type** | When the third party's user was created. | [optional] -**access_role** | **object, none_type** | The user's role. | [optional] +**access_role** | **bool, date, datetime, dict, float, int, list, str, none_type** | The user's role. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestFormatEnum.md b/docs/RequestFormatEnum.md index 2693686..bc9081a 100644 --- a/docs/RequestFormatEnum.md +++ b/docs/RequestFormatEnum.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["JSON", "XML", ] +**value** | **str** | | must be one of ["JSON", "XML", "MULTIPART", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScheduledInterview.md b/docs/ScheduledInterview.md index 273c7d1..2faab1e 100644 --- a/docs/ScheduledInterview.md +++ b/docs/ScheduledInterview.md @@ -1,6 +1,6 @@ # ScheduledInterview -# The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. +# The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. ## Properties Name | Type | Description | Notes @@ -16,8 +16,9 @@ Name | Type | Description | Notes **end_at** | **datetime, none_type** | When the interview was ended. | [optional] **remote_created_at** | **datetime, none_type** | When the third party's interview was created. | [optional] **remote_updated_at** | **datetime, none_type** | When the third party's interview was updated. | [optional] -**status** | **object, none_type** | The interview's status. | [optional] +**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | The interview's status. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Scorecard.md b/docs/Scorecard.md index fa84801..5389e78 100644 --- a/docs/Scorecard.md +++ b/docs/Scorecard.md @@ -1,6 +1,6 @@ # Scorecard -# The Scorecard Object ### Description The `Scorecard` object is used to represent a Scorecard for an interview ### Usage Example Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. +# The Scorecard Object ### Description The `Scorecard` object is used to represent a Scorecard for an interview ### Usage Example Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. ## Properties Name | Type | Description | Notes @@ -12,8 +12,9 @@ Name | Type | Description | Notes **interviewer** | **str, none_type** | The interviewer doing the scoring. | [optional] **remote_created_at** | **datetime, none_type** | When the third party's scorecard was created. | [optional] **submitted_at** | **datetime, none_type** | When the scorecard was submitted. | [optional] -**overall_recommendation** | **object, none_type** | The inteviewer's recommendation. | [optional] +**overall_recommendation** | **bool, date, datetime, dict, float, int, list, str, none_type** | The inteviewer's recommendation. | [optional] **remote_data** | [**[RemoteData], none_type**](RemoteData.md) | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorecardsApi.md b/docs/ScorecardsApi.md index 47913c4..48df8a8 100644 --- a/docs/ScorecardsApi.md +++ b/docs/ScorecardsApi.md @@ -18,6 +18,7 @@ Returns a list of `Scorecard` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -51,6 +52,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) expand = "application,interview,interviewer" # str | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) interview_id = "interview_id_example" # str | If provided, will only return scorecards for this interview. (optional) interviewer_id = "interviewer_id_example" # str | If provided, will only return scorecards for this interviewer. (optional) @@ -69,7 +71,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.scorecards_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_remote_data=include_remote_data, interview_id=interview_id, interviewer_id=interviewer_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.scorecards_list(x_account_token, application_id=application_id, created_after=created_after, created_before=created_before, cursor=cursor, expand=expand, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, interview_id=interview_id, interviewer_id=interviewer_id, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling ScorecardsApi->scorecards_list: %s\n" % e) @@ -86,6 +88,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **expand** | **str**| Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **interview_id** | **str**| If provided, will only return scorecards for this interview. | [optional] **interviewer_id** | **str**| If provided, will only return scorecards for this interviewer. | [optional] @@ -109,6 +112,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -125,6 +129,7 @@ Returns a `Scorecard` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -198,6 +203,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/SyncStatus.md b/docs/SyncStatus.md index be1446e..72c59ed 100644 --- a/docs/SyncStatus.md +++ b/docs/SyncStatus.md @@ -9,8 +9,9 @@ Name | Type | Description | Notes **model_id** | **str** | | **last_sync_start** | **datetime** | | **next_sync_start** | **datetime** | | -**status** | **object** | | +**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | **is_initial_sync** | **bool** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SyncStatusApi.md b/docs/SyncStatusApi.md index 445b3dc..5dbb442 100644 --- a/docs/SyncStatusApi.md +++ b/docs/SyncStatusApi.md @@ -5,7 +5,6 @@ All URIs are relative to *https://api.merge.dev/api/ats/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**sync_status_list**](SyncStatusApi.md#sync_status_list) | **GET** /sync-status | -[**sync_status_resync_create**](SyncStatusApi.md#sync_status_resync_create) | **POST** /sync-status/resync | # **sync_status_list** @@ -13,11 +12,12 @@ Method | HTTP request | Description -Get syncing status. +Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `SYNCING` ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -89,81 +89,7 @@ Name | Type | Description | Notes ### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **sync_status_resync_create** -> SyncStatus sync_status_resync_create(x_account_token) - - - -Force re-sync of all models. This is only available for organizations on Merge's Grow and Expand plans. - -### Example - -* Api Key Authentication (tokenAuth): -```python -import time -import MergeATSClient -from MergeATSClient.api import sync_status_api -from MergeATSClient.model.sync_status import SyncStatus -from pprint import pprint -# Defining the host is optional and defaults to https://api.merge.dev/api/ats/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = MergeATSClient.Configuration( - host = "https://api.merge.dev/api/ats/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: tokenAuth -configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['tokenAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with MergeATSClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sync_status_api.SyncStatusApi(api_client) - x_account_token = "X-Account-Token_example" # str | Token identifying the end user. - - # example passing only required values which don't have defaults set - try: - api_response = api_instance.sync_status_resync_create(x_account_token) - pprint(api_response) - except MergeATSClient.ApiException as e: - print("Exception when calling SyncStatusApi->sync_status_resync_create: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **x_account_token** | **str**| Token identifying the end user. | - -### Return type -[**SyncStatus**](SyncStatus.md) - -### Authorization - -[tokenAuth](../README.md#tokenAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/SyncStatusStatusEnum.md b/docs/SyncStatusStatusEnum.md index 272a1b1..446b7a7 100644 --- a/docs/SyncStatusStatusEnum.md +++ b/docs/SyncStatusStatusEnum.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | | must be one of ["SYNCING", "DONE", "FAILED", ] +**value** | **str** | | must be one of ["SYNCING", "DONE", "FAILED", "DISABLED", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Tag.md b/docs/Tag.md index 5fb9e5f..0046932 100644 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -1,6 +1,6 @@ # Tag -# The Tag Object ### Description The `Tag` object is used to represent a tag for a candidate. ### Usage Example Fetch from the `LIST Tags` endpoint and view the tags used within a company. +# The Tag Object ### Description The `Tag` object is used to represent a tag for a candidate. ### Usage Example Fetch from the `LIST Tags` endpoint and view the tags used within a company. ## Properties Name | Type | Description | Notes @@ -8,6 +8,7 @@ Name | Type | Description | Notes **remote_id** | **str, none_type** | The third-party API ID of the matching object. | [optional] **name** | **str, none_type** | The tag's name. | [optional] **remote_data** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TagsApi.md b/docs/TagsApi.md index f893f95..134d058 100644 --- a/docs/TagsApi.md +++ b/docs/TagsApi.md @@ -17,6 +17,7 @@ Returns a list of `Tag` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -48,6 +49,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional) created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -64,7 +66,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.tags_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.tags_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling TagsApi->tags_list: %s\n" % e) @@ -79,6 +81,7 @@ Name | Type | Description | Notes **created_after** | **datetime**| If provided, will only return objects created after this datetime. | [optional] **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -100,6 +103,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/Url.md b/docs/Url.md index 76db17e..074a49d 100644 --- a/docs/Url.md +++ b/docs/Url.md @@ -1,12 +1,13 @@ # Url -# The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls. +# The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The site's url. | [optional] -**url_type** | **object, none_type** | The type of site. | [optional] +**url_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of site. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UrlRequest.md b/docs/UrlRequest.md index d9416de..0556684 100644 --- a/docs/UrlRequest.md +++ b/docs/UrlRequest.md @@ -1,12 +1,13 @@ # UrlRequest -# The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls. +# The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str, none_type** | The site's url. | [optional] -**url_type** | **object, none_type** | The type of site. | [optional] +**url_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | The type of site. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 5983c13..58395a5 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -18,6 +18,7 @@ Returns a list of `RemoteUser` objects. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -50,6 +51,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional) cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional) email = "email_example" # str, none_type | If provided, will only return remote users with the given email address (optional) + include_deleted_data = True # bool | Whether to include data that was deleted in the third-party service. (optional) include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional) modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional) @@ -66,7 +68,7 @@ with MergeATSClient.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.users_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, email=email, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) + api_response = api_instance.users_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, email=email, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, remote_id=remote_id) pprint(api_response) except MergeATSClient.ApiException as e: print("Exception when calling UsersApi->users_list: %s\n" % e) @@ -82,6 +84,7 @@ Name | Type | Description | Notes **created_before** | **datetime**| If provided, will only return objects created before this datetime. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **email** | **str, none_type**| If provided, will only return remote users with the given email address | [optional] + **include_deleted_data** | **bool**| Whether to include data that was deleted in the third-party service. | [optional] **include_remote_data** | **bool**| Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] **modified_after** | **datetime**| If provided, will only return objects modified after this datetime. | [optional] **modified_before** | **datetime**| If provided, will only return objects modified before this datetime. | [optional] @@ -103,6 +106,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | @@ -119,6 +123,7 @@ Returns a `RemoteUser` object with the given `id`. ### Example * Api Key Authentication (tokenAuth): + ```python import time import MergeATSClient @@ -190,6 +195,7 @@ Name | Type | Description | Notes ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | diff --git a/docs/ValidationProblemSource.md b/docs/ValidationProblemSource.md new file mode 100644 index 0000000..d45dbfc --- /dev/null +++ b/docs/ValidationProblemSource.md @@ -0,0 +1,12 @@ +# ValidationProblemSource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pointer** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WarningValidationProblem.md b/docs/WarningValidationProblem.md new file mode 100644 index 0000000..45bf95d --- /dev/null +++ b/docs/WarningValidationProblem.md @@ -0,0 +1,15 @@ +# WarningValidationProblem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | +**detail** | **str** | | +**problem_type** | **str** | | +**source** | [**ValidationProblemSource**](ValidationProblemSource.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/git_push.sh b/git_push.sh index 29d49a2..93755ce 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/setup.py b/setup.py index c27bf8e..6eda124 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "MergeATSClient" -VERSION = "1.2.0" +VERSION = "1.0.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_error_validation_problem.py b/test/test_error_validation_problem.py new file mode 100644 index 0000000..76d5ec5 --- /dev/null +++ b/test/test_error_validation_problem.py @@ -0,0 +1,38 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import MergeATSClient +from MergeATSClient.model.validation_problem_source import ValidationProblemSource +globals()['ValidationProblemSource'] = ValidationProblemSource +from MergeATSClient.model.error_validation_problem import ErrorValidationProblem + + +class TestErrorValidationProblem(unittest.TestCase): + """ErrorValidationProblem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorValidationProblem(self): + """Test ErrorValidationProblem""" + # FIXME: construct object with mandatory attributes with example values + # model = ErrorValidationProblem() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_force_resync_api.py b/test/test_force_resync_api.py new file mode 100644 index 0000000..1321860 --- /dev/null +++ b/test/test_force_resync_api.py @@ -0,0 +1,35 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import MergeATSClient +from MergeATSClient.api.force_resync_api import ForceResyncApi # noqa: E501 + + +class TestForceResyncApi(unittest.TestCase): + """ForceResyncApi unit test stubs""" + + def setUp(self): + self.api = ForceResyncApi() # noqa: E501 + + def tearDown(self): + pass + + def test_sync_status_resync_create(self): + """Test case for sync_status_resync_create + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_linked_account_status.py b/test/test_linked_account_status.py new file mode 100644 index 0000000..11f254e --- /dev/null +++ b/test/test_linked_account_status.py @@ -0,0 +1,36 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import MergeATSClient +from MergeATSClient.model.linked_account_status import LinkedAccountStatus + + +class TestLinkedAccountStatus(unittest.TestCase): + """LinkedAccountStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLinkedAccountStatus(self): + """Test LinkedAccountStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = LinkedAccountStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_meta_response.py b/test/test_meta_response.py new file mode 100644 index 0000000..f674fcb --- /dev/null +++ b/test/test_meta_response.py @@ -0,0 +1,38 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import MergeATSClient +from MergeATSClient.model.linked_account_status import LinkedAccountStatus +globals()['LinkedAccountStatus'] = LinkedAccountStatus +from MergeATSClient.model.meta_response import MetaResponse + + +class TestMetaResponse(unittest.TestCase): + """MetaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetaResponse(self): + """Test MetaResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = MetaResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_problem_source.py b/test/test_validation_problem_source.py new file mode 100644 index 0000000..47edb60 --- /dev/null +++ b/test/test_validation_problem_source.py @@ -0,0 +1,36 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import MergeATSClient +from MergeATSClient.model.validation_problem_source import ValidationProblemSource + + +class TestValidationProblemSource(unittest.TestCase): + """ValidationProblemSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testValidationProblemSource(self): + """Test ValidationProblemSource""" + # FIXME: construct object with mandatory attributes with example values + # model = ValidationProblemSource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_warning_validation_problem.py b/test/test_warning_validation_problem.py new file mode 100644 index 0000000..ffb5b69 --- /dev/null +++ b/test/test_warning_validation_problem.py @@ -0,0 +1,38 @@ +""" + Merge ATS API + + The unified API for building rich integrations with multiple Applicant Tracking System platforms. # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: hello@merge.dev + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import MergeATSClient +from MergeATSClient.model.validation_problem_source import ValidationProblemSource +globals()['ValidationProblemSource'] = ValidationProblemSource +from MergeATSClient.model.warning_validation_problem import WarningValidationProblem + + +class TestWarningValidationProblem(unittest.TestCase): + """WarningValidationProblem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWarningValidationProblem(self): + """Test WarningValidationProblem""" + # FIXME: construct object with mandatory attributes with example values + # model = WarningValidationProblem() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()